6 #ifndef CT_FLOWREACTOR_H 7 #define CT_FLOWREACTOR_H 21 return FlowReactorType;
27 virtual void getState(doublereal* y);
30 virtual void evalEqs(doublereal t, doublereal* y,
31 doublereal* ydot, doublereal* params);
34 void setMassFlowRate(doublereal mdot) {
36 m_speed = mdot/m_rho0;
39 m_P0 = m_thermo->
pressure() + m_rho0*m_speed*m_speed;
43 void setTimeConstant(doublereal tau) {
47 double speed()
const {
50 double distance()
const {
61 doublereal m_speed, m_dist, m_T;
63 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 void getInitialConditions(doublereal t0, size_t leny, doublereal *y)
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.