cantera/interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

15 lines
515 B
Matlab

function a = setState_SP(a,sp)
% SETSTATE_SP Set the specific entropy [J/kg/K] and pressure [Pa].
%
% setState_SP(a, sp) sets the specific entropy and pressure
% of object a, holding its composition fixed. Argument 'sp' must
% be a vector of length 2 containing the desired values for the specific
% entropy (J/kg/K) and pressure (Pa).
%
if sp(1) <= 0.0
error('the pressure must be positive');
end
if sp(2) <= 0.0
error('the specific entropy must be positive');
end
thermo_set(a.tp_id,23,sp);