Chapter 4 : Properties of Steam

Example 4.1 pg : 20

In [1]:
# Variables
#Case 1
Vg = 0.132;
SV = 0.12;        #Specific Volume
#As SV is less than Vg, steam is wet

# Calculations and Results
x = SV/Vg;

print ' For Case 1 ';
print 'Part of wet steam: %2.2f'%(x);


#Case 2
T = 200;
Tsat = 179.9;     #Satuaration Temperature
#Steam is superheated as T > Tsat
D_sh = T-Tsat;

print ' For Case 2 ';
print 'Degree of Superheat: %2.1f C'%(D_sh);


#Case 3
P = 20.;       #Pressure in bars
Hf = 908.8;       #kJ/kg
Hfg = 1890.7;     #kJ/kg
Hg = 2799.5;      #kJ/kg
H = 2650;

#Steam is wet as Specific enthalpy is less than Hg

x = (H-Hf)/Hfg;

print ' For Case 3 ';
print 'Part of wet steam: %2.2f'%(x);


#Case 4
T = 150;      #in Celcius
SV = 0.3928;  #Specific Volume in m**3/kg
Vg = 0.3928;  #in m**3/kg

print ' For Case 4 ';
print 'As SV = Vg , steam is dry saturated'


#Case 5
P = 10;       #in bars
S = 5.697;
Sf = 2.319;
Sfg = 4.448;
Sg = 6.623;
#As Sample specific entropy is less than Sg and more than Sf, steam is wet

x = (S-Sf)/Sfg;
print ' For Case 5 ';
print 'Part of wet steam: %2.1f'%(x);
 For Case 1 
Part of wet steam: 0.91
 For Case 2 
Degree of Superheat: 20.1 C
 For Case 3 
Part of wet steam: 0.92
 For Case 4 
As SV = Vg , steam is dry saturated
 For Case 5 
Part of wet steam: 0.8

Example 4.2 pg : 21

In [2]:
# Variables
#At 10 bar pressure
P = 10.;       #in bars
x = 0.8;
Vg = 0.194;   #in kJ/kg

# Calculations and Results
W = P*100*x*Vg;
print 'External Work Done: %3.2f kJ/kg'%(W);


Hf = 762.8;       #in kJ/kg
Hfg = 2015.3;     #in kJ/kg
H = Hf+(x*Hfg);
U = H-W;
print 'Internal energy: %3.2f kJ/kg'%(U);


Vf = 0.001127;        #in m**3/kg
Uf = Hf-(P*100*Vf);
Ux = U-Uf;
print 'Internal Heat of Evaporation: %3.2f kJ/kg'%(Ux);


Sf = 2.139;       #in kJ/kg K
Sfg = 4.448;      #in kJ/kg K
S = Sf+(x*Sfg);
print 'Entropy of steam: %3.3f kJ/kg'%(S);
External Work Done: 155.20 kJ/kg
Internal energy: 2219.84 kJ/kg
Internal Heat of Evaporation: 1458.17 kJ/kg
Entropy of steam: 5.697 kJ/kg

Example 4.3 pg : 22

In [3]:
# Variables
#Condition at 10 bar pressure
#Steam is wet
x = 0.95;
P = 10;       #in bars
Hf = 762.8;       #in kJ/kg
Hfg = 2015.3;     #in kJ/kg

# Calculations and Results
H = Hf+(x*Hfg);
print 'Enthalpy : %3.2f kJ/kg'%(H);


#Now we calculate Work Done
Vg = 0.194;       #in m**3/kg
W = P*100*x*Vg;
U = H-W;
print 'Internal energy: %3.0f kJ/kg'%(U);
Enthalpy : 2677.34 kJ/kg
Internal energy: 2493 kJ/kg

Example 4.4 pg: 22

In [4]:
# Variables
#Condition at pressure 15 bars
P = 15.;       #in bars
Hf = 844.9;   # in kJ/kg
Hfg = 1947.3; #in kJ/kg
Vg = 0.132;   #in m**3/kg
x = 0.9;      #Dryness fraction

# Calculations and Results
W = P*100*x*Vg;
print 'External Work Done: %3.2f kJ/kg'%(W);

H = Hf+(x*Hfg);
U = H-W;
print 'Internal Energy: %3.1f kJ/kg'%(U);
External Work Done: 178.20 kJ/kg
Internal Energy: 2419.3 kJ/kg

Example 4.5 pg : 23

In [5]:
import math 

# Variables
x = 0.9;      #Dryness Fraction
m = 1.5;      #mass in kg
Cps = 2.1;
#Condition at 10 bars
P = 10.;
Tsat = 179.9;     #in Celcius
T = 250.;          #in Celcius
Hg = 2778.1;      #in kJ/kg
Vg = 0.194;       #in m**3/kg
Cps = 2.1;
H1 = Hg+(Cps*(T-Tsat));
Vsup = ((T+273)/(Tsat+273))*Vg;
U1 = H1-(P*100*Vsup);
Sf = 2.139;       #in kJ/kg K
Sfg = 4.448;      #in kJ/kg K
Sg = 6.623;       #in kJ/kg K
S1 = Sg+(Cps*math.log((T+273)/(Tsat+273)));

# Calculations and Results
#Conditions at 2.8 bars
P2 = 2.8;
Hf = 551.4;       #in kJ/kg
Hfg = 2170.7;     #in kJ/kg
Vg = 0.646;       #in m**3/kg
H2 = Hf+(x*Hfg);
U2 = H2-(P2*100*x*Vg);
Sf = 1.647;       #in kJ/kg K
Sfg = 5.368;      #in kJ/kg K
S2 = Sf+(x*Sfg);
U = m*(U2-U1);
print 'The change in internal energy: %3.1f kJ/kg'%(U);

S = S2-S1;
print 'The change in Entropy: %3.4f kJ/kg K'%(S);
The change in internal energy: -538.6 kJ/kg
The change in Entropy: -0.4470 kJ/kg K

Example 4.6 pg : 24

In [6]:
import math 

# Variables
#Conditions at 8 bar
P = 8.;                #Pressure in bar
x = 0.9;              #dryness fraction
Hf = 721.1;           #in kJ/kg
Hfg = 2048.0;         #in kJ/kg
Vg = 0.240;           #in m**3/kg
H1 = Hf+(x*Hfg);
V1 = x*Vg;

# Calculations and Results
#Enthalpy of superheated steam at 8 bar and 200 Celcius
Hg = 2769.1;
Cps = 2.1;
Tsup = 200+273;           #in Celcius
Tsat = 170.4+273;         #in Celcius
H2 = Hg+(Cps*(Tsup-Tsat));
V2 = (Vg*Tsup)/Tsat;
H = H2-H1;
print 'Heat supplied: %3.1f kJ/kg'%(H);

W = P*100*(V2-V1);
print 'Work Done: %3.3f kJ/kg'%(W);

#At 8 bar
Sf = 2.046;           #in kJ/kg K
Sfg = 4.617;          #in kJ/kg K
Sg = 6.663;           #in kJ/kg K
S1 = Sf+(x*Sfg);
S2 = Sg+(Cps*(math.log(Tsup/Tsat)));
S = S2-S1;
print 'The Enthalpy change during process: %3.1f kJ/kg K'%(S);
Heat supplied: 267.0 kJ/kg
Work Done: 32.017 kJ/kg
The Enthalpy change during process: 0.6 kJ/kg K

Example 4.7 pg : 25

In [7]:
# Variables
#Conditions at 10 bar
P1 = 10.;              #in bars
Hg = 2778.1;          #in kJ/kg
Tsat = 179.9+273;     #Temperature in K
Vg = 0.194;           #in m**3/kg

# Calculations and Results
#Conditions at 10 bar and 300 Celcius
Cps = 2.1;
Tsup = 300+273;
H1 = Hg+(Cps*(Tsup-Tsat));
V1 = Vg*(Tsup/Tsat);
U1 = H1-(P1*100*V1);
print 'The Internal energy: %3.1f kJ/kg'%(U1);


#At 1.4 bar and other conditions
P2 = 1.4;             #in bars
x = 0.8;              #Dryness Fraction
Hf = 458.4;           #in kJ/kg
Hfg = 2232.0;         #in kJ/kg
Vg = 1.237;           #in m**3/kg
H2 = Hf+(x*Hfg);
V2 = x*Vg;
U2 = H2-(P2*100*V2);
U = U2-U1;
print 'The change in internal energy: %3.1f kJ/kg'%(U);
The Internal energy: 2784.9 kJ/kg
The change in internal energy: -679.4 kJ/kg

Example 4.8 pg : 26

In [8]:
# Variables
#Conditions at 8 bar
P = 8.;            #in bars
x = 0.8;          #Dryness Fraction
Hf = 721.1;       #in kJ/kg
Hfg = 2048.0;     #in kJ/kg

# Calculations and Results
H1 = Hf+(x*Hfg);
H2 = H1+410;          #After adding 410 kJ of heat
Hg = 2769.1;      #in kJ/kg
print 'The Enthalpy of steam: %3.1f kJ/kg'%(H2);

print 'The steam is superheated'

V2 = 0.240;       #in m**3/kg
Vg = V2;
Den = 1./Vg;
print 'The Density of steam: %3.3f kg/m**3'%(Den);
The Enthalpy of steam: 2769.5 kJ/kg
The steam is superheated
The Density of steam: 4.167 kg/m**3

Example 4.9 pg : 27

In [9]:
#For throttling H1 = H2

# Variables
#At 11 bar
Hf = 781.3;           #in kJ/kg
Hfg = 2000.4;         #in kJ/kg

# Calculations
#At 1 bar
Hg = 2675.5;          #in kJ/kg
x = (Hg-Hf)/Hfg;

# Results
print 'The Dryness Fraction: %3.3f kJ/kg'%(x);
The Dryness Fraction: 0.947 kJ/kg

Example 4.10 pg : 27

In [11]:
# Variables
#Conditions at 4 bar
P1 = 4.;               #in bars
Hf = 604.7;           #in kJ/kg
Hfg = 2133.8;         #in kJ/kg
Vg = 0.463;           #in m**3/kg
x1 = 0.9;
H1 = Hf+(x1*Hfg);
V1 = x1*Vg;

# Calculations and Results
#Now at 12 bar pressure
P2 = 12;              #in bars
V2 = (P1*V1)/P2;
Vg = 0.163;           #in m**3/kg
print 'At 12 bar, V2: %3.3f kJ/kg'%(V2);

print 'As Vg>V2, steam is wet'

x2 = V2/Vg;
print 'The dryness fraction at 12 bars: %3.2f '%(x2);


Hf = 798.6;           #in kJ/kg
Hfg = 1986.2;         #in kJ/kg
H2 = Hf+(x2*Hfg);
print 'The Final enthalpy of steam: %3.1f kJ/kg'%(H2);

# note : rounding off error.
At 12 bar, V2: 0.139 kJ/kg
As Vg>V2, steam is wet
The dryness fraction at 12 bars: 0.85 
The Final enthalpy of steam: 2491.1 kJ/kg

Example 4.11 pg : 28

In [12]:
# Variables
#At 20 degree Celcius
Cpw = 4.187;              #in kJ/kg
Tw = 20.;
H1 = Cpw*Tw;

# Calculations
#At 8 bar condition
m = 4;                #mass in kg
Cps = 2.1;            #in kJ/kg
Tsat = 170.4+273;     #in K
Hg = 2769.1;          #in kJ/kg
Tsup = 200+273;       #in K
H2 = Hg+(Cps*(Tsup-Tsat));
Q = m*(H2-H1);

# Results
print 'Heat to be added: %3.1f kJ'%(Q);
Heat to be added: 10990.1 kJ

Example 4.12 pg : 29

In [13]:
# Variables
#Combined Seperating and Throttling Calorimeter
m1 = 2;       #mass of water seperated in kg
m = 20.5;     #Steam discharged from calorimeter in kg
mt = m1+m;    #Steam inlet in kg

# Calculations
x1 = m/(mt);      #Dryness fraction

#At 12 bar pressure
Hf = 798.6;       #in kJ/kg
Hfg = 1986.2;     #in kJ/kg

P_bar = 760;          #Pressure in mm
P_fin = 5;            #Pressure in mm
P = (P_bar+P_fin)*1.01325/P_bar;      #Absolute Pressure

#Now at 1.02 bar
Cp = 2.2;         #in kJ/kg K
Hg = 2676.34;         #in kJ/kg
Tsat = 99.66+273;     #in K
Tsup = 110+273;       #in K
H2 = Hg+(Cp*(Tsup-Tsat));
x2 = (H2-Hf)/Hfg;
x = x1*x2;

# Results
print 'The Dryness Fraction: %3.3f'%(x);
The Dryness Fraction: 0.872

Example 4.13 pg : 29

In [14]:
# Variables
#At 7 bar and 300 Celcius
P = 7.;            #in bars
Cps = 2.1;
Tsup = 300+273;   #in K
Tsat = 165+273;   #in K
Hg = 2763.5;      #in kJ/kg

# Calculations
H1 = Hg+(Cps*(Tsup-Tsat));

x2 = 0.9;          #Dryness Fraction
Hf = 697.2;       #in kJ/kg
Hfg = 2066.3;     #in kJ/kg
H2 = Hf+(x2*Hfg);
m = (H1-Hg)/(Hg-H2);

# Results
print 'The mass flow rate of wet steam: %3.3f kg/kg'%(m);
The mass flow rate of wet steam: 1.372 kg/kg

Example 4.14 pg : 30

In [16]:
# Variables
#Conditions at 10 bar
P = 10.;                   #in bar
Tsat = 179.9+273;         #in K
Hf = 762.8;               #in kJ/kg
Hfg = 2015.3;             #in kJ/kg
Hg = 2778.1;              #in kJ/kg
Vg = 0.194;               #in m**3/kg
Sf = 2.139;               #in kJ/kg K
Sg = 6.623;               #in kJ/kg K
Sfg = 4.448;              #in kJ/kg K
x = 0.91;                 #Dryness Fraction
m = 3.;                    #in kg

# Calculations and Results
#Now for wet steam
H = Hf+(x*Hfg);
H_final = m*H;
print 'The total Enthalpy: %3.1f kJ'%(H_final);

V = x*Vg;
U = H-(P*100*V);
U_final = m*U;
print 'The Internal Energy: %3.1f kJ'%(U_final);

S = Sf+(x*Sfg);
S_final = m*S;
print 'The Entropy: %3.3f kJ/K'%(S_final);

#Now Case 2
print 'Now for Case 2 ';
Tsat = 179.9+273;         #in K
Tsup = 200+273;           #in K
Cp = 2.1;                 #in kJ/kg K
H = Hg+(Cp*(Tsup-Tsat));
H_final = m*H;
print 'The Enthalpy: %3.1f kJ'%(H_final);

Vsup = (Tsup*Vg)/Tsat;
U = H-(P*100*Vsup);
U_final = m*U;
print 'The change in internal energy: %3.1f kJ'%(U_final);

S = Sg+(Cp*math.log(Tsup/Tsat));
S_final = m*S;
print 'The Entropy: %3.1f kJ/K'%(S_final);


#Now Case 3
print ' Now for case 3 ';
H = Hg;
H_final = m*H;            #in  kJ
print 'The total enthalpy: %3.1f kJ'%(H_final);

V = Vg;
U = H-(P*100*V);
U_final = m*U;
print 'The change in internal energy: %3.1f kJ'%(U_final);

S = Sg;
S_final = m*S;
print 'The total entropy: %3.3f kJ/kg'%(S_final);

# note : rounding off error
The total Enthalpy: 7790.2 kJ
The Internal Energy: 7260.5 kJ
The Entropy: 18.560 kJ/K
Now for Case 2 
The Enthalpy: 8460.9 kJ
The change in internal energy: 7853.1 kJ
The Entropy: 20.1 kJ/K
 Now for case 3 
The total enthalpy: 8334.3 kJ
The change in internal energy: 7752.3 kJ
The total entropy: 19.869 kJ/kg

Example 4.15 pg : 32

In [17]:
import math 

# Variables
#At 15 bar condition
Tsat = 198.3+273;         #in K
m = 7.;                    #in kg
Hg = 2792.2;              #in kJ/kg
Tsup = 300.+273;           #in K
Cps = 2.1;                #in kJ/kg K

# Calculations and Results
H1 = Hg+(Cps*(Tsup-Tsat));
Cpw = 4.187;              #in kJ/kg K
H2 = Cpw*50;
Q = m*(H1-H2);
print 'The total amount of heat required: %3.1f kJ'%(Q);

Sg = 6.445;               #in kJ/kg K
S2 = Sg+(Cps*math.log(Tsup/Tsat));
Sf = 0.704;               #in kJ/kg K
S1 = Sf;
S = m*(S2-S1);
print 'The change in Entropy: %3.2f kJ/K'%(S);
The total amount of heat required: 19574.9 kJ
The change in Entropy: 43.06 kJ/K

Example 4.16 pg : 33

In [18]:
# Variables
#Conditions at 10 bar
P = 10.;               #in bar
Tsat = 179.9+273;     #in K
Hf = 762.8;           #in kJ/kg
Hfg = 2015.3;         #in kJ/kg
Hg = 2778.1;          #in kJ/kg
Vg = 0.194;           #in m**3/kg
x = 0.7;              #Dryness Fraction
V = x*Vg;
m = 0.2/V;            #mass in kg
mf = 2/V;            #mass in kg

# Calculations and Results
H = Hf+(x*Hfg);
H_tot = H*mf;
print 'The total enthalpy: %3.1f kJ'%(H_tot);

U = H-(P*100*V);
U_tot = U*mf;
print 'The internal energy: %3.1f kJ'%(U_tot);

W = P*100*V;
W_tot = W*mf;
print 'The external work of evaporation: %3.1f kJ'%(W_tot);
The total enthalpy: 32010.5 kJ
The internal energy: 30010.5 kJ
The external work of evaporation: 2000.0 kJ

Example 4.17 pg : 34

In [19]:
# Variables
#Conditions at 10 bar pressure
P = 10.;               #in bar
Tsat = 179.9+273;     #in K
Tsup = 350+273;
x = 0.9;              #Dryness Fraction
Hf = 762.8;           #in kJ/kg
Hfg = 2015.3;         #in kJ/kg
Hg = 2778.1;          #in kJ/kg
Vg = 0.194;           #in m**3/kg
Cps = 2.1;            #in kJ/kg K

# Calculations
Ha = Hg+(Cps*(Tsup-Tsat));
Hb = Hf+(x*Hfg);
H_mix = (Ha+Hb)/2;
Tsupe = ((H_mix-Hg)/Cps)+Tsat;
Tsuper = Tsupe-273;


# Results
print 'Temperature of superheated steam: %3.0f Celcius'%(Tsuper);
Temperature of superheated steam: 217 Celcius

Example 4.18 pg: 34

In [20]:
# Variables
#Now at 10 bar pressure
V = 1.5;              #Volume in m**3
P = 10;               #Pressure in bar
x = 0.91;             #Dryness fraction
Vg = 0.194;           #in m**3/kg
m = V/Vg;

# Calculations
Vf = x*Vg;
m_f = V/Vf;

# Results
print 'Amount of water to be placed in container: %2.2f kg'%(m);
print 'Mass of water required: %2.2f kg'%(m_f);
Amount of water to be placed in container: 7.73 kg
Mass of water required: 8.50 kg

Example 4.19 pg : 35

In [21]:
# Variables
#Conditions at 7 bat
P = 7.;                #in bar
Tsat = 165.+273;       #in K
Hf = 697.2;           #in kJ/kg
Hfg = 2066.3;         #in kJ/kg
Hg = 2763.5;          #in kJ/kg
Vg = 0.273;           #in m**3/kg
D = 0.02;             #in m
vel = 17.;             #in m/s
Cps = 4.187;          #in kJ/kg K
Tw1 = 25.;             #in Celcius
Tw2 = 100.;            #in Celcius
Vfr = (22./7)*D*D*vel*(1./4)*60;       #Volume flow rate in m**3/min
x = 0.9;              #Dryness Fraction
V = x*Vg;

# Calculations and Results
Mfr = Vfr/V;          #Mass flow rate
print 'The mass flow rate of steam: %2.2f kg/min'%(Mfr);

H1 = Hf+(x*Hfg);
H2 = Cps*100;
Mw = (Mfr*(H1-H2))/(Cps*(Tw2-Tw1));
print 'The mass flow rate of water: %2.2f kg/min'%(Mw);
The mass flow rate of steam: 1.30 kg/min
The mass flow rate of water: 8.88 kg/min

Example 4.20 pg : 36

In [22]:
# Variables
#Conditions at 9 bar
P = 9.;                #in bar
Tsat = 175.4+273;     #in K
Vg = 0.215;           #in m**3/kg
Hf = 742.8;           #in kJ/kg
Hfg = 2031.1;         #in kJ/kg
Hg = 2773.9;          #in kJ/kg
T2 = 250.+273;         #in K
x = 0.91;             #Dryness Fraction
V1 = x*Vg;

# Calculations and Results
V2 = 0.2696;          #From Steam Table
W = P*100*(V2-V1);
print 'The Work Output: %2.2f kJ/kg'%(W);

H1 = Hf+(x*Hfg);
H2 = 2946.3;          #From steam table in kJ/kg
Q = H2-H1;
print 'The heat supplied to steam: %2.2f kJ/kg'%(Q);

U = Q-W;
print 'The internal energy of steam increases by: %2.2f kJ/kg'%(U);
The Work Output: 66.56 kJ/kg
The heat supplied to steam: 355.20 kJ/kg
The internal energy of steam increases by: 288.64 kJ/kg

Example 4.21 pg : 37

In [24]:
# Variables
#Conditions at 16 bar
P = 16.;                   #in bar
Vov = 0.015;              #Volume of Vessel
Mos = 0.1;                #Mass of steam
SV = Vov/Mos;             #Specific Volume
Vg = 0.124;               #in m**3/kg

# Calculations and Results
Tsat = 201.4+273;         #in K
Tsup = (SV/Vg)*Tsat;
print 'The temperature of steam: %2.2f K'%(Tsup);


#Now cooling takes place
Tsat = 191.16;            #From steam table
print 'After cooling, temperature of steam: %2.2f K'%(Tsat);


#Now cooled to 10 bar pressure
P1 = 16;              #in bar
Vg = 0.194;           #in m**3/kg
v = 0.15;             #in m**3/kg
x = v/Vg;             #Dryness Fraction

#For consmath.tant Volume process W = 0
Hg = 2794.0;          #in kJ/kg
Hf = 762.8;           #in kJ/kg
Hfg = 2015.3;         #in kJ/kg
Cps = 2.1;            #in kJ/kg K
Tsup = 300.84;        #in C
Tsat = 201.4;         #in C
H1 = Hg+(Cps*(Tsup-Tsat));
U1 = H1-(P1*100*v);
P2 = 10;              #in bar
H2 = Hf+(x*Hfg);
U2 = H2-(P2*100*v);
Q = U2-U1;
print 'Heat rejected by system: %2.2f kJ/kg'%(Q);

# note : rounding off error.
The temperature of steam: 573.87 K
After cooling, temperature of steam: 191.16 K
Heat rejected by system: -591.80 kJ/kg

Example 4.22 pg : 38

In [26]:
# Variables
#Isothermal process
P = 10.;                   #in bar
Tsat = 179.9+273;         #in K
Vg = 0.194;               #in m**3/kg
Hf = 762.6;               #in kJ/kg
Hfg = 2015.3;             #in kJ/kg
Hg = 2778.1;              #in kJ/kg
x1 = 1.;                   #Dryness Fraction
Sf = 2.139;               #in kJ/kg K
Sfg = 4.448;              #in kJ/kg K
Sg = 6.623;               #in kJ/kg K
V = 0.3;                  #in m**3
m = V/Vg;                 #in kg
V2 = Vg/2;
x2 = V2/Vg;               #Dryness Fraction

# Calculations and Results
W = P*100*(V2-Vg)*m;
print 'Work Done: %2.2f kJ'%(W);

H1 = Hg;
H2 = Hf+(x2*Hfg);
Q = m*(H2-H1);
print 'Change in Enthalpy: %2.2f kJ'%(Q);

U = (Q-W);
print 'Change in total Internal Energy: %2.2f kJ'%(U);

S1 = Sg;
S2 = Sf+(x2*Sfg);
S = m*(S2-S1);
print 'Change in Entropy: %2.2f kJ/K'%(S);


#Now for case 2 where PV = C
print 'Now for case 2';


V01 = 0.097;
V02 = 0.5*V01;
P1 = 10;               #in bars
P2 = (P1*V01)/V02;      #in bars

#Now at 20 bars
Vg1 = 0.0996;              #in m**3/kg
V2 = 0.097;
x2 = V2/Vg1;               #Dryness Fraction
Hf = 908.8;               #in kJ/kg
Hfg = 1890.7;             #in kJ/kg
H2 = Hf+(x2*Hfg);
H = m*(H2-Hg);
print 'Change in Enthalpy: %2.2f kJ'%(H);


W = m*P1*100*Vg*(math.log(V02/V01));
print 'Total work done: %2.2f kJ'%(W);


U = H;                #as P1 V1 =  P2 V2
Q = U+W;
print 'Change in Enthalpy: %2.2f kJ'%(Q);


#Now at 20 bar pressure
Sf = 2.447;               #in kJ/kg K
Sfg = 3.894;              #in kJ/kg K
Sg1 = 6.341;               #in kJ/kg K
S2 = Sf+(x2*Sfg);
S1 = Sg;
S = m*(S2-S1)
print 'Change in Entropy: %2.3f kJ/K'%(S);

# note : rounding off error.
Work Done: -150.00 kJ
Change in Enthalpy: -1558.53 kJ
Change in total Internal Energy: -1408.53 kJ
Change in Entropy: -3.49 kJ/K
Now for case 2
Change in Enthalpy: -43.23 kJ
Total work done: -207.94 kJ
Change in Enthalpy: -251.17 kJ
Change in Entropy: -0.593 kJ/K

Example 4.23 pg : 41

In [27]:
import math 

# Variables
#Initial conditions at 7 bar pressure
P1 = 7.;               #in bars
Vg1 = 0.273;           #in m**3/kg
V1 = Vg1;              #in m**3/kg
Hg1 = 2763.5;          #in kJ/kg
H1 = Hg1;
Tsat = 165+273;           #in K
Sf = 1.992;           #in kJ/kg K
Sfg = 4.716;          #in kJ/kg K
Sg = 6.708;           #in kJ/kg K
n = 1.1;

# Calculations and Results
#Final conditions at 0.5 bar
P2 = 0.5;             #in bars
V2 = ((P1*(V1**1.1))/P2)**(1./1.1);          #umath.sing P(V)**1.1 = Consmath.tant

W = ((P1*100*V1)-(P2*100*V2))/(n-1);
print 'Work Done: %3.2f kJ'%(W);


Hf2 = 340.6;              #in kJ/kg
Hfg2 = 2305.4;            #in kJ/kg
Vg2 = 3.24;               #in m**3/kg
x2 = V2/Vg2;              #Dryness Fraction

H2 = Hf2+(x2*Hfg2);

U1 = H1-(P1*100*V1);
U2 = H2-(P2*100*V2);
U = U2-U1;
print 'Change in Internal Energy: %3.2f kJ/kg'%(U);


Q = U+W;              #From First law of Thermodynamics
print 'Heat Transferred: %3.2f kJ/kg'%(Q);


S1 = Sg;
#At 0.5 bar
Sf2 = 1.091;              #in kJ/kg K
Sfg2 = 6.503;             #in kJ/kg K
Sg2 = 7.594;              #in kJ/kg K
S2 = Sf2+(x2*Sfg2);
S = S2-S1;
print 'Change in Entropy: %3.2f kJ/kg K'%(S);
Work Done: 407.63 kJ
Change in Internal Energy: -242.71 kJ/kg
Heat Transferred: 164.92 kJ/kg
Change in Entropy: 0.42 kJ/kg K

Example 4.24 pg :43

In [28]:
import math 

# Variables
#At state 1
P1 = 20;              #in bar
V = 2;
Vg1 = 0.0996;         #in m**3/kg
Tsat1 = 212.4+273;        #in K
Tsup1 = 573;          #in K
V1 = Vg1*(Tsup1/Tsat1);
m = V/V1;

#At state 2
V2 = V1;
Vg2 = V2;
P2 = 16.9;            #From Steam Table

#Calculations
Hg1 = 2799.5;         #in kJ/kg
Cps = 2.1;            #in kJ/kg K
H1 = m*(Hg1+(Cps*(Tsup1-Tsat1)));
U1 = H1-(P1*100*V);

Hg2 = 2795.5;         #in kJ/kg from Steam table
H2 = m*Hg2;
U2 = H2-(P2*100*V);

# Calculations and Results
Q = U2-U1;
print 'Heat Transferred: %3.1f kJ'%(Q);


Sg1 = 6.341;              #in kJ/kg K
S1 = Sg1+(Cps*math.log(Tsup1/Tsat1));

S2 = 6.4022;             #From Steam Table
S = m*(S2-S1);
print 'Change in Entropy: %3.3f kJ/K'%(S);
Heat Transferred: -2577.3 kJ
Change in Entropy: -4.886 kJ/K

Example 4.25 pg : 45

In [29]:
import math 

# Variables
#For Throttling process, H1 = H2
#At 15 bar pressure
P1 = 15.;                  #in bar
Hf1 = 844.9;              #in kJ/kg
Hfg1 = 1947.3;            #in kJ/kg
x1 = 0.73;                #Dryness Fraction

#At 1 bar pressure
P2 = 1.;                   #in bar
Hf2 = 417.5;              #in kJ/kg
Hfg2 = 2258.0;            #in kJ/kg
Hg2 = 2675.5;             #in kJ/kg
H2 = 2266.4;              #in kJ/kg

# Calculations and Results
H1 = Hf1+(x1*Hfg1);
x2 = (H2-Hf2)/Hfg2;

#Now if x1 = 0.95
H1 = Hf1+(0.95*Hfg1);
H2 = H1;

#At 1 bar
Hg = 2675.5;
Cps = 2.1;
x = 0.93;                 #New dryness fraction
T = (H2-Hg)/Cps;          #Temperature difference
Tsat = 99;                #in Celcius
Tsup = Tsat+T;
print 'Temperature of superheated steam: %3.1f Celcius'%(Tsup);


#Now at 15 bar
Sf = 2.315;               #in kJ/kg K
Sfg = 4.130;              #in kJ/kg K
Sg = 6.445;               #in kJ/kg K
S1 = Sf+(x*Sfg);

#Now at 1 bar
Sg1 = 7.360;              #in kJ/kg K
S2 = Sg1+(Cps*math.log((Tsup+273)/(Tsat+273)));
S = S2-S1;
print 'Change in Entropy: %3.2f kJ/kg K'%(S);
Temperature of superheated steam: 108.2 Celcius
Change in Entropy: 1.26 kJ/kg K

Example 4.26 pg : 46

In [30]:
#Heat lost by Steam = Heat gained by water and calorimeter
# Variables
ms = 2.;               #in kg
Hf1 = 697.2;          #in kJ/kg
Hfg1 = 2066.3;        #in kJ/kg
Hf2 = 146.7;          #in kJ/kg
T2 = 35.;              #in Celcius
T1 = 15.;              #in Celcius
mg = 56;              #in kg

# Calculations
Cpw = 4.187;          #in kJ/kg K
H_gained = mg*Cpw*(T2-T1);
x = (((H_gained)/2)+(Hf2-Hf1))/Hfg1;

# Results
print 'The dryness fraction is %2.2f '%(x);
The dryness fraction is 0.87 

Example 4.27 pg : 47

In [31]:
# Variables
Ms = 10.;
Mw = 1.;

# Calculations
x = (100*Ms)/(Ms+Mw);

# Results
print 'The Dryness Fraction of steam is %2.1f percent'%(x);
The Dryness Fraction of steam is 90.9 percent

Example 4.28 pg : 47

In [32]:
import math 

# Variables
P1 = 11.;              #in bar
P2 = 1.1;             #in bar
T2 = 130.+273;         #in K
Cps = 2.1;            #in kJ/kg K

# Calculations
#At 11 bar
Hf1 = 781.3;          #in kJ/kg
Hfg1 = 2000.4;        #in kJ/kg

#At 1.1 bar
Hg2 = 2679.7;         #in kJ/kg
Tsat = 102.3+273;     #in K
Tsup = 130+273;

#Now for throttling process, H1 = H2
H2 = Hg2+(Cps*(Tsup-Tsat));
x = ((H2-Hf1)*100)/Hfg1;

# Results
print 'The dryness fraction of steam: %2.1f'%(x);
The dryness fraction of steam: 97.8

Example 4.29 pg : 47

In [33]:
# Variables
#Combined seperating and throttling calorimeter
Ms = 5.;               #in kg
Mw = 0.5;             #in kg
Cps = 2.1;            #in kJ/kg K
Man = 166.8;          #in mm of Hg
Bar = 733.6;          #in mm of Hg

# Calculations
x1 = Ms/(Ms+Mw);
P = Man+Bar;
P_bar = (1.01325*P)/760;      #Pressure in bar

#From steam table
Hf1 = 742.8;              #in kJ/kg
Hfg1 = 2031.1;            #in kJ/kg
Tsat = 104.8+273;         #in K
Tsup = 110.3+273;         #in K
Hg = 2683.5;              #in kJ/kg

H2 = Hg+(Cps*(Tsup-Tsat));
x2 = (H2-Hf1)/Hfg1;
x = x1*x2;

# Results
print 'The dryness fraction of steam: %2.3f'%(x);
The dryness fraction of steam: 0.874

Example 4.30 pg : 48

In [34]:
#Combined seperating and throttling calorimeter

# Variables
Mw = 8.;                   #in kg
M = 63.;                   #in kg
Ms = M-Mw;                #in kg
P1 = 81.5;                #Pressure after throttling in mm
P2 = 754.;                 #Barometer reading in mm
SD = 13.6;                #Specific Density of Hg

# Calculations
x1 = Ms/(Ms+Mw);          #Dryness Fraction
P = (P1/SD)+P2;           #Pressure in mm
P = 1.01325;              #Pressure in bar

#Now at 7.5 bar pressure
Hf1 = 709.2;              #in kJ/kg
Hfg1 = 2057.0;            #in kJ/kg

#Now at 1.01325 bar
Hg2 = 2676.0;             #in kJ/kg
Tsat = 100+273;           #in K
Cps = 2.1;                #in kJ/kg K
Tsup = 110+273;           #in K

#For throttling H1 = H2
H2 = Hg2+(Cps*(Tsup-Tsat));
x2 = (H2-Hf1)/Hfg1;

x = x1*x2;

# Results
print 'The dryness fraction of steam: %2.3f'%(x);
The dryness fraction of steam: 0.844

Example 4.31 pg : 49

In [35]:
# Variables
#At 9.2 bar pressure
x1 = 0.96;                    #Dryness Fraction
Sf1 = 2.1038;                 #in kJ/kg K
Sg1 = 6.6151;                 #in kJ/kg K

#At 3.55 bar pressure
Sf2 = 1.7327;                 #in kJ/kg K
Sg2 = 6.9358;                 #in kJ/kg K
Vg2 = 0.5173;                 #in m**3/kg

#Now at 0.36 bar pressure
Vg3 = 4.408;                  #in m**3/kg

# Calculations
S1 = Sf1+(x1*(Sg1-Sf1));

#As process is adiabatic
S2 = S1;

#From steam table, Sg = 6.9358 > S2

x2 = (S2-Sf2)/(Sg2-Sf2);
V2 = x2*Vg2;

#As volume remains consmath.tant
V3 = V2;
x3 = V3/Vg3;

# Results
print 'The dryness fraction of steam: %2.3f'%(x3);
The dryness fraction of steam: 0.106

Example 4.32 pg : 50

In [36]:
# Variables
#At 10 bar pressure
m = 1./(0.9*0.194);

Hf1 = 762.6;              #in kJ/kg
x1 = 0.9;                 #Dryness Fraction
Hfg1 = 2013.6;            #in kJ/kg
H1 = Hf1+(x1*Hfg1);

# Calculations and Results
Hf2 = 640.1;              #in kJ/kg
Hfg2 = 2107.4;            #in kJ/kg
x2 = (H1-Hf2)/Hfg2;
Vg2 = 0.375;

Ms = (1./(x2*Vg2));
Vg3 = 0.462;
#Now mass of steam blown off
M = m-Ms;

print 'Mass of steam blown off: %2.3f kg'%(M);


V = 1;                #Volume in m**3
x3 = V/(Ms*Vg3);
print 'Dryness fraction of steam: %2.3f '%(x3);
Mass of steam blown off: 2.823 kg
Dryness fraction of steam: 0.745 

Example 4.33 pg : 51

In [37]:
# Variables
#At 25 bar pressure
P = 25.;                   #Pressure in bar
x = 0.8;                  #Dryness fraction
Hf = 962.1;               #in kJ/kg
Hfg = 1841;               #in kJ/kg
Vg = 0.0801;              #in m**3/kg

# Calculations and Results
H = Hf+(x*Hfg);
print 'Enthalpy: %2.1f kJ/kg'%(H);

U = H-(P*100*x*Vg);
print 'Internal Energy: %2.1f kJ/kg'%(U);
Enthalpy: 2434.9 kJ/kg
Internal Energy: 2274.7 kJ/kg

Example 4.34 pg : 51

In [38]:
import math 

# Variables
Ms = 20.;          #in kg
Mw = 2.;           #in kg
Cps = 2.1;        #in kJ/kg K
x1 = Ms/(Ms+Mw);  #Dryness fraction

#At 12 bar pressure
Hf1 = 798.6;          #in kJ/kg
Hfg1 = 1986.2;        #in kJ/kg

#At 1 bar pressure
Hg2 = 2675.5;         #in kJ/kg
Tsup = 110.+273;           #in K
Tsat = 99.+273;            #in K

# Calculations
#For throttling, H1 = H2
H2 = Hg2+(Cps*(Tsup-Tsat));
x2 = (H2-Hf1)/Hfg1;

x = x1*x2;

# Results
print 'Dryness fraction of steam: %2.4f kJ'%(x);
Dryness fraction of steam: 0.8696 kJ

Example 4.35 pg : 51

In [41]:
import math 

# Variables
V = 0.15;                 #in m**3
P = 4.;                    #in bar
x = 0.8;                  #Dryness fraction

#Now at 4 bar pressure
P = 4.;                    #in bar
Vg = 0.463;               #in m**3/kg

# Calculations
SV = x*Vg;
Mos = V/SV;               #Mass of Steam

#Now if Volume is 1 m**3

Ms = 1./SV;                #in kg
#At 4 bar pressure
Hf = 604.7;               #in kJ/kg
Hfg = 2133.8;             #in kJ/kg
H = Ms*(Hf+(x*Hfg));

# Results
print 'Enthalpy of 1 m**3 steam: %2.2f kJ'%(H);

# note : rounding off error.
Enthalpy of 1 m**3 steam: 6241.20 kJ

Example 4.36 pg : 53

In [42]:
import math 

# Variables
P1 = 9.;               #in bar
P2 = 1.;               #in bar
T2 = 115.+273;         #in K
m = 1.8;              #in kg
m1 = 0.2;             #in kg
x1 = m/(m+m1);        #Dryness fraction

# Calculations
#Now from steam table
Hf = 742.8;           #in kJ/kg
Hfg = 2031.1;         #in kJ/kg
Hg = 2675.5;          #in kJ/kg
Tsat = 99+273;        #in K
Tsup = 115+273;       #in K
Cps = 2.1;            #in kJ/kg K
H2 = Hg+(Cps*(Tsup-Tsat));
x2 = (H2-Hf)/Hfg;
x = x1*x2;

# Results
print 'The dryness fraction: %2.4f kJ'%(x);
The dryness fraction: 0.8713 kJ

Example 4.37 pg : 54

In [43]:
import math 

# Variables
m1 = 0.45;                #in kg
m = 7.;                    #in kg
P1 = 12.;                  #in bar
Bar = 760.;                #mm of Hg Barometer reading
Man = 180.;                #mm of Hg Manometer Reading
Cps = 2.1;                #in kJ/kg K
P = Bar+Man;
P2 = (P*1.01325)/760;     #Pressure in bar
Tsup = 140.+273;             #in K
x1 = m/(m+m1);

#Now at 12 bar pressure
Hf = 798.6;               #in kJ/kg
Hfg = 1986.2;             #in kJ/kg

# Calculations
#At 1.25 bar pressure
Hg = 2685.3;              #in kJ/kg
Tsat = 106+273;           #in K
#For throttling H1 = H2
H2 = Hg+(Cps*(Tsup-Tsat));
x2 = (H2-Hf)/Hfg;

x = x1*x2;

# Results
print 'The dryness fraction: %2.3f '%(x);
The dryness fraction: 0.926 

Example 4.38 pg : 55

In [44]:
import math 

# Variables
#Case 1
P = 10.;               #in bar
Cps = 2.1;            #in kJ/kg K
x = 0.85;             #Dryness fraction
Hf = 762.8;           #in kJ/kg
Hfg = 2015.3;         #in kJ/kg
Vg = 0.194;           #in m**3/kg
Hg = 2778.1;          #in kJ/kg

# Calculations and Results
H = Hf+(x*Hfg);
print 'Case 1: When x = 0.85  ';
print 'Enthalpy of steam: %2.2f kJ'%(H);


U = H-(P*100*x*Vg);
print 'Internal Energy of steam: %2.2f kJ'%(U);


#Case 2
H = Hg;               #in kJ/kg
print ' Case 2: When steam is dry and saturated  ';
print 'Enthalpy of steam: %2.2f kJ'%(H);


U = H-(P*100*Vg);
print 'Internal Energy of steam: %2.2f kJ'%(U);


#Case 3
Tsup = 300.+273;           #in K
Tsat = 179.9+273;             #in K
H = Hg+(Cps*(Tsup-Tsat));
print ' Case 3: When steam is superheated to 300 C  ';
print 'Enthalpy of steam: %2.2f kJ'%(H);


Vsup = (Tsup/Tsat)*Vg;
U = H-(P*100*Vsup);
print 'Internal Energy of steam: %2.2f kJ'%(U);
Case 1: When x = 0.85  
Enthalpy of steam: 2475.80 kJ
Internal Energy of steam: 2310.90 kJ
 Case 2: When steam is dry and saturated  
Enthalpy of steam: 2778.10 kJ
Internal Energy of steam: 2584.10 kJ
 Case 3: When steam is superheated to 300 C  
Enthalpy of steam: 3030.31 kJ
Internal Energy of steam: 2784.87 kJ

Example 4.39 pg : 56

In [45]:
import math 

# Variables
Ms = 5.;               #in kg
P = 5.;                #in bar
Tsup = 250.+273;       #in K
Cps = 2.1;            #in kJ/kg K
Tf = 30.;              #in C
Cpw = 4.187;          #in kJ/kg K
H1 = Cpw*Tf;

# Calculations
#At 5 bar pressure
Tsat = 151.9+273;         #in K
Hg = 2748.7;          #in kJ/kg
H2 = Hg+(Cps*(Tsup-Tsat));
Q = Ms*(H2-H1);

# Results
print 'Amount of heat required: %2.2f kJ'%(Q);
Amount of heat required: 14145.50 kJ

Example 4.40 pg : 56

In [46]:
# Variables
Ms = 3.;               #in kg
Tf = 30.;              #in C
P = 8.;                #in bar
Tsup = 210.+273;       #in K
Cps = 2.1;            #in kJ/kg K
Cpw = 4.186;          #in kJ/kg K


# Calculations
H1 = Cpw*Tf;

#At 8 bar pressure
Tsat = 170.4+273;         #in K
Hg = 2769.1;              #in kJ/kg
H2 = Hg+(Cps*(Tsup-Tsat));
Q = Ms*(H2-H1);

# Results
print 'Amount of heat required: %2.2f kJ'%(Q);
Amount of heat required: 8180.04 kJ

Example 4.41 pg : 57

In [48]:
# Variables
#At 7 bar pressure
P1 = 7.;               #in bar
P2 = 1.;               #in bar
n = 1.1;
#Now according to law of expansion P(V)**1.1 =  Consmath.tant

# Calculations and Results
Vg1 = 0.273;          #in m**3/kg
V1 = Vg1;
V2 = ((P1/P2)**(1./n))*V1;

W = ((P1*100*V1)-(P2*100*V2))/(n-1);
print 'Work Done: %3.1f kJ/kg'%(W);


Hg = 2763.5;          #in kJ/kg
H1 = Hg;
Vg = 1.694;
#At 1 bar, Vg = 1.694 and as V2<Vg steam is wet
x = V2/Vg;

Hf = 417.5;           #in kJ/kg
Hfg = 2258;           #in kJ/kg
H2 = Hf+(x*Hfg);

U2 = H2-(P2*100*V2);
U1 = H1-(P1*100*V1);
U = U2-U1;
print 'Change in Internal Energy: %3.2f kJ/kg'%(U);


Q = U+W;
print 'Heat transferred during the process: %3.2f kJ/kg'%(Q);

# rounding off error.
Work Done: 309.8 kJ/kg
Change in Internal Energy: -180.77 kJ/kg
Heat transferred during the process: 129.07 kJ/kg