6 #ifndef CT_FLOWREACTOR_H
7 #define CT_FLOWREACTOR_H
29 "To be changed after Cantera 2.5. "
30 "Return string instead of magic number; use "
31 "FlowReactor::typeStr during transition");
32 return FlowReactorType;
35 virtual void getState(doublereal* y);
38 virtual void evalEqs(doublereal t, doublereal* y,
39 doublereal* ydot, doublereal* params);
42 void setMassFlowRate(doublereal mdot) {
44 m_speed = mdot/m_rho0;
47 m_P0 = m_thermo->
pressure() + m_rho0*m_speed*m_speed;
51 void setTimeConstant(doublereal tau) {
55 double speed()
const {
58 double distance()
const {
69 doublereal m_speed, m_dist, m_T;
71 doublereal m_rho0, m_speed0, m_P0, m_h0;
Adiabatic flow in a constant-area duct.
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 updateState(doublereal *y)
Set the state of the reactor to correspond to the state vector y.
virtual std::string typeStr() const
String indicating the reactor model implemented.
virtual void getState(doublereal *y)
Get the the current state of the reactor.
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
virtual void evalEqs(doublereal t, doublereal *y, doublereal *ydot, doublereal *params)
virtual double density() const
Density (kg/m^3).
doublereal temperature() const
Temperature (K).
virtual double pressure() const
Return the thermodynamic pressure (Pa).
Class Reactor is a general-purpose class for stirred reactors.
doublereal enthalpy_mass() const
Specific enthalpy. Units: J/kg.
Namespace for the Cantera kernel.