BWR Equation

559

2.3 BWR Equation
Thermodynamic properties are evaluated by the Benwdict-Webb-Rubin equation modiﬁed by Nishiumi andSaito[1]. No provision is made for transport properties at this moment.

2.3.1 The Names of Subroutine, Library File and Single Shot Program
Library File for UNIX:
Library File for DOS,Windows95/NT:
Single Shot Program for UNIX:
Single Shot Program for DOS,Windows95/NT:

libjbwr.a
JBWRMX.LIB
Not provided
BWRMX–SS.EXE

It should be noted that the source programs of JBWRMX.LIB are writen in both C-language and FORTRAN.
Therefore user’s programming environment must support mixed language programming of C and FORTRAN to
use JBWRMX.LIB.

2.3.2 Reference State
By user’s selecton of KSTAN, which is the ﬁrst ARGUMENT of STNKAS, the reference state is determined
as shown below.
Table V-2.3-1 Reference State Speciﬁed by KSTAN
KSTAN
1others

Reference Statevalue of enthalpy and entropy

273.15K : saturated liquid of pure component
200kJ/kg, 1.0kJ/(kg·K)
same with KSTAN= 1

2.3.3 Missing SUBPROGRAM
Of the SUBPROGRAMs listed in 1.6, the next is missing in F–PROPATH by BWR equation.
MKTABLE, START1, SUBCRT, SUBMXH, SUBM, SUBPAR, T68, T90
Also, subroutine SUBMIX with either I = 3 or 4 (see 1.7) are not supported in F–PROPATH by BWR equation.

2.3.4 Initialization by SUBROUTINE START2
By the procedure described below, user can use F–PROPATH by BWR equation for any mixture. Howeverin that case a user has to transfer related constants of each component to F–PROPATH. They are relative
molecular mass, critical constants(temperature, pressure, volume), acentric factor, coeﬃcients of isobaric speciﬁcheat equation at ideal gas state, and interaction parameter.
A user has to write the lines shown below before he or she makes reference to any F–PROPATH by BWR
equation SUBPROGRAM.
DIMENSION PR1(5),PR2(5),CP1(8),CP2(8)DATA STATEMENT for PR1,PR2,CP1,CP2
AKIJ=XCALL KPAMES(KPA,MESS)CALL STNKAS(KSTAN,KAS)CALL START2(J,PR1,PR2,CP1,CP2,AKIJ)
PR1 and PR2 are arrays to which a user transfers constants for component 1 and 2, respectively. CP1 andCP2 are arrays to which a user trasfers coeﬃcients of isobaric speciﬁc heat equation for component 1 and 2,respectively. AKIJ is the interaction parameter deﬁned in reference [1].
Elements of PR1 and PR2 mean what are shown below.
PR1(1) : relative molecular mass of component 1 [kg/kmol]
PR1(2) : critical temperature of component 1 [K]PR1(3) : dummy(critical pressure of component 1 [Pa])560

F-PROPATH: Binary Mixture by General Equations
PR1(4) : critical volume of component 1 [m3 /kmol]
PR1(5) : acentric factor of component 1 [-]PR2(1) : relative molecular mass of component 2 [kg/kmol]
PR2(2) : critical temperature of component 2 [K]PR2(3) : dummy(critical pressure of component 2 [Pa])PR2(4) : critical volume of component 2 [m3 /kmol]
PR2(5) : acentric factor of component 2 [-]A user is allowed to use one of the following three equations of isobaric speciﬁc heat at ideal gas state (T :temperature [K]).
(1) CP[J/(kmol·K)] = A + BT + CT 2 + DT 3 + ET 4 , CP*(1) = 2.0(2) CP[J/(kmol·K)] = AT 2 + BT + C + DT + ET 2 + F T 3 , CP*(1) = 3.0
Elements of CP1 and CP2 mean what are shown below.
When CP*(1) = 1.0 or 2.0
CP1(1) : number of equation 2.0 or 3.0 for component 1.
CP1(2) : value of A for component 1
CP1(3) : value of B for component 1
CP1(4) : value of C for component 1
CP1(5) : value of D for component 1
CP1(6) : value of E for component 1
CP1(7) : lower valid bound of the equation [K]CP1(8) : upper valid bound of the equation [K]CP2(1) : number of equation 2.0 or 3.0 for component 2.
CP2(2) : value of A for component 2
CP2(3) : value of B for component 2
CP2(4) : value of C for component 2
CP2(5) : value of D for component 2CP2(6) : value of E for component 2
CP2(7) : lower valid bound of the equation [K]CP2(8) : upper valid bound of the equation [K]When CP*(1) = 3.0
CP1(1) : number of equation 3.0 for component 1.
CP1(2) : lower valid bound of the equation [K]CP1(3) : upper valid bound of the equation [K]CP1(4) : value of A for component 1
CP1(5) : value of B for component 1
CP1(6) : value of C for component 1
CP1(7) : value of D for component 1
CP1(8) : value of E for component 1
CP1(9) : value of F for component 1
CP2(1) : number of equation 3.0 for component 2.
CP2(2) : lower valid bound of the equation [K]CP2(3) : upper valid bound of the equation [K]CP2(4) : value of A for component 2
CP2(5) : value of B for component 2
CP2(6) : value of C for component 2
CP2(7) : value of D for component 2
CP2(8) : value of E for component 2CP2(9) : value of F for component 2

BWR Equation

561

J is the error detection code. When PR1(2)>PR2(2), Tc1 >Tc2 , exchange between component 1 and 2 willoccur and J= −1 will be returned. For other invalid ARGUMENT(s), J= −2 will occur.

2.3.5 Example of User’s PROGRAM UNIT
Sample Program 1
C----------------------------------------------------------------C
NS-BWR Equation
C
This program calculates properties of R22-R114 mixture
Cat buble and dew point at P=2.5[bar] and Z=0.5[kg/kg].
C----------------------------------------------------------------C
C--------------------------------------------C
Definition of array PR1,PR2,CP1 and CP2.
C--------------------------------------------DIMENSION PR1(5),PR2(5),CP1(9),CP2(9)C
C---------------------------------------C
T=[C],P=[bar],quantity=[kg]Cstandard state=(saturated liquid at 273.15[K])C----------------------------------------call KPAMES(1,1)
call STNKAS(1,1)
C
C---------------------------------------------------------------------------C
Putting fundamental constants into PR1 and PR2 using DATA STATEMENT.
CDATA(PR1(I),I=1,5)/MW1[KG/KMOL],TC1[K],dummy, VC1[M^3/KMOL],OMEGA1[-]/CDATA(PR2(I),I=1,5)/MW2[KG/KMOL],TC2[K],dummy, VC2[M^3/KMOL],OMEGA2[-]/
C---------------------------------------------------------------------------DATA(PR1(I),I=1,5)/ 86.469, 369.3, -1.0, 0.168555, 0.205/
DATA(PR2(I),I=1,5)/170.922, 418.78, -1.0, 0.296739, 0.234/
CC---------------------------------------------------------------------------C
Putting isobaric heat capacity at ideal gas state into CP1 and CP2C
using DATA STATEMENT.
CDATA(CP1(I),I=1,8)/EQUATION NUMBER,TMIN[K],TMAX[K], A,B,C,D,E/
C
DATA(CP2(I),I=1,8)/EQUATION NUMBER,TMIN[K],TMAX[K], A,B,C,D,E/
C---------------------------------------------------------------------------DATA(CP1(I),I=1,9)& /3.0, 250.0, 350.0,&-917.3,28.755,-2.030E-02,2.5351E-03,-2.185E-06, 7.1E-10/
C[kJ/kg]
DATA(CP2(I),I=1,9)& /2.0, 250.0, 400.0,&-0.12916, 4.7009E-03, -8.612E-06, 6.05E-09, 0.0, 0.0 /C[kJ/kg]do 10 I=4,9C[kJ/kg] -> [J/kmol]
CP1(I) = CP1(I) * PR1(1) * 1000CP2(I) = CP2(I) * PR2(1) * 1000
10continueC
C-----------------------------------------C
Setting interaction parametar AKIJ.
C-----------------------------------------AKIJ=0.976
CC-------------------------C
Execution START2.
C-------------------------call START2(ECODE, PR1, PR2, CP1, CP2, AKIJ)C
C-------------------------------------------C
Calculation of properties at buble point andC
dew point using SUBPB and output results.
C-------------------------------------------P=2.5
Z=0.5

562

12
34

F-PROPATH: Binary Mixture by General Equations

CALL SUBTB(J,TB,P,Z,VB,HB,SB)
CALL SUBTD(J,TD,P,Z,VD,HD,SD)
WRITE(*,*) ’ P[bar]=’,PWRITE(*,*) ’ Z[kg/kg]=’,Z
WRITE(*,1) TB, TD
WRITE(*,2) VB, VD
WRITE(*,3) HB/1000, HD/1000
WRITE(*,4) SB/1000, SD/1000
format(’ TB[C]=’, F7.1, ’
TD =’, F7.1)
format(’ VB[m^3/kg] =’, E10.2, ’ VB =’, E10.2)
format(’ HB[kJ/kg] =’, F7.1, ’HD =’, F7.1)
format(’ SB[kJ/kg] =’, F7.3, ’SD =’, F7.3)
STOP
END

OutputP[bar]=
Z[kg/kg]=
TB[C]=
VB[m^3/kg] =HB[kJ/kg] =SB[kJ/kg] =2.5
0.5-14.0
TD =0.72E-03 VB =
196.7
HD =
1.025
SD =

3.5
0.75E-01
372.0
1.683

Sample Program 2C----------------------------------------------------------------C
NS-BWR Equation
CThis program calculates temperature, volume,entropy and quality
Cof R22-R114 mixture
Cat P=0.6[MPa], Z=0.5[kg/kg] and H=300[kJ/kg].
C----------------------------------------------------------------DIMENSION PR1(5),PR2(5),CP1(9),CP2(9)call KPAMES(0,1)
call STNKAS(1,1)
DATA(PR1(I),I=1,5)/ 86.469, 369.3, -1.0, 0.168555, 0.205/
DATA(PR2(I),I=1,5)/170.922, 418.78, -1.0, 0.296739, 0.234/
DATA(CP1(I),I=1,9)& /3.0, 250.0, 350.0,&-917.3,28.755,-2.030E-02,2.5351E-03,-2.185E-06, 7.1E-10/
C[kJ/kg]DATA(CP2(I),I=1,9)& /2.0, 250.0, 400.0,&-0.12916, 4.7009E-03, -8.612E-06, 6.05E-09, 0.0, 0.0 /C[kJ/kg]do 10 I=4,9C[kJ/kg] -> [J/kmol]
CP1(I) = CP1(I) * PR1(1) * 1000CP2(I) = CP2(I) * PR2(1) * 1000
10continue
AKIJ=0.976
call START2(ECODE, PR1, PR2, CP1, CP2, AKIJ)C
C-------------------------------------------C
Calculation of temperature, volume, entropy and quality
Cfrom pressure, whole composition and enthalpy.
C-------------------------------------------P = 0.6E+6
Z = 0.5
H = 300.0*1000.0
CALL SUBMIX(2, J, T, P, Z, V, H, S)
Q = QMIX(T, P, Z)
WRITE(*,*) ’ P[MPa]=’, P/1e+6
WRITE(*,*) ’ Z[kg/kg]=’, Z
WRITE(*,*) ’ H[kJ/kg]=’, H/1000
WRITE(*,*) ’ T[K]=’, TBWR Equation

563

WRITE(*,*) ’ Q[kg/kg]
WRITE(*,*) ’ V[m3/kg]
WRITE(*,*) ’ S[kJ/kg]
STOP
END=’, Q=’, V=’, S/1000

OutputP[MPa]
Z[kg/kg]
H[kJ/kg]
T[K]
Q[kg/kg]
V[m3/kg]
S[kJ/kg]

==
=
=
=
=
=0.600000024
0.5
300.
297.011963
0.667366326
0.00257301494
1.34425902

2.3.6 Sample Output of Single Shot Program Single shot program of BWR equation is notproveided in this version of F-PROPATH.

References[1] Nishiumi, H. and Saito, S., J. Chem. Eng. Japan, 8-5(1975), 356.