Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtraGlobalRxn.h
1 /**
2  * @file ReactingVolDomain.h
3  *
4  */
5 /*
6  * Copyright (2005) Sandia Corporation. Under the terms of
7  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
8  * U.S. Government retains certain rights in this software.
9  */
10 
11 #ifndef EXTRAGLOBALRXN_H
12 #define EXTRAGLOBALRXN_H
13 
15 #include <string>
16 #include <vector>
17 
18 namespace Cantera
19 {
20 
21 //! Class describing an extra global reaction, which is defined as
22 //! a linear combination of actuals reactions, global or mass-action, creating a global stoichiometric result
23 /*!
24  * This is useful for defining thermodynamics of global processes that occur
25  * on a surface or in a homogeneous phase.
26  *
27  * The class is set up via the function setupElemRxnVector(RxnVector, specialSpecies) which defines
28  * the vector of stoichiometric coefficients representing the base reaction to combine in order to
29  * achieve the global result that's to be calculated. specialSpecies is the index of the species
30  * within the kinetics object that is used to identify the global reaction. Rates of progress
31  * are defined in terms of the production rate of the special species.
32  *
33  * @deprecated Unfinished implementation to be removed after Cantera 2.2.
34  */
36 {
37 
38 public:
39  //! Constructor takes a default kinetics pointer
40  /*!
41  * @param[in] k_ptr Pointer to a Kinetics class that will be used as the basis
42  * for constructing this class.
43  */
44  ExtraGlobalRxn(Kinetics* k_ptr);
45 
46  //! Destructor
47  virtual ~ExtraGlobalRxn() {}
48 
49  void setupElemRxnVector(double* RxnVector,
50  int specialSpecies = -1);
51  std::string reactionString();
52  double deltaSpecValue(double* speciesVectorProperty);
53 
54  std::vector<int>& reactants();
55  std::vector<int>& products();
56  bool isReversible();
57 
58  double ROPValue(double* ROPKinVector);
59  double FwdROPValue(double* FwdROPElemKinVector, double* RevROPElemKinVector);
60  double RevROPValue(double* FwdROPElemKinVector, double* RevROPElemKinVector);
61 
62  double reactantStoichCoeff(int kKin);
63  double productStoichCoeff(int kKin);
64  bool m_ThisIsASurfaceRxn;
65  double deltaRxnVecValue(double* rxnVectorProperty);
66 
67  //! This kinetics operator is associated with just one
68  //! homogeneous phase, associated with tpList[0] phase
69  /*!
70  * Kinetics object pointer
71  */
73 
74  //! This kinetics operator is associated with multiple
75  //! homogeneous and surface phases.
76  /*!
77  * This object owns the Kinetics object
78  */
80 
81  int m_nKinSpecies;
82 
83  //! Number of reactants in the global reaction
85 
86  //! Vector of reactants that make up the global reaction
87  /*!
88  * This is a list of reactants using the kinetic species index
89  */
90  std::vector<int> m_Reactants;
91 
92  //! Vector of reactant stoichiometries that make up the global reaction
93  /*!
94  * This is a list of reactant stoichiometries. The species index is given in
95  * the member m_Reactants using the kinetic species index.
96  */
97  std::vector<doublereal> m_ReactantStoich;
98 
99  int m_nProducts;
100  std::vector<int> m_Products;
101  std::vector<doublereal> m_ProductStoich;
102 
103  int m_nNetSpecies;
104  std::vector<int> m_NetSpecies;
105  std::vector<doublereal> m_netStoich;
106 
107  int m_nRxns;
108  std::vector<doublereal> m_ElemRxnVector;
109 
110  int m_SpecialSpecies;
111  bool m_SpecialSpeciesProduct;
112  int m_SS_index;
113 
114  int iphaseKin;
115  bool m_ok;
116  bool m_reversible;
117 
118 
119 };
120 }
121 #endif
virtual ~ExtraGlobalRxn()
Destructor.
int m_nReactants
Number of reactants in the global reaction.
std::vector< doublereal > m_ReactantStoich
Vector of reactant stoichiometries that make up the global reaction.
A kinetics manager for heterogeneous reaction mechanisms.
Public interface for kinetics managers.
Definition: Kinetics.h:128
Class describing an extra global reaction, which is defined as a linear combination of actuals reacti...
ExtraGlobalRxn(Kinetics *k_ptr)
Constructor takes a default kinetics pointer.
Cantera::Kinetics * m_kinetics
This kinetics operator is associated with just one homogeneous phase, associated with tpList[0] phase...
std::vector< int > m_Reactants
Vector of reactants that make up the global reaction.
Cantera::InterfaceKinetics * m_InterfaceKinetics
This kinetics operator is associated with multiple homogeneous and surface phases.