In [1]:

```
#pg 326
print('Example 11.1')
import math
# aim : To determine the
# (a) bore of the cylinder
# (b) piston stroke
# (c) speed of the engine
# Given values
P_req = 60.;# power required to develop, [kW]
P = 1.25;# boiler pressure, [MN/m^2]
Pb = .13;# back pressure, [MN/m^2]
cut_off = .3;# [stroke]
k = .82;# diagram factor
n = .78;# mechanical efficiency
LN = 3.;# mean piston speed, [m/s]
# solution
# (a)
r = 1/cut_off;# expansion ratio
Pm = P/r*(1+math.log(r))-Pb;# mean effective pressure, [MN/m^2]
P_ind = P_req/n;# Actual indicated power developed, [kW]
P_the = P_ind/k;# Theoretical indicated power developed, [kW]
# using indicated_power=Pm*LN*A
# Hence
A = P_the/(Pm*LN)*10**-3;# piston area,[m^2]
d = math.sqrt(4*A/math.pi)*10**3;# bore ,[mm]
print ' (a) The bore of the cylinder is (mm) = ',round(d)
# (b)
# given that stroke is 1.25 times bore
L = 1.25*d;# [mm]
print ' (b) The piston stroke is (mm) = ',round(L)
# (c)
# LN=mean piston speed, where L is stroke in meter and N is 2*rev/s,(since engine is double_acting)
# hence
rev_per_sec = LN/(2*L*10**-3);# [rev/s]
rev_per_min = rev_per_sec*60;# [rev/min]
print ' (c) The speed of the engine is (rev/min) = ',round(rev_per_min,1)
# End
```

In [2]:

```
#pg 328
print('Example 11.2')
import math
# aim : To determine the
# (a) the diameter of the cylinder
# (b) piston stroke
# (c) actual steam consumption and indicated thermal efficiency
# Given values
P = 900.;# inlet pressure, [kN/m^2]
Pb = 140.;# exhaust pressure, [kN/m^2]
cut_off =.4;# [stroke]
k = .8;# diagram factor
rs = 1.2;# stroke to bore ratio
N = 4.;# engine speed, [rev/s]
ip = 22.5;# power output from the engine, [kW]
# solution
# (a)
r = 1/cut_off;# expansion ratio
Pm = P/r*(1+math.log(r))-Pb;# mean effective pressure, [kN/m^2]
Pm = Pm*k;# actual mean effective pressure, [kN/m^2]
# using ip=Pm*L*A*N
# and L=r*d; where L is stroke and d is bore
d = (ip/(Pm*rs*math.pi/4.*2*N))**(1./3);# diameter of the cylinder, [m]
print ' (a) The diameter of the cylinder is (mm) = ',round(d*1000)
# (b)
L = rs*d;# stroke, [m]
print ' (b) The piston stroke is (mm) = ',round(L*1000,1)
# (c)
SV = math.pi/4*d**2*L;# stroke volume, [m^3]
V = SV*cut_off*2*240*60;# volume of steam consumed per hour, [m^3]
v = .2148;# specific volume at 900 kN/m^2, [m^3/kg]
SC = V/v;# steam consumed/h, [kg]
ASC = 1.5*SC;# actual steam consumption/h, [kg]
print ' (c) The actual steam consumption/h is (kg) = ',round(ASC,1)
m_dot = ASC/3600.;# steam consumption,[kg/s]
# from steam table
hg = 2772.1;# specific enthalpy of inlet steam, [kJ/kg]
hfe = 458.4;# specific liquid enthalpy at exhaust pressure, [kJ/kg]
ITE = ip/(m_dot*(hg-hfe));# indicated thermal efficiency
print ' The indicated thermal efficiency is (percent) = ',round(ITE*100,1)
print 'The answers are a bit different due to rounding off error in textbook'
# End
```

In [3]:

```
#pg 330
print('Example 11.3');
# aim : To determine
# (a) the diagram factor
# (b) the indicated thermal efficiency of the engine
import math
# given values
d = 250.*10**-3;# cylinder diameter, [m]
L = 375.*10**-3;# length of stroke, [m]
P = 1000.;# steam pressure , [kPa]
x = .96;# dryness fraction of steam
Pb = 55;# exhaust pressure, [kPa]
r = 6.;# expansion ratio
ip = 45.;# indicated power developed, [kW]
N = 3.5;# speed of engine, [rev/s]
m = 460.;# steam consumption, [kg/h]
# solution
# (a)
Pm = P/r*(1+math.log(r))-Pb;# [kN/m**3]
A = math.pi*(d)**2/4;# area, [m**2]
tip = Pm*L*A*N*2;# theoretical indicated power, [kW]
k = ip/tip;# diagram factor
print ' (a) The diagram factor is = ',round(k,2)
# (b)
# from steam table at 1 MN/m**2
hf = 762.6;# [kJ/kg]
hfg = 2013.6;# [kJ/kg]
# so
h1 = hf+x*hfg;# specific enthalpy of steam at 1MN/m**2, [kJ/kg]
# minimum specific enthalpy in engine at 55 kPa
hf = 350.6;# [kJ/kg]
# maximum energy available in engine is
h = h1-hf;# [kJ/kg]
ITE = ip/(m*h/3600)*100;# indicated thermal efficiency
print ' (b) The indicated thermal efficiency is (percent) = ',round(ITE)
# End
```

In [4]:

```
#pg 333
print('Example 11.4');
# aim : To determine
# steam consumption
# given values
P1 = 11.;# power, [kW]
m1 = 276.;# steam use/h when developing power P1,[kW]
ip = 8.;# indicated power output, [kW]
B = 45.;# steam used/h at no load, [kg]
# solution
# using graph of Fig.11.9
A = (m1-B)/P1;# slop of line, [kg/kWh]
W = A*ip+B;# output, [kg/h]
#results
print 'The steam consumption is (kg/h) = ',W
# End
```

In [5]:

```
#pg 338
print('Example 11.5');
from scipy.optimize import brentq
# aim : To determine
# (a) the intermediate pressure
# (b) the indicated power output
# (c) the steam consumption of the engine
import math
# given values
P1 = 1400.;# initial pressure, [kN/m**2]
x = .9;# dryness fraction
P5 = 35.;# exhaust pressure
k = .8;# diagram factor of low-pressure cylindaer
L = 350.*10**-3;# stroke of both the cylinder, [m]
dhp = 200.*10**-3;# diameter of high pressure cylinder, [m]
dlp = 300.*10**-3;# diameter of low-pressure cylinder, [m]
N = 300.;# engine speed, [rev/min]
# solution
# taking reference Fig.11.13
Ahp = math.pi/4*dhp**2;# area of high-pressure cylinder, [m**2]
Alp = math.pi/4*dlp**2;# area of low-pressure cylinder, [m**2]
# for equal initial piston loads
# (P1-P7)Ahp=(P7-P5)Alp
def f(P7):
return (P1-P7)*Ahp - (P7-P5)*Alp
#deff('[x]=f(P7)','x=(P1-P7)*Ahp-(P7-P5)*Alp');
P7 = brentq(f,0,1000);# intermediate pressure, [kN/m**2]
print ' (a) The intermediate pressure is (kN/m^2) = ',P7
# (b)
V6 = Ahp*L;# volume of high-pressure cylinder, [m**3]
P2 = P1;
P6 = P7;
# using P2*V2=P6*V6
V2 = P6*V6/P2; # [m**3]
V1 = Alp*L;# volume of low-pressure cylinder, [m**3]
R = V1/V2;# expansion ratio
Pm = P1/R*(1+math.log(R))-P5;# effective pressure of low-pressure cylinder, [kn/m**2]
Pm = k*Pm;# actual effective pressure, [kN/m**2]
ip = Pm*L*Alp*N*2/60.;# indicated power, [kW]
print ' (b) The indicated power is (kW) = ',round(ip,1)
# (c)
COV = V1/ R;# cut-off volume in high-pressure cylinder, [m**3]
V = COV*N*2*60;# volume of steam admitted/h
# from steam table
vg = .1407;# [m**3/kg]
AV = x*vg;# specific volume of admission steam, [m**3/kg]
m = V/AV;# steam consumption, [kg/h]
print ' (c) The steam consumption of the engine is (kg/h) = ',round(m)
# End
```

In [6]:

```
#pg 340
print('Example 11.6');
# aim : To determine
# (a) the indicated power output
# (b) the diameter of high-pressure cylinder of the engine
# (c) the intermediate pressure
import math
from math import sqrt, exp, log, pi
# given values
P = 1100.;# initial pressure, [kN/m**2]
Pb = 28.;# exhaust pressure
k = .82;# diagram factor of low-pressure cylindaer
L = 600.*10**-3;# stroke of both the cylinder, [m]
dlp = 600.*10**-3;# diameter of low-pressure cylinder, [m]
N = 4.;# engine speed, [rev/s]
R = 8.;# expansion ratio
# solution
# taking reference Fig.11.13
# (a)
Pm = P/R*(1+log(R))-Pb;# effective pressure of low-pressure cylinder, [kn/m**2]
Pm = k*Pm;# actual effective pressure, [kN/m**2]
Alp = pi/4*dlp**2;# area of low-pressure cylinder, [m**2]
ip = Pm*L*Alp*N*2;# indicated power, [kW]
print ' (a) The indicated power is (kW) = ',round(ip)
# (b)
# work done by both cylinder is same as area of diagram
w = Pm*Alp*L;# [kJ]
W = w/2;# work done/cylinder, [kJ]
V2 = Alp*L/8;# volume, [m63]
P2 = P;# [kN/m**2]
# using area A1267=P2*V2*log(V6/V2)=W
V6 = V2*exp(W/(P2*V2));# intermediate volume, [m**3]
# using Ahp*L=%pi/4*dhp**2*L=V6
dhp = sqrt(V6*4/L/pi);# diameter of high-pressure cylinder, [m]
print ' (b) The diameter of high-pressure cylinder is (mm) = ',round(dhp*1000)
# (c)
# using P2*V2=P6*V6
P6 = P2*V2/V6; # intermediate pressure, [kN/m**2]
print ' (c) The intermediate opressure is (kN/m^2) = ',round(P6)
# End
```

In [7]:

```
#pg 342
print('Example 11.7');
# aim : To determine
# (a) The speed of the engine
# (b) the diameter of the high pressure cylinder
import math
from math import sqrt,log, exp,pi
# given values
ip = 230.;# indicated power, [kW]
P = 1400.;# admission pressure, [kN/m**2]
Pb = 35.;# exhaust pressure, [kN/m**2]
R = 12.5;# expansion ratio
d1 = 400.*10**-3;# diameter of low pressure cylinder, [m]
L = 500.*10**-3;# stroke of both the cylinder, [m]
k = .78;# diagram factor
rv = 2.5;# expansion ratio of high pressure cylinder
# solution
# (a)
Pm = P/R*(1+log(R))-Pb;# mean effective pressure in low pressure cylinder, [kN/m**2]
ipt = ip/k;# theoretical indicated power, [kw]
# using ip=Pm*L*A*N
A = pi/4*d1**2;# area , [m**2]
N = ipt/(Pm*L*A*2);# speed, [rev/s]
print ' (a) The engine speed is (rev/s) = ',round(N,2)
# (b)
Vl = A*L;# volume of low pressure cylinder, [m**3]
COV = Vl/R;# cutt off volume of hp cylinder, [m**3]
V = COV*rv;# total volume, [m**3]
# V = %pi/4*d**2*L, so
d = sqrt(4*V/pi/L);# diameter of high pressure cylinder, [m]
print ' (b) The diameter of the high pressure cylinder is (mm) = ',round(d*1000)
# End
```

In [8]:

```
#pg 344
print('Example 11.8');
# aim : To determine
# (a) the actual and hypothetical mean effective pressures referred to the low-pressure cylinder
# (b) the overall diagram factor
# (c) the indicated power
import math
from math import pi,sqrt,log
# given values
P = 1100.;# steam supply pressure, [kN/m**2]
Pb = 32.;# back pressure, [kN/m**2]
d1 = 300.*10**-3;# cylinder1 diameter, [m]
d2 = 600.*10**-3;# cylinder2 diameter, [m]
L = 400.*10**-3;# common stroke of both cylinder, [m]
A1 = 12.5;# average area of indicated diagram for HP, [cm**2]
A2 = 11.4;# average area of indicated diagram for LP, [cm**2]
P1 = 270.;# indicator calibration, [kN/m**2/ cm]
P2 = 80.;# spring calibration, [kN/m**2/ cm]
N = 2.7;# engine speed, [rev/s]
l = .75;# length of both diagram, [m]
# solution
# (a)
# for HP cylinder
Pmh = P1*A1/7.5;# [kN/m**2]
F = Pmh*pi/4*d1**2;# force on HP, [kN]
PmH = Pmh*(d1/d2)**2;# pressure referred to LP cylinder, [kN/m**2]
PmL = P2*A2/7.5;# pressure for LP cylinder, [kN/m**2]
PmA = PmH+PmL;# actual effective pressure referred to LP cylinder, [kN/m**2]
Ah = pi/4*d1**2;# area of HP cylinder, [m**2]
Vh = Ah*L;# volume of HP cylinder, [m**3]
CVh = Vh/3;# cut-off volume of HP cylinder, [m**3]
Al = pi/4*d2**2;# area of LP cylinder, [m**2]
Vl = Al*L;# volume of LP cylinder, [m**3]
R = Vl/CVh;# expansion ratio
Pm = P/R*(1+log(R))-Pb;# hypothetical mean effective pressure referred to LP cylinder, [kN/m**2]
print ' (a) The actual mean effective pressure referred to LP cylinder is (kN/m^2) = ',PmA
print ' The hypothetical mean effective pressure referred to LP cylinder is (kN/m^2) = ',round(Pm)
# (a)
ko = PmA/Pm;# overall diagram factor
print ' (b) The overall diagram factor is = ',round(ko,3)
# (c)
ip = PmA*L*Al*N*2;# indicated power, [kW]
print ' (c) The indicated power is (kW) = ',round(ip)
# End
```

In [9]:

```
#pg 345
print('Example 11.9');
# aim : To determine
# (a) the actual and hypothetical mean effective pressures referred to the low-pressure cylinder
# (b) the overall diagram factor
# (c) the pecentage of the total indicated power developed in each cylinder
from math import pi,log,sqrt
# given values
P = 1400.;# steam supply pressure, [kN/m**2]
Pb = 20.;# back pressure, [kN/m**2]
Chp = .6;# cut-off in HP cylinder, [stroke]
dh = 300.*10**-3;# HP diameter, [m]
di = 500.*10**-3;# IP diameter, [m]
dl = 900.*10**-3;# LP diameter, [m]
Pm1 = 590.;# actual pressure of HP cylinder, [kN/m**2]
Pm2 = 214.;# actual pressure of IP cylinder, [kN/m**2]
Pm3 = 88.;# actual pressure of LP cylinder, [kN/m**2]
# solution
# (a)
# for HP cylinder
PmH = Pm1*(dh/dl)**2;# PmH referred to LP cylinder, [kN/m**2]
# for IP cylinder
PmI = Pm2*(di/dl)**2;# PmI referred to LP cylinder, [kN/m**2]
PmA = PmH+PmI+Pm3;# actual mean effective pressure referred to LP cylinder, [kN/m**2]
R = dl**2/(dh**2*Chp);# expansion ratio
Pm = P/R*(1+log(R))-Pb;# hypothetical mean effective pressure referred to LP cylinder, [kN/m**2]
print ' (a) The actual mean effective pressure referred to LP cylinder is (kN/m^2) = ',round(PmA,2)
print ' The hypothetical mean effective pressure referred to LP cylinder is (kN/m^2) = ',round(Pm)
# (b)
ko = PmA/Pm;# overall diagram factor
print ' (b) The overall diagram factor is = ',round(ko,3)
# (c)
HP = PmH/PmA*100;# %age of indicated power developed in HP
IP = PmI/PmA*100; # %age of indicated power developed in IP
LP = Pm3/PmA*100; # %age of indicated power developed in LP
print ' (c) The pecentage of the total indicated power developed in HP cylinder is (percent) = ',round(HP,1)
print ' The pecentage of the total indicated power developed in IP cylinder is (percent) = ',round(IP,1)
print ' The pecentage of the total indicated power developed in LP cylinder is (percent) = ',round(LP,1)
# End
```