cantera/interfaces/matlab/toolbox/@FlowDevice/setMassFlowRate.m
Ingmar Schoegl d263566670 [Reactor] Deprecating magic numbers.
* add deprecation warning for int ReactorBase::type() (to be changed after Cantera 2.5)
 * introduce temporary std::string ReactorBase::typeStr() (to be renamed after Cantera 2.5)
 * deprecate all functions using the old call and introduce associated temporary functions
2019-08-01 15:37:48 -04:00

19 lines
484 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(3, f.index, mdot);
if k < 0
error(geterr);
end
else
error('Mass flow rate can only be set for mass flow controllers')
end