| Cantera 3.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
PressureController Class Reference
Zero-Dimensional Reactor Networks » Flow Devices

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 | setMaster (FlowDevice *master)
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'.
Public Member Functions inherited from FlowDevice
| FlowDevice (const FlowDevice &)=delete
FlowDevice & | operator= (const FlowDevice &)=delete
double | massFlowRate ()
| Mass flow rate (kg/s).
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.
ReactorBase & | in () const
| Return a reference to the upstream reactor.
const ReactorBase & | out () const
| Return a const 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.
void | setSimTime (double time)
| Set current reactor network time.

## Protected Attributes
FlowDevice * | m_primary = nullptr
Protected Attributes inherited from FlowDevice
double | m_mdot = Undef
Func1 * | m_pfunc = nullptr
| Function set by setPressureFunction; used by updateMassFlowRate.
Func1 * | m_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
| inline override virtual

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 | ( |  | ) |
| inline override virtual

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.

## ◆ setMaster()

void setMaster | ( | FlowDevice * | master | ) |

Deprecated:
  To be removed after Cantera 3.0; replaced by setPrimary().

Definition at line 34 of file flowControllers.cpp.

## ◆ setTimeFunction()

void setTimeFunction | ( | Func1 * | g | ) |
| inline override virtual

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

## ◆ getPressureCoeff()

double getPressureCoeff | ( |  | ) |
| inline

Get the pressure coefficient.

Definition at line 108 of file flowControllers.h.

## ◆ updateMassFlowRate()

void updateMassFlowRate | ( | double | time | ) |
| override virtual

Update the mass flow rate at time 'time'.

This must be overloaded in subclasses to update m_mdot.

Reimplemented from FlowDevice.

Definition at line 41 of file flowControllers.cpp.

## Member Data Documentation

## ◆ m_primary

FlowDevice* m_primary = nullptr
| protected

Definition at line 115 of file flowControllers.h.

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

- flowControllers.h
- flowControllers.cpp