Cantera 2.6.0
Public Member Functions | Protected Attributes | List of all members
PressureController Class Reference

A class for flow controllers where the flow rate is equal to the flow rate of a "master" mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet. More...

#include <flowControllers.h>

Inheritance diagram for PressureController:
[legend]
Collaboration diagram for PressureController:
[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...
 
virtual bool ready ()
 
void setMaster (FlowDevice *master)
 
virtual void setTimeFunction (Func1 *g)
 Set a function of time that is used in determining the mass flow rate through the device. More...
 
void setPressureCoeff (double c)
 Set the proportionality constant between pressure drop and mass flow rate. More...
 
double getPressureCoeff ()
 Get the pressure coefficient. More...
 
virtual void updateMassFlowRate (double time)
 Update the mass flow rate at time 'time'. 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...
 
ReactorBasein () const
 Return a reference to the upstream reactor. More...
 
const ReactorBaseout () const
 Return a const reference to the downstream reactor. More...
 
virtual void setPressureFunction (Func1 *f)
 Set a function of pressure that is used in determining the mass flow rate through the device. More...
 

Protected Attributes

FlowDevicem_master
 
- 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 flow controllers where the flow rate is equal to the flow rate of a "master" mass flow controller plus a correction proportional to the pressure difference between the inlet and outlet.

Definition at line 69 of file flowControllers.h.

Constructor & Destructor Documentation

◆ PressureController()

Definition at line 37 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 74 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 80 of file flowControllers.h.

◆ ready()

virtual bool ready ( )
inlinevirtual

Reimplemented from FlowDevice.

Definition at line 85 of file flowControllers.h.

◆ setMaster()

void setMaster ( FlowDevice master)
inline

Definition at line 89 of file flowControllers.h.

◆ setTimeFunction()

virtual void setTimeFunction ( Func1 g)
inlinevirtual

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

◆ 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} = \dot{m}_{master} + 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}_{master} + c \Delta P \]

Definition at line 107 of file flowControllers.h.

References FlowDevice::m_coeff.

◆ getPressureCoeff()

double getPressureCoeff ( )
inline

Get the pressure coefficient.

Definition at line 112 of file flowControllers.h.

References FlowDevice::m_coeff.

◆ updateMassFlowRate()

void updateMassFlowRate ( double  time)
virtual

Update the mass flow rate at time 'time'.

This must be overloaded in subclassess to update m_mdot.

Reimplemented from FlowDevice.

Definition at line 40 of file flowControllers.cpp.

References Func1::eval(), FlowDevice::in(), FlowDevice::m_coeff, FlowDevice::m_pfunc, FlowDevice::massFlowRate(), FlowDevice::out(), ReactorBase::pressure(), and FlowDevice::updateMassFlowRate().

Member Data Documentation

◆ m_master

FlowDevice* m_master
protected

Definition at line 119 of file flowControllers.h.


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