Project

Independent Research Project

AIM : To solve an Air Standard Brayton Cycle (Joule cycle).

OBJECTIVES :

  1. To solve an ideal air standard Brayton cycle based on user's input.
  2. To plot it's T-s diagram

THEORY :

The Brayton cycle is a thermodynamic cycle named after George Brayton that describes the workings of a constant-pressure heat engine. The original Brayton engines used a piston compressor and piston expander, but more modern gas turbine engines and airbreathing jet engines also follow the Brayton cycle. Although the cycle is usually run as an open system (and indeed must be run as such if internal combustion is used), it is conventionally assumed for the purposes of thermodynamic analysis that the exhaust gases are reused in the intake, enabling analysis as a closed system.

The Brayton cycle (or Joule cycle) represents the operation of a gas turbine engine. The cycle consists of four processes, as shown in Figure:

  • a - b Adiabatic, quasi-static (or reversible) compression in the inlet and compressor;
  • b - c Constant pressure fuel combustion (idealized as constant pressure heat addition);
  • c - d Adiabatic, quasi-static (or reversible) expansion in the turbine and exhaust nozzle, with which we
    1. take some work out of the air and use it to drive the compressor, and
    2. take the remaining work out and use it to accelerate fluid for jet propulsion, or to turn a generator for electrical power generation;
  • d - a Cool the air at constant pressure back to its initial condition.

In practice, real Brayton cycles take one of two forms. An 'open cycle', where the working fluid enters and then exits the device. This is the way a jet propulsion cycle works. A closed cycle, which recirculates the working fluid. Closed cycles are used, for example, in space power generation.

Open cycle gas turbine Closed cycle gas turbine

Work and Efficiency

The objective now is to find the work done, the heat absorbed, and the thermal efficiency of the cycle. Tracing the path shown around the cycle from ` a - b -c - d-a` , the first law gives (writing the equation in terms of a unit mass),

`implies``Deltau_(a-b-c-d)=0` , `q_2+q_1=w`,

Here `Delta u` is zero because `u` is a function of state, and any cycle returns the system to its starting state. The net work done is therefore,

`implies``q_2+q_1=w`,

where ` q_1` , ` q_2` are defined as heat received by the system (` q_` is negative). We thus need to evaluate the heat transferred in processes ` b - c` and ` d - a` .

For a constant pressure, quasi-static process the heat exchange per unit mass is , `implies``dh = c_p dT = dq`,

The heat exchange can be expressed in terms of enthalpy differences between the relevant states. Treating the working fluid as a perfect gas with constant specific heats, for the heat addition from the combustor,

`implies``q_2 = h_c - h_b = c_p (T_c - T_b )` `

The heat rejected is, similarly,

`implies``q_1 = h_a - h_d = c_p (T_a - T_d)` ,

The net work per unit mass is given by, `implies` Net work per unit mass `= q_1 + q_2 = c_p [(T_c - T_b)+(T_a - T_d)]` ,

The thermal efficiency of the Brayton cycle can now be expressed in terms of the temperatures:

`implies``eta =` Net work `/` Heat in `=``frac(c_p[(T_C-T_b)-(T_d-T_a)])(c_p(T_c-T_b)` ,

To proceed further, we need to examine the relationships between the different temperatures. We know that points ` a` and `d` are on a constant pressure process as are points `b` and `c` , and `P_a =P_d` ; ` P_b=P_c` . The other two legs of the cycle are adiabatic and reversible, so,

`implies``frac{P_d}{P_c}=\frac{P_a}{P_b}` `implies` `(\frac{T_d}{T_c}\)^{\gamma/(\gamma-1)}=(frac{T_a}{T_b})^{\gamma/(\gamma-1)}` ,

Therefore `T_d/T_c = T_a/T_b` .

Using this relation in the expression for thermal efficiency, yields an expression for the thermal efficiency of a Brayton cycle:

Ideal Brayton cycle efficiency: `eta_B = 1-\frac{T_a}{T_b}` ,

The temperature ratio across the compressor, `T_b/T_a =TR` . In terms of compressor temperature ratio, and using the relation for an adiabatic reversible process we can write the efficiency in terms of the compressor (and cycle) pressure ratio, which is the parameter commonly used:

`implies``\eta_B=1-\frac{1}{TR}=1-\frac{1}{PR^{(\gamma-1)/\gamma}}.`

PYTHON CODE :

  • For solving and calculating different state variables and work done, thermal efficiency:
# A program to solve an air standard cycle for a gas turbine power plant

import math
import matplotlib.pyplot as plt 
import numpy as np

print('Enter the following details:')
print('')
T3 = float(input('Enter inlet temperature at compressor (in degrees C) :\n'))
p3 = float(input('Enter inlet pressure at compressor (in MPa) :\n'))
ratio = float(input('Enter pressure ratio :\n'))
T1 = float(input('Enter maximum temperature (in degrees C) :\n'))
eff_t = float(input('Enter turbine efficiency :\n'))
eff_c = float(input('Enter compressor efficiency :\n'))
gamma = float(input('Enter the value of gamma :\n'))
# Inputs
R = 0.287
Cp = R*gamma/(gamma - 1)

# Calculating all state variables

# Converting deg C to K
T1 = T1 + 273.15
T3 = T3 + 273.15

p3 = p3*pow(10,6)
# pressure ratio = p4/p3 = p1/p2
p4 = ratio*p3
p1=p4         # Isobaric Processes
p2=p3
# Ideal gas euation| pV = mRT
v1 = (R*T1)/p1
v3 = (R*T3)/p3
# Adiabatic law | pv^gamma = constant| pressure ratio^(1/gamma) = v3/v4 = v2/v1 || TV^(1-gamma)= constant
v4 = v3*pow((1/ratio),(1/gamma))
T4 = T3*pow((v3/v4),(gamma - 1))

#eff_t(turbine efficiency) = (T4s - T3)/(T4- T3) | T4s is the temperature obtained if the turbine or compressor were completly isentropic 
T4s = T3 +eff_t*(T4 - T3)
T2s = T1/pow((p1/p2),(gamma - 1)/(gamma))
T2 = T1 - eff_c*(T1 - T2s)
# Ideal gas law
v2 = (R*T2)/p2
v2s = (R*T2s)/p2
v4s = (R*T4s)/p4

# Calculating work done, heat supplied , thermal efficiency

W_compressor = Cp*(T4 - T3)
W_turbine = Cp*(T1 - T2)
Q_in = Cp*(T1 - T4)
Thermal_eff = (W_turbine- W_compressor)/(Q_in)


print('')
print('At State point 1:')
print('p1 (in Pa) =  ', p1)
print('T1 (in K) =  ', T1)
print('\n')
print('At State point 2:')
print('p2 (in Pa) =  ', p2)
print('T2 (in K) =  ', T2)
print('\n')
print('At State point 3:')
print('p3 (in Pa) =  ', p3)
print('T3 (in K) =  ', T3)
print('\n')
print('At State point 4:')
print('p4 (in Pa) =  ', p4)
print('T4 (in K) =  ', T4)
print('\n')
print('Work consumed by compressor (in kJ/kg) : ' , W_compressor)
print('\n')
print('Work done by turbine (in kJ/kg) : ' , W_turbine)
print('\n')
print('Heat supplied (in kJ/kg) : ' , Q_in)
print('\n')
print('Thermal efficiency of the cycle is: ' , Thermal_eff)
print('\n')


int(input('Enter 0 to exit and press Enter:'))





  
  • For plotting T-s curve:
# A program to solve a air standard Brayton cycle and plot T-s diagram

import math
import matplotlib.pyplot as plt 
import numpy as np
import pyromat as pyro

air = pyro.get('ig.air')

# Inputs based on previous program
#inlet pressure at compressor (in MPa)
p1 = 0.1   # in MPa
p1 = p1*10   # 1 MPa = 10 bar
#inlet temperature at compressor (in degrees C)
T1 = 27
#maximum temperature (in degrees C)
T3 = 1000
# Converting deg C to K
T1 = T1 + 273.15
T3 = T3 + 273.15
#pressure ratio
ratio = 6
# Entropy calculation at state 1
s1 = air.s(T1,p1)
# Isentropic Compression
s2 = s1
# pressure ratio = p3/p4 = p2/p1
p2 = p1*ratio
# calculating T2
T2 = air.T_s(s=s1,p=p2)
# Isobaric processes
p4 = p1
p3 = p2
# Entropy calculation at state 3
s3 = air.s(T3,p3)
# Isentropic Expansion 
s4 = s3
# calculating T4
T4 = air.T_s(s=s4,p=p4)
# Creating an array of temperature for plotting
T = np.linspace(T2,T3)
# Plotting T-s diagram
plt.figure(1)
plt.plot(air.s(T=T,p=p2),T,linewidth=2,label='Isobaric Heat addition')
T = np.linspace(T1,T4)
plt.plot(air.s(T=T,p=p1),T,linewidth=2,label='Isobaric Heat addition')
plt.plot([s1,s2],[T1,T2],linewidth=2,label='Isentropic Compression')
plt.plot([s3,s4],[T3,T4],linewidth=2,label='Isentropic Expansion')
plt.legend(loc='best')
plt.axis([6, 8.5, 100, 1500])
plt.xlabel('Entropy (kJ/kgK)')
plt.ylabel('Temperature (K)')
plt.grid()
plt.title('T-s diagram of Brayton cycle')
plt.show()




PROCEDURE :

  1. At first necessary modules were imported such as 'math,matplotlib,numpy' were imported for their respective functions. In addition to these one extra module was installed and imported named as 'pyromat'. PYroMat is a Python package for conveniently retrieving the thermodynamic properties of substances from the command line or in scripts.
  2. For solving and finding different state variables of gas turbine, user has to input initial conditions such as- temperature and pressure at compressor inlet, maximum temperature which can occur inside plant, pressure ratio, etc.
  3. Then the script will solve for these inputs according to their thermodynamic relations and will display in the command window.
  4. For plotting T-s diagram, first thermodyanmic properties of air are imported which is possible through pyromat, and for the inputs provided several other variables such temperature, entropy are calculated. For plotting isobaric curves arrays of temperatures are created and it consists of parts a(2-3) and (1-4). It is returning data at specified intervals. Numpy gives us this feature. Isentropic lines are vertical lines. It consists of coordinates (s1,T1), (s1,T2) and (s3,T3), (s3,T4).

RESULTS :

  • The following are the outputs for the above programs. The inputs given are also dissplayed.

CONCLUSION : Python can be a very important tool for mechanical engineers as it has a huge library and a simple syntax which can help you solve complex problems easily and with the help of 'pyromat' module, different types of thermodynamic analysis can also be done easily like Rankine cycle.

REFERENCES :

  1. http://pyromat.org/doc_howto.html#plot
  2. https://github.com/chmarti1/PYroMat
  3. https://web.mit.edu/16.unified/www/SPRING/propulsion/notes/node27.html
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.