24 throw CanteraError(
"MassFlowController::updateMassFlowRate",
25 "Device is not ready; some parameters have not been set.");
31 m_mdot = std::max(mdot, 0.0);
37 "To be removed after Cantera 3.0; replaced by setPrimary.");
44 throw CanteraError(
"PressureController::updateMassFlowRate",
45 "Device is not ready; some parameters have not been set.");
56 m_mdot = std::max(mdot, 0.0);
63 "Device is not ready; some parameters have not been set.");
75 m_mdot = std::max(mdot, 0.0);
Base class for exceptions thrown by Cantera classes.
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.
Func1 * m_tfunc
Function set by setTimeFunction; used by updateMassFlowRate.
double m_coeff
Coefficient set by derived classes; used by updateMassFlowRate.
ReactorBase & in() const
Return a reference to the upstream reactor.
double massFlowRate()
Mass flow rate (kg/s).
const ReactorBase & out() const
Return a const reference to the downstream reactor.
virtual void updateMassFlowRate(double time)
Update the mass flow rate at time 'time'.
Func1 * m_pfunc
Function set by setPressureFunction; used by updateMassFlowRate.
virtual double eval(double t) const
Evaluate the function.
void setMassFlowRate(double mdot)
Set the fixed mass flow rate (kg/s) through the mass flow controller.
void updateMassFlowRate(double time) override
If a function of time has been specified for mdot, then update the stored mass flow rate.
void setMaster(FlowDevice *master)
void updateMassFlowRate(double time) override
Update the mass flow rate at time 'time'.
double pressure() const
Returns the current pressure (Pa) of the reactor.
void updateMassFlowRate(double time) override
Compute the current mass flow rate, based on the pressure difference.
Some flow devices derived from class FlowDevice.
Namespace for the Cantera kernel.
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.