Cantera 2.6.0
Public Member Functions | List of all members
MassFlowController Class Reference

A class for mass flow controllers. More...

#include <flowControllers.h>

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

Public Member Functions

virtual std::string typeStr () const
 String indicating the flow device implemented. More...
 
virtual std::string type () const
 String indicating the flow device implemented. More...
 
void setMassFlowRate (double mdot)
 Set the fixed mass flow rate (kg/s) through the mass flow controller. More...
 
void setMassFlowCoeff (double m)
 Set the mass flow coefficient. More...
 
double getMassFlowCoeff ()
 Get the mass flow coefficient. 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 updateMassFlowRate (double time)
 If a function of time has been specified for mdot, then update the stored mass flow rate. More...
 
- Public Member Functions inherited from FlowDevice
 FlowDevice (const FlowDevice &)=delete
 
FlowDeviceoperator= (const FlowDevice &)=delete
 
double massFlowRate ()
 Mass flow rate (kg/s). 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 ()
 
ReactorBasein () const
 Return a reference to the upstream reactor. More...
 
const ReactorBaseout () const
 Return a const reference to the downstream reactor. More...
 
virtual void setTimeFunction (Func1 *g)
 Set a function of time that is used in determining the mass flow rate through the device. More...
 

Additional Inherited Members

- Protected Attributes inherited from FlowDevice
double m_mdot
 
Func1m_pfunc
 Function set by setPressureFunction; used by updateMassFlowRate. More...
 
Func1m_tfunc
 Function set by setTimeFunction; used by updateMassFlowRate. More...
 
double m_coeff
 Coefficient set by derived classes; used by updateMassFlowRate. More...
 

Detailed Description

A class for mass flow controllers.

The mass flow rate is constant or specified as a function of time..

Definition at line 19 of file flowControllers.h.

Constructor & Destructor Documentation

◆ MassFlowController()

Definition at line 13 of file flowControllers.cpp.

Member Function Documentation

◆ typeStr()

virtual std::string typeStr ( ) const
inlinevirtual

String indicating the flow device implemented.

Usually corresponds to the name of the derived class.

Deprecated:
To be removed after Cantera 2.6. Use type() instead.

Reimplemented from FlowDevice.

Definition at line 24 of file flowControllers.h.

References Cantera::warn_deprecated().

◆ type()

virtual std::string type ( ) const
inlinevirtual

String indicating the flow device implemented.

Usually corresponds to the name of the derived class.

Reimplemented from FlowDevice.

Definition at line 30 of file flowControllers.h.

◆ setMassFlowRate()

void setMassFlowRate ( double  mdot)

Set the fixed mass flow rate (kg/s) through the mass flow controller.

Definition at line 16 of file flowControllers.cpp.

◆ setMassFlowCoeff()

void setMassFlowCoeff ( double  m)
inline

Set the mass flow coefficient.

m has units of kg/s. The mass flow rate is computed as:

\[\dot{m} = m g(t) \]

where g is a function of time that is set by setTimeFunction. If no function is specified, the mass flow rate defaults to:

\[\dot{m} = m \]

Definition at line 45 of file flowControllers.h.

References FlowDevice::m_coeff.

◆ getMassFlowCoeff()

double getMassFlowCoeff ( )
inline

Get the mass flow coefficient.

Definition at line 50 of file flowControllers.h.

References FlowDevice::m_coeff.

◆ setPressureFunction()

virtual void setPressureFunction ( Func1 f)
inlinevirtual

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 from FlowDevice.

Definition at line 54 of file flowControllers.h.

◆ updateMassFlowRate()

void updateMassFlowRate ( double  time)
virtual

If a function of time has been specified for mdot, then update the stored mass flow rate.

Otherwise, mdot is a constant, and does not need updating.

Reimplemented from FlowDevice.

Definition at line 24 of file flowControllers.cpp.


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