193 virtual int type()
const;
303 for (
size_t p = 0; p < np; p++) {
372 const std::string& ph)
const;
417 err(
"getFwdRatesOfProgress");
429 err(
"getRevRatesOfProgress");
440 err(
"getNetRatesOfProgress");
453 err(
"getEquilibriumConstants");
473 doublereal* deltaProperty) {
474 err(
"getReactionDelta");
486 err(
"getDeltaGibbs");
500 err(
"getDeltaElectrochemPotentials");
512 err(
"getDeltaEnthalpy");
524 err(
"getDeltaEntropy");
537 err(
"getDeltaSSGibbs");
550 err(
"getDeltaSSEnthalpy");
563 err(
"getDeltaSSEntropy");
578 err(
"getCreationRates");
589 err(
"getDestructionRates");
601 err(
"getNetProductionRates");
615 err(
"reactantStoichCoeff");
626 err(
"productStoichCoeff");
639 err(
"reactantOrder");
664 err(
"getActivityConcentrations");
673 virtual const std::vector<size_t>&
reactants(
size_t i)
const {
683 virtual const std::vector<size_t>&
products(
size_t i)
const {
717 err(
"reactionStd::String");
730 err(
"getFwdRateConstants");
745 bool doIrreversible =
false) {
746 err(
"getFwdRateConstants");
758 err(
"getActivationEnergies");
814 virtual const std::vector<grouplist_t>& reactantGroups(
size_t i) {
819 virtual const std::vector<grouplist_t>& productGroups(
size_t i) {
883 doublereal* phase_data);
979 void err(
const std::string& m)
const;
virtual void getDeltaElectrochemPotentials(doublereal *deltaM)
Return the vector of values for the reaction electrochemical free energy change.
virtual void getReactionDelta(const doublereal *property, doublereal *deltaProperty)
Change in species properties.
virtual void getDestructionRates(doublereal *ddot)
Species destruction rates [kmol/m^3/s or kmol/m^2/s].
virtual void getCreationRates(doublereal *cdot)
Species creation rates [kmol/m^3/s or kmol/m^2/s].
std::vector< thermo_t * > m_thermo
m_thermo is a vector of pointers to ThermoPhase objects that are involved with this kinetics operator...
void incrementRxnCount()
Increment the number of reactions in the mechanism by one.
std::vector< std::vector< size_t > > m_reactants
This is a vector of vectors containing the reactants for each reaction.
virtual void assignShallowPointers(const std::vector< thermo_t * > &tpVector)
Reassign the pointers within the Kinetics object.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
size_t m_kk
The number of species in all of the phases that participate in this kinetics mechanism.
std::vector< size_t > m_start
m_start is a vector of integers specifying the beginning position for the species vector for the n'th...
const size_t npos
index returned by functions to indicate "no position"
virtual void getNetProductionRates(doublereal *wdot)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
std::string kineticsSpeciesName(size_t k) const
Return the name of the kth species in the kinetics manager.
void selectPhase(const doublereal *data, const thermo_t *phase, doublereal *phase_data)
virtual const std::vector< size_t > & products(size_t i) const
Returns a read-only reference to the vector of product index numbers for reaction i...
std::vector< grouplist_t > m_dummygroups
Vector of group lists.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state gibbs free energy change.
size_t nTotalSpecies() const
The total number of species in all phases participating in the kinetics mechanism.
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
doublereal multiplier(size_t i) const
The current value of the multiplier for reaction i.
Kinetics()
Default constructor.
size_t reactionPhaseIndex()
Phase where the reactions occur.
virtual doublereal reactantOrder(size_t k, size_t i) const
Reactant order of species k in reaction i.
virtual doublereal productStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a product in reaction i.
void setMultiplier(size_t i, doublereal f)
Set the multiplier for reaction i to f.
virtual void getEquilibriumConstants(doublereal *kc)
Return a vector of Equilibrium constants.
virtual void getNetRatesOfProgress(doublereal *netROP)
Net rates of progress.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction gibbs free energy change.
virtual void getActivationEnergies(doublereal *E)
Return the activation energies in Kelvin.
Base class for a phase with thermodynamic properties.
virtual void getRevRatesOfProgress(doublereal *revROP)
Return the Reverse rates of progress of the reactions.
virtual void init()
Prepare the class for the addition of reactions.
void checkPhaseIndex(size_t m) const
Check that the specified phase index is in range Throws an exception if m is greater than nPhases() ...
size_t surfacePhaseIndex()
This returns the integer index of the phase which has ThermoPhase type cSurf.
size_t nPhases() const
The number of phases participating in the reaction mechanism.
thermo_t & speciesPhase(const std::string &nm)
This function looks up the name of a species and returns a reference to the ThermoPhase object of the...
void checkSpeciesArraySize(size_t mm) const
Check that an array size is at least nSpecies() Throws an exception if kk is less than nSpecies()...
void err(const std::string &m) const
Function indicating that a function inherited from the base class hasn't had a definition assigned to...
void checkSpeciesIndex(size_t k) const
Check that the specified species index is in range Throws an exception if k is greater than nSpecies(...
vector_fp m_perturb
Vector of perturbation factors for each reaction's rate of progress vector.
Public interface for kinetics managers.
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
virtual doublereal productOrder(int k, int i) const
product Order of species k in reaction i.
virtual doublereal reactantStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a reactant in reaction i.
virtual void getFwdRatesOfProgress(doublereal *fwdROP)
Return the forward rates of progress of the reactions.
std::map< std::string, size_t > m_phaseindex
Mapping of the phase id, i.e., the id attribute in the xml phase element to the position of the phase...
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
Kinetics & operator=(const Kinetics &right)
Assignment operator.
size_t kineticsSpeciesIndex(size_t k, size_t n) const
The location of species k of phase n in species arrays.
virtual const std::vector< size_t > & reactants(size_t i) const
Returns a read-only reference to the vector of reactant index numbers for reaction i...
size_t nSpecies() const
Returns the number of species in the phase.
virtual void getActivityConcentrations(doublereal *const conc)
Get the vector of activity concentrations used in the kinetics object.
size_t m_mindim
number of spatial dimensions of lowest-dimensional phase.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
thermo_t & speciesPhase(size_t k)
This function takes as an argument the kineticsSpecies index (i.e., the list index in the list of spe...
void checkReactionIndex(size_t m) const
Check that the specified reaction index is in range Throws an exception if i is greater than nReactio...
size_t speciesPhaseIndex(size_t k)
This function takes as an argument the kineticsSpecies index (i.e., the list index in the list of spe...
std::vector< std::vector< size_t > > m_products
This is a vector of vectors containing the products for each reaction.
void checkReactionArraySize(size_t ii) const
Check that an array size is at least nReactions() Throws an exception if ii is less than nReactions()...
size_t m_ii
Number of reactions in the mechanism.
size_t nReactions() const
Number of reactions in the reaction mechanism.
virtual int type() const
Identifies the kinetics manager type.
size_t m_surfphase
Index in the list of phases of the one surface phase.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
virtual std::string reactionString(size_t i) const
Return a string representing the reaction.
size_t m_rxnphase
Phase Index where reactions are assumed to be taking place.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
virtual int reactionType(size_t i) const
Flag specifying the type of reaction.
virtual void finalize()
Finish adding reactions and prepare for use.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).
virtual void addPhase(thermo_t &thermo)
Add a phase to the kinetics manager object.
virtual ~Kinetics()
Destructor.
void checkPhaseArraySize(size_t mm) const
Check that an array size is at least nPhases() Throws an exception if mm is less than nPhases()...
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
size_t phaseIndex(const std::string &ph)
Return the phase index of a phase in the list of phases defined within the object.
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...