-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dave Goodwin
committed
Mar 12, 2004
1 parent
fc80f22
commit 2351fc7
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function a = setState_SV(a,sv) | ||
% SETSTATE_SV Set the specific entropy [J/kg/K] and specific | ||
% volume [m3/kg]. | ||
% | ||
% setState_SV(a, sv) sets the specific entropy and specific volume | ||
% of object a, holding its composition fixed. Argument 'sv' must | ||
% be a vector of length 2 containing the desired values for the specific | ||
% entropy (J/kg/K) and specific volume (m3/kg). | ||
% | ||
if sv(1) <= 0.0 | ||
error('the specific entropy must be positive'); | ||
end | ||
if sv(2) <= 0.0 | ||
error('the specific volume must be positive'); | ||
end | ||
thermo_set(a.tp_id,22,sv); |