18 AqueousKinetics::AqueousKinetics(
thermo_t* thermo) :
33 m_rates.update(T, log(T),
m_rfn.data());
58 doublereal rrt = 1.0 /
thermo().
RT();
59 for (
size_t i = 0; i <
m_revindex.size(); i++) {
64 for (
size_t i = 0; i !=
m_irrev.size(); ++i) {
83 doublereal rrt = 1.0 /
thermo().
RT();
85 kc[i] = exp(-
m_rkcn[i]*rrt);
93 void AqueousKinetics::updateROP()
151 addElementaryReaction(dynamic_cast<ElementaryReaction&>(*r));
154 "Invalid reaction type: {}", r->reaction_type);
162 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.
vector_fp m_ropr
Reverse rate-of-progress for each reaction.
doublereal temperature() const
Temperature (K).
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics 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 getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
size_t nSpecies() const
Returns the number of species in the phase.
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.
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
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.
virtual bool addReaction(shared_ptr< Reaction > r)
Add a single reaction to the mechanism.
StoichManagerN m_reactantStoich
Stoichiometry manager for the reactants for each reaction.
virtual void assignShallowPointers(const std::vector< thermo_t *> &tpVector)
Reassign the pointers within the Kinetics object.
vector_fp m_perturb
Vector of perturbation factors for each reaction's rate of progress vector.
Public interface for kinetics managers.
void _update_rates_T()
Update temperature-dependent portions of reaction rates.
virtual bool addReaction(shared_ptr< Reaction > r)
Add a single reaction to the mechanism.
Base class for exceptions thrown by Cantera classes.
std::vector< size_t > m_revindex
Indices of reversible reactions.
size_t nReactions() const
Number of reactions in the reaction 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.
vector_fp m_rkcn
Reciprocal of the equilibrium constant in concentration units.
void updateKc()
Update the equilibrium constants in molar units.
void _update_rates_C()
Update properties that depend on concentrations.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
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 getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Namespace for the Cantera kernel.
virtual void getReactionDelta(const doublereal *property, doublereal *deltaProperty)
Change in species properties.