III A-PROPATH:Moist Air

Use is made of two diﬀerent formulations. One is that of ideal gas mixture of dry air and steam. Another isthat of real ﬂuid.

466

A-PROPATH: Moist Air

1. General Features
1.1 FUNCTION SUBPROGRAM REFERENCE
Every A-PROPATH user has to make an initialization process by one of the following two procedures.

1.1.1 Initialization by COMMON VARIABLEs
Every user’s PROGRAM UNIT which is going to CALL the A-PROPATH FUNCTION SUBPROGRAM
should include the following one LINE before the ﬁrst EXECUTABLE STATEMENT.

COMMON/UNIT/KPA, MESSKPA and MESS are reserved as INTEGER VARIABLEs. Furthermore, the following two LINEs must be placed in
the user’s PROGRAM UNIT before the ﬁrst FUNCTION CALL appears.

KPA= M
MESS= N
where both M and N are INTEGERs selected by a user.
KPA speciﬁes the units of pressure and temperature for A-PROPATH FUNCTIONs and their ARGUMENTs.
Descriptions on the system of units will be found both in 1.3 and the relation between the value of M andthe units is shown there. When a user wishes to use other units in his/her PROGRAM UNIT later, he/she issupposed to do the same at thar place.
MESS speciﬁes whether the message to the erroneous FUNCTION REFERENCE is to be printed out to thestandard listing device or not. PROPATH does not return any messages when N = 0, while it does when N = 0.

1.1.2 Initialization by SUBROUTINE SUBPROGRAM KPAMES
The alternative method to set the values for KPA and MESS is to make use of SUBROUTINE SUBPROGRAMKPAMES as the following.

CALL KPAMES(KPA,MESS)Operations to Manage Erroneous FUNCTION REFERENCE

467

1.2 Operations to Manage Erroneous FUNCTIONREFERENCE
A predetermined sequence of operations will occur to process the erroneous FUNCTION REFERENCE when
an improper FUNCTION REFERENCE has been done. Erroneous FUNCTION REFERENCEs are grouped
into 3 levels, with the ascending severity of the user’s mistake. (A user has committed a more serious mistake
when he/she gets a level 2 ERROR than when a level 1 ERROR occurs)

1.2.1 Level 1 ERROR (Convergence Failure)
The method of iteration, which is built into some of the A-PROPATH FUNCTION SUBPROGRAMs to solve
an implicit equation, may not work in some cases where a user has speciﬁed an ARGUMENT of FUNCTION
very close to the saturation line or the critical point. A level 1 ERROR means A-PROPATH has stopped
performing the iteration after the preset maximum number of iteration. Then the A-PROPATH FUNCTIONSUBPROGRAM returns him/her an unexpected FUNCTION value and an ERROR message, though the user
is not responsible for this type of ERROR,. A level 1 ERROR is processed as shown below.
value of FUNCTION returned to the CALLing program: −1.0E+10
output to the standard listing device:**** NO CONVERGENCE AT (NAME OF FUNCTION CALLED) ****The PROPATH group is working hard to ensure that A-PROPATH FUNCTION SUBPROGRAM will notreact with level 1 ERRORs because of poor programing technique. However when a user wants to get a value ofa thermophysical property just on the saturation line or at the critical point and not at a point very close to it,
he/she should try to CALL another FUNCTION for the states on the saturation line or at the critical point.

1.2.2 Level 2 ERROR (Invalid ARGUMENT(s))
A level 2 ERROR occurs when the ARGUMENT a user transferred to A-PROPATH FUNCTION has failed
to drop in the proper range. A level 2 ERROR is processed as shown below.
value of FUNCTION returned to the CALLing program: −1.0E+20
output to the standard listing device:**** OUT OF RANGE AT (NAME OF FUNCTION) FOR (NAME OF SUBSTANCE) WHEN
(FIRST ARGUMENT) AND (SECOND ARGUMENT, if any) ****
FUNCTION tables provides the proper range of ARGUMENT(s) for each substance.

1.2.3 Level 3 ERROR (FUNCTION Unavailable)
A user encounters a level 3 ERROR when a A-PROPATH FUNCTION SUBPROGRAM is not available forthe substance selected. A level 3 ERROR is processed as shown below.
value of FUNCTION returned to the CALLing program: −1.0E+30
output to the standard listing device:**** FUNCTION (NAME OF FUNCTION CALLED) UNAVAILABLE FOR (NAME OF
SUBSTANCE) ****
Function table provides a list of FUNCTION SUBPROGRAMs available for each substance.

468

A-PROPATH: Moist Air

1.3 System of Units
All quantities, REAL ARGUMENTs and values of FUNCTION, are in the fundamental SI or in the coherent
derived SI with two exceptions. Pressure can be in the unit of Pascal Pa or bar, and temperature in the unit ofKelvin K or degree Celsius ◦ C. Users are allowed to make their own selection on these units by speciﬁng a value
to COMMON INTEGER VARIABLE KPA. The procedure to set a value to KPA is described in chapter 1, andthe relation between the value of KPA and the units of pressure and temperature is shown in the table below.
The temperature is based on the International Practical Temperature Scale, 1968.
Table III-1.3-1 Units of Pressure and Temperature Speciﬁed by KPA
unit of pressure
KPA0123othersPabarbarPaPa

unit of temperatureKCK◦CK◦Reserved NAMEs in A-PROPATH

469

1.4 Reserved NAMEs in A-PROPATH
As listed below, A-PROPATH for moit air uses a lot of NAMEs for its own purpose. These are the NAMEsof FUNCTION SUBPROGRAMs to which a user can access directly, KPA, the ﬁrst COMMON INTEGERVARIABLE, to specify the units of pressure and temperature, and MESS, the second COMMON INTEGERVARIABLE, to allow or suppress the error messages. These are supposed to appear in the user’s PROGRAM
UNIT only when they mean their original meaning. D, E, F, · · · are the ﬁrst LETTERs in the NAMEs listed inthe same line.
NAMEs of FUNCTION SUBPROGRAMs:
D : DPA, DPC, DPD, DPE, DPF, DSA, DSB, DSC, DSD, DSE, DSF
E : ENHFAC
F : FCH : HA, HB, HC, HD
I : IDENTF
P : PSTR : RHA, RHB, RHD, RHE, RHF, RWA, RWB, RWC, RWD, RWE, RWF
S : SA, SB, SC, SD, SE, SF
T : TF, T68, T90
V : VA, VB, VC, VD, VE, VF
W: WBB, WBC, WBD, WBE, WBF
X : XA, XB, XC, XE
NAMEs of COMMON INTEGER VARIABLEs:
K : KPA
M: MESS

470

A-PROPATH: Moist Air

1.5 Naming Convention of FUNCTION SUBPROGRAMs
in A-PROPATH
The NAMEs of FUNCTION SUBPROGRAM have been allocated to in a regular pattern. This will help auser to remember them. The ﬁrst one to six LETTERs stand for the kinds of the thermophysical properties.
These are, in alphabetical order,DP*=dew point temperatureDS*=degree of saturation
ENHFAC=enhancement factorFC=fundamental constants
H*=speciﬁc enthalpy
IDENTF =package identiﬁcation
PST=saturation vapor pressure of pure water (or ice)
RH*
=relative humidity
RW*=mole fraction of water vapor
S*=speciﬁc entropyT*=dry-bulb temperatureV*=speciﬁc volume
WB*=thermodynamic wet-bulb temperatureX*=humidity ratio (mixing ratio)* stands for a character of one of A, B, C, D, E and F, and they represent the type of FUNCTIONs shown below:

Table III-1.5-1 Type of FUNCTIONs and Arguments in A-PROPATH
typeFUNCTION

A#A(P,T,WB)

B#B(P,T,DP)

C#C(P,T,RH)

D#D(P,T,X)

E#E(P,T,H)

F#F(P,X,H)

P:
T:
WB:
P:
T:
DP:
P:
T:
RH:
P:
T:
X:
P:
T:
H:
P:
X:
H:

ARGUMENTs
total pressuredry-bulb temperaturethermodynamic wet-bulb temperature
total pressuredry-bulb temperature
dew point temperature
total pressuredry-bulb temperature
relative humidity
total pressuredry-bulb temperaturehumidity ratio
total pressuredry-bulb temperature
speciﬁc enthalpy
total pressure
humidity ratio
speciﬁc enthalpy# stands for one or two alphabetical letters and means the dependent variables. From the table of reserved
NAMEs, # must be one of DP, DS, H, RH, RW, S, T, V, WB and X.

Fundamental Definitions and Terms of Moist Air

471

1.6 Fundamental Definitions and Terms of Moist Air

1.6.1 Important Constants and Others
Molecular Formula:
Percentage composition of dry air by volume:N2 :O2 :Ar:
CO2 and others:
Relative Molecular Mass :Dry air:
Water vapor:
Gas Constant:
Dry air:
Water vaopr:

Two-component mixture of dry air and water vapor
78.09 vol%20.95 vol%0.93 vol%0.03 vol%28.964518.01528
287.055 J/(kg·K)
461.520 J/(kg·K)

1.6.2 Moist Air Terminology and Others(1) Humidity Ratio (Mixing Ratio), X
The ratio of the mass of water vapor to the mass of dry air contained in a given moist air sample.
X = 0.62198RW/(1 − RW)
where the value of 0.62198 is the ratio of relative molecular masses between water vapor and dry air.
(2) Mole fraction of water vapor, RW
The number of moles of water vapor divided by the total number of moles of all components in a given
moist air sample.
(3) Relative Humidity, RH
The ratio of the mole fraction of water vapor RW in a given moist air sample to the mole fraction RWs
in a air sample, saturated at the same temperature and pressure.
RH = (RW/RWs)T,P(4) Degree of Saturation, DS
The ratio of the air humidity ratio X to the humidity ratio of saturated air Xs , at the same temperatureand pressure.
DS = (X/Xs )T,P
(5) Dew Point Temperature, DP
The temperature of moist air, saturated at the same pressure P, with the same humidity ratio X asthat of the given sample of moist air. It is deﬁned as the unique solution of DP the following equation:
Xs (P, DP) = X(6) Thermodynamic Wet-Bulb Temperature, WB
The temperature deﬁned as the unique solution WB(P,T,X) of the following equation:
H + (Xs − X) · Hw = HsorH(P, T, X) + [Xs (P, WB) − X] · Hw (P, WB) = Hs (P, WB)
whereH=H(P,T,X)= speciﬁc enthalpy of moist air at pressure P, temperature T, andhumidity ratio X.
Hs= Hs (P, WB) = speciﬁc enthalpy of moist air saturated at pressure P and temperature WB.
Xs= Xs (P, WB) = speciﬁc humidity ratio at pressure P and temperature WB.
Hw = Hw (P, WB) = speciﬁc enthalpy of liquid water (or ice) at pressure P and temperature WB.

472

A-PROPATH: Moist Air
The thermodynamic wet-bulb temperature is the same as the temperature of adiabatic saturation andhence it can alternatively be deﬁned as the temperature at which wtater (or ice), by evaporating into moist
air, can bring the air to saturation adiabatically at the same temperature and pressure.

(7) Enhancement Factor, ENHFAC
The enhancement factor accounts for the non-ideal behavior of moist air in the saturated state, which
is deﬁned by the following equation:
ENHFAC = RWs · P/PSTorENHFAC(P, T) = RWs (P, T) · P/PST(T)whereRWs = RWs (P, T) = mole fraction of water vapor in most air saturated with water atpressure P and temperature T.
PST =PST(T)= saturation vapor pressure of pure water (or ice) at temperature T.
(8) Others
The values of humidity ratio X, speciﬁc volume V, speciﬁc enthalpy H and speciﬁc entropy S are basedon unit mass of dry air in a given moist air sample. The unit symbol kgDA in Tables III-2.1-1 and III-2.2-1indicates kilogram of dry air. The subscripts a and s in the Tables indicate dry air and saturated air,respectively. Moreover, the FUNCTION subprograms do not cover the region of supersaturated air (foggedair).

An Example of User’s PROGRAM UNIT

473

1.7 An Example of User’s PROGRAM UNIT
[ Example ] The dry- and wet-bulb temperatures of atmospheric air at 1.01325 bar are measured with a
psychrometer and determined to be 25◦C and 15◦C, respectively. Determine (a) humidity ratio, (b) reletivehumidity, (c) dew point and (d) speciﬁc enthalpy of air.

Sample Program
123456789101112131415161718192021222324252627**************************************************SAMPLE PROGRAM FOR /A-PROPATH/ USERS****EAMPLE FROM
Y.A. CENGEL AND M.A. BOLES **THERMODYNAMICS,**MCGRAW-HILL 1989******************************************************** EX.13-3 ON PAGE 603 ******COMMON/UNIT/KPA, MESSKAP=1
MESS=1P=1.01325
T=25.0
TWB=15.0
OMEGA=XA(P,T,TWB)
PHI=RHA(P,T,TWB)
DEWPNT=DPA(P,T,TWB)
H=HA(P,T,TWB)WRITE(6,*)’****** SAMPLE PROGRAM FOR /A-PROPATH/ USERS ******’WRITE(6,*)’
HUMIDITY RATIOOMEGA =’,OMEGAWRITE(6,*)’
RELATIVE HUMIDITY
PHI =’,PHI
WRITE(6,*)’
DEW POINTDEWPNT=’,DEWPNTWRITE(6,*)’
SPECIFIC ENTHALPY
H =’,H
STOP
END

Output****** SAMPLE PROGRAM FOR /A-PROPATH/ USERS ******HUMIDITY RATIOOMEGA =
6.522585E-03
RELATIVE HUMIDITY
PHI =3.318627E-01
DEW POINTDEWPNT=7.706512
SPECIFIC ENTHALPY
H =41739.000000