Exercise 8 Solutions

11.8. Exercise 8 Solutions#

Section 10.3.5 Exercise 8

import cantera as ct
Kc = 273.15
#1 A stationary gas-turbine power plant operates on a simple ideal Brayton cycle with air as the
#working fluid. The air enters the compressor at 95 kPa and 290 K and the turbine at 760 kPa and
#1100 K. Heat is transferred to air at a rate of 35,000 kW. Determine the power delivered by this
#plant (a) assuming constant specific heats at room temperature and (b) accounting for the variation
#of specific heats with temperature.
Pl = 95e3
Ph = 760e3
T1 = 290 # K
T3 = 1100 # K
Qin = 35000 #kW
# approach 1
state1 = ct.Solution('gri30.yaml')
state1.X = 'N2:0.79 O2:0.21'
cv_RT = state1.cv
cp_RT = state1.cp

k = cp_RT/cv_RT
T2 = T1*(Ph/Pl)**((k-1)/k)
T4 = T3*(Pl/Ph)**((k-1)/k)
wc = cp_RT*(T2-T1)
wt = cp_RT*(T3-T4)
wnet = wt - wc
mdot = Qin/(cp_RT*(T3-T2))
Wnet = wnet*mdot

# approach 2
state1,state2,state3,state4 = ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml')
state1.X,state2.X,state3.X,state4.X = 'N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21'
state1.TP = T1,Pl
s1 = state1.SP[0]
h1 = state1.HP[0]

s2 = s1
state2.SP = s2,Ph
h2 = state2.HP[0]

state3.TP = T3,Ph
s3 = state3.SP[0]
h3 = state3.HP[0]

s4 = s3
state4.SP = s4,Pl
h4 = state4.HP[0]

wc = h1-h2
wt = h3-h4
wnet = wc + wt
mdot = Qin/(h3-h2)
Wnet = wnet*mdot
print(f"Part A: Power Delivered is {round(Wnet,3)} kW")
print(f"Part B: Power Delivered is {round(Wnet,3)} kW")
Part A: Power Delivered is 15053.32 kW
Part B: Power Delivered is 15053.32 kW
#2
#A gas turbine power plant operates on the simple Brayton cycle with air as the working fluid and
#delivers 32 MW of power. The minimum and maximum temperatures in the cycle are 310 and 900
#K, and the pressure of air at the compressor exit is 8 times the value at the compressor inlet.
#Assuming an isentropic efficiency of 80% for the compressor and 86% for the turbine, determine
#the mass flow rate of air through the cycle. Account for the variation of specific heats with
#temperature.
# 774 kg/s 
Wdotnet = 32e+6 #W
T1 = 310 # K
T3 = 900 #K
P = 100e3
Pr = 8 # P3 = P2 = 8*P1
etac, etat = 0.80, 0.86
state1,state2s,state3,state4s = ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml')
state1.X,state2s.X,state3.X,state4s.X = 'N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21'
cv_RT = state1.cv
cp_RT = state1.cp
k = cp_RT/cv_RT
T2s = T1*Pr**((k-1)/k)
T4s = T3/(Pr**((k-1)/k))

state1.TP = T1,P
h1 = state1.HP[0]
state3.TP = T3,P
h3 = state3.HP[0]
state2s.TP = T2s,P
h2s = state2s.HP[0]
state4s.TP = T4s,P
h4s = state4s.HP[0]
h2 = etac*(h2s-h1) + h1
h4 = -1*(etat*(h3-h4s)-h3)
wcin = (h1 - h2)
wt = h3 - h4
wnet = (wc + wt)/1000
m_dot = Wdotnet/wnet
print(f"The Mass Flow Rate is {round(m_dot,3)} kg/s")
The Mass Flow Rate is 232185.382 kg/s
Wdotnet = 32e+6 #W
T1 = 310 # K
T3 = 900 #K
P = 100e3
Pr = 8 # P3 = P2 = 8*P1
etac, etat = 0.80, 0.86
state1,state2s,state3,state4s = ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml'),ct.Solution('gri30.yaml')
state1.X,state2s.X,state3.X,state4s.X = 'N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21','N2:0.79 O2:0.21'

state1.TP = T1,P
h1 = state1.HP[0]
s1 = state1.SP[0]
state3.TP = T3,P
h3 = state3.HP[0]
s3 = state3.SP[0]
s2 = s1
state2s.SP = s2,P
h2s = state2s.HP[0]
s4 = s3
state4s.SP = s4,P
h4s = state4s.HP[0]
h2 = etac*(h2s-h1) + h1
h4 = -1*(etat*(h3-h4s)-h3)
wcin = (h1 - h2)
wt = h3 - h4
wnet = -(wc + wt)/1000
m_dot = Wdotnet/wnet
print(f"The Mass Flow Rate is {round(m_dot,3)} kg/s")
The Mass Flow Rate is 135191.699 kg/s
# 3

#A Brayton cycle using air as the working fluid operates at steady state with
#intercooling and reheating. The net power output is 10 MW. Operating data are provided in problem statement.

#a) Sketch the T-s diagram for the cycle
#b) Determine the mass flowrate of air, in kg/s
#c) The rate of heat transfer, in kW, during all heat addition stages
#d) The thermal efficiency
Wdnet = 10e6
h1, h2, h3, h4, h5, h6, h7, h8, h9, h10 = 300.19e3, 411.22e3, 300.19e3, 446.50e3, 1173.84e3, 1575.57e3,1085.31e3,1575.57e3,1173.84e3,446.5e3

# b) find the mass flow rate
wc= h1 - h2 + h3 - h4
wt= h6 - h7 + h8 - h9
wnet = wc + wt

m_dot = Wdnet/wnet

# c) rate of heat transfer 
qin = h6 - h4 + h8 - h7
Qdotin = m_dot*qin

# d) thermal efficiency
nth = Wdnet/Qdotin
print(f"b) air mass flow rate: {round(m_dot,2)} kg/s")
print(f"c) heat transfer rate: {round(Qdotin/10**6,2)} MW")
print(f"d) thermal efficiency: {round(nth,2)}")
b) air mass flow rate: 15.76 kg/s
c) heat transfer rate: 25.52 MW
d) thermal efficiency: 0.39
# 4

#Consider an ideal gas-turbine cycle with two stages of compression and two stages of expansion.
#The pressure ratio across each stage of the compressor and turbine is 3. The air enters each stage
#of the compressor at 300 K and each stage of the turbine at 1200 K. Determine the thermal
#efficiency of the cycle, assuming (a) no regenerator is used and (b) a regenerator with 75 percent
#effectiveness is used. Use variable specific heats.
T1 = 300
T3 = T1
T5 = 1200
k = 1.4
Pr = 3
P = 100e3
state = ct.Solution('gri30.yaml')
state.X = 'N2:0.79 O2:0.21'
cp = state1.cp/1000
T2 = T1*(Pr)**((k-1)/k)
T6 = T5*(1/Pr)**((k-1)/k)
T7 = T5
T8 = T6
T3 = T1
T4 = T2
Wt = cp*(T5-T6) + cp*(T7-T8)
Wc = cp*(T1-T2) + cp*(T3-T4)
state.TP = T1,P
h1 = state.HP[0]/1000
state.TP = T2,P
h2 = state.HP[0]/1000
state.TP = T5,P
h5 = state.HP[0]/1000
state.TP = T6,P
h6 = state.HP[0]/1000

h8 = h6
h7 = h5
h3 = h1
h4 = h2
q = (h5 - h4) + (h7 - h6)
W = Wt + Wc
etath = W/q
print(f"a) thermal efficiency w no regenerator: {round(etath,2)}")

e = 0.75
Tb = e*(T8-T4) + T4
etath = (T5-T6 + T7 - T8 + T1 - T2 + T3 -  T4)/(T5 - Tb + T7 -T6)
print(f"a) thermal efficiency w 75% effectiveness regenerator: {round(etath,2)}")
a) thermal efficiency w no regenerator: 0.35
a) thermal efficiency w 75% effectiveness regenerator: 0.56
#5
#Air at ambient conditions is compressed with a compression ratio r = 12. There is 700 kJ/kg of heat addition
#What is the net specific work of the cycle?
#What is the thermal efficiency of this process?
#What is the thermal efficiency not assuming constant specific heats?
import cantera as ct
#otto cycle has 4 states

#state 1
#given: T = 300 K, P = 100 kPa
species1 = ct.Nitrogen() #assumption for air
species1.TP = 300, 100000

#state 2: after isentropic compression
#r = 12
species2 = ct.Nitrogen()
# v1/v2 = r
v2 = species1.TV[1]/12
#s1 = s2
s2 = species1.SP[0]
species2.SV = s2, v2

#state 3: after constant volume heat addition
#700 kJ/kg heat addition; u3 = u2 + qin
#v2 = v3
species3 = ct.Nitrogen()
u2 = species2.UP[0]
u3 = u2 + 700000
v3 = v2
species3.UV = u3, v3
print(species3.TP[0])

#state 4: after isentropic expansion
#v4 = rv3
#s3 = s4
species4 = ct.Nitrogen()
v4 = 12*v3
s3 = species3.SP[0]
s4 = s3
species4.SV = s4, v4

#What is the net specific work of the cycle?
#net work is found from work of each process or the difference of heat in vs heat out
#w = qin - qout
#qout = u4 - u1
u4 = species4.UP[0]
u1 = species1.UP[0]
w = 700000 - (u4 - u1)
print(f'The net specific work of the process is {round(w/1000,2)} kJ/kg.') 

#What is the thermal efficiency of this process?
#nthotto = 1 - 1/r^(k-1)
#k = 1.4 for air. Ratio of specific heats
nth_otto = 1 - 1/(12**(1.4-1))
print(f'The thermal efficiency of the process not assuming constant specific heats is {round(nth_otto*100,1)}%.') 

#What is the thermal efficiency not assuming constant specific heats?
#nth = 1 - qout/qin
nth = 1 - (u4 -u1)/700000
print(f'The thermal efficiency of the process is {round(nth*100,1)}%.')
1571.886568324419
The net specific work of the process is 417.33 kJ/kg.
The thermal efficiency of the process not assuming constant specific heats is 63.0%.
The thermal efficiency of the process is 59.6%.
#6
#An ideal otto cycle has a compresion ratio of 10. The air is at P = 120 kPa and T = 300 K before compression and reaches P = 4.5 MPa and T = 1500 K after heat addition.
#What is the specific heat addition of the process? 
#What is the thermal efficiency of the cycle?
import cantera as ct

#state 3
#Given: P = 4.5 MPa and T = 1500 K
species3 = ct.Nitrogen() #assumption for air
species3.TP = 1500, 4500000

#state 4
#r = 10
#s3 = s4
species4 = ct.Nitrogen()
s3 = species3.SP[0]
#v4 = rv3
v3 = species3.TV[1] 
v4 = 10*v3
species4.SV = s3, v4

#state 1
#given: P = 120 kPa, T = 300 K
species1 = ct.Nitrogen()
species1.TP = 300, 120000

#state 2
#v2 = v3
#s2 = s1
species2 = ct.Nitrogen()
v3 = species3.TV[1]
v2 = v3
s1 = species1.SP[0]
s2 = s1
species2.SV = s2, v2

#What is the specific heat addition of the process? 
#qin = u3 - u2
u3 = species3.UP[0]
u2 = species2.UP[0]
qin = u3 - u2
print(f'The heat addition to the system is {round(qin/1000,2)} kJ/kg.')

#What is the thermal efficiency of the cycle?
#nth = 1 - qout/qin
#qout = u4 -u1
u1 = species1.UP[0]
u4 = species4.UP[0]
qout = u4 -u1
nth = 1-qout/qin
print(f'The thermal efficiency of the cycle is {round(nth*100,1)}%.')
The heat addition to the system is 736.35 kJ/kg.
The thermal efficiency of the cycle is 60.6%.
#7
#An ideal diesel cycle has a cutoff ratio of 2 and a compression ratio of 15. The air is at ambient conditions prior to compression.
#What is the heat addition to the system?
#What is the thermal efficiency of the cycle?
import cantera as ct

#state 1
#given P = 100 kPa and T = 300 K
species1 = ct.Nitrogen() #assumption for air
species1.TP = 300, 100000

#state 2
#s2 = s1
#v1/v2 = r
species2 = ct.Nitrogen()
s1 = species1.SP[0]
s2 = s1
v1 = species1.TV[1]
v2 = v1/15
species2.SV = s2, v2

#state 3
#P2 = P3
#v3/v2 = r
species3 = ct.Nitrogen()
P2 = species2.TP[1]
P3 = P2
v3 = v2*2
species3.PV = P3, v3

#state 4
#v1 = v4
#s3 = s4
species4 = ct.Nitrogen()
v4 = v1
s3 = species3.SP[0]
s4 = s3
species4.SV = s4,v4

#What is the heat addition to the system?
#qin = h3 - h2
h2 = species2.HP[0]
h3 = species3.HP[0]
qin = h3 - h2
print(f'The heat addition to the system is {round(qin/1000,2)} kJ/kg.')

#what is the thermal efficiency of the cycle?
#nth = 1 - qout/qin
#qout = u4 - u1
u1 = species1.UP[0]
u4 = species4.UP[0]
qout = u4 - u1
nth = 1 - qout/qin
print(f'The thermal efficiency of the cycle is {round(nth*100,1)}%.')
The heat addition to the system is 1055.65 kJ/kg.
The thermal efficiency of the cycle is 56.0%.
#8
#Air in an ideal diesel cycle is at P = 4 MPa and T = 1500 K after constant pressure heat addition. The cutoff ratio is 1.7 and the compression ration is 18.
#What is the heat addition to the system?
#What is the net specific work in the cycle?
#What is the thermal efficiency of the cycle?
import cantera as ct

#state 3
#Given P = 4 MPa and T = 1500 K
species3 = ct.Nitrogen() # assumption for air
species3.TP = 1500, 4000000

#state 2
#P3 = P2
#v3/v2 = r
species2 = ct.Nitrogen()
v3 = species3.TV[1]
v2 = v3/1.7
species2.PV = 4000000, v2

#state 1
#s2 = s1
#v1/v2 = r
species1 = ct.Nitrogen()
s2 = species2.SP[0]
s1 = s2
v1 = v2*18
species1.SV = s1, v1

#state 4
#v1 = v4
#s3 = s4
species4 = ct.Nitrogen()
v4 = v1
s3 = species3.SP[0]
s4 =s3
species4.SV = s4,v4

#What is the heat addition to the system?
#qin = h3 -h2
h2 = species2.HP[0]
h3 = species3.HP[0]
qin = h3 - h2
print(f'The heat addition to the system is {round(qin/1000,2)} kJ/kg.')

#What is the net specific work in the cycle?
#w = qin - qout
#qout = u4 - u1
u1 = species1.UP[0]
u4 = species4.UP[0]
qout = u4 - u1
w = qin - qout
print(f'The net specific work of the cycle is {round(w/1000,2)} kJ/kg.')

#What is the thermal efficiency of the cycle?
#nth = 1 - qout/qin
nth = 1 - qout/qin
print(f'The thermal efficiency of the cycle is {round(nth*100,1)}%.')
The heat addition to the system is 745.63 kJ/kg.
The net specific work of the cycle is 456.48 kJ/kg.
The thermal efficiency of the cycle is 61.2%.
#9 
#A power plant uses an ideal brayton cycle with a pressure ratio of 10. The gas enters the compressor at ambient conditions and enters the turbine at T = 1500 K.
#What is the heat addition to the system?
#What is the thermal efficiency of the cycle?
#If the net power is P = 1 MJ, what is the mass flowrate?
import cantera as ct

#state 1
#Given P = 100 kPa, T = 300 K
species1 = ct.Nitrogen() #assumption for air
species1.TP = 300, 100000

#state 2
#r = P2/P1
#s1 = s2
species2 = ct.Nitrogen()
P2 = 10*100000
s1 = species1.SP[0]
s2 = s1
species2.SP = s2,P2

#state 3
#P2 = P3
#Given T3 = 1500
species3 = ct.Nitrogen()
P3 = P2
species3.TP = 1500, P3

#state 4
#P4 = P1
#s3 = s4
species4 = ct.Nitrogen()
s3 = species3.SP[0]
s4 = s3
species4.SP = s4, 100000

#What is the heat addition to the system?
#qin = h3 - h2
h2 = species2.HP[0]
h3 = species3.HP[0]
qin = h3 - h2
print(f'The heat addition to the system is {round(qin/1000,2)} kJ/kg.')

#What is the thermal efficiency of the cycle?
#nth = 1 - qout/qin
#qout = h4 - h1
h1 = species1.HP[0]
h4 = species4.HP[0]
qout = h4 - h1
nth = 1 - qout/qin
print(f'The thermal efficiency of the cycle is {round(nth*100,1)}%.')

#If the net power is P = 2 MJ, what is the mass flowrate?
#Wnet = mwnet
#wnet = qin - qout
wnet = qin - qout
#Wnet/wnet = m
m = 1000000/wnet
print(f'The mass flowrate of the cycle is {round(m,2)} kg/s.')
The heat addition to the system is 1077.49 kJ/kg.
The thermal efficiency of the cycle is 45.8%.
The mass flowrate of the cycle is 2.03 kg/s.