Cantera  2.1.2
IdealGasConstPressureReactor.h
1 /**
2  * @file ConstPressureReactor.h
3  */
4 
5 // Copyright 2001 California Institute of Technology
6 
7 #ifndef CT_IDEALGASCONSTP_REACTOR_H
8 #define CT_IDEALGASCONSTP_REACTOR_H
9 
10 #include "ConstPressureReactor.h"
11 
12 namespace Cantera
13 {
14 
15 /**
16  * Class ConstPressureReactor is a class for constant-pressure reactors. The
17  * reactor may have an arbitrary number of inlets and outlets, each of which
18  * may be connected to a "flow device" such as a mass flow controller, a
19  * pressure regulator, etc. Additional reactors may be connected to the other
20  * end of the flow device, allowing construction of arbitrary reactor
21  * networks.
22  */
24 {
25 public:
27 
28  virtual int type() const {
29  return IdealGasConstPressureReactorType;
30  }
31 
32  virtual void setThermoMgr(ThermoPhase& thermo);
33 
34  virtual void getInitialConditions(doublereal t0, size_t leny,
35  doublereal* y);
36 
37  virtual void initialize(doublereal t0 = 0.0);
38  virtual void evalEqs(doublereal t, doublereal* y,
39  doublereal* ydot, doublereal* params);
40 
41  virtual void updateState(doublereal* y);
42 
43  //! Return the index in the solution vector for this reactor of the
44  //! component named *nm*. Possible values for *nm* are "m", "T", the name
45  //! of a homogeneous phase species, or the name of a surface species.
46  virtual size_t componentIndex(const std::string& nm) const;
47 
48 protected:
49  vector_fp m_hk; //!< Species molar enthalpies
50 };
51 }
52 
53 #endif
Class ConstPressureReactor is a class for constant-pressure reactors.
virtual void getInitialConditions(doublereal t0, size_t leny, doublereal *y)
Called by ReactorNet to get the initial conditions.
virtual void setThermoMgr(ThermoPhase &thermo)
Specify the mixture contained in the reactor.
vector_fp m_hk
Species molar enthalpies.
virtual void updateState(doublereal *y)
Set the state of the reactor to correspond to the state vector y.
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:101
virtual size_t componentIndex(const std::string &nm) const
Return the index in the solution vector for this reactor of the component named nm.
Class ConstPressureReactor is a class for constant-pressure reactors.
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:165
virtual void evalEqs(doublereal t, doublereal *y, doublereal *ydot, doublereal *params)
virtual int type() const
Return a constant indicating the type of this Reactor.
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.