22 AqueousKinetics::AqueousKinetics(
thermo_t* thermo) :
37 m_rates.update(T, log(T), &
m_rfn[0]);
58 m_grt[k] -= rt * logStandConc_k;
65 for (
size_t i = 0; i <
m_revindex.size(); i++) {
70 for (
size_t i = 0; i !=
m_irrev.size(); ++i) {
84 m_grt[k] -= rt * logStandConc_k;
91 for (
size_t i = 0; i <
m_ii; i++) {
92 kc[i] = exp(-
m_rkcn[i]*rrt);
100 void AqueousKinetics::updateROP()
128 for (
size_t j = 0; j !=
m_ii; ++j) {
146 for (
size_t i = 0; i <
m_ii; i++) {
154 addElementaryReaction(r);
167 addElementaryReaction(dynamic_cast<ElementaryReaction&>(*r));
170 "Invalid reaction type: " +
int2str(r->reaction_type));
178 modifyElementaryReaction(i, dynamic_cast<ElementaryReaction&>(*rNew));
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
Kinetics manager for elementary aqueous-phase chemistry.
StoichManagerN m_revProductStoich
Stoichiometry manager for the products of reversible reactions.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
vector_fp m_ropr
Reverse rate-of-progress for each reaction.
int reactionType
Type of the reaction.
virtual void assignShallowPointers(const std::vector< thermo_t * > &tpVector)
Reassign the pointers within the Kinetics object.
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
AqueousKinetics(thermo_t *thermo=0)
Constructor. Creates an empty reaction mechanism.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
virtual void getRevReactionDelta(const doublereal *g, doublereal *dg)
Given an array of species properties 'g', return in array 'dg' the change in this quantity in the rev...
vector_fp m_ropnet
Net rate-of-progress for each reaction.
virtual void getEquilibriumConstants(doublereal *kc)
Return a vector of Equilibrium constants.
void multiply_each(OutputIter x_begin, OutputIter x_end, InputIter y_begin)
Multiply each entry in x by the corresponding entry in y.
vector_fp m_ropf
Forward rate-of-progress for each reaction.
Base class for a phase with thermodynamic properties.
Partial specialization of Kinetics for chemistry in a single bulk phase.
std::vector< size_t > m_irrev
Indices of irreversible reactions.
vector_fp m_rfn
Forward rate constant for each reaction.
StoichManagerN m_reactantStoich
Stoichiometry manager for the reactants for each reaction.
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...
void _update_rates_T()
Update temperature-dependent portions of reaction rates.
Base class for exceptions thrown by Cantera classes.
std::vector< size_t > m_revindex
Indices of reversible reactions.
vector_fp m_rkcn
Reciprocal of the equilibrium constant in concentration units.
void updateKc()
Update the equilibrium constants in molar units.
size_t nSpecies() const
Returns the number of species in the phase.
doublereal temperature() const
Temperature (K).
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
void _update_rates_C()
Update properties that depend on concentrations.
Templates for operations on vector-like objects.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
size_t m_ii
Number of reactions in the mechanism.
const int ELEMENTARY_RXN
A reaction with a rate coefficient that depends only on temperature and voltage that also obeys mass-...
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual void getReactionDelta(const doublereal *property, doublereal *deltaProperty)
Change in species properties.