cantera/interfaces/matlab/toolbox/@ThermoPhase/isIdealGas.m
2017-02-12 19:22:33 -05:00

16 lines
414 B
Matlab

function v = isIdealGas(tp)
% ISIDEALGAS Get a flag indicating whether the phase is an ideal gas.
% v = isIdealGas(tp)
% :param tp:
% Instance of class :mat:func:`ThermoPhase` (or another
% object that derives from ThermoPhase)
% :return:
% True (1) if the phase is an ideal gas or ideal gas
% mixture, and false (0) otherwise.
%
if strcmp(eosType(tp), 'IdealGas')
v = 1;
else
v = 0;
end