FlowReactor.cpp Source File#
FlowReactor.cpp
Go to the documentation of this file.
Headers for the DenseMatrix object, which deals with dense rectangular matrices and description of th...
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
A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operat...
Definition DenseMatrix.h:55
vector< double > m_sdot_temp
temporary storage for surface species production rates
Definition FlowReactor.h:152
double surfaceAreaToVolumeRatio() const
The ratio of the reactor's surface area to volume ratio [m^-1].
Definition FlowReactor.cpp:222
void setMassFlowRate(double mdot)
Set the mass flow rate through the reactor [kg/s].
Definition FlowReactor.cpp:210
double m_ss_rtol
steady-state relative tolerance, used to determine initial surface coverages
Definition FlowReactor.h:156
int m_max_ss_error_fails
maximum number of steady-state integrator error test failures
Definition FlowReactor.h:162
void getConstraints(double *constraints) override
Given a vector of length neq(), mark which variables should be considered algebraic constraints.
Definition FlowReactor.cpp:333
size_t componentIndex(const string &nm) const override
Return the index in the solution vector for this reactor of the component named nm.
Definition FlowReactor.cpp:340
void getStateDae(double *y, double *ydot) override
Get the current state and derivative vector of the reactor for a DAE solver.
Definition FlowReactor.cpp:20
int m_max_ss_steps
maximum number of steady-state coverage integrator-steps
Definition FlowReactor.h:160
void evalDae(double t, double *y, double *ydot, double *residual) override
Evaluate the reactor governing equations.
Definition FlowReactor.cpp:246
string componentName(size_t k) override
Return the name of the solution component with index i.
Definition FlowReactor.cpp:358
void syncState() override
Set the state of the reactor to correspond to the state of the associated ThermoPhase object.
Definition FlowReactor.cpp:185
void updateState(double *y) override
Set the state of the reactor to correspond to the state vector y.
Definition FlowReactor.cpp:193
void updateSurfaceState(double *y) override
Update the state of SurfPhase objects attached to this reactor.
Definition FlowReactor.cpp:233
double m_ss_atol
steady-state absolute tolerance, used to determine initial surface coverages
Definition FlowReactor.h:158
vector< double > m_hk
temporary storage for species partial molar enthalpies
Definition FlowReactor.h:154
A kinetics manager for heterogeneous reaction mechanisms.
Definition InterfaceKinetics.h:56
void advanceCoverages(double tstep, double rtol=1.e-7, double atol=1.e-14, double maxStepSize=0, size_t maxSteps=20000, size_t maxErrTestFails=7)
Advance the surface coverages in time.
Definition InterfaceKinetics.cpp:518
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
virtual void getNetProductionRates(double *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Definition Kinetics.cpp:363
void restoreState(const vector< double > &state)
Restore a state saved on a previous call to saveState.
Definition Phase.cpp:260
virtual void setMassFractions_NoNorm(const double *const y)
Set the mass fractions to the specified values without normalizing.
Definition Phase.cpp:355
void saveState(vector< double > &state) const
Save the current internal state of the phase.
Definition Phase.cpp:236
const vector< double > & molecularWeights() const
Return a const reference to the internal vector of molecular weights.
Definition Phase.cpp:395
virtual void syncState()
Set the state of the reactor to correspond to the state of the associated ThermoPhase object.
Definition ReactorBase.cpp:30
virtual void evalSurfaces(double *LHS, double *RHS, double *sdot)
Evaluate terms related to surface reactions.
Definition Reactor.cpp:287
Kinetics * m_kin
Pointer to the homogeneous Kinetics object that handles the reactions.
Definition Reactor.h:277
vector< double > m_sdot
Production rates of gas phase species on surfaces [kmol/s].
Definition Reactor.h:287
virtual void getSurfaceInitialConditions(double *y)
Get initial conditions for SurfPhase objects attached to this reactor.
Definition Reactor.cpp:75
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
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
Definition SurfPhase.h:98
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
virtual void getPartialMolarEnthalpies(double *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
Definition ThermoPhase.h:801
virtual void setState_TP(double t, double p)
Set the temperature (K) and pressure (Pa)
Definition ThermoPhase.cpp:121
double cp_mass() const
Specific heat at constant pressure. Units: J/kg/K.
Definition ThermoPhase.h:1048
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
int solve(DenseMatrix &A, double *b, size_t nrhs, size_t ldb)
Solve Ax = b. Array b is overwritten on exit with x.
Definition DenseMatrix.cpp:133
Generated by 1.9.7