Cantera
2.1.2
|
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors. More...
#include <FlowDevice.h>
Public Member Functions | |
int | type () |
Return an integer indicating the type of flow device. More... | |
doublereal | massFlowRate (double time=-999.0) |
virtual void | updateMassFlowRate (doublereal time) |
Update the mass flow rate at time 'time'. More... | |
doublereal | outletSpeciesMassFlowRate (size_t k) |
doublereal | 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 | setParameters (int n, doublereal *coeffs) |
set parameters More... | |
void | setFunction (Cantera::Func1 *f) |
Set a function of a single variable that is used in determining the mass flow rate through the device. More... | |
void | setMassFlowRate (doublereal mdot) |
Set the fixed mass flow rate (kg/s) through the flow device. More... | |
Protected Attributes | |
doublereal | m_mdot |
Cantera::Func1 * | m_func |
vector_fp | m_coeffs |
int | m_type |
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 28 of file FlowDevice.h.
|
inline |
Return an integer indicating the type of flow device.
Definition at line 38 of file FlowDevice.h.
|
inline |
Mass flow rate (kg/s).
Definition at line 45 of file FlowDevice.h.
References FlowDevice::updateMassFlowRate().
Referenced by PressureController::updateMassFlowRate().
|
inlinevirtual |
Update the mass flow rate at time 'time'.
This must be overloaded in subclassess to update m_mdot.
Reimplemented in Valve, PressureController, and MassFlowController.
Definition at line 54 of file FlowDevice.h.
Referenced by FlowDevice::massFlowRate().
doublereal 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 48 of file FlowDevice.cpp.
References ReactorBase::massFraction(), and Cantera::npos.
doublereal enthalpy_mass | ( | ) |
specific enthalpy
Definition at line 60 of file FlowDevice.cpp.
References ReactorBase::enthalpy_mass().
bool install | ( | ReactorBase & | in, |
ReactorBase & | out | ||
) |
Install a flow device between two reactors.
in | Upstream reactor. |
out | Downstream reactor. |
Definition at line 9 of file FlowDevice.cpp.
References ReactorBase::addInlet(), ReactorBase::addOutlet(), ReactorBase::contents(), FlowDevice::in(), Phase::nSpecies(), FlowDevice::out(), Phase::speciesIndex(), and Phase::speciesName().
|
inline |
Return a reference to the upstream reactor.
Definition at line 77 of file FlowDevice.h.
Referenced by ReactorNet::initialize(), FlowDevice::install(), PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
inline |
Return a const reference to the downstream reactor.
Definition at line 82 of file FlowDevice.h.
Referenced by ReactorNet::initialize(), FlowDevice::install(), PressureController::updateMassFlowRate(), and Valve::updateMassFlowRate().
|
inlinevirtual |
set parameters
Definition at line 87 of file FlowDevice.h.
void setFunction | ( | Cantera::Func1 * | f | ) |
Set a function of a single variable that is used in determining the mass flow rate through the device.
The meaning of this function depends on the parameterization of the derived type.
Definition at line 43 of file FlowDevice.cpp.
|
inline |
Set the fixed mass flow rate (kg/s) through the flow device.
Definition at line 98 of file FlowDevice.h.