diff --git a/interfaces/matlab/toolbox/@ThermoPhase/private/phase_get.m b/interfaces/matlab/toolbox/@ThermoPhase/private/phase_get.m index 0d963e4b6..0a2d17e6d 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/private/phase_get.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/private/phase_get.m @@ -1,8 +1,8 @@ function i = phase_get(n, job, a, b) if nargin == 2 - i = ctmethods(30,n,job); + i = ctmethods(30, n, job); elseif nargin == 3 - i = ctmethods(30,n,job,a); + i = ctmethods(30, n, job, a); else i = ctmethods(30, n, job, a, b); end \ No newline at end of file diff --git a/interfaces/matlab/toolbox/@ThermoPhase/private/phase_set.m b/interfaces/matlab/toolbox/@ThermoPhase/private/phase_set.m index 0ce4e9010..7c5b9bb60 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/private/phase_set.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/private/phase_set.m @@ -1,8 +1,8 @@ function phase_set(n, job, a, b) if nargin == 2 - ctmethods(30,n,-job); + ctmethods(30, n, -job); elseif nargin == 3 - ctmethods(30,n,-job,a); + ctmethods(30, n, -job, a); else ctmethods(30, n,-job, a, b); end \ No newline at end of file diff --git a/interfaces/matlab/toolbox/@ThermoPhase/private/thermo_set.m b/interfaces/matlab/toolbox/@ThermoPhase/private/thermo_set.m index 516f1c4a6..6377c4bc0 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/private/thermo_set.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/private/thermo_set.m @@ -1,16 +1,16 @@ function i = thermo_set(n, job, a, b, c, d, e, f) if nargin == 2 - i = ctmethods(20,n,-job); + i = ctmethods(20, n, -job); elseif nargin == 3 - i = ctmethods(20,n,-job,a); + i = ctmethods(20, n, -job,a); elseif nargin == 4 - i = ctmethods(20, n,-job, a, b); + i = ctmethods(20, n, -job, a, b); elseif nargin == 5 - i = ctmethods(20, n,-job, a, b, c); + i = ctmethods(20, n, -job, a, b, c); elseif nargin == 6 - i = ctmethods(20, n,-job, a, b, c, d); + i = ctmethods(20, n, -job, a, b, c, d); elseif nargin == 7 - i = ctmethods(20, n,-job, a, b, c, d, e); + i = ctmethods(20, n, -job, a, b, c, d, e); elseif nargin == 8 - i = ctmethods(20, n,-job, a, b, c, d, e, f); + i = ctmethods(20, n, -job, a, b, c, d, e, f); end \ No newline at end of file diff --git a/interfaces/matlab/toolbox/@ThermoPhase/setState_Psat.m b/interfaces/matlab/toolbox/@ThermoPhase/setState_Psat.m index 1d4a5e256..c3afb15e8 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/setState_Psat.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/setState_Psat.m @@ -1,10 +1,15 @@ function setState_Psat(tp, px) -% SETSTATE_PSAT Set the fluid to a saturated state at a given pressure. +% SETSTATE_PSAT Set the fluid state using the given pressure and quality. % setState_Psat(tp,px) +% The fluid state will be set to a saturated liquid-vapor state using the +% input pressure and vapor fraction (quality) as the independent, +% intensive variables. % :param tp: % Instance of class :mat:func:`ThermoPhase` (or another % class derived from ThermoPhase) % :param px: -% Pressure. Units: Pa +% Vector of length 2 containing the desired values for the pressure (Pa) +% and the vapor fraction % + thermo_set(tp.tp_id, 24, px); diff --git a/interfaces/matlab/toolbox/@ThermoPhase/setState_Tsat.m b/interfaces/matlab/toolbox/@ThermoPhase/setState_Tsat.m index 765f4959d..fe1accaca 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/setState_Tsat.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/setState_Tsat.m @@ -1,11 +1,15 @@ function setState_Tsat(tp, tx) -% SETSTATE_TSAT Set the fluid to a saturated state at a given temperature. +% SETSTATE_TSAT Set the fluid state using the given temperature and quality. % setState_Tsat(tp,tx) +% The fluid state will be set to a saturated liquid-vapor state using the +% input temperature and vapor fraction (quality) as the independent, +% intensive variables. % :param tp: % Instance of class :mat:func:`ThermoPhase` (or another % class derived from ThermoPhase) % :param tx: -% Temperature. Units: K +% Vector of length 2 containing the desired values for the temperature (K) +% and the vapor fraction (quality) % thermo_set(tp.tp_id, 25, tx); diff --git a/interfaces/matlab/toolbox/@ThermoPhase/setState_satLiquid.m b/interfaces/matlab/toolbox/@ThermoPhase/setState_satLiquid.m index 5afb29c91..5c617f137 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/setState_satLiquid.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/setState_satLiquid.m @@ -6,4 +6,4 @@ function setState_satLiquid(tp) % class derived from ThermoPhase) % -thermo_set(tp.tp_id, 2, 0); +set(tp, 'T', temperature(tp), 'Liquid', 1.0) diff --git a/interfaces/matlab/toolbox/@ThermoPhase/setState_satVapor.m b/interfaces/matlab/toolbox/@ThermoPhase/setState_satVapor.m index 3e0bf9ad2..6805e1e17 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/setState_satVapor.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/setState_satVapor.m @@ -6,4 +6,4 @@ function setState_satVapor(tp) % class derived from ThermoPhase) % -thermo_set(tp.tp_id, 3, 0); +set(tp, 'T', temperature(tp), 'Vapor', 1.0)