Cantera  3.1.0a1
PressureController Class Reference

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>

Inheritance diagram for PressureController:
[legend]

Detailed Description

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. More...
 
bool ready () override
 
void setPrimary (FlowDevice *primary)
 Set the primary mass flow controller. More...
 
void setTimeFunction (Func1 *g) override
 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...
 
void updateMassFlowRate (double time) override
 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...
 
double evalPressureFunction ()
 Return current value of the pressure function. More...
 
virtual void setPressureFunction (Func1 *f)
 Set a function of pressure that is used in determining the mass flow rate through the device. More...
 
double evalTimeFunction ()
 Return current value of the time function. More...
 
void setSimTime (double time)
 Set current reactor network time. More...
 

Protected Attributes

FlowDevicem_primary = nullptr
 
- Protected Attributes inherited from FlowDevice
double m_mdot = Undef
 
Func1m_pfunc = nullptr
 Function set by setPressureFunction; used by updateMassFlowRate. More...
 
Func1m_tfunc = nullptr
 Function set by setTimeFunction; used by updateMassFlowRate. More...
 
double m_coeff = 1.0
 Coefficient set by derived classes; used by updateMassFlowRate. More...
 
double m_time = 0.
 Current reactor network time. More...
 

Member Function Documentation

◆ type()

string type ( ) const
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.

◆ setPrimary()

void setPrimary ( FlowDevice primary)
inline

Set the primary mass flow controller.

Since
New in Cantera 3.0.

Definition at line 82 of file flowControllers.h.

◆ setTimeFunction()

void setTimeFunction ( Func1 g)
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 86 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}_{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 100 of file flowControllers.h.

◆ getPressureCoeff()

double getPressureCoeff ( )
inline

Get the pressure coefficient.

Definition at line 105 of file flowControllers.h.

◆ updateMassFlowRate()

void updateMassFlowRate ( double  time)
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 34 of file flowControllers.cpp.


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