9 #ifndef CT_AQUEOUSKINETICS_H
10 #define CT_AQUEOUSKINETICS_H
70 return cAqueousKinetics;
85 std::copy(m_ropf.begin(), m_ropf.end(), fwdROP);
90 std::copy(m_ropr.begin(), m_ropr.end(), revROP);
95 std::copy(m_ropnet.begin(), m_ropnet.end(), netROP);
132 return m_index[i].first;
140 if (std::find(m_revindex.begin(), m_revindex.end(), i)
141 < m_revindex.end()) {
150 bool doIrreversible =
false);
159 virtual bool ready()
const;
161 virtual void update_T();
163 virtual void update_C();
167 const std::vector<grouplist_t>& reactantGroups(
size_t i) {
170 const std::vector<grouplist_t>& productGroups(
size_t i) {
192 Rate1<Arrhenius> m_rates;
194 mutable std::map<size_t, std::pair<int, size_t> > m_index;
196 std::vector<size_t> m_irrev;
198 ReactionStoichMgr m_rxnstoich;
200 std::vector<size_t> m_fwdOrder;
205 std::map<size_t, std::vector<grouplist_t> > m_rgroups;
206 std::map<size_t, std::vector<grouplist_t> > m_pgroups;
208 std::vector<int> m_rxntype;
210 mutable std::vector<std::map<size_t, doublereal> > m_rrxn;
211 mutable std::vector<std::map<size_t, doublereal> > m_prxn;
220 std::vector<size_t> m_revindex;
222 std::vector<std::string> m_rxneqn;
242 size_t reactionNumber() {
245 std::vector<std::map<int, doublereal> > m_stoich;
251 void installGroups(
size_t irxn,
const std::vector<grouplist_t>& r,
252 const std::vector<grouplist_t>& p);
259 void registerReaction(
size_t rxnNumber,
int type,
size_t loc) {
260 m_index[rxnNumber] = std::pair<int, size_t>(
type, loc);
virtual void getNetProductionRates(size_t nsp, const doublereal *ropnet, doublereal *w)
Species net production rates.
Kinetics manager for elementary aqueous-phase chemistry.
virtual void init()
Prepare the class for the addition of reactions.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
virtual void getDestructionRates(doublereal *ddot)
Species destruction rates [kmol/m^3/s or kmol/m^2/s].
virtual void getDestructionRates(size_t nSpecies, const doublereal *fwdRatesOfProgress, const doublereal *revRatesOfProgress, doublereal *destructionRates)
Species destruction rates.
virtual void getRevRatesOfProgress(doublereal *revROP)
Return the Reverse rates of progress of the reactions.
Various templated functions that carry out common vector operations (see Templated Utility Functions)...
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
virtual void getCreationRates(size_t nSpecies, const doublereal *fwdRatesOfProgress, const doublereal *revRatesOfProgress, doublereal *creationRates)
Species creation rates.
Header file declaring class ReactionStoichMgr.
size_t m_kk
The number of species in all of the phases that participate in this kinetics mechanism.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction gibbs free energy change.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
AqueousKinetics(thermo_t *thermo=0)
Constructor. Creates an empty reaction mechanism.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
virtual std::string reactionString(size_t i) const
Return a string representing the reaction.
virtual void finalize()
Finish adding reactions and prepare for use.
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
virtual void getEquilibriumConstants(doublereal *kc)
Return a vector of Equilibrium constants.
virtual void getCreationRates(doublereal *cdot)
Species creation rates [kmol/m^3/s or kmol/m^2/s].
Base class for a phase with thermodynamic properties.
virtual void getNetRatesOfProgress(doublereal *netROP)
Net rates of progress.
virtual doublereal reactantStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a reactant in reaction i.
vector_fp m_dn
Difference between the input global reactants order and the input global products order...
Public interface for kinetics managers.
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
void updateKc()
Update the equilibrium constants in molar units.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
virtual int type() const
Identifies the kinetics manager type.
virtual void getNetProductionRates(doublereal *net)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual void getFwdRatesOfProgress(doublereal *fwdROP)
Return the forward rates of progress of the reactions.
size_t m_ii
Number of reactions in the mechanism.
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
virtual doublereal productStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a product in reaction i.
virtual int reactionType(size_t i) const
Flag specifying the type of reaction.
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state gibbs free energy change.