Cantera  2.3.0
Public Member Functions | List of all members
Valve Class Reference

Supply a mass flow rate that is a function of the pressure drop across the valve. More...

#include <flowControllers.h>

Inheritance diagram for Valve:
[legend]
Collaboration diagram for Valve:
[legend]

Public Member Functions

virtual bool ready ()
 
void setPressureCoeff (double c)
 Set the proportionality constant between pressure drop and mass flow rate. More...
 
virtual void updateMassFlowRate (doublereal time)
 Compute the currrent mass flow rate, based on the pressure difference. More...
 
- Public Member Functions inherited from FlowDevice
int type ()
 Return an integer indicating the type of flow device. More...
 
doublereal massFlowRate (double time=-999.0)
 Mass flow rate (kg/s). More...
 
doublereal outletSpeciesMassFlowRate (size_t k)
 Mass flow rate (kg/s) of outlet species k. More...
 
doublereal enthalpy_mass ()
 specific enthalpy More...
 
bool install (ReactorBase &in, ReactorBase &out)
 Install a flow device between two reactors. More...
 
ReactorBasein () const
 Return a reference to the upstream reactor. More...
 
const ReactorBaseout () const
 Return a const reference to the downstream reactor. More...
 
virtual void setParameters (int n, const double *coeffs)
 set parameters. More...
 
void setFunction (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...
 

Additional Inherited Members

- Protected Attributes inherited from FlowDevice
doublereal m_mdot
 
Func1m_func
 
vector_fp m_coeffs
 
int m_type
 

Detailed Description

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 92 of file flowControllers.h.

Member Function Documentation

◆ setPressureCoeff()

void setPressureCoeff ( double  c)
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 \Delta P \]

Definition at line 109 of file flowControllers.h.

◆ updateMassFlowRate()

virtual void updateMassFlowRate ( doublereal  time)
inlinevirtual

Compute the currrent mass flow rate, based on the pressure difference.

Reimplemented from FlowDevice.

Definition at line 114 of file flowControllers.h.

References Func1::eval(), FlowDevice::in(), FlowDevice::out(), and ReactorBase::pressure().


The documentation for this class was generated from the following file: