Cantera 2.6.0
|
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors. More...
#include <FlowDevice.h>
Public Member Functions | |
FlowDevice (const FlowDevice &)=delete | |
FlowDevice & | operator= (const FlowDevice &)=delete |
virtual std::string | typeStr () const |
String indicating the flow device implemented. More... | |
virtual std::string | type () const |
String indicating the flow device implemented. More... | |
double | massFlowRate () |
Mass flow rate (kg/s). More... | |
virtual void | updateMassFlowRate (double time) |
Update the mass flow rate at time 'time'. More... | |
double | outletSpeciesMassFlowRate (size_t k) |
Mass flow rate (kg/s) of outlet species k. More... | |
double | enthalpy_mass () |
specific enthalpy More... | |
bool | install (ReactorBase &in, ReactorBase &out) |
Install a flow device between two reactors. More... | |
virtual bool | ready () |
ReactorBase & | in () const |
Return a reference to the upstream reactor. More... | |
const ReactorBase & | out () const |
Return a const reference to the downstream reactor. More... | |
virtual void | setPressureFunction (Func1 *f) |
Set a function of pressure that is used in determining the mass flow rate through the device. More... | |
virtual void | setTimeFunction (Func1 *g) |
Set a function of time that is used in determining the mass flow rate through the device. More... | |
Protected Attributes | |
double | m_mdot |
Func1 * | m_pfunc |
Function set by setPressureFunction; used by updateMassFlowRate. More... | |
Func1 * | m_tfunc |
Function set by setTimeFunction; used by updateMassFlowRate. More... | |
double | m_coeff |
Coefficient set by derived classes; used by updateMassFlowRate. More... | |
Private Attributes | |
size_t | m_nspin |
size_t | m_nspout |
ReactorBase * | m_in |
ReactorBase * | m_out |
std::vector< size_t > | m_in2out |
std::vector< size_t > | m_out2in |
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.
Definition at line 23 of file FlowDevice.h.
FlowDevice | ( | ) |
Definition at line 14 of file FlowDevice.cpp.
|
inlinevirtual |
Definition at line 28 of file FlowDevice.h.
|
inlinevirtual |
String indicating the flow device implemented.
Usually corresponds to the name of the derived class.
Reimplemented in MassFlowController, PressureController, and Valve.
Definition at line 35 of file FlowDevice.h.
References Cantera::warn_deprecated().
|
inlinevirtual |
String indicating the flow device implemented.
Usually corresponds to the name of the derived class.
Reimplemented in MassFlowController, PressureController, and Valve.
Definition at line 43 of file FlowDevice.h.
|
inline |
Mass flow rate (kg/s).
Definition at line 48 of file FlowDevice.h.
References Cantera::Undef.
Referenced by ConstPressureReactor::eval(), IdealGasConstPressureReactor::eval(), IdealGasReactor::eval(), and PressureController::updateMassFlowRate().
|
inlinevirtual |
Update the mass flow rate at time 'time'.
This must be overloaded in subclassess to update m_mdot.
Reimplemented in MassFlowController, PressureController, and Valve.
Definition at line 59 of file FlowDevice.h.
Referenced by PressureController::updateMassFlowRate().
double outletSpeciesMassFlowRate | ( | size_t | k | ) |
Mass flow rate (kg/s) of outlet species k.
Returns zero if this species is not present in the upstream mixture.
Definition at line 59 of file FlowDevice.cpp.
References Cantera::npos.
Referenced by ConstPressureReactor::eval(), IdealGasConstPressureReactor::eval(), and IdealGasReactor::eval().
double enthalpy_mass | ( | ) |
specific enthalpy
Definition at line 71 of file FlowDevice.cpp.
Referenced by ConstPressureReactor::eval(), IdealGasConstPressureReactor::eval(), and IdealGasReactor::eval().
bool install | ( | ReactorBase & | in, |
ReactorBase & | out | ||
) |
Install a flow device between two reactors.
in | Upstream reactor. |
out | Downstream reactor. |
Definition at line 18 of file FlowDevice.cpp.
References ReactorBase::addOutlet(), Phase::nSpecies(), Phase::speciesIndex(), and Phase::speciesName().
|
inlinevirtual |
Definition at line 75 of file FlowDevice.h.
|
inline |
Return a reference to the upstream reactor.
Definition at line 80 of file FlowDevice.h.
Referenced by PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
inline |
Return a const reference to the downstream reactor.
Definition at line 85 of file FlowDevice.h.
Referenced by PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
virtual |
Set a function of pressure that is used in determining the mass flow rate through the device.
The evaluation of mass flow depends on the derived flow device class.
Reimplemented in MassFlowController.
Definition at line 49 of file FlowDevice.cpp.
|
virtual |
Set a function of time that is used in determining the mass flow rate through the device.
The evaluation of mass flow depends on the derived flow device class.
Reimplemented in PressureController.
Definition at line 54 of file FlowDevice.cpp.
|
protected |
Definition at line 100 of file FlowDevice.h.
|
protected |
Function set by setPressureFunction; used by updateMassFlowRate.
Definition at line 103 of file FlowDevice.h.
Referenced by PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
protected |
Function set by setTimeFunction; used by updateMassFlowRate.
Definition at line 106 of file FlowDevice.h.
Referenced by Valve::updateMassFlowRate().
|
protected |
Coefficient set by derived classes; used by updateMassFlowRate.
Definition at line 109 of file FlowDevice.h.
Referenced by MassFlowController::getMassFlowCoeff(), PressureController::getPressureCoeff(), Valve::getValveCoeff(), MassFlowController::setMassFlowCoeff(), PressureController::setPressureCoeff(), Valve::setValveCoeff(), PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
private |
Definition at line 112 of file FlowDevice.h.
|
private |
Definition at line 112 of file FlowDevice.h.
|
private |
Definition at line 113 of file FlowDevice.h.
|
private |
Definition at line 114 of file FlowDevice.h.
|
private |
Definition at line 115 of file FlowDevice.h.
|
private |
Definition at line 115 of file FlowDevice.h.