Cantera  2.5.1
BulkKinetics.h
Go to the documentation of this file.
1 /**
2  * @file BulkKinetics.h
3  * @ingroup chemkinetics
4  */
5 
6 // This file is part of Cantera. See License.txt in the top-level directory or
7 // at https://cantera.org/license.txt for license and copyright information.
8 
9 #ifndef CT_BULKKINETICS_H
10 #define CT_BULKKINETICS_H
11 
12 #include "Kinetics.h"
13 #include "RateCoeffMgr.h"
14 
15 namespace Cantera
16 {
17 
18 class ElementaryReaction;
19 
20 //! Partial specialization of Kinetics for chemistry in a single bulk phase
21 class BulkKinetics : public Kinetics
22 {
23 public:
25 
26  virtual bool isReversible(size_t i);
27 
28  virtual void getDeltaGibbs(doublereal* deltaG);
29  virtual void getDeltaEnthalpy(doublereal* deltaH);
30  virtual void getDeltaEntropy(doublereal* deltaS);
31 
32  virtual void getDeltaSSGibbs(doublereal* deltaG);
33  virtual void getDeltaSSEnthalpy(doublereal* deltaH);
34  virtual void getDeltaSSEntropy(doublereal* deltaS);
35 
36  virtual void getRevRateConstants(doublereal* krev,
37  bool doIrreversible = false);
38 
39  virtual bool addReaction(shared_ptr<Reaction> r);
40  virtual void resizeSpecies();
41 
42  virtual void setMultiplier(size_t i, double f);
43  virtual void invalidateCache();
44 
45 protected:
46  virtual void addElementaryReaction(ElementaryReaction& r);
47  virtual void modifyElementaryReaction(size_t i, ElementaryReaction& rNew);
48 
49  Rate1<Arrhenius> m_rates;
50  std::vector<size_t> m_revindex; //!< Indices of reversible reactions
51  std::vector<size_t> m_irrev; //!< Indices of irreversible reactions
52 
53  //! Difference between the global reactants order and the global products
54  //! order. Of type "double" to account for the fact that we can have real-
55  //! valued stoichiometries.
57 
58  vector_fp m_conc;
59  vector_fp m_grt;
60 
61  bool m_ROP_ok;
62  doublereal m_temp;
63 };
64 
65 }
66 
67 #endif
Cantera::BulkKinetics::setMultiplier
virtual void setMultiplier(size_t i, double f)
Set the multiplier for reaction i to f.
Definition: BulkKinetics.cpp:142
Cantera::BulkKinetics::getDeltaSSEnthalpy
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
Definition: BulkKinetics.cpp:58
RateCoeffMgr.h
Cantera::BulkKinetics::getDeltaSSEntropy
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction.
Definition: BulkKinetics.cpp:69
Kinetics.h
Cantera::Kinetics
Public interface for kinetics managers.
Definition: Kinetics.h:110
Cantera::BulkKinetics::m_irrev
std::vector< size_t > m_irrev
Indices of irreversible reactions.
Definition: BulkKinetics.h:51
Cantera::vector_fp
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:180
Cantera::BulkKinetics::addReaction
virtual bool addReaction(shared_ptr< Reaction > r)
Add a single reaction to the mechanism.
Definition: BulkKinetics.cpp:101
Cantera::BulkKinetics::isReversible
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
Definition: BulkKinetics.cpp:19
Cantera::ElementaryReaction
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
Definition: Reaction.h:83
Cantera::BulkKinetics::m_revindex
std::vector< size_t > m_revindex
Indices of reversible reactions.
Definition: BulkKinetics.h:50
Cantera::BulkKinetics::getDeltaGibbs
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction Gibbs free energy change.
Definition: BulkKinetics.cpp:23
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:101
Cantera::BulkKinetics::m_dn
vector_fp m_dn
Difference between the global reactants order and the global products order.
Definition: BulkKinetics.h:56
Cantera::BulkKinetics
Partial specialization of Kinetics for chemistry in a single bulk phase.
Definition: BulkKinetics.h:21
Cantera::BulkKinetics::getRevRateConstants
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
Definition: BulkKinetics.cpp:82
Cantera::Rate1
This rate coefficient manager supports one parameterization of the rate constant of any type.
Definition: RateCoeffMgr.h:21
Cantera::BulkKinetics::getDeltaEntropy
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
Definition: BulkKinetics.cpp:39
Cantera::BulkKinetics::resizeSpecies
virtual void resizeSpecies()
Resize arrays with sizes that depend on the total number of species.
Definition: BulkKinetics.cpp:135
Cantera::Kinetics::thermo
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism.
Definition: Kinetics.h:227
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:263
Cantera::BulkKinetics::getDeltaEnthalpy
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
Definition: BulkKinetics.cpp:31
Cantera::BulkKinetics::getDeltaSSGibbs
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state Gibbs free energy change.
Definition: BulkKinetics.cpp:47