9 #ifndef CT_GASKINETICS_H
10 #define CT_GASKINETICS_H
73 std::copy(m_ropf.begin(), m_ropf.end(), fwdROP);
78 std::copy(m_ropr.begin(), m_ropr.end(), revROP);
83 std::copy(m_ropnet.begin(), m_ropnet.end(), netROP);
108 return m_index[i].first;
116 if (std::find(m_revindex.begin(), m_revindex.end(), i)
117 < m_revindex.end()) {
127 bool doIrreversible =
false);
135 virtual bool ready()
const;
140 const std::vector<grouplist_t>& reactantGroups(
size_t i) {
143 const std::vector<grouplist_t>& productGroups(
size_t i) {
160 std::vector<size_t> m_fallindx;
162 Rate1<Arrhenius> m_falloff_low_rates;
163 Rate1<Arrhenius> m_falloff_high_rates;
164 Rate1<Arrhenius> m_rates;
166 mutable std::map<size_t, std::pair<int, size_t> > m_index;
168 FalloffMgr m_falloffn;
170 ThirdBodyMgr<Enhanced3BConc> m_3b_concm;
171 ThirdBodyMgr<Enhanced3BConc> m_falloff_concm;
173 std::vector<size_t> m_irrev;
175 Rate1<Plog> m_plog_rates;
176 Rate1<ChebyshevRate> m_cheb_rates;
178 ReactionStoichMgr m_rxnstoich;
180 std::vector<size_t> m_fwdOrder;
185 std::map<size_t, std::vector<grouplist_t> > m_rgroups;
186 std::map<size_t, std::vector<grouplist_t> > m_pgroups;
188 std::vector<int> m_rxntype;
190 mutable std::vector<std::map<size_t, doublereal> > m_rrxn;
191 mutable std::vector<std::map<size_t, doublereal> > m_prxn;
200 std::vector<size_t> m_revindex;
202 std::vector<std::string> m_rxneqn;
206 doublereal m_logp_ref;
207 doublereal m_logc_ref;
208 doublereal m_logStandConc;
226 void processFalloffReactions();
230 size_t reactionNumber() {
233 std::vector<std::map<int, doublereal> > m_stoich;
243 void installGroups(
size_t irxn,
const std::vector<grouplist_t>& r,
244 const std::vector<grouplist_t>& p);
249 void registerReaction(
size_t rxnNumber,
int type_,
size_t loc) {
250 m_index[rxnNumber] = std::pair<int, size_t>(type_, loc);
virtual std::string reactionString(size_t i) const
Return a string representing the reaction.
vector_fp m_dn
Difference between the input global reactants order and the input global products order...
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...
Header file declaring class ReactionStoichMgr.
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
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.
virtual void getNetProductionRates(doublereal *net)
Species net production rates [kmol/m^3/s or kmol/m^2/s].
Kinetics manager for elementary gas-phase chemistry.
virtual void update_rates_T()
Update temperature-dependent portions of reaction rates and falloff functions.
Base class for a phase with thermodynamic properties.
virtual void getEquilibriumConstants(doublereal *kc)
Return a vector of Equilibrium constants.
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
virtual void getDestructionRates(doublereal *ddot)
Species destruction rates [kmol/m^3/s or kmol/m^2/s].
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
virtual void getCreationRates(doublereal *cdot)
Species creation rates [kmol/m^3/s or kmol/m^2/s].
virtual doublereal reactantStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a reactant in reaction i.
void updateKc()
Update the equilibrium constants in molar units.
Public interface for kinetics managers.
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
virtual doublereal productStoichCoeff(size_t k, size_t i) const
Stoichiometric coefficient of species k as a product in reaction i.
GasKinetics(thermo_t *thermo=0)
Constructor.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
virtual void getFwdRatesOfProgress(doublereal *fwdROP)
Return the forward rates of progress of the reactions.
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
virtual void getNetRatesOfProgress(doublereal *netROP)
Net rates of progress.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
virtual void update_rates_C()
Update properties that depend on concentrations.
GasKinetics & operator=(const GasKinetics &right)
Assignment operator.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state gibbs free energy change.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction gibbs free energy change.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual int type() const
Identifies the kinetics manager type.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
doublereal m_pres
Last pressure at which rates were evaluated.
size_t m_ii
Number of reactions in the mechanism.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
virtual int reactionType(size_t i) const
Flag specifying the type of reaction.
virtual void finalize()
Finish adding reactions and prepare for use.