ImplicitSurfChem.cpp Source File#
ImplicitSurfChem.cpp
Go to the documentation of this file.
Declarations for the implicit integration of surface site density equations (see Kinetics Managers an...
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
vector< ThermoPhase * > m_bulkPhases
Vector of pointers to bulk phases.
Definition ImplicitSurfChem.h:237
void eval(double t, double *y, double *ydot, double *p) override
Evaluate the value of ydot[k] at the current conditions.
Definition ImplicitSurfChem.cpp:159
void setConcSpecies(const double *const vecConcSpecies)
Sets the concentrations within phases that are unknowns in the surface problem.
Definition ImplicitSurfChem.cpp:268
void setCommonState_TP(double TKelvin, double PresPa)
Sets the state variable in all thermodynamic phases (surface and surrounding bulk phases) to the inpu...
Definition ImplicitSurfChem.cpp:284
int m_ioFlag
Controls the amount of printing from this routine and underlying routines.
Definition ImplicitSurfChem.h:300
void initialize(double t0=0.0)
Must be called before calling method 'advance'.
Definition ImplicitSurfChem.cpp:124
void integrate(double t0, double t1)
Integrate from t0 to t1. The integrator is reinitialized first.
Definition ImplicitSurfChem.cpp:133
void getConcSpecies(double *const vecConcSpecies) const
Get the specifications for the problem from the values in the ThermoPhase objects for all phases.
Definition ImplicitSurfChem.cpp:252
vector< InterfaceKinetics * > m_vecKinPtrs
vector of pointers to InterfaceKinetics objects
Definition ImplicitSurfChem.h:240
unique_ptr< solveSP > m_surfSolver
Pointer to the helper method, Placid, which solves the surface problem.
Definition ImplicitSurfChem.h:291
bool m_commonTempPressForPhases
If true, a common temperature and pressure for all surface and bulk phases associated with the surfac...
Definition ImplicitSurfChem.h:295
void setTolerances(double rtol=1.e-7, double atol=1.e-14)
Set the relative and absolute integration tolerances.
Definition ImplicitSurfChem.cpp:105
vector< size_t > m_nsp
Vector of number of species in each Surface Phase.
Definition ImplicitSurfChem.h:243
void setMaxStepSize(double maxstep=0.0)
Set the maximum integration step-size.
Definition ImplicitSurfChem.cpp:97
vector< double > m_concSpecies
Temporary vector - length num species in the Kinetics object.
Definition ImplicitSurfChem.h:270
void setMaxSteps(size_t maxsteps=20000)
Set the maximum number of CVODES integration steps.
Definition ImplicitSurfChem.cpp:112
void updateState(double *y)
Set the mixture to a state consistent with solution vector y.
Definition ImplicitSurfChem.cpp:150
void getState(double *y) override
Get the current state of the solution vector.
Definition ImplicitSurfChem.cpp:88
size_t m_maxErrTestFails
maximum number of error test failures allowed
Definition ImplicitSurfChem.h:262
void integrate0(double t0, double t1)
Integrate from t0 to t1 without reinitializing the integrator.
Definition ImplicitSurfChem.cpp:144
void solvePseudoSteadyStateProblem(int ifuncOverride=-1, double timeScaleOverride=1.0)
Solve for the pseudo steady-state of the surface problem.
Definition ImplicitSurfChem.cpp:176
ImplicitSurfChem(vector< InterfaceKinetics * > k, double rtol=1.e-7, double atol=1.e-14, double maxStepSize=0, size_t maxSteps=20000, size_t maxErrTestFails=7)
Constructor for multiple surfaces.
Definition ImplicitSurfChem.cpp:18
void setMaxErrTestFails(size_t maxErrTestFails=7)
Set the maximum number of CVODES error test failures.
Definition ImplicitSurfChem.cpp:118
A kinetics manager for heterogeneous reaction mechanisms.
Definition InterfaceKinetics.h:56
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
virtual void getConcentrations(double *const c) const
Get the species concentrations (kmol/m^3).
Definition Phase.cpp:482
virtual void setConcentrations(const double *const conc)
Set the concentrations to the specified values within the phase.
Definition Phase.cpp:487
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 setState_TP(double t, double p)
Set the temperature (K) and pressure (Pa)
Definition ThermoPhase.cpp:121
Integrator * newIntegrator(const string &itype)
Create new Integrator object.
Definition Integrators.cpp:14
const int SFLUX_RESIDUAL
Need to solve the surface problem in order to calculate the surface fluxes of gas-phase species.
Definition solveSP.h:29
const int SFLUX_INITIALIZE
This assumes that the initial guess supplied to the routine is far from the correct one.
Definition solveSP.h:22
Header file for implicit surface problem solver (see Chemical Kinetics and class solveSP).
Generated by 1.9.7