Chapter 6 : Thermodynamic Properties of Pure Fluids

Example 6.1

In [18]:
#Given:
betta = 1.25*10**-3; 			#coeffecient of math.expansion (K**-1)
V = 0.1; 			#molar volume of organic liquid (m**3/kmol)
P2 = 20.; 			#final pressure (bar)
P1 = 1.; 			#initial pressure (bar)

# Calculations
#To determine the change in entropy of system
#betta = (1/V)*(del V/del T)p
#Let k = (del V/del T)p
k = betta*V;

#Considering Maxwell's relation Eq. 6.24 (Page no. 193)
#dS = -k*(dP)
S = -k*(P2-P1)*10**5; 			#entropy change (J/kmol K)

# Results
print 'Change in entropy is %f J/kmol K'%S
print ' It is assumed that (del V/del T)p is constant in the pressure range 1 to 20 bar'
Change in entropy is -237.500000 J/kmol K
 It is assumed that (del V/del T)p is constant in the pressure range 1 to 20 bar

Example 6.2

In [19]:
import math

# Variables
T1 = 363.; 			#temperature (K)
T2 = 373.; 			#temperature (K)
P2 = 101.3; 			#vapour pressure at 373 K (kPa)
H = 2275.*18; 			#mean heat of vaporisation (kJ/kmol)
R =8.314; 			#ideal gas constant (kJ/kmol K)

# Calculations
#To calculate vapour pressure of water at 363 K
#Using eq. 6.28 (Page no. 196)
P1 = P2/(math.e**((H/R)*((1./T1)-(1./T2))))

# Results
print ' Vapour pressure of water at 363 K is %f kPa'%P1
 Vapour pressure of water at 363 K is 70.408579 kPa

Example 6.3

In [20]:
# Variables
d_l = 13.69*10**3; 			#density of mercury in liquid state (kg/m**3)
d_s = 14.193*10**3; 			#density of mercury in solid state (kg/m**3)
T1 = 234.33; 			#temperature in K
P1 = 1.; 			#initial pressure in bar
P2 = 10.; 			#final pressure in bar
Hf = 9.7876; 			#heat of fusion of mercury (kJ/kg)

# Calculations
#Assuming del_V/del_H remains constant% math.log(T2/T1) = (del_V/del_H)*(P2-P1)
del_V = (1./d_l)-(1./d_s)
T2 = T1*(math.e**((del_V/Hf)*(P2-P1)))

# Results
print 'The melting point of mercury at 10 bar is %f K'%T2
The melting point of mercury at 10 bar is 234.330558 K

Example 6.4, page no:198

In [21]:
# Variables
T1 = 300.; 			#initial temperature (K)
T2 = 800.; 			#final temperature (K)

# Calculations
#Heat capacity (J/mol K)
#Cp = 26.04+(5.586*10**-3*T)+(28.476*10**4*T**-2)
import math
S = 26.04*math.log(T2/T1)+5.586*10**-3*(T2-T1)+28.476*10**4/(-2)*(T2**-2-T1**-2)

# Results
print 'The increase in entropy of solid magnesium is %f J/mol K'%S
The increase in entropy of solid magnesium is 29.693325 J/mol K

Example 6.7

In [22]:
# Variables
T = 773.; 			#temperature (K)
P = 100.; 			#pressure (bar)
Ho = 0; 			#enthalpy of nitrogen at 273 K and 1 bar
So = 192.4; 			#entropy of nitrogen at 298 K and 1 bar
To = 273.; 			#(K)
Po = 1.; 			#(bar)
R = 8.314; 			#ideal gas constant (kJ/kmol K)

# Calculations
#Cp = 27.3+(4.2*10**-3*T) molal heat capacity at 1 bar
#To calculate internal energy enthalpy entropy and free energyfor one mole of nitrogen
#Step 1:
#Assuming that nitrogen is initially at 273 K and 1 bar
#del_H1 = intg(CpdT)
del_H1 = 27.3*(T-To)+4.2*10**-3*(T**2-To**2)/2;
#Assuming that nitrogen is initially at 298 K and 1 bar
#del_S1 = intg(Cp*(dT/T))
del_S1 = 27.3*math.log(T/To)+4.2*10**-3*(T-To)
H1 = Ho + del_H1;
S1 = So + del_S1;

#Step 2:
#del_H2 = [V - T*(del_V/del_T)p]dP
#Since nitrogen behaves as ideal gas
#(del_V/del_T)p = R/P% V-(R*T)/P = 0
del_H2 = 0.;
del_S2 = -R*math.log(P/Po)
H = H1 + del_H2;
S = S1 + del_S2;

#Internal energy: U = H-PV = H-RT (J/mol)
U = H - (R*T)

#Gibbs free energy (J/mol)
G = H-(T*S)

# Results
print 'Enthalpy is %5.3e J/mol'%H
print ' Entropy is %f J/mol K'%S
print ' Internal energy is %4.3e J/mol'%U
print ' Gibbs free energy is %4.3e J/mol'%G
Enthalpy is 1.475e+04 J/mol
 Entropy is 184.626653 J/mol K
 Internal energy is 8.322e+03 J/mol
 Gibbs free energy is -1.280e+05 J/mol

Example 6.8

In [23]:
# Variables
#Equation of state: P(V-B) = RT + (A*P**2)/T
Cp = 33.6; 			#mean specific heat at atmosheric pressure (J/mol K)
A = 1*10**-3; 			#m**3 K/(bar)mol
B = 8.0*10**-5; 			#m**3/mol
R = 8.314*10**-5; 			#ideal gas constant (m**3 (bar)/mol K)

import math
#For step 1:
Po = 4.; 			#pressure at A (bar)
P1 = 1.; 			#pressure at C (bar)
T = 300.; 			#temperature (K)

# Calculations and Results
#del_S1 = intg[(del_V/del_T)pdP]
del_S1 = (R*math.log(Po/P1) - (A/T**2)*(Po**2-P1**2)/2)*10**5; 			#(J/mol K)

#For step 2:
T1 = 300.; 			#temperature at C (K)
T2 = 400.; 			#temperature at D (K)
del_S2 = Cp*math.log(T2/T1) 			#(J/mol K)

#For step 3:
P2 = 1.; 			#pressure at D (bar)
P3 = 12.; 			#pressure at B (bar)
T = 400.; 			#temperature (K)
del_S3 = (R*math.log(P2/P3) - (A/T**2)*(P2**2-P3**2)/2)*10**5; 			#(J/mol K)
S = del_S1+del_S2+del_S3; 			#total entropy change
print '(a). Total entropy change is %f J/mol K'%S

#(b). The mean heat capacity at 12 bar
P1 = 4.; 			#pressure at A (bar)
P2 = 12.; 			#pressure at Co (bar)
T = 300.; 			#temperature (K)
del_S1 = R*math.log(P1/P2) - (A/T**2)*(P1**2-P2**2)/2;

#For CoB
T2 = 400.; 			#temperature at B (K)
T1 = 300.; 			#temperature at Co (K)
del_S2 = S-del_S1;
Cpm = del_S2/(math.log(T2/T1))
print ' (b). The mean heat capacity at 12 bar is %f J/mol K'%Cpm
(a). Total entropy change is 0.568609 J/mol K
 (b). The mean heat capacity at 12 bar is 1.976835 J/mol K

Example 6.10

In [24]:
# Variables
betta = 1.8*10**-4; 			#coeffecient of volume math.expansion (K**-1)
k = 3.9*10**-6; 			#coeffecient of compressibility (bar**-1)
T = 273.; 			#temperature in K
d = 13.596*10**3; 			#density (kg/m**3)
Cp = 0.14*10**3; 			#(J/kg K)

# Calculations
#To calculate Cv for mercury
#Using equation 6.55 (Page no. 208)
Cv = Cp - (betta**2*T*10**5)/(k*d)

# Results
print 'Cv for mercury is %f J/kg K'%Cv
Cv for mercury is 123.318623 J/kg K

Example 6.21

In [25]:
# Variables
#Eqution of state: P(V-b) = RT
P = 10.; 			#pressure (bar)
T = 298.; 			#temperature (K)
b = 3.707*10**-5; 			#Vander Waal's constant (m**3/mol)
R = 8.314; 			#ideal gas constant

# Calculations
#To estimate the fugacity of ammonia
#Since PV = RT + Pb% Z = 1 + (Pb/RT)
#Using equation 6.127 (Page no. 228)
f = P*(math.e**((b*P*10**5)/(R*T)))

# Results
print 'Fugacity f = %f bar'%f
Fugacity f = 10.150747 bar

Example 6.22

In [26]:
# Variables
#intg(alphadP) = -556.61 J/mol
P = 50.; 			#pressure in bar
T = 300.; 			#temperature in K
R = 8.314; 			#ideal gas constant

# Calculations
#To determine the fugacity of gas
#Using equation 6.130 (Page no. 230)
f = P*math.e**(-556.61/(R*T))

# Results
print 'Fugacity of gas at 50 bar and 300 K is %i bar'%f
Fugacity of gas at 50 bar and 300 K is 39 bar

Example 6.23

In [27]:
# Variables
#Equation of state: PV = RT(1-0.00513P)
P = [1, 5, 10]; 			#pressures in bar
phi = [0,0,0]

# Calculations and Results
for i in range(3):
    phi[i] = math.e**(-0.00513*P[i])
    print ' Fugacity coeffecient at %i bar is %f'%(P[i],phi[i])
 Fugacity coeffecient at 1 bar is 0.994883
 Fugacity coeffecient at 5 bar is 0.974676
 Fugacity coeffecient at 10 bar is 0.949994

Example 6.25

In [28]:
# Variables
P = 100.; 			#pressure in bar
T = 373.; 			#temperature in K
a = 0.453; 			#Vander Waal's constant (J m**3/mol**2)
b = 0.571*10**-4; 			#Vander Waal's constant (m**3/mol)
V = 2.072*10**-4; 			#molar volume (m**3/mol)
R = 8.314; 			#ideal gas constant

# Calculations
#To determine the fugacity of pure ethylene
#Using eq. 6.139 (Page no. 233)
ln_f = (b/(V-b)) - ((2*a)/(R*T*V)) + math.log((R*T*10**-5)/(V-b) )
f = math.e**ln_f;

# Results
print 'Fugacity is %f bar'%f
Fugacity is 73.789328 bar

Example 6.26

In [29]:
# Variables
T = 623.; 			#temperature in K

#Data from steam tables:
H = 3159.; 			#enthalpy at 1000 kPa and 623 K (kJ/kg)
S = 7.3; 			#entropy at 1000 kPa and 623 K (kJ/kg K)
Ho = 3176.; 			#enthalpy at 101.3 kPa and 623 K (kJ/kg)
So = 8.38; 			#entropy at 101.3 kPa and 623 K (kJ/kg K)
fo = 101.3; 			#fugacity at 101.3 kPa (kPa)
R = 8.314/18; 			#ideal gas consatnt (kJ/kg K)

# Calculations
#To determine fugacity and fugacity coeffecient of steam
ln_phi = (1/(R*T))*((H-Ho)-T*(S-So))
f = fo*math.e**ln_phi;
phi = f/fo;

# Results
print 'Fugacity of steam is %f bar'%(f/100)
print ' Fugacity coeffecient is %f'%phi
Fugacity of steam is 9.895333 bar
 Fugacity coeffecient is 9.768345

Example 6.27

In [30]:
# Variables
T = 473.; 			#temperature in K
P = 50.*10**5; 			#pressure in Pa
d = 24.3; 			#density of ammonia (kg/m**3)
m = 17.; 			#molecular wt of ammonia
R = 8.314; 			#ideal gas constant

# Calculations
#To estimate the fugacity of ammonia
V = m/(d*1000) 			#molar volume of ammonia (m**3/kmol)
#Using eq. 6.142 (Page no. 234)
f = (V*(P**2))/(R*T)

# Results
print 'The fugacity of ammonia is %f bar'%(f/10**5)
The fugacity of ammonia is 44.474543 bar

Example 6.28

In [32]:
# Variables
T = 303.; 			#temperature in K
P = 10.; 			#pressure in bar
Ps = 4.241/100; 			#saturation pressure (bar)
sp_vol = 1.004 *10**-3; 			#specific volume at 303 K (m**3/kg)
R = 8.314; 			#ideal gas constant

# Calculations
#To calculate the fugacity of liquid water
V = sp_vol*10**-3*18; 			#molar volume (m**3/mol)
#Assuming vapour behaves as an ideal gas
f_sat = Ps;
#Using Eq. 6.144 (Page no. 235)
ln_phi = (V/(R*T))*(P-Ps)*10**5;
f = f_sat*math.e**ln_phi;

# Results
print 'Fugacity of liquid water at given conditions is %f bar'%f
Fugacity of liquid water at given conditions is 0.042714 bar

Example 6.29

In [33]:
# Variables
T = 350.; 			#temperature in K
P = 60.; 			#pressure in bar
Ps = 9.35; 			#vapour pressure at 350 K (bar)
V = 0.1072*10**-3; 			#molar volume (m**3/mol
phi = 0.834; 			#fugacity coeffecient
R = 8.314; 			#ideal gas constant
import math

# Calculations
#To determine fugaity of n butane in liquid state at given conditions
f_sat = phi*Ps;
#Using eq. 6.144 (Page no. 235)
ln_phi = (V/(R*T))*(P-Ps)*10**5;
f = f_sat*math.e**ln_phi;

# Results
print 'Fugacity of n-butane in liquid state at given conditions is %f bar'%f
Fugacity of n-butane in liquid state at given conditions is 9.397539 bar

Example 6.30

In [34]:
# Variables
M = 24.32; 			#molecular wt of solid magnesium
T = 300.; 			#temperature in K
P = 10.; 			#pressure in bar
Po = 1.; 			#reference state pressure (bar)
R = 8.314
d = 1.745*10**3; 			#density of Mg at 300 K in kg/m**3

# Calculations
#To determine the ativity of solid magnesiun
#Using eq. 6.149 (Page no. 237)
ln_a = (M/(d*10**3*R*T))*(P-Po)*10**5;
a = (math.e)**ln_a;

# Results
print 'Acivity of solid magnesium at 300 K and 10 bar is %f'%a
Acivity of solid magnesium at 300 K and 10 bar is 1.005042