IdealGasMoleReactor.cpp Source File#
IdealGasMoleReactor.cpp
Go to the documentation of this file.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Header file for class ReactorSurface.
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
double outletSpeciesMassFlowRate(size_t k)
Mass flow rate (kg/s) of outlet species k.
Definition FlowDevice.cpp:72
void setThermoMgr(ThermoPhase &thermo) override
Specify the mixture contained in the reactor.
Definition IdealGasMoleReactor.cpp:20
void eval(double t, double *LHS, double *RHS) override
Evaluate the reactor governing equations.
Definition IdealGasMoleReactor.cpp:96
size_t componentIndex(const string &nm) const override
Return the index in the solution vector for this reactor of the component named nm.
Definition IdealGasMoleReactor.cpp:53
Eigen::SparseMatrix< double > jacobian() override
Calculate an approximate Jacobian to accelerate preconditioned solvers.
Definition IdealGasMoleReactor.cpp:156
void getState(double *y) override
Get the the current state of the reactor.
Definition IdealGasMoleReactor.cpp:29
string componentName(size_t k) override
Return the name of the solution component with index i.
Definition IdealGasMoleReactor.cpp:67
void updateState(double *y) override
Set the state of the reactor to correspond to the state vector y.
Definition IdealGasMoleReactor.cpp:82
virtual void getNetProductionRates(double *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition Kinetics.cpp:363
void evalSurfaces(double *LHS, double *RHS, double *sdot) override
Evaluate terms related to surface reactions.
Definition MoleReactor.cpp:61
void getSurfaceInitialConditions(double *y) override
Get initial conditions for SurfPhase objects attached to this reactor.
Definition MoleReactor.cpp:21
void getMoles(double *y)
Get moles of the system from mass fractions stored by thermo object.
Definition MoleReactor.cpp:141
void setMassFromMoles(double *y)
Set internal mass variable based on moles given.
Definition MoleReactor.cpp:151
virtual void addSurfaceJacobian(vector< Eigen::Triplet< double > > &triplets)
For each surface in the reactor, update vector of triplets with all relevant surface jacobian derivat...
Definition MoleReactor.cpp:85
string componentName(size_t k) override
Return the name of the solution component with index i.
Definition MoleReactor.cpp:298
void updateSurfaceState(double *y) override
Update the state of SurfPhase objects attached to this reactor.
Definition MoleReactor.cpp:44
void restoreState(const vector< double > &state)
Restore a state saved on a previous call to saveState.
Definition Phase.cpp:260
void setState_TD(double t, double rho)
Set the internally stored temperature (K) and density (kg/m^3)
Definition Phase.cpp:377
const vector< double > & inverseMolecularWeights() const
Return a const reference to the internal vector of molecular weights.
Definition Phase.cpp:400
virtual void setMolesNoTruncate(const double *const N)
Set the state of the object with moles in [kmol].
Definition Phase.cpp:528
FlowDevice & outlet(size_t n=0)
Return a reference to the n-th outlet FlowDevice connected to this reactor.
Definition ReactorBase.cpp:114
FlowDevice & inlet(size_t n=0)
Return a reference to the n-th inlet FlowDevice connected to this reactor.
Definition ReactorBase.cpp:110
virtual void setThermoMgr(ThermoPhase &thermo)
Specify the mixture contained in the reactor.
Definition ReactorBase.cpp:20
double time()
Current value of the simulation time [s], for reactor networks that are solved in the time domain.
Definition ReactorNet.cpp:68
Kinetics * m_kin
Pointer to the homogeneous Kinetics object that handles the reactions.
Definition Reactor.h:277
vector< Eigen::Triplet< double > > m_jac_trips
Vector of triplets representing the jacobian.
Definition Reactor.h:302
vector< double > m_sdot
Production rates of gas phase species on surfaces [kmol/s].
Definition Reactor.h:287
virtual size_t speciesIndex(const string &nm) const
Return the index in the solution vector for this reactor of the species named nm, in either the homog...
Definition Reactor.cpp:426
virtual void updateConnected(bool updatePressure)
Update the state information needed by connected reactors, flow devices, and reactor walls.
Definition Reactor.cpp:184
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
virtual void getPartialMolarCp(double *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
Definition ThermoPhase.h:832
string type() const override
String indicating the thermodynamic model implemented.
Definition ThermoPhase.h:399
virtual void getPartialMolarIntEnergies(double *ubar) const
Return an array of partial molar internal energies for the species in the mixture.
Definition ThermoPhase.h:821
Eigen::SparseMatrix< double > netProductionRates_ddCi()
Calculate derivatives for species net production rates with respect to species concentration at const...
Definition Kinetics.cpp:515
Various templated functions that carry out common vector and polynomial operations (see Templated Arr...
Generated by