Chapter 6 - Thermodynamic property relations

Example: 6.1 Page: 197

In [1]:
print "Example: 6.1 - Page: 197\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.1 on page number 197 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.1 on page 197 of the book."
Example: 6.1 - Page: 197


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.1 on page 197 of the book.

Example: 6.2 Page: 205

In [6]:
from __future__ import division
print "Example: 6.2 - Page: 205\n\n"

# Solution

# *****Data******#
density_water = 0.998## [g/cubic cm]
density_ice = 0.9168## [g/cubic cm]
Hf = 335## [J/g]
T = 0 + 273## [K]
#*****************#

V_water = 1/density_water## [cubic cm/g]
V_ice = 1/density_ice## [cubic cm/g]
# From Eqn. 6.56:
# dP/dT = deltaS/(V2 - V1) = deltaH/(T*(V2 - V1))
# Substituting these values in Eqn. 6.58
deltaP_By_deltaT = (Hf/(T*(V_water - V_ice)))*10## [atm/K]
deltaT_By_deltaP = 1/deltaP_By_deltaT## [K/atm]
if deltaT_By_deltaP > 0:
    print "Increase in pressure of 1 atm increases the freezing point by %.4f K"%(abs(deltaT_By_deltaP))#
else:
    print "Increase in pressure of 1 atm lowers the freezing point by %.4f K"%(abs(deltaT_By_deltaP))#
Example: 6.2 - Page: 205


Increase in pressure of 1 atm lowers the freezing point by 0.0072 K

Example: 6.3 Page: 206

In [7]:
from __future__ import division
print "Example: 6.3 - Page: 206\n\n"

# Solution

# *****Data******#
P1 = 361.3## [kPa]
T1 = 140 + 273## [K]
P2 = 617.8## [kPa]
T2 = 160 + 273## [K]
T = 150 + 273## [K]
Vg = 0.3917## [cubic m/kg]
#****************#

# From Eqn. 6.56
# dP/dT = deltaH/(T*(Vg - V1)) = deltaH/(T*Vg)
deltaP = P2 - P1## [kPa]
deltaT = T2 - T1## [K]
deltaH = T*Vg*deltaP/deltaT## [kJ/kg]
print "Enthalpy of Vaporisation is %d kJ/kg\n"%(round(deltaH))#
Example: 6.3 - Page: 206


Enthalpy of Vaporisation is 2125 kJ/kg

Example: 6.4 Page: 206

In [8]:
from __future__ import division
from math import exp
print "Example: 6.4 - Page: 206\n\n"

# Solution

# *****Data******#
T1 = -40 + 273## [K]
T2 = -45 + 273## [K]
P1 = 51.25## [kPa]
R = 0.0815## [kJ/kg K]
Hv = 225.86## [kJ/kg]
#****************#

# From Eqn. 6.61:
P2 = P1*exp((Hv/R)*((1/T1) - (1/T2)))## [kPa]
print "Saturation pressure of the refrigerant is %.2f kPa"%(P2)#
Example: 6.4 - Page: 206


Saturation pressure of the refrigerant is 39.48 kPa

Example: 6.5 Page: 206

In [9]:
from __future__ import division
from math import log10, exp
print "Example: 6.5 - Page: 206\n\n"

# Solution

# *****Data******#
Tb = -103.9 + 273## [K]
def f1(T):
    P = 10**(-(834.13/T) + 1.75*log10(T) - 8.375*10**(-3)*T + 5.324)
    return P
R = 8.314## [J/mol K]
#***************#

# From Eqn. 6.60, we get:
# d(ln(P))/dT = deltaH/(R*T**2)
def f2(T):
    P = exp(2.303*log10(f1(T)))
    return P
# Differentiating it with respect to T
# d(ln(P))/dT = (834.13*2.303/Tb**2 + 1.75/Tb - 2.303*8.375*10**(-3))
deltaH = R*Tb**2*(834.13*2.303/Tb**2 + 1.75/Tb - 2.303*8.375*10**(-3))/1000## [kJ/mol]
print "The enthalpy of vaporisation is %.2f kJ/mol\n"%(deltaH)#
Example: 6.5 - Page: 206


The enthalpy of vaporisation is 13.85 kJ/mol

Example: 6.6 Page: 214

In [10]:
print "Example: 6.6 - Page: 214\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.6 on page number 214 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.6 on page 214 of the book."
Example: 6.6 - Page: 214


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.6 on page 214 of the book.

Example: 6.7 Page: 215

In [11]:
print "Example: 6.7 - Page: 215\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.7 on page number 215 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.7 on page 215 of the book."
Example: 6.7 - Page: 215


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.7 on page 215 of the book.

Example: 6.8 Page: 217

In [12]:
print "Example: 6.8 - Page: 217\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.8 on page number 217 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.8 on page 217 of the book."
Example: 6.8 - Page: 217


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.8 on page 217 of the book.

Example: 6.9 Page: 217

In [13]:
print "Example: 6.9 - Page: 217\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.9 on page number 217 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.9 on page 217 of the book."
Example: 6.9 - Page: 217


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.9 on page 217 of the book.

Example: 6.10 Page: 218

In [14]:
print "Example: 6.10 - Page: 218\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.10 on page number 218 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.10 on page 218 of the book."
Example: 6.10 - Page: 218


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.10 on page 218 of the book.

Example: 6.11 Page: 219

In [15]:
print "Example: 6.11 - Page: 219\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.11 on page number 219 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.11 on page 219 of the book."
Example: 6.11 - Page: 219


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.11 on page 219 of the book.

Example: 6.12 Page: 219

In [16]:
print "Example: 6.12 - Page: 219\n\n"

# Mathematics is involved in proving but just that no numerical computations are involved.
# For prove refer to this example 6.12 on page number 219 of the book.

print " Mathematics is involved in proving but just that no numerical computations are involved.\n\n"
print " For prove refer to this example 6.12 on page 219 of the book."
Example: 6.12 - Page: 219


 Mathematics is involved in proving but just that no numerical computations are involved.


 For prove refer to this example 6.12 on page 219 of the book.

Example: 6.13 Page: 220

In [17]:
print "Example: 6.13 - Page: 220\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.13 on page number 220 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.13 on page 220 of the book."
Example: 6.13 - Page: 220


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.13 on page 220 of the book.

Example: 6.14 Page: 221

In [18]:
from __future__ import division
print "Example: 6.14 - Page: 221\n\n"

# Solution

# *****Data******#
alpha = 0.837*10**(-11)## [square m/N]
beeta = 54.2*10**(-6)## [1/K]
T = 227 + 273## [K]
V = 7.115*10**(-3)## [cubic m/kmol]
Cp = 26.15## [J/mol K]
#*****************#

Cv = Cp - (T*V*beeta**2/alpha)/1000## [J/mol K]
# Percentage error if Cp is assumed to Cv.
err = ((Cp - Cv)/Cp)*100#
print "Percentage error is %.2f %%"%(err)#
Example: 6.14 - Page: 221


Percentage error is 4.77 %

Example: 6.15 Page: 221

In [19]:
print "Example: 6.15 - Page: 221\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.15 on page number 221 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.15 on page 221 of the book."
Example: 6.15 - Page: 221


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.15 on page 221 of the book.

Example: 6.16 Page: 222

In [20]:
print "Example: 6.16 - Page: 222\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.16 on page number 222 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.16 on page 222 of the book."
Example: 6.16 - Page: 222


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.16 on page 222 of the book.

Example: 6.17 Page: 222

In [21]:
print "Example: 6.17 - Page: 222\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.17 on page number 222 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.17 on page 222 of the book."
Example: 6.17 - Page: 222


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.17 on page 222 of the book.

Example: 6.18 Page: 223

In [22]:
print "Example: 6.18 - Page: 223\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.18 on page number 223 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.18 on page 223 of the book."
Example: 6.18 - Page: 223


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.18 on page 223 of the book.

Example: 6.19 Page: 227

In [23]:
from __future__ import division
print "Example: 6.19 - Page: 227\n\n"

# Solution

# *****Data******#
a = 3.59## [square L atm /square mol]
b = 0.043## [L/mol]
R = 0.082## [J/mol K]
#***************#

# From Eqn. 6.122:
Ti = 2*a/(R*b)## [K]
print "Inversion of temperature is %.1f K"%(Ti)#
Example: 6.19 - Page: 227


Inversion of temperature is 2036.3 K

Example: 6.20 Page: 227

In [24]:
print "Example: 6.20 - Page: 227\n\n"

# This problem involves proving a relation in which no mathematics and no calculations are involved.
# For prove refer to this example 6.20 on page number 227 of the book.

print " This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n"
print " For prove refer to this example 6.20 on page 227 of the book."
Example: 6.20 - Page: 227


 This problem involves proving a relation in which no mathematics and no calculations are involved.


 For prove refer to this example 6.20 on page 227 of the book.

Example: 6.23 Page: 239

In [26]:
from __future__ import division
from math import log
print "Example: 6.23 - Page: 239\n\n"

# Solution

# *****Data******#
T = 298## [K]
P = 10*10**5## [Pa]
Tc = 126.2## [K]
Pc = 34*10**5## [bar]
R = 8.314## [J/mol K]
#****************#

a = 27*R**2*Tc**2/(64*Pc)## [Pa.m**6/square mol]
b = R*Tc/(8*Pc)## [cubic m/mol]
V = 2.425*10**(-3)## [cubic m/mol]
# From Eqn. 6.173:
Sr = R*log(P*(V - b)/(R*T))## [J/mol K]
print "Residual Entropy is %.4f J/mol K\n"%(Sr)#
# From Eqn. 6.174:
Hr = P*V - R*T - (a/V)## [J/mol]
print "Residual Enthalpy is %.4f J/mol K\n"%(Hr)#
Ur = -(a/V)## [J/mol]
print "Residual Internal Energy is %.4f J/mol K\n"%(Ur)#
Example: 6.23 - Page: 239


Residual Entropy is -0.3116 J/mol K

Residual Enthalpy is -108.9010 J/mol K

Residual Internal Energy is -56.3290 J/mol K

Example: 6.24 Page: 244

In [1]:
from __future__ import division
from math import exp
print "Example: 6.24 - Page: 244\n\n"

# Solution

# *****Data******#
B = -4.28*10**(-4)## [cubic m/mol]
P = 15*10**5## [Pa]
T = 273 + 87## [K]
R = 8.314## [J/atm K]
#****************#

# Z = 1 + (B*P/(R*T))
# (Z - 1)/P = B/(R*T)
# From Eqn. 6.192 (b)
# ln(f/P) = integral('(Z - 1)/P','P',0,P) = B*P/(R*T)
f = P*exp(B*P/(R*T))## [Pa]
print "Fugacity of iso-butane is %.2f atm"%(f/10**5)#
Example: 6.24 - Page: 244


Fugacity of iso-butane is 12.10 atm