Boundary1D.cpp Source File#
Boundary1D.cpp
Go to the documentation of this file.
Boundary objects for one-dimensional simulations.
const AnyValue & getMetadata(const string &key) const
Get a value from the metadata applicable to the AnyMap tree containing this node.
Definition AnyMap.cpp:580
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
A wrapper for a variable whose type is determined at runtime.
Definition AnyMap.h:86
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
size_t lastPoint() const
The index of the last (that is, right-most) grid point belonging to this domain.
Definition Domain1D.h:400
shared_ptr< Solution > m_solution
Composite thermo/kinetics/transport handler.
Definition Domain1D.h:567
shared_ptr< Solution > solution() const
Return thermo/kinetics/transport manager used in the domain.
Definition Domain1D.h:366
double prevSoln(size_t n, size_t j) const
Value of component n at point j in the previous solution.
Definition Domain1D.h:441
size_t firstPoint() const
The index of the first (that is, left-most) grid point belonging to this domain.
Definition Domain1D.h:392
void needJacUpdate()
Set this if something has changed in the governing equations (for example, the value of a constant ha...
Definition Domain1D.cpp:95
virtual size_t loc(size_t j=0) const
Location of the start of the local solution vector in the global solution vector,.
Definition Domain1D.h:384
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:287
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:282
void setMoleFractions(const string &xin) override
Set the mole fractions by specifying a string.
Definition Boundary1D.cpp:122
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:241
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:173
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
Definition Boundary1D.cpp:258
ThermoPhase & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism.
Definition Kinetics.h:242
size_t nPhases() const
The number of phases participating in the reaction mechanism.
Definition Kinetics.h:184
size_t kineticsSpeciesIndex(size_t k, size_t n) const
The location of species k of phase n in species arrays.
Definition Kinetics.h:276
size_t nTotalSpecies() const
The total number of species in all phases participating in the kinetics mechanism.
Definition Kinetics.h:254
virtual void getNetProductionRates(double *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition Kinetics.cpp:363
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:406
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:373
void setMoleFractions(const string &xin) override
Set the mole fractions by specifying a string.
Definition Boundary1D.cpp:414
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:488
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:456
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
Definition Boundary1D.cpp:505
virtual void setMoleFractions(const double *const x)
Set the mole fractions to the specified values.
Definition Phase.cpp:289
void saveState(vector< double > &state) const
Save the current internal state of the phase.
Definition Phase.cpp:236
virtual size_t stateSize() const
Return size of vector defining internal state of the phase.
Definition Phase.cpp:228
void setMoleFractionsByName(const Composition &xMap)
Set the species mole fractions by name.
Definition Phase.cpp:330
const vector< double > & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
Definition Phase.cpp:395
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
Definition Phase.h:623
void setKinetics(shared_ptr< Kinetics > kin) override
Set the kinetics manager.
Definition Boundary1D.cpp:602
void resetBadValues(double *xg) override
When called, this function should reset "bad" values in the state vector such as negative species con...
Definition Boundary1D.cpp:637
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:726
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:643
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
Definition Boundary1D.cpp:745
string componentName(size_t n) const override
Name of the nth component. May be overloaded.
Definition Boundary1D.cpp:614
A container class holding arrays of state information.
Definition SolutionArray.h:33
void setLoc(int loc, bool restore=true)
Update the buffered location used to access SolutionArray entries.
Definition SolutionArray.cpp:739
AnyMap getAuxiliary(int loc)
Retrieve auxiliary data for a given location.
Definition SolutionArray.cpp:822
shared_ptr< ThermoPhase > thermo()
Retrieve associated ThermoPhase object.
Definition SolutionArray.cpp:534
static shared_ptr< SolutionArray > create(const shared_ptr< Solution > &sol, int size=0, const AnyMap &meta={})
Instantiate a new SolutionArray reference.
Definition SolutionArray.h:51
size_t rightExcessSpecies() const
Index of the species on the right boundary with the largest mass fraction.
Definition StFlow.h:311
void setGas(const double *x, size_t j)
Set the gas object state to be consistent with the solution at point j.
Definition StFlow.cpp:229
size_t leftExcessSpecies() const
Index of the species on the left boundary with the largest mass fraction.
Definition StFlow.h:306
bool isFree() const
Retrieve flag indicating whether flow is freely propagating.
Definition StFlow.h:263
bool isStrained() const
Retrieve flag indicating whether flow uses radial momentum.
Definition StFlow.h:274
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:547
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:522
void fromArray(SolutionArray &arr, double *soln) override
Restore the solution for this domain from a SolutionArray.
Definition Boundary1D.cpp:554
void show(std::ostream &s, const double *x) override
Print the solution.
Definition Boundary1D.cpp:562
double size(size_t k) const
Returns the number of sites occupied by one molecule of species k.
Definition SurfPhase.h:221
void setCoverages(const double *theta)
Set the surface site fractions to a specified state.
Definition SurfPhase.cpp:215
void setCoveragesNoNorm(const double *theta)
Set the surface site fractions to a specified state.
Definition SurfPhase.cpp:231
void getCoverages(double *theta) const
Return a vector of surface coverages.
Definition SurfPhase.cpp:249
shared_ptr< SolutionArray > asArray(const double *soln) const override
Save the state of this domain as a SolutionArray.
Definition Boundary1D.cpp:339
void eval(size_t jg, double *xg, double *rg, integer *diagg, double rdt) override
Evaluate the residual function at point j.
Definition Boundary1D.cpp:300
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
virtual void setState_TP(double t, double p)
Set the temperature (K) and pressure (Pa)
Definition ThermoPhase.cpp:121
const AnyMap & input() const
Access input data associated with the phase description.
Definition ThermoPhase.cpp:1152
void writelog(const string &fmt, const Args &... args)
Write a formatted message to the screen.
Definition global.h:175
Generated by 1.9.7