8#ifndef CT_BULKKINETICS_H
9#define CT_BULKKINETICS_H
34 bool addReaction(shared_ptr<Reaction> r,
bool resize=
true)
override;
35 void addThirdBody(shared_ptr<Reaction> r);
40 void invalidateCache()
override;
85 void updateROP()
override;
118 void process_ddT(
const span<const double> in, span<double> drop);
123 void process_ddP(
const span<const double> in, span<double> drop);
131 span<double> drop,
bool mass_action=
true);
167 bool m_jac_skip_falloff;
168 double m_jac_rtol_delta;
170 bool m_ROP_ok =
false;
174 vector<double> m_rbuf1;
175 vector<double> m_rbuf2;
177 vector<double> m_sbuf0;
178 vector<double> m_state;
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
A map of string keys to values whose type can vary at runtime.
Specialization of Kinetics for chemistry in a single bulk phase.
bool addReaction(shared_ptr< Reaction > r, bool resize=true) override
Add a single reaction to the mechanism.
Eigen::SparseMatrix< double > netRatesOfProgress_ddX() override
Calculate derivatives for net rates-of-progress with respect to species mole fractions at constant te...
void applyEquilibriumConstants(span< double > rop)
Multiply rate with inverse equilibrium constant.
string kineticsType() const override
Identifies the Kinetics manager type.
Eigen::SparseMatrix< double > revRatesOfProgress_ddCi() override
Calculate derivatives for forward rates-of-progress with respect to species concentration at constant...
void getRevRatesOfProgress_ddP(span< double > drop) override
Calculate derivatives for reverse rates-of-progress with respect to pressure at constant temperature,...
void process_ddT(const span< const double > in, span< double > drop)
Process temperature derivative.
Eigen::SparseMatrix< double > calculateCompositionDerivatives(StoichManagerN &stoich, span< const double > in, bool ddX=true)
Process derivatives.
void getDeltaEnthalpy(span< double > deltaH) override
Return the vector of values for the reactions change in enthalpy.
void getEquilibriumConstants(span< double > kc) override
Return a vector of Equilibrium constants.
Eigen::SparseMatrix< double > fwdRatesOfProgress_ddX() override
Calculate derivatives for forward rates-of-progress with respect to species mole fractions at constan...
void getFwdRatesOfProgress_ddT(span< double > drop) override
Calculate derivatives for forward rates-of-progress with respect to temperature at constant pressure,...
vector< double > m_phys_conc
Physical concentrations, as calculated by ThermoPhase::getConcentrations.
void getRevRatesOfProgress_ddC(span< double > drop) override
Calculate derivatives for reverse rates-of-progress with respect to molar concentration at constant t...
Eigen::SparseMatrix< double > revRatesOfProgress_ddX() override
Calculate derivatives for reverse rates-of-progress with respect to species mole fractions at constan...
void getNetRatesOfProgress_ddT(span< double > drop) override
Calculate derivatives for net rates-of-progress with respect to temperature at constant pressure,...
void getNetRatesOfProgress_ddP(span< double > drop) override
Calculate derivatives for net rates-of-progress with respect to pressure at constant temperature,...
void assertDerivativesValid(const string &name)
Helper function ensuring that all rate derivatives can be calculated.
void getFwdRateConstants(span< double > kfwd) override
Return the forward rate constants.
void process_ddC(StoichManagerN &stoich, span< const double > in, span< double > drop, bool mass_action=true)
Process concentration (molar density) derivative.
void applyEquilibriumConstants_ddT(span< double > drkcn)
Multiply rate with scaled temperature derivatives of the inverse equilibrium constant.
void setMultiplier(size_t i, double f) override
Set the multiplier for reaction i to f.
vector< double > m_dn
Difference between the global reactants order and the global products order.
void process_ddP(const span< const double > in, span< double > drop)
Process pressure derivative.
void getDeltaSSGibbs(span< double > deltaG) override
Return the vector of values for the reaction standard state Gibbs free energy change.
void processThirdBodies(span< double > rop)
Multiply rate with third-body collider concentrations.
bool m_jac_skip_third_bodies
Derivative settings.
void resizeSpecies() override
Resize arrays with sizes that depend on the total number of species.
vector< double > m_grt
Standard chemical potentials for each species.
vector< double > m_act_conc
Activity concentrations, as calculated by ThermoPhase::getActivityConcentrations.
void getFwdRateConstants_ddC(span< double > dkfwd) override
Calculate derivatives for forward rate constants with respect to molar concentration at constant temp...
void getDerivativeSettings(AnyMap &settings) const override
Retrieve derivative settings.
void getNetRatesOfProgress_ddC(span< double > drop) override
Calculate derivatives for net rates-of-progress with respect to molar concentration at constant tempe...
Eigen::SparseMatrix< double > fwdRatesOfProgress_ddCi() override
Calculate derivatives for forward rates-of-progress with respect to species concentration at constant...
void modifyReaction(size_t i, shared_ptr< Reaction > rNew) override
Modify the rate expression associated with a reaction.
void getRevRateConstants(span< double > krev, bool doIrreversible=false) override
Return the reverse rate constants.
vector< double > m_rbuf0
Buffers for partial rop results with length nReactions()
span< const double > thirdBodyConcentrations() const override
Provide direct access to current third-body concentration values.
void getDeltaSSEnthalpy(span< double > deltaH) override
Return the vector of values for the change in the standard state enthalpies of reaction.
void getFwdRatesOfProgress_ddP(span< double > drop) override
Calculate derivatives for forward rates-of-progress with respect to pressure at constant temperature,...
void getDeltaEntropy(span< double > deltaS) override
Return the vector of values for the reactions change in entropy.
ThirdBodyCalc m_multi_concm
used with MultiRate evaluator
void getDeltaSSEntropy(span< double > deltaS) override
Return the vector of values for the change in the standard state entropies for each reaction.
void resizeReactions() override
Finalize Kinetics object and associated objects.
void getFwdRateConstants_ddP(span< double > dkfwd) override
Calculate derivatives for forward rate constants with respect to pressure at constant temperature,...
void getRevRatesOfProgress_ddT(span< double > drop) override
Calculate derivatives for reverse rates-of-progress with respect to temperature at constant pressure,...
void getThirdBodyConcentrations(span< double > concm) override
Return a vector of values of effective concentrations of third-body collision partners of any reactio...
Eigen::SparseMatrix< double > netRatesOfProgress_ddCi() override
Calculate derivatives for net rates-of-progress with respect to species concentration at constant tem...
void getFwdRateConstants_ddT(span< double > dkfwd) override
Calculate derivatives for forward rate constants with respect to temperature at constant pressure,...
void getDeltaGibbs(span< double > deltaG) override
Return the vector of values for the reaction Gibbs free energy change.
vector< double > m_concm
Third body concentrations.
vector< double > m_kf0
Forward rate constants without perturbation.
void setDerivativeSettings(const AnyMap &settings) override
Set/modify derivative settings.
void getFwdRatesOfProgress_ddC(span< double > drop) override
Calculate derivatives for forward rates-of-progress with respect to molar concentration at constant t...
Public interface for kinetics managers.
This class handles operations involving the stoichiometric coefficients on one side of a reaction (re...
Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencie...
Namespace for the Cantera kernel.