11 #ifndef CT_IMPSURFCHEM_H
12 #define CT_IMPSURFCHEM_H
74 double rtol=1.e-7,
double atol=1.e-14,
75 double maxStepSize=0,
size_t maxSteps=20000,
76 size_t maxErrTestFails=7);
94 virtual void setTolerances(
double rtol=1.e-7,
double atol=1.e-14);
114 void integrate(doublereal t0, doublereal t1);
124 void integrate0(doublereal t0, doublereal t1);
146 doublereal timeScaleOverride = 1.0);
163 virtual void eval(doublereal t, doublereal* y, doublereal* ydot,
172 virtual void getState(doublereal* y);
216 int checkMatch(std::vector<ThermoPhase*> m_vec,
ThermoPhase* thPtr);
218 void setIOFlag(
int ioFlag) {
249 std::vector<size_t> m_specStartIndex;
257 size_t m_numTotalBulkSpecies;
258 size_t m_numTotalSpecies;
260 std::vector<vector_int> pLocVec;
263 doublereal m_atol, m_rtol;
Virtual base class for ODE right-hand-side function evaluators.
Advances the surface coverages of the associated set of SurfacePhase objects in time.
void integrate0(doublereal t0, doublereal t1)
Integrate from t0 to t1 without reinitializing the integrator.
void integrate(doublereal t0, doublereal t1)
Integrate from t0 to t1. The integrator is reinitialized first.
int m_bulkSpeciesStart
Index into the species vector of the kinetics manager, pointing to the first species from the condens...
int m_mediumSpeciesStart
Index into the species vector of the kinetics manager, pointing to the first species from the surroun...
void updateState(doublereal *y)
Set the mixture to a state consistent with solution vector y.
std::vector< ThermoPhase * > m_bulkPhases
Vector of pointers to bulk phases.
void setConcSpecies(const doublereal *const vecConcSpecies)
Sets the concentrations within phases that are unknowns in the surface problem.
size_t m_nv
Total number of surface species in all surface phases.
doublereal m_maxstep
max step size
int m_ioFlag
Controls the amount of printing from this routine and underlying routines.
virtual void getState(doublereal *y)
Get the current state of the solution vector.
virtual size_t neq()
Return the number of equations.
std::vector< InterfaceKinetics * > & getObjects()
Returns a reference to the vector of pointers to the InterfaceKinetics objects.
std::unique_ptr< solveSP > m_surfSolver
Pointer to the helper method, Placid, which solves the surface problem.
std::vector< size_t > m_surfindex
index of the surface phase in each InterfaceKinetics object
bool m_commonTempPressForPhases
If true, a common temperature and pressure for all surface and bulk phases associated with the surfac...
friend class solveSS
We make the solveSS class a friend because we need to access all of the above information directly.
virtual void setTolerances(double rtol=1.e-7, double atol=1.e-14)
virtual void setMaxStepSize(double maxstep=0.0)
ImplicitSurfChem(std::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.
std::vector< SurfPhase * > m_surf
vector of pointers to surface phases.
virtual void setMaxSteps(size_t maxsteps=20000)
vector_fp m_concSpecies
Temporary vector - length num species in the Kinetics object.
void getConcSpecies(doublereal *const vecConcSpecies) const
virtual void initialize(doublereal t0=0.0)
size_t m_maxErrTestFails
maximum number of error test failures allowed
void solvePseudoSteadyStateProblem(int ifuncOverride=-1, doublereal timeScaleOverride=1.0)
Solve for the pseudo steady-state of the surface problem.
int m_surfSpeciesStart
Index into the species vector of the kinetics manager, pointing to the first species from the surface...
std::vector< size_t > m_nsp
Vector of number of species in each Surface Phase.
virtual void setMaxErrTestFails(size_t maxErrTestFails=7)
void setCommonState_TP(doublereal TKelvin, doublereal PresPa)
Sets the state variable in all thermodynamic phases (surface and surrounding bulk phases) to the inpu...
virtual void eval(doublereal t, doublereal *y, doublereal *ydot, doublereal *p)
Evaluate the value of ydot[k] at the current conditions.
std::unique_ptr< Integrator > m_integ
Pointer to the CVODE integrator.
size_t m_nmax
maximum number of steps allowed
std::vector< InterfaceKinetics * > m_vecKinPtrs
vector of pointers to InterfaceKinetics objects
Base class for a phase with thermodynamic properties.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Namespace for the Cantera kernel.
Header file for implicit surface problem solver (see Chemical Kinetics and class solveSP).