Cantera  3.1.0
Loading...
Searching...
No Matches
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.
 
bool ready () override
 
void setPrimary (FlowDevice *primary)
 Set the primary mass flow controller.
 
void setTimeFunction (Func1 *g) override
 Set a function of time that is used in determining the mass flow rate through the device.
 
void setPressureCoeff (double c)
 Set the proportionality constant between pressure drop and mass flow rate.
 
double getPressureCoeff ()
 Get the pressure coefficient.
 
void updateMassFlowRate (double time) override
 Update the mass flow rate at time 'time'.
 
 FlowDevice (const string &name="(none)")
 
 FlowDevice (const FlowDevice &)=delete
 
- Public Member Functions inherited from FlowDevice
 FlowDevice (const string &name="(none)")
 
 FlowDevice (const FlowDevice &)=delete
 
FlowDeviceoperator= (const FlowDevice &)=delete
 
virtual string type () const
 String indicating the flow device implemented.
 
string name () const
 Retrieve flow device name.
 
void setName (const string &name)
 Set flow device name.
 
bool setDefaultName (map< string, int > &counts)
 Set the default name of a flow device. Returns false if it was previously set.
 
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 ()
 
ReactorBasein () const
 Return a reference to the upstream reactor.
 
const ReactorBaseout () const
 Return a const reference to the downstream reactor.
 
ReactorBaseout ()
 Return a mutable 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.
 

Protected Attributes

FlowDevicem_primary = nullptr
 
- Protected Attributes inherited from FlowDevice
string m_name
 Flow device name.
 
bool m_defaultNameSet = false
 true if default name has been previously set.
 
double m_mdot = Undef
 
Func1m_pfunc = nullptr
 Function set by setPressureFunction; used by updateMassFlowRate.
 
Func1m_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.
 

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.

◆ ready()

bool ready ( )
inlineoverridevirtual

Reimplemented from FlowDevice.

Definition at line 74 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.

◆ FlowDevice()

FlowDevice ( const string &  name = "(none)")
inline

Definition at line 26 of file FlowDevice.h.

Member Data Documentation

◆ m_primary

FlowDevice* m_primary = nullptr
protected

Definition at line 112 of file flowControllers.h.


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