Cantera
3.0.0
|
A class for flow controllers where the flow rate is equal to the flow rate of a primary mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet. More...
#include <flowControllers.h>
A class for flow controllers where the flow rate is equal to the flow rate of a primary mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet.
Definition at line 65 of file flowControllers.h.
Public Member Functions | |
string | type () const override |
String indicating the flow device implemented. | |
bool | ready () override |
void | setPrimary (FlowDevice *primary) |
Set the primary mass flow controller. | |
void | setMaster (FlowDevice *master) |
void | setTimeFunction (Func1 *g) override |
Set a function of time that is used in determining the mass flow rate through the device. | |
void | setPressureCoeff (double c) |
Set the proportionality constant between pressure drop and mass flow rate. | |
double | getPressureCoeff () |
Get the pressure coefficient. | |
void | updateMassFlowRate (double time) override |
Update the mass flow rate at time 'time'. | |
Public Member Functions inherited from FlowDevice | |
FlowDevice (const FlowDevice &)=delete | |
FlowDevice & | operator= (const FlowDevice &)=delete |
virtual string | type () const |
String indicating the flow device implemented. | |
double | massFlowRate () |
Mass flow rate (kg/s). | |
virtual void | updateMassFlowRate (double time) |
Update the mass flow rate at time 'time'. | |
double | outletSpeciesMassFlowRate (size_t k) |
Mass flow rate (kg/s) of outlet species k. | |
double | enthalpy_mass () |
specific enthalpy | |
bool | install (ReactorBase &in, ReactorBase &out) |
Install a flow device between two reactors. | |
virtual bool | ready () |
ReactorBase & | in () const |
Return a reference to the upstream reactor. | |
const ReactorBase & | out () const |
Return a const reference to the downstream reactor. | |
double | evalPressureFunction () |
Return current value of the pressure function. | |
virtual void | setPressureFunction (Func1 *f) |
Set a function of pressure that is used in determining the mass flow rate through the device. | |
double | evalTimeFunction () |
Return current value of the time function. | |
virtual void | setTimeFunction (Func1 *g) |
Set a function of time that is used in determining the mass flow rate through the device. | |
void | setSimTime (double time) |
Set current reactor network time. | |
Protected Attributes | |
FlowDevice * | m_primary = nullptr |
Protected Attributes inherited from FlowDevice | |
double | m_mdot = Undef |
Func1 * | m_pfunc = nullptr |
Function set by setPressureFunction; used by updateMassFlowRate. | |
Func1 * | m_tfunc = nullptr |
Function set by setTimeFunction; used by updateMassFlowRate. | |
double | m_coeff = 1.0 |
Coefficient set by derived classes; used by updateMassFlowRate. | |
double | m_time = 0. |
Current reactor network time. | |
|
inlineoverridevirtual |
String indicating the flow device implemented.
Usually corresponds to the name of the derived class.
Reimplemented from FlowDevice.
Definition at line 70 of file flowControllers.h.
|
inlineoverridevirtual |
Reimplemented from FlowDevice.
Definition at line 74 of file flowControllers.h.
|
inline |
Set the primary mass flow controller.
Definition at line 82 of file flowControllers.h.
void setMaster | ( | FlowDevice * | master | ) |
Definition at line 34 of file flowControllers.cpp.
|
inlineoverridevirtual |
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 from FlowDevice.
Definition at line 89 of file flowControllers.h.
|
inline |
Set the proportionality constant between pressure drop and mass flow rate.
c has units of kg/s/Pa. The mass flow rate is computed as:
\[\dot{m} = \dot{m}_{primary} + c f(\Delta P) \]
where f is a functions of pressure drop that is set by setPressureFunction
. If no functions is specified, the mass flow rate defaults to:
\[\dot{m} = \dot{m}_{primary} + c \Delta P \]
Definition at line 103 of file flowControllers.h.
|
inline |
Get the pressure coefficient.
Definition at line 108 of file flowControllers.h.
|
overridevirtual |
Update the mass flow rate at time 'time'.
This must be overloaded in subclasses to update m_mdot.
Reimplemented from FlowDevice.
Definition at line 41 of file flowControllers.cpp.
|
protected |
Definition at line 115 of file flowControllers.h.