Go to the documentation of this file.
13 MassFlowController::MassFlowController() : FlowDevice() {
28 throw CanteraError(
"MassFlowController::updateMassFlowRate",
29 "Device is not ready; some parameters have not been set.");
35 m_mdot = std::max(mdot, 0.0);
38 PressureController::PressureController() :
FlowDevice(), m_master(0) {
39 m_type = PressureController_Type;
45 throw CanteraError(
"PressureController::updateMassFlowRate",
46 "Device is not ready; some parameters have not been set.");
57 m_mdot = std::max(mdot, 0.0);
68 "Device is not ready; some parameters have not been set.");
80 m_mdot = std::max(mdot, 0.0);
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.
Func1 * m_tfunc
Function set by setTimeFunction; used by updateMassFlowRate.
void setMassFlowRate(double mdot)
Set the fixed mass flow rate (kg/s) through the mass flow controller.
virtual void updateMassFlowRate(double time)
Update the mass flow rate at time 'time'.
ReactorBase & in() const
Return a reference to the upstream reactor.
double massFlowRate(double time=-999.0)
Mass flow rate (kg/s).
virtual void updateMassFlowRate(double time)
Compute the currrent mass flow rate, based on the pressure difference.
const int MFC_Type
Magic numbers.
double m_coeff
Coefficient set by derived classes; used by updateMassFlowRate.
doublereal pressure() const
Returns the current pressure (Pa) of the reactor.
virtual void updateMassFlowRate(double time)
Update the mass flow rate at time 'time'.
virtual void updateMassFlowRate(double time)
If a function of time has been specified for mdot, then update the stored mass flow rate.
virtual doublereal eval(doublereal t) const
Evaluate the function.
Base class for exceptions thrown by Cantera classes.
Func1 * m_pfunc
Function set by setPressureFunction; used by updateMassFlowRate.
Namespace for the Cantera kernel.
const ReactorBase & out() const
Return a const reference to the downstream reactor.