Chapter 3: Properties of Pure Substances

Example 3-1 ,Page No.128

In [2]:
#Given values
m=50;#mass in kg
T=90;#temperature in C

#Values from Table A-4
P=70.183;#in kPa
v=0.001036;#in m^3/kg

#Calculation
V=m*v;#equating dimensions
print'pressure is %f kPa'%round(P,3);
print'total volumne of tank becomes %f m^3'%round(V,4)
pressure is 70.183000 kPa
total volumne of tank becomes 0.051800 m^3

Example 3-2 ,Page No.128

In [1]:
#Given values
V=2.0;#volumne of saturated water vapor in ft^3
P=50.0;#pressure in psia

#Values from Table A-5E
T=280.99;#in F
v=8.5175;#in ft^3/lbm

#caluclation
m=V/v;#dimension analysis
print'Temperature inside cylinder %f F'%round(T,2);
print'mass of vapour inside cylinder %f lbm'%round(m,3);
Temperature inside cylinder 280.990000 F
mass of vapour inside cylinder 0.235000 lbm

Example 3-3 ,Page No.128

In [4]:
#Constants used
Hfg=2257.5;#enthalpy of vaporization in kJ/kg

#Given values
m=200.0/1000;#mass converting in kg
P=100;#Pressure at which process takes place in kPa

#Values from Table A-5
vg=1.6941;#specific vol of sat liq
vf=0.001043;#specific vol of vapor

#Caluclation
vfg=vg-vf;
V=m*vfg;
print'the volume change %f m^3'%round(V,4);
E=m*Hfg;
print'amount of energy transferred to the water %f kJ'%round(E,1)
the volume change 0.338600 m^3
amount of energy transferred to the water 451.500000 kJ

Example 3-4 ,Page No.131

In [5]:
#Given values
mt=10#mass of water in kg
mf=8;#mass of water in liquid form in kg
T=90;#temperature in C

#Values from Table A-4
P=70.183;#in kPa
vf=0.001036;#in m^3
vg=2.3593;#in m^3

#Caluclation
mg=mt-mf;
V=mf*vf+mg*vg;# V= Vg + Vf
print'the volume of the tank %f m^3'%round(V,2);
print'the pressure in the tank %f kPa'%round(P,3)
the volume of the tank 4.730000 m^3
the pressure in the tank 70.183000 kPa

Example 3-5 ,Page No.131

In [1]:
#Given values
m=4;#mass of refrigerant-134a in kg
V=80.0/1000;#volumne converting into m^3
P=160;#pressure in kPa

#Values from Table A-12
vf=0.0007437;
vg=0.12348;
T=-15.60;
hf=31.21;
hfg=209.90;

#Caluclations
v=V/m;
#vg>v>vf therefore it is a saturated mix
#hence temp will same as saturation temp
print'the temperature %f celcius'%round(T,2)
x=(v-vf)/(vg-vf);#x=vg/vfg i.e the dryness fraction
print'the quality is %f'%round(x,3);
h=hf+x*hfg;
print'the enthalpy of the refrigerant %f kJ/kg'%round(h,1);
mg=x*m;
Vg=mg*vg;
print'the volume occupied by the vapor phase %f m^3'%round(Vg,4)
the temperature -15.600000 celcius
the quality is 0.157000
the enthalpy of the refrigerant 64.100000 kJ/kg
the volume occupied by the vapor phase 0.077500 m^3

Example 3-7 ,Page No.133

In [6]:
#Given values
P=0.5;#pressure in MPa
h=2890.0;#enthaply in kJ/kg

#from Table A–6
#at P=0.5 MPa
T1=200.0;
h1=2855.8;
T2=250;
h2=2961.0;
# we need linear interpolation 

#calculatiom
#by interpolation we can say that
#h=h1+(T-T1)/(T2-T1)*(h2-h1)
#we have to find T
T=(h-h1)/(h2-h1)*(T2-T1)+T1;
print'temperature of water %f celcius'%round(T,1)
temperature of water 216.300000 celcius

Example 3-8 ,Page No.134

In [18]:
#Given values
T=80;#temperature of compressed liquid water in C
P=5;#pressure in KPa

#from Table A–7
#at compressed liq given conditions
u=333.82;

#from Table A-4
#at saturation
usat=334.97;

#calcualtion
e=(usat-u)/u*100;
print'internal energy of compressed liquid water using data from the compressed liquid table %f kJ/kg '%round(u,2);
print'internal energy of compressed liquid water using saturated liquid data %f kJ/kg '%round(usat,2);
print'the error involved %f the second case'%round(e,2)
internal energy of compressed liquid water using data from the compressed liquid table 333.820000 kJ/kg 
internal energy of compressed liquid water using saturated liquid data 334.970000 kJ/kg 
the error involved 0.340000 the second case

Example 3-9 ,Page No.135

In [7]:
#part a
print('Part a');

#given values
P=200;#in KPa
x=0.6;

#from Table A-5
T=120.21;
uf=504.50;
ufg=2024.6;

#calcualtions
u=uf+(x*ufg);
print'temperature %f Celcius '%round(T,2);
print'internal energy %f kJ/kg'%round(u,2);
print('saturated liquid–vapor mixture at a pressure of 200 kPa');

#part b
print('Part b');

#given values
T=125;#in C
u=1600;#in kJ/kg

#from Table A–4
uf=524.83;
ug=2534.3;
#ug>u>ufg so its aturated liquid–vapor mixture
P=232.23;

#calculation
ufg=ug-uf;
x=(u-uf)/ufg;
print'Pressure %f kPa'%round(P,2);
print'x is %f'%round(x,3);
print('saturated liquid–vapor mixture at a temp of 125 of celcius');

#part c
print('Part c');

#given values
P=1000;#in kPa
u=2950;#in kJ/kg

#from Table A–6
uf=761.39;
ug=2582.8;
#u>ug so its superheated steam
T=395.2;

#calculation
print'temperature %f Celcius'%round(T,1);
print('superheated vapor at 1MPa');

#part d
print('Part d');

#given values
T=75;#in C
P=100;#in kPa

#from Table A–5
Tsat=151.83;
#T<Tsat so it is a compressed liquid
#the given pressure is much lower than the lowest pressure value in the compressed liquid table i.e 5 MPa
#assuming, the compressed liquid as saturated liquid at the given temperature

#from Table A-4
u=313.99;
print'Internal energy %f kJ/kg'%round(u,2);
print('the compressed liquid condition');

#Part e
print('Part e');

#given values
P=850;#in kPa
x=0;

#x=0 therefore it is a saturateed liquid condition
#from Table A-5
T=172.94;
u=731.00;
print'temperature %f Celcius'%round(T,2);
print'Internal energy %f kJ/kg'%round(u,2);
print('saturateed liquid condition')
Part a
temperature 120.210000 Celcius 
internal energy 1719.260000 kJ/kg
saturated liquid–vapor mixture at a pressure of 200 kPa
Part b
Pressure 232.230000 kPa
x is 0.535000
saturated liquid–vapor mixture at a temp of 125 of celcius
Part c
temperature 395.200000 Celcius
superheated vapor at 1MPa
Part d
Internal energy 313.990000 kJ/kg
the compressed liquid condition
Part e
temperature 172.940000 Celcius
Internal energy 731.000000 kJ/kg
saturateed liquid condition

Example 3-10 ,Page No.139

In [23]:
#constants used
R=0.287# in kPa m^3/kg K

#given values
l=4;#dimensions of room in m
b=5;#dimensions of room in m
h=6;#dimensions of room in m
P=100.0;#pressure in kPa
T=25+273.0;#temperature in Kelvin

#calculation
V=l*b*h;
m=P*V/R/T;
print'the mass of the air %f kg'%round(m,1)
the mass of the air 140.300000 kg

Example 3-11 ,Page No.142

In [8]:
#given values
P=1;#pressure in MPa
T=50+273;#tempearture converting into Kelvin
vgiv=0.021796;#specific vol. given in m^3

#from Table A-1
R=0.0815;
Pcr=4.059;
Tcr=374.2;

#calculation

#Part A
v1=R*T/(P*1000);
print'specific volume of refrigerant-134a under the ideal-gas assumption %fm^3/kg'%round(v1,6);
e=(v1-vgiv)/vgiv;
print'an error of %f'%round(e,3);

#Part B
#determine Z from the compressibility chart, we will calculate the reduced pressure and temperature
Pr=P/Pcr;
Tr=T/Tcr;
#from chart
Z=0.84;
v=Z*v1;
print'specific volume of refrigerant-134a under the generalized compressibility chart %f m^3/kg'%round(v,6);
e=(v-vgiv)/vgiv;
print'an error of %f'%round(e,3);
specific volume of refrigerant-134a under the ideal-gas assumption 0.026325m^3/kg
an error of 0.208000
specific volume of refrigerant-134a under the generalized compressibility chart 0.022113 m^3/kg
an error of 0.015000

Example 3-12 ,Page No.143

In [12]:
#given values
v=0.51431;
T=600;

#from Table A-1E
R=0.5956;
Pcr=3200;
Tcr=1164.8;

#calculation

#Part A
#from Table A-6E
Pa=1000.0;#in psia
print'from the steam tables %i psia'%Pa;

#Part B
T=1060;#converted into R from F
Pb=R*T/v;
print'from the ideal-gas equation %i psia'%round(Pb,0);
e=(Pb-Pa)/Pa;
print'treating the steam as an ideal gas would result in an error of %f'%round(e,3)

#Part C
#calculating the pseudo-reduced specific volume and the reduced temperature
Vr=v/(R*Tcr/Pcr);
Tr=T/Tcr;
#from the compressibility chart
Pr=0.33;
P=Pr*Pcr;
print'from the generalized compressibility chart %i psia'%P
from the steam tables 1000 psia
from the ideal-gas equation 1228 psia
treating the steam as an ideal gas would result in an error of 0.228000
from the generalized compressibility chart 1056 psia

Example 3-13 ,Page No.147

In [14]:
#Answer of part c-d are having slight difference due to approximation in molar volumne in the textbook which here is caluculated to the approximation of 7 decimal digits

from math import exp

#given values
T=175.0;#temperature in C
v=0.00375;#sp. volumne in m^3/kg
Pex=10000;#experimentaion determination

#from Table A-1
R=0.2968# in kPa m^3/kg  K

#calculating

#Part-a
P=R*T/v;
print'using the ideal-gas equation of state %i kPa'%(round(P))
e=(P-Pex)/Pex*100;
print'error is %f percent'%e;

#Part-b
#van der Waals constants from Eq. 3-23
a=0.175;
b=0.00138;
#from van der waal eq.
P=R*T/(v-b)-a/v**2;
print'using the van der Waals equation of state  is %i kPa'%(round(P));
e=(P-Pex)/Pex*100;
print'error is %f percent'%e;

#Part-c
#constants in the Beattie-Bridgeman equation from Table 3–4
A=102.29;
B=0.05378;
c=4.2*10**4;
Ru=8.314;#in kPa m^3/kmol K
M=28.013;#molecular weight in kg/mol
vb=M*v;#molar vol.
P=(Ru*T)/(vb**2)*(1-((c)/(vb*T**3)))*(vb+B)-(A/vb**2);
print'using the Beattie-Bridgeman equationis %i kPa'%(round(P));
e=(P-Pex)/Pex*100;
print'error is %f percent'%e;

#Part-d
#constants of Benedict-Webb-Rubin equation from Table 3–4
a=2.54;
b=0.002328;
c=7.379*10**4;
alp=1.272*10**-4;
Ao=106.73;
Bo=0.040704;
Co=8.164*10**5;
gam=0.0053;
P=((Ru*T)/vb)+((Bo*Ru*T)-Ao-Co/T**2)/vb**2+(b*Ru*T-a)/vb**3+(a*alp/vb**6)+(c/((vb**3)*(T**2)))*(1 + (gam/vb**2))*exp(-gam/vb**2);
print'using Benedict-Webb-Rubin equation %i kPa'%(round(P));
e=(P-Pex)/Pex*100;
print'error is %f percent'%e;
using the ideal-gas equation of state 13851 kPa
error is 38.506667 percent
using the van der Waals equation of state  is 9471 kPa
error is -5.288326 percent
using the Beattie-Bridgeman equationis 10109 kPa
error is 1.092970 percent
using Benedict-Webb-Rubin equation 10004 kPa
error is 0.039256 percent

Example 3-14 ,Page No.152

In [15]:
#given value
T=25;#air temperature over a lake in C

#from table 3-1
Psat=3.17;#in kPa

#calculations

#Relative Humidity 10%
Pv1=0.1*Psat
#Relative Humidity 80%
Pv2=0.8*Psat
#Relative Humidity 100%
Pv3=1*Psat

# from table 3-1 Tsat at these Pressures are
T1=-8.0;
T2=21.2;
T3=25.0;
print'with relative humidity 10, temperature is %i in C'%T1
print'with relative humidity 80, temperature is %i in C'%T2
print'with relative humidity 100, temperature is %i in C'%T3
with relative humidity 10, temperature is -8 in C
with relative humidity 80, temperature is 21 in C
with relative humidity 100, temperature is 25 in C