cantera/interfaces/matlab/toolbox/@FlowDevice/setMassFlowRate.m
Ingmar Schoegl bc8b4be654 [Reactor] clarify FlowDevice interface
* differentiated Valve::setValveCoeff from PressureController::setPressureCoeff
 and introduced MassFlowController::setMassFlowCoeff for consistency.
 * introduced FlowDevice::setTimeFunction and FlowDevice::setPressureFunction to
 differentiate time-dependent and pressure-dependent functions.
 * introduced arbitrary pressure dependence for PressureController
 * deprecated FlowDevice::setFunction which is replaced by time and pressure
 specific functions.
 * introduced properties Valve.valve_coeff / PressureController.pressure_coeff /
 MassFlowController.mass_flow_coeff in Cython interface and deprecated
 Valve.set_pressure_coeff / PressureController.set_pressure_coeff
 * deprecated corresponding function calls in clib interface
 * deprecate FlowDevice.setParameters (which was only used by MATLAB interface)
2019-08-05 17:01:05 -04:00

19 lines
485 B
Matlab

function setMassFlowRate(f, mdot)
% SETMASSFLOWRATE Set the mass flow rate to a constant value.
% setMassFlowRate(f, mdot)
%
% See also: :mat:func:`MassFlowController`
%
% :param f:
% Instance of class :mat:func:`MassFlowController`
% :param mdot:
% Mass flow rate
%
if strcmp(f.type, 'MassFlowController')
k = flowdevicemethods(10, f.index, mdot);
if k < 0
error(geterr);
end
else
error('Mass flow rate can only be set for mass flow controllers')
end