THERMODYNAMICS / PYTHON / EXERGY ANALYSIS · INDEPENDENT PROJECT

Brayton-cycle gas turbine simulator

A Python simulation comparing ideal-component and non-ideal Brayton gas turbine cycles. The model uses compressor and turbine efficiencies, combustor pressure loss and energy/exergy balances to examine how pressure ratio and turbine inlet temperature change predicted performance.

Saved Python plot comparing net power versus pressure ratio for ideal and real cycle models
Saved model output - net power as a function of compressor pressure ratio. View full graph ↗
MODELIdeal-component and real-component air-standard Brayton cycle
TOOLSPython · NumPy · Pandas · Matplotlib
EVIDENCESource code · parameter sweeps · CSV summaries · saved graphs

01 / OBJECTIVE

From textbook thermodynamics to design trade-offs

The aim was to quantify how departures from ideal compression and expansion affect predicted net shaft power, first-law thermal efficiency and second-law performance. Separate pressure-ratio and turbine-inlet-temperature sweeps were implemented to identify different operating points for maximum power and efficiency.

2–50Pressure-ratio sweep, increments of 1
1400–1800 KTurbine-inlet-temperature sweep, 50 K increments
10 kg/sFixed working-fluid mass flow rate
5%Combustor pressure loss in current configuration

Model scope: A simplified steady-state air-standard cycle with constant specific heat and heat-capacity ratio. It is a conceptual design calculation, not an experimentally validated gas turbine or a manufacturer performance map.

02 / SYSTEM MODEL

Four thermodynamic states, two component models

1 → 2Compression

Air temperature and pressure rise through the compressor; real outlet temperature accounts for ηc.

2 → 3Heat addition

Working-fluid temperature increases to the specified TIT; the model applies combustor pressure loss.

3 → 4Expansion

The turbine delivers shaft work; actual outlet temperature depends on ηt and expansion pressure ratio.

4 → 1Cycle closure

Heat rejection is represented through the air-standard cycle idealisation.

InputConfigurationMeaning
T1 / P1298.15 K / 100,000 PaCompressor inlet conditions
T31400 K baselineTurbine inlet temperature
γ / Cp / R1.4 / 1005 J kg−1 K−1 / 287 J kg−1 K−1Constant air-property assumptions
ηc / ηt0.85 / 0.90Compressor / turbine isentropic efficiencies in real model
ΔPcombustor5%Pressure loss is applied in both comparison models
T0300 KExergy reference temperature

The repository calls its first case the ideal cycle. More precisely, its compressor and turbine are isentropic but it retains the configured 5% combustor pressure loss. It is therefore not a completely loss-free textbook Brayton cycle.

03 / GOVERNING EQUATIONS

Compression, expansion and cycle efficiency

Isentropic compressor

T2s = T1 · PR(γ−1)/γ

Real compressor

T2 = T1 + (T2s − T1) / ηc

Real turbine

T4 = T3 − ηt(T3 − T4s)

Net specific work

wnet = Cp[(T3 − T4) − (T2 − T1)]

Thermal efficiency

ηth = wnet / [Cp(T3 − T2)]

Exergy destruction

ĖD = T0 Ṡgen

The code calculates compressor and turbine entropy changes using constant-property ideal-gas relations and applies the Gouy-Stodola relationship to calculate their exergy destruction. Its second-law efficiency uses the simplified heat-exergy approximation Qin(1 − T0/T3), not detailed fuel chemical exergy.

04 / PARAMETRIC RESULTS

Maximum net power is not maximum efficiency

The committed Results/cycle_optima_summary.csv reports these model outcomes for the saved configuration:

CaseOptimised quantityPRNet powerThermal efficiency
Ideal-component caseMaximum net power153.98 MW52.61%
Real-component caseMaximum net power102.73 MW34.99%
Ideal-component caseMaximum thermal efficiency*503.23 MW65.91%
Real-component caseMaximum thermal efficiency232.31 MW38.69%

*The ideal-component efficiency rises to its highest recorded value at the upper sweep boundary PR = 50. This is a boundary result, not proof of a finite interior optimum.

Saved ideal and real net-specific-work comparison by pressure ratio
Specific net work against pressure ratio - expand ↗
Saved thermal efficiency versus turbine inlet temperature for both cycle models
Thermal efficiency against turbine inlet temperature - expand ↗
01

Power optimum shifts earlier

In the saved sweep, component inefficiencies and pressure losses move the modelled maximum power from PR 15 to PR 10.

02

Efficiency has a different optimum

Real-model thermal efficiency peaks at PR 23, where net power is lower than at PR 10. The choice depends on the design objective.

03

Increasing compressor work

Higher pressure ratios increase compressor outlet temperature and specific compressor work, eventually eroding the power benefit of expansion.

04

Turbine inlet temperature

The separate TIT sweep explores 1400–1800 K. The Notion summary reports modest real-cycle efficiency gains, whereas the ideal-component efficiency is insensitive to TIT for fixed PR under the model assumptions.

05 / SECOND-LAW ANALYSIS

Exergy destruction and usable work

The simulation estimates component-level entropy generation and exergy destruction in the compressor and turbine, then compares the net work output with a simplified heat-exergy input expression.

49.24%Highest recorded real-model second-law efficiency (PR 23)
83.89%Highest recorded ideal-component second-law efficiency (PR 50 boundary)
PR 23Real-model peak thermal and second-law efficiencies
T0 = 300 KAmbient reference for exergy destruction
Saved second law efficiency comparison between ideal and real Brayton models
Second-law efficiency across PR - expand ↗
Saved specific exergy destruction breakdown for compressor turbine and total across pressure ratio
Compressor / turbine exergy-destruction breakdown - expand ↗

Interpretation boundary: These exergy quantities follow the repository's simplified constant-property calculations. The model does not resolve combustion chemistry, fuel exergy, heat transfer to surroundings or a complete combustor exergy balance, so the figures should not be presented as audited plant irreversibility losses.

06 / SOFTWARE

Modular calculation and exported results

The GitHub repository separates Brayton.py (ideal/real cycle state calculations), Config.py (parameters), Sensitivity.py (sweeps), Plots.py (graph functions) and Main.py (simulation pipeline). Pandas exports the pressure-ratio runs and optimum summary to CSV.

Representative lines from the real-cycle calculation:

T2s = T1 * pressure_ratio ** ((gamma - 1) / gamma)
T2 = T1 + (T2s - T1) / compressor_efficiency

P3 = P2 * (1 - combustor_pressure_loss)
T4s = T3 * (P4 / P3) ** ((gamma - 1) / gamma)
T4 = T3 - (T3 - T4s) * turbine_efficiency

W_net = Cp * (T3 - T4) - Cp * (T2 - T1)
power_net = mass_flow_rate * W_net

The functions also reject non-physical conditions such as non-positive net work and turbine-inlet temperatures below the compressor outlet temperature.

Reproducibility note: The committed Main.py produces CSV outputs, but its individual plotting calls are currently commented out. Saved graph files remain available; to regenerate them from a fresh run, the required plotting calls must be enabled.

07 / ENGINEERING REFLECTION

What the model establishes - and what it doesn't

The key engineering result is the trade-off between power and efficiency. Selecting pressure ratio solely for maximum ideal-cycle efficiency can miss the lower net-power optimum of the real-component model. Including imperfect components changes both the magnitude and location of the predicted performance peaks.

Next iteration: Use temperature-dependent specific heat, separate combustor exergy accounting and measured compressor/turbine maps; add structured unit tests and rerun the model against an established published benchmark. These are improvement proposals rather than completed validation.