6 #ifndef CT_FLOWREACTOR_H 7 #define CT_FLOWREACTOR_H 21 return FlowReactorType;
24 virtual void getState(doublereal* y);
27 virtual void evalEqs(doublereal t, doublereal* y,
28 doublereal* ydot, doublereal* params);
31 void setMassFlowRate(doublereal mdot) {
33 m_speed = mdot/m_rho0;
36 m_P0 = m_thermo->
pressure() + m_rho0*m_speed*m_speed;
40 void setTimeConstant(doublereal tau) {
44 double speed()
const {
47 double distance()
const {
58 doublereal m_speed, m_dist, m_T;
60 doublereal m_rho0, m_speed0, m_P0, m_h0;
virtual void getState(doublereal *y)
Get the the current state of the reactor.
doublereal temperature() const
Temperature (K).
virtual void updateState(doublereal *y)
Set the state of the reactor to correspond to the state vector y.
Adiabatic flow in a constant-area duct.
virtual doublereal density() const
Density (kg/m^3).
doublereal enthalpy_mass() const
Specific enthalpy. Units: J/kg.
virtual int type() const
Return a constant indicating the type of this Reactor.
virtual void evalEqs(doublereal t, doublereal *y, doublereal *ydot, doublereal *params)
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
virtual size_t componentIndex(const std::string &nm) const
Return the index in the solution vector for this reactor of the component named nm.
Namespace for the Cantera kernel.
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
Class Reactor is a general-purpose class for stirred reactors.