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
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Partial specialization of Kinetics for chemistry in a single bulk phase.
Definition: BulkKinetics.h:22
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state Gibbs free energy change.
std::vector< size_t > m_revindex
Indices of reversible reactions.
Definition: BulkKinetics.h:50
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
virtual void setMultiplier(size_t i, double f)
Set the multiplier for reaction i to f.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
vector_fp m_dn
Difference between the global reactants order and the global products order.
Definition: BulkKinetics.h:56
virtual bool addReaction(shared_ptr< Reaction > r)
Add a single reaction to the mechanism.
std::vector< size_t > m_irrev
Indices of irreversible reactions.
Definition: BulkKinetics.h:51
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction.
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction Gibbs free energy change.
virtual void resizeSpecies()
Resize arrays with sizes that depend on the total number of species.
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
Definition: Reaction.h:84
Public interface for kinetics managers.
Definition: Kinetics.h:111
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
This rate coefficient manager supports one parameterization of the rate constant of any type.
Definition: RateCoeffMgr.h:22
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:102
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
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:264