10 BulkKinetics::BulkKinetics(
thermo_t* thermo) :
19 bool BulkKinetics::isReversible(
size_t i) {
20 return std::find(m_revindex.begin(), m_revindex.end(), i) < m_revindex.end();
23 void BulkKinetics::getDeltaGibbs(doublereal* deltaG)
26 thermo().getChemPotentials(m_grt.data());
28 getReactionDelta(m_grt.data(), deltaG);
31 void BulkKinetics::getDeltaEnthalpy(doublereal* deltaH)
34 thermo().getPartialMolarEnthalpies(m_grt.data());
36 getReactionDelta(m_grt.data(), deltaH);
39 void BulkKinetics::getDeltaEntropy(doublereal* deltaS)
42 thermo().getPartialMolarEntropies(m_grt.data());
44 getReactionDelta(m_grt.data(), deltaS);
47 void BulkKinetics::getDeltaSSGibbs(doublereal* deltaG)
53 thermo().getStandardChemPotentials(m_grt.data());
55 getReactionDelta(m_grt.data(), deltaG);
58 void BulkKinetics::getDeltaSSEnthalpy(doublereal* deltaH)
61 thermo().getEnthalpy_RT(m_grt.data());
62 for (
size_t k = 0; k < m_kk; k++) {
63 m_grt[k] *= thermo().RT();
66 getReactionDelta(m_grt.data(), deltaH);
69 void BulkKinetics::getDeltaSSEntropy(doublereal* deltaS)
74 thermo().getEntropy_R(m_grt.data());
75 for (
size_t k = 0; k < m_kk; k++) {
79 getReactionDelta(m_grt.data(), deltaS);
82 void BulkKinetics::getRevRateConstants(doublereal* krev,
bool doIrreversible)
86 getFwdRateConstants(krev);
89 getEquilibriumConstants(m_ropnet.data());
90 for (
size_t i = 0; i < nReactions(); i++) {
91 krev[i] /= m_ropnet[i];
95 for (
size_t i = 0; i < nReactions(); i++) {
101 bool BulkKinetics::addReaction(shared_ptr<Reaction> r)
103 bool added = Kinetics::addReaction(r);
108 for (
const auto& sp : r->products) {
111 for (
const auto& sp : r->reactants) {
118 m_revindex.push_back(nReactions()-1);
120 m_irrev.push_back(nReactions()-1);
127 m_rates.install(nReactions()-1, r.rate);
130 void BulkKinetics::modifyElementaryReaction(
size_t i, ElementaryReaction& rNew)
132 m_rates.replace(i, rNew.rate);
135 void BulkKinetics::resizeSpecies()
137 Kinetics::resizeSpecies();
142 void BulkKinetics::setMultiplier(
size_t i,
double f) {
143 Kinetics::setMultiplier(i, f);
147 void BulkKinetics::invalidateCache()
149 Kinetics::invalidateCache();
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
ThermoPhase thermo_t
typedef for the ThermoPhase class