Cycle Description
Boiler (Q_in)
4 ────────────→ 1
↑ ↓
Pump Turbine (W_out)
↑ ↓
3 ←──────────── 2
Condenser (Q_out)
| State |
Location |
Condition |
| 1 |
Turbine inlet |
Superheated steam |
| 2 |
Turbine outlet |
Wet/superheated steam |
| 3 |
Condenser outlet |
Saturated liquid |
| 4 |
Pump outlet |
Compressed liquid |
Given Data
- Working fluid: Water
- Turbine inlet: 80 bar, 480°C
- Condenser pressure: 0.08 bar
- Turbine isentropic efficiency: 85%
- Pump isentropic efficiency: 85%
- Mass flow rate: 1 kg/s
Complete Code
from thermocycle import (
ThermodynamicModel, Turbine, Pump, HeatExchanger,
)
from thermocycle.plotting import CyclePlotter
# ── Step 1: Create model ─────────────────────────────
Model = ThermodynamicModel()
Model.set_dead_state(T0=298.15, P0=101325)
# ── Step 2: Parameters ───────────────────────────────
wf = 'water'
T1 = 480 + 273.15 # 753.15 K
P1 = 80e5 # 80 bar = 8 MPa
P_cond = 0.08e5 # 0.08 bar = 8 kPa
eta_t = 0.85
eta_p = 0.85
m_dot = 1.0 # kg/s
# ── Step 3: State points ─────────────────────────────
Model.add_point(wf, '1', P=P1, T=T1, Mass_flowrate=m_dot)
Model.add_point(wf, '2', P=P_cond)
Model.add_point(wf, '3', P=P_cond, Q=0)
Model.add_point(wf, '4', P=P1)
# ── Step 4: Components ───────────────────────────────
Turbine(Model, 'Turbine', '1', '2', n_isen=eta_t, Calculate=True)
HeatExchanger(Model, 'Condenser', PPT=5, HEX_type='SimpleHEX',
HeatAdded=False,
Hot_In_state='2', Hot_Out_state='3',
Cold_In_state=None, Cold_Out_state=None,
Calculate=True)
Pump(Model, 'Pump', '3', '4', n_isen=eta_p, Calculate=True)
HeatExchanger(Model, 'Boiler', PPT=5, HEX_type='SimpleHEX',
HeatAdded=True,
Hot_In_state=None, Hot_Out_state=None,
Cold_In_state='4', Cold_Out_state='1',
Calculate=True)
# ── Step 5: Results ───────────────────────────────────
print(Model)
# ── Step 6: Plots ────────────────────────────────────
plotter = CyclePlotter(Model)
plotter.plot_Ts_diagram(['1', '2', '3', '4', '1'],
title='Simple Rankine Cycle')
plotter.plot_exergy_bar(as_percentage=True)
Expected Results
| Parameter |
Value |
| Turbine work |
~1050 kW |
| Pump work |
~8 kW |
| Net power |
~1042 kW |
| Heat input |
~3200 kW |
| Heat rejected |
~2158 kW |
| Thermal efficiency |
~32.5% |