Cantera  2.3.0
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 http://www.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  virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
26 
27  virtual bool isReversible(size_t i);
28 
29  virtual void getDeltaGibbs(doublereal* deltaG);
30  virtual void getDeltaEnthalpy(doublereal* deltaH);
31  virtual void getDeltaEntropy(doublereal* deltaS);
32 
33  virtual void getDeltaSSGibbs(doublereal* deltaG);
34  virtual void getDeltaSSEnthalpy(doublereal* deltaH);
35  virtual void getDeltaSSEntropy(doublereal* deltaS);
36 
37  virtual void getRevRateConstants(doublereal* krev,
38  bool doIrreversible = false);
39 
40  virtual bool addReaction(shared_ptr<Reaction> r);
41  virtual void resizeSpecies();
42 
43  virtual void setMultiplier(size_t i, double f);
44  virtual void invalidateCache();
45 
46 protected:
47  virtual void addElementaryReaction(ElementaryReaction& r);
48  virtual void modifyElementaryReaction(size_t i, ElementaryReaction& rNew);
49 
50  Rate1<Arrhenius> m_rates;
51  std::vector<size_t> m_revindex; //!< Indices of reversible reactions
52  std::vector<size_t> m_irrev; //!< Indices of irreversible reactions
53 
54  //! Difference between the global reactants order and the global products
55  //! order. Of type "double" to account for the fact that we can have real-
56  //! valued stoichiometries.
58 
59  vector_fp m_conc;
60  vector_fp m_grt;
61 
62  bool m_ROP_ok;
63  doublereal m_temp;
64 };
65 
66 }
67 
68 #endif
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
Definition: Reaction.h:79
virtual void setMultiplier(size_t i, double f)
Set the multiplier for reaction i to f.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state Gibbs free energy change.
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:276
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t *> &tpVector) const
Duplication routine for objects which inherit from Kinetics.
This rate coefficient manager supports one parameterization of the rate constant of any type...
Definition: RateCoeffMgr.h:21
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:93
Partial specialization of Kinetics for chemistry in a single bulk phase.
Definition: BulkKinetics.h:21
std::vector< size_t > m_irrev
Indices of irreversible reactions.
Definition: BulkKinetics.h:52
virtual bool addReaction(shared_ptr< Reaction > r)
Add a single reaction to the mechanism.
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
Public interface for kinetics managers.
Definition: Kinetics.h:111
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
std::vector< size_t > m_revindex
Indices of reversible reactions.
Definition: BulkKinetics.h:51
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
virtual void resizeSpecies()
Resize arrays with sizes that depend on the total number of species.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction Gibbs free energy change.
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:157
vector_fp m_dn
Difference between the global reactants order and the global products order.
Definition: BulkKinetics.h:57
Namespace for the Cantera kernel.
Definition: application.cpp:29
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.