7 #ifndef CT_FLOWREACTOR_H
8 #define CT_FLOWREACTOR_H
24 return FlowReactorType;
31 virtual void evalEqs(doublereal t, doublereal* y,
32 doublereal* ydot, doublereal* params);
35 void setMassFlowRate(doublereal mdot) {
37 m_speed = mdot/m_rho0;
40 m_P0 = m_thermo->
pressure() + m_rho0*m_speed*m_speed;
44 void setTimeConstant(doublereal tau) {
48 double speed()
const {
51 double distance()
const {
62 doublereal m_speed, m_dist, m_T;
64 doublereal m_rho0, m_speed0, m_P0, m_h0;
virtual doublereal density() const
Density (kg/m^3).
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 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 evalEqs(doublereal t, doublereal *y, doublereal *ydot, doublereal *params)
virtual void getInitialConditions(doublereal t0, size_t leny, doublereal *y)
Called by ReactorNet to get the initial conditions.
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
doublereal temperature() const
Temperature (K).
doublereal enthalpy_mass() const
Specific enthalpy.
virtual int type() const
Return a constant indicating the type of this Reactor.
virtual void initialize(doublereal t0=0.0)
Initialize the reactor.
Class Reactor is a general-purpose class for stirred reactors.