#pg 625
print('Example 19.1');
# aim : To compare the moisture content and the true specific volumes of atmosphere air
# (a) temperature is 12 C and the air is saturaded
# (b) temperature is 31 C and air is .75 saturated
# Given values
P_atm = 101.4;# atmospheric pressure, [kN/m^2]
R = .287;# [kJ/kg K]
# solution
# (a)
T = 273+12;# air temperature, [K]
# From steam table at 12 C
p = 1.4;# [kN/m^2]
vg = 93.9;# [m^3/kg]
pa = P_atm-p;# partial pressure of the dry air, [kN/m^2]
va = R*T/pa;# [m^3/kg]
mw = va/vg;# mass of water vapor in the air,[kg]
v = va/(1+mw);# specific volume of humid air, [m^3/kg]
print ' (a) The mass of water vapor in the humid air is (kg) = ',round(mw,4)
print ' The specific volume of humid air is (m^3/kg) = ',round(v,3)
# (b)
x = .75;# dryness fraction
T = 273.+31;# air temperature, [K]
# From steam table
p = 4.5;# [kN/m^2]
vg = 31.1;# [m^3/kg]
pa = P_atm-p;# [kN/m^2]
va = R*T/pa;# [m^3/kg]
mw1= va/vg;# mass of water vapor in the air, [kg]
mw_actual = mw1*x;# actual mass of vapor, [kg]
v = va/(1+mw_actual);# true specific volume of humid air,[m^3/kg]
print ' (b) The mass of water vapor in the humid air is (kg) = ',round(mw1,4)
print ' The specific volume of humid air is (m^3/kg) = ',round(v,3)
ewv = mw_actual/mw ;
print ' On the warm day the air contains ',round(ewv,1),' times the mass of water vapor as on the cool day \n'
# End
#pg 626
print('Example 19.2');
# aim : To determine
# (a) the partial pressures of the vapor and the dry air
# (b) the specific humidity of the mixture
# (c) the composition of the mixture
# Given values
phi = .65;# Relative humidity
T = 273.+20;# temperature, [K]
p = 100.;# barometric pressure, [kN/m^2]
# solution
# (a)
# From the steam table at 20 C
pg = 2.34;# [kN/m^2]
ps = phi*pg;# partial pressure of vapor, [kN/m^2]
pa = p-ps;# partial pressure of dry air, [kN/m^2]
print ' (a) The partial pressure of vapor is (kN/m^2) = ',ps
print ' The partial pressure of dry air is (kN/m^2) = ',pa
# (b)
# from equation [15]
omega = .622*ps/(p-ps);# specific humidity of the mixture
print ' (b) The specific humidity of the mixture is (kg/kg dry air) = ',round(omega,4)
# (c)
# using eqn [1] from section 19.2
y = 1/(1+omega);# composition of the mixture
print ' (c) The composition of the mixture is = ',round(y,2)
# End
#pg 627
print('Example 19.3');
# aim : To determine
# (a) the specific humidity
# (b) the dew point
# (c) the degree of superheat of the superheated vapor
# (d) the mass of condensate formed per kg of dry air if the moist air is cooled to 12 C
# Given values
t = 25.;# C
T = 273.+25;# moist air temperature, [K]
phi = .6;# relative humidity
p = 101.3;# barometric pressure, [kN/m^2]
R = .287;# [kJ/kg K]
# solution
# (a)
# From steam table at 25 C
pg = 3.17;# [kN/m^2]
ps = phi*pg;# partial pressure of the vapor, [kN/m^2]
omega = .622*ps/(p-ps);# the specific humidity of air
print ' (a) The specific humidity is (kg/kg air) = ',round(omega,4)
# (b)
# Dew point is saturated temperature at ps is,
t_dew = 16.+2*(1.092-1.817)/(2.062-1.817);# [C]
print ' (b) The dew point is (C) = ',round(t_dew,2)
# (c)
Dos = t-t_dew;# degree of superheat, [C]
print ' (c) The degree of superheat is (C) = ',round(Dos,2)
# (d)
# at 25 C
pa = p-ps;# [kN/m^2]
va = R*T/pa;# [m^3/kg]
# at 16.69 C
vg = 73.4-(73.4-65.1)*.69/2;# [m^3/kg]
ms1= va/vg;
# at 12 C
vg = 93.8;# [m^3/kg]
ms2 = va/vg;
m = ms1-ms2;# mas of condensate
print ' (d) The mass of condensate is (kg/kg dry air) = ',round(m,4)
print 'there is calculation mistake in the book so answer is no matching'
# End
#pg 630
print(' Example 19.4');
# aim : To determine
# (a) the volume of external saturated air
# (b) the mass of air
# (c) the heat transfer
# (d) the heat transfer required by the combind water vapour
# given values
Vb = 56000.;# volume of building, [m^3]
T2 = 273.+20;# temperature of air in thebuilding, [K]
phi = .6;# relative humidity
T1 = 8+273.;# external air saturated temperature, [K]
p0 = 101.3;# atmospheric pressure, [kN/m^2]
cp = 2.093;# heat capacity of saturated steam, [kJ/kg K]
R = .287;# gas constant, [kJ/kg K]
# solution
# from steam table at 20 C saturation pressure of steam is,
pg = 2.34;# [kN/m^2]
# (a)
pvap = phi*pg;# partial pressure of vapor, [kN/m^2]
P = p0-pvap;# partial pressure of air, [kN/m^2]
V = 2*Vb;# air required, [m^3]
# at 8 C saturation pressure ia
pvap = 1.072;# [kN/m^2]
P2 = p0-pvap;# partial pressure of entry at 8 C, [kN/m^2]
# using P1*V1/T1=P2*V2/T2;
V2 = P*V*T1/(T2*P2);# air required at 8 C, [m^3/h]
print ' (a) The volume of air required is (m^3/h) = ',round(V2)
# (b)
# assuming
pg = 1.401;# pressure, [kN/m^2]
Tg = 273.+12;# [K]
vg = 93.8;# [m^3/kg]
# at constant pressure
v = vg*T2/Tg;# volume[m^3/kg]
mv = V/v;# mass of vapor in building at 20 C, [kg/h]
# from steam table at 8 C
vg2 = 121.;# [m^3/kg]
mve = V2/vg2;# mass of vapor supplied with saturated entry air, [kg/h]
mw = mv-mve;# mass of water added, [kg/h]
print ' (b) The mass of water added is (kg/h) = ',round(mw,1)
# (c)
# for perfect gas
m = P2*V2/(R*T1);# [kg/h]
Cp = .287;# heat capacity, [kJ/kg K]
Q = m*Cp*(T2-T1);# heat transfer by dry air,[kJ/h]
print ' (c) The heat transfer required by dry air is (MJ/h) = ',round(Q*10**-3,3)
# (d)
# from steam table
h1 = 2516.2;# specific enthalpy of saturated vapor at 8 C,[kJ/kg]
hs = 2523.6;# specific enthalpy of saturated vapor at 20 C, [kJ/kg]
h2 = hs+cp*(T2-T1);# specific enthalpy of vapor at 20 c, [kJ/kg]
Q1 = mve*(h2-h1);# heat transfer required for vapor, [kJ]
# again from steam table
hf1 = 33.6;# [kJ/kg]
hg3 = 2538.2;# [kJ/kg]
Q2 = mw*(hg3-hf1);# heat transfer required for water, [kJ/h]
Qt = Q1+Q2;# total heat transfer, [kJ/h]
print ' (d) The heat transferred required for vapor+supply water is (MJ/h) = ',round(Qt*10**-3,3)
print ' there is minor variation in the answer reported in the book due to rounding off error'
# End