Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BulkKinetics.h
Go to the documentation of this file.
1 /**
2  * @file BulkKinetics.h
3  * @ingroup chemkinetics
4  */
5 
6 #ifndef CT_BULKKINETICS_H
7 #define CT_BULKKINETICS_H
8 
9 #include "Kinetics.h"
10 #include "RateCoeffMgr.h"
11 
12 namespace Cantera
13 {
14 
15 class ElementaryReaction;
16 
17 //! Partial specialization of Kinetics for chemistry in a single bulk phase
18 class BulkKinetics : public Kinetics
19 {
20 public:
22  virtual Kinetics* duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const;
23 
24  virtual bool isReversible(size_t i);
25 
26  virtual void getDeltaGibbs(doublereal* deltaG);
27  virtual void getDeltaEnthalpy(doublereal* deltaH);
28  virtual void getDeltaEntropy(doublereal* deltaS);
29 
30  virtual void getDeltaSSGibbs(doublereal* deltaG);
31  virtual void getDeltaSSEnthalpy(doublereal* deltaH);
32  virtual void getDeltaSSEntropy(doublereal* deltaS);
33 
34  virtual void getRevRateConstants(doublereal* krev,
35  bool doIrreversible = false);
36 
37  virtual void addReaction(ReactionData& r);
38  virtual bool addReaction(shared_ptr<Reaction> r);
39  virtual void init();
40  virtual void finalize();
41  virtual bool ready() const;
42 
43  virtual void setMultiplier(size_t i, double f);
44 
45 
46 protected:
47  virtual void addElementaryReaction(ReactionData& r);
48  virtual void addElementaryReaction(ElementaryReaction& r);
49  virtual void modifyElementaryReaction(size_t i, ElementaryReaction& rNew);
50 
51  Rate1<Arrhenius> m_rates;
52  std::vector<size_t> m_revindex; //!< Indices of reversible reactions
53  std::vector<size_t> m_irrev; //!< Indices of irreversible reactions
54 
55  //! Difference between the global reactants order and the global products
56  //! order. Of type "double" to account for the fact that we can have real-
57  //! valued stoichiometries.
59 
60  vector_fp m_conc;
61  vector_fp m_grt;
62 
63  bool m_ROP_ok;
64  doublereal m_temp;
65 
66  bool m_finalized;
67 };
68 
69 }
70 
71 #endif
A reaction which follows mass-action kinetics with a modified Arrhenius reaction rate.
Definition: Reaction.h:77
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:285
This rate coefficient manager supports one parameterization of the rate constant of any type...
Definition: RateCoeffMgr.h:20
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
virtual void init()
Prepare the class for the addition of reactions.
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:97
Partial specialization of Kinetics for chemistry in a single bulk phase.
Definition: BulkKinetics.h:18
std::vector< size_t > m_irrev
Indices of irreversible reactions.
Definition: BulkKinetics.h:53
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
Public interface for kinetics managers.
Definition: Kinetics.h:128
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Definition: ReactionData.h:22
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:52
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
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
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
vector_fp m_dn
Difference between the global reactants order and the global products order.
Definition: BulkKinetics.h:58
virtual void finalize()
Finish adding reactions and prepare for use.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.