Ch -1 : Thermodynamic Cycles for Gas Engines

Ex - 1.1 : Pg - 21

In [1]:
#initialisation of variables
t2=275 #k
t1=1100 #k
R = 0.287 # kJ/kgK
y = 1.4
qs = 250 # kJ/kgK
pa = 1.01325 # bar
th=393 #k
re=0.14
#CALCULATIONS
eff = 1-t2/t1
from sympy import symbols, solve, log
p1,pb = symbols('p1 pb')
expr = t1/t2-(p1/pa)**((y-1)/y)
p1 = float(solve(expr,p1)[0])
expr2 = qs-R*t1*log(pb/p1)
pb = float(solve(expr2,pb)[0])
va = R*t2/pa
vb = R*t1/pb
mep = qs*eff/(va-vb)
#RESULTS
print "Cycle efficiency = %0.2f \nmean effective pressure = %0.3f bar"%(eff, mep)
Cycle efficiency = 1.00 
mean effective pressure = 3.256 bar

Ex - 1.2 : Pg - 22

In [2]:
#initailisation variables
d=20 #cm
l=25 #cm
cv=1400 #cc
g=1.4
#CALCULATIONS
sv=(22/7*d**2*l)/4
tv=sv+cv
r=tv/cv
e=1-1/(r)**(g-1)
print 'otto efficiency is %.3f'%e
otto efficiency is 0.512

Ex - 1.3 : Pg - 22

In [3]:
#initialisation of variables
t1=305 #K
t3=1920 #K
r=7
g=1.4
p1=1 #bar
cv=0.718
R=0.287 #kj/kgk
#CALCULATIONS
print "part(a): "
t2=t1*r**(g-1)
p2=p1*r**(g)
print "T2 = %0.f K"%t2
print "P2 = %0.1f bar"%p2
p3=p2*(t3/t2)
print "T3 = %0.f K"%t3
print "P3 = %0.1f bar"%p3
t4=t3*1/r**(g-1)
p4=p3*(1/r)**(g)
print "T4 = %0.f K"%t4
print "P4 = %0.2f bar"%p4
print "part(b) :"
qs=cv*(t3-t2)
print "Heat Supplied, qs = %0.1f kJ/kg/cycle"%qs
qr1=cv*(t4-t1)
print "part(c) :"
print "Heat rejected, qr = %0.1f kJ/kg/cycle"%qr1
wo=qs-qr1
print "part(d) : "
print "Work Output = %0.1f kJ/kg/cycle"%wo
print "part(e) : "
ef=wo/qs
print "Efficiency = %0.3f"%ef
v1=R*t1/p1
v2=v1/r
sv=v1-v2
cl=v2/(v1-v2)
print "part(f) : \nclearance = %0.4f"%cl
mep=wo/sv
print 'part(g) : \nmean effective pressure is %0.3f bar'%mep
part(a): 
T2 = 664 K
P2 = 15.2 bar
T3 = 1920 K
P3 = 44.1 bar
T4 = 882 K
P4 = 0.00 bar
part(b) :
Heat Supplied, qs = 901.6 kJ/kg/cycle
part(c) :
Heat rejected, qr = 414.0 kJ/kg/cycle
part(d) : 
Work Output = 487.6 kJ/kg/cycle
part(e) : 
Efficiency = 0.541
part(f) : 
clearance = 0.1667
part(g) : 
mean effective pressure is 6.499 bar

Ex - 1.4 : Pg - 23

In [4]:
 
#initialisation of variables
r=14
g=1.4
x=1.78 #x=v3/v2
#CALCULATIONS
oef=1-(1/14)**(g-1)
Def=1-((1/(14)**(g)*1.4))*((x**(g) -1)/(x-1))
print 'otto efficiency is %0.3f'%oef
otto efficiency is 1.000

Ex - 1.5 : Pg - 24

In [5]:
#1.5
from __future__ import division
#initialisation of variables
t1=300 #K
t3=1900 #K
r=15
g=1.4
p1=1 #bar 
cp=1.005
cv=0.718
R=0.287 #kj/kgk
#CALCULATIONS
t2=t1*r**(g-1)
p2=p1*r**(g)
p3=p2
t4=t3*0.143**(g-1)
p4=p3*(0.143)**(g)
qs=cp*(t3-t2)
qr1=cv*(t4-t1)
wo=qs-qr1
ef=wo/qs
v1=R*t1/p1/1e2
v2=v1/r
sv=v1-v2
cl=v2/(v1-v2)
v3 = t3/t2*v2
cf = (v3-v2)/(v1-v2)
mep=wo/sv
print "part(a) : \nT2 = %0.f K\nP2 = %0.1f bar\nT4 = %0.f K\nP4 = %0.2f bar"%(t2,p2,t4,p4)
print "part(b) : \nHeat Supplied, qs = %0.2f"%qs
print "part(c) : \nHeat rejected, qr = %0.2f kJ/kg/cycle"%qr1
print "part(d) : \nNet work output = %0.2f kJ/kg/cycle" %wo
print "part(e) : \nEfficiency = %0.4f "%ef
print "part(f) : \nClearance = %0.5f"%cl
print "part(g) : \nCut-off = %0.4f"%cf
print 'part(h) : \nmean effective pressure is %0.f kN/m^2'%mep
part(a) : 
T2 = 886 K
P2 = 44.3 bar
T4 = 873 K
P4 = 2.91 bar
part(b) : 
Heat Supplied, qs = 1018.82
part(c) : 
Heat rejected, qr = 411.23 kJ/kg/cycle
part(d) : 
Net work output = 607.58 kJ/kg/cycle
part(e) : 
Efficiency = 0.5964 
part(f) : 
Clearance = 0.07143
part(g) : 
Cut-off = 0.0817
part(h) : 
mean effective pressure is 756 kN/m^2

Ex - 1.6 : Pg - 25

In [6]:
#initialisation of variables 
t1=300 #temparature in k
r=10 #compression ratio
p1=1 #pressure in bar
g=1.4 
p3=40 #pressure in bar
x=0.166 #x=v4/v5=t4/v1=(v4/v2)*(v2/v1)
t4=2000 #temparature in k
p4=40 #pressure in bar
cv=0.718 #calorific value(const volume)
cp=1.005 #calorific value(const preussure)
R=0.287
r=10
#CALCULATIONS
t2=(t1*(r)**(g-1))
p2=(p1*(r)**(g))
t3=t2*(p3/p2)
t5=t4*(x)**(g-1)
p5=p4*(x)**(g)
q23=cv*(t3-t2)
q34=cp*(t4-t3)
q44=cv*(t5-t1)
nwd=q23+q34-q44
ef=nwd/(q23+q34)
v1=(R*t1)/(p1*100)
v2=v1/r
mep=nwd/(v1-v2)
effo=1-(1/(r)**(g-1))
v3=(R*t4)/(p2*100)
cr=v3/v2
effd=1-((1/(r)**(g-1))*(1/g)*((cr)**(g)-1)/(cr-1))
#RESULTS
print '(a) temparature 2,3,5 and pressure 2,5 are %.fk,%.fk,%.fk and %0.f bar,%0.2f bar'%(t2,t3,t5,p2,p5)
print '\n(b) heat supplied at const volume is %.2f kJ/kg/cycle'%q23
print '\n(c) heat supplied at const pressure is %.2f kJ/kg/cycle'%q34
print '\n(d) heat rejected is %.2f kJ/kg/cycle'%q44
print '\n(e) net work output is %.2f'%nwd
print '\n(f) efficiency is %.4f'%ef
print '\n(g) otto efficiency is %0.3f'%effo,
print ' & diesel efficiency is %0.3f'%effd
(a) temparature 2,3,5 and pressure 2,5 are 754k,1200k,975k and 25 bar,3.24 bar

(b) heat supplied at const volume is 320.54 kJ/kg/cycle

(c) heat supplied at const pressure is 804.00 kJ/kg/cycle

(d) heat rejected is 484.76 kJ/kg/cycle

(e) net work output is 639.78

(f) efficiency is 0.5689

(g) otto efficiency is 0.602  & diesel efficiency is 0.498

Ex - 1.7 : Pg - 27

In [7]:
#initialisation of variables
t1=295 #temparature in k
r=5.25
g=1.4
t3=923 #temparature in k
tc=511 #temparature in k
tt=633 #temparature in k
#CALCULATIONS
t2=t1*(r)**((g-1)/g)
t4=t3/(r)**((g-1)/g)
effb=1-((t4-t1)/(t3-t2))
wt=t3-t4
wc=t2-t1
wr1=(1-(t2-t1)/(t3-t4))
ctwr1=(t2-t1)/(t3-t4)
effc=(t2-t1)/(tc-t1)
efft=(t3-tt)/(t3-t4)
effbr=1-((tt-t1)/(t3-tc))
wr2=1-((tc-t1)/(t3-tt))
ctwr2=(tc-t1)/(t3-tt)
#RESULTS
print 'work ratio and compressed turbine wrok ratio in first part of problem are %.3f and %0.3f'%(wr1,ctwr1)
print '\nwork ratio and compressed turbine wrok ratio in second part of problem are %0.3f and %0.3f'%(wr2,ctwr2)
work ratio and compressed turbine wrok ratio in first part of problem are 0.487 and 0.513

work ratio and compressed turbine wrok ratio in second part of problem are 0.255 and 0.745