Cantera  2.1.2
ConstPressureReactor.h
Go to the documentation of this file.
1 /**
2  * @file ConstPressureReactor.h
3  */
4 
5 // Copyright 2001 California Institute of Technology
6 
7 #ifndef CT_CONSTP_REACTOR_H
8 #define CT_CONSTP_REACTOR_H
9 
10 #include "Reactor.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 ConstPressureReactorType;
30  }
31 
32  virtual void getInitialConditions(doublereal t0, size_t leny,
33  doublereal* y);
34 
35  virtual void initialize(doublereal t0 = 0.0);
36  virtual void evalEqs(doublereal t, doublereal* y,
37  doublereal* ydot, doublereal* params);
38 
39  virtual void updateState(doublereal* y);
40 
41  //! Return the index in the solution vector for this reactor of the
42  //! component named *nm*. Possible values for *nm* are "m", "H", the name
43  //! of a homogeneous phase species, or the name of a surface species.
44  virtual size_t componentIndex(const std::string& nm) const;
45 };
46 
47 }
48 
49 #endif
virtual size_t componentIndex(const std::string &nm) const
Return the index in the solution vector for this reactor of the component named nm.
virtual void getInitialConditions(doublereal t0, size_t leny, doublereal *y)
Called by ReactorNet to get the initial conditions.
Class ConstPressureReactor is a class for constant-pressure reactors.
virtual void evalEqs(doublereal t, doublereal *y, doublereal *ydot, doublereal *params)
virtual void updateState(doublereal *y)
Set the state of the reactor to correspond to the state vector y.
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
virtual int type() const
Return a constant indicating the type of this Reactor.
Class Reactor is a general-purpose class for stirred reactors.
Definition: Reactor.h:39