Supply a mass flow rate that is a function of the pressure drop across the valve. More...
#include <flowControllers.h>
Supply a mass flow rate that is a function of the pressure drop across the valve.
The default behavior is a linearly proportional to the pressure difference. Note that real valves do not have this behavior, so this class does not model real, physical valves.
Definition at line 123 of file flowControllers.h.
Public Member Functions | |
string | type () const override |
String indicating the flow device implemented. | |
void | setValveCoeff (double c) |
Set the proportionality constant between pressure drop and mass flow rate. | |
double | getValveCoeff () |
Get the valve coefficient. | |
void | updateMassFlowRate (double time) override |
Compute the current mass flow rate, based on the pressure difference. | |
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. | |
Additional Inherited Members | |
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 128 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} = c g(t) f(\Delta P) \]
where g and f are functions of time and pressure drop that are set by setTimeFunction
and setPressureFunction
, respectively. If no functions are specified, the mass flow rate defaults to:
\[\dot{m} = c \Delta P \]
Definition at line 142 of file flowControllers.h.
|
inline |
Get the valve coefficient.
Definition at line 147 of file flowControllers.h.
|
overridevirtual |
Compute the current mass flow rate, based on the pressure difference.
Reimplemented from FlowDevice.
Definition at line 52 of file flowControllers.cpp.