Rankine Cycle - unreasonable results #457
-
Hello community, Code: from tespy.networks import Network
# a network object creation with water as fluid
my_plant = Network()
my_plant.set_attr(p_unit='bar', h_unit='kJ / kg')
from tespy.components import (
CycleCloser, Turbine, Condenser, Pump, SimpleHeatExchanger, Source, Sink
)
cc = CycleCloser('cycle closer')
tu = Turbine('steam turbine')
co = Condenser('condenser')
fp = Pump('feed pump')
sg = SimpleHeatExchanger('HRSG')
cw_so = Source('cooling water source')
cw_si = Sink('cooling water sink')
from tespy.connections import Connection
# main (closed) cycle
c1 = Connection(cc, 'out1', tu, 'in1', label='1')
c2 = Connection(tu, 'out1', co, 'in1', label='2') # in1 for condenser's hot side inlet
c3 = Connection(co, 'out1', fp, 'in1', label='3') # out1 for condenser's hot side outlet
c4 = Connection(fp, 'out1', sg, 'in1', label='4')
c0 = Connection(sg, 'out1', cc, 'in1', label='0')
my_plant.add_conns(c1, c2, c3, c4, c0)
# cooling water loop
c11 = Connection(cw_so, 'out1', co, 'in2', label='11') # in2 for condenser's cold side inlet
c12 = Connection(co, 'out2', cw_si, 'in1', label='12') # out2 for condenser's cold side outlet
my_plant.add_conns(c11, c12)
# parameters' definition
co.set_attr(pr1=1, pr2=0.98)
sg.set_attr(pr=0.9)
tu.set_attr(eta_s=0.89)
fp.set_attr(eta_s=0.75)
c11.set_attr(T=293.15, p=1.2, fluid={'water': 1})
c12.set_attr(T=303.15)
c1.set_attr(T=750, p=100, m=19.56, fluid={'water': 1})
c2.set_attr(p=0.13724)
from tespy.connections import Bus
power_gen = Bus("electrical power output")
power_gen.add_comps(
{"comp": tu, "char": 0.97, "base": "component"},
{"comp": fp, "char": 0.97, "base": "bus"},
)
my_plant.add_busses(power_gen)
my_plant.solve(mode='design')
my_plant.print_results()
# parametric analysis (with constant steam mass flow)
my_plant.set_attr(iterinfo=False)
import matplotlib.pyplot as plt
import numpy as np
# make text reasonably sized
plt.rc('font', **{'size': 18})
data = {
'T_live_steam': np.linspace(600, 900, 7), # [K]
'T_cooling_water': np.linspace(5+273.15, 35+273.15, 7), # feed (cooling) water temperature level (in condenser inlet) [K]
'p_live_steam': np.linspace(75, 225, 7) # [bar]
}
# Rankine cycle efficiency
eta = {
'T_live_steam': [],
'T_cooling_water': [],
'p_live_steam': []
}
# Rankine cycle net power output
power = {
'T_live_steam': [],
'T_cooling_water': [],
'p_live_steam': []
}
for T in data['T_live_steam']:
c1.set_attr(T=T)
my_plant.solve('design')
eta['T_live_steam'] += [(abs(power_gen.P.val) / sg.Q.val) * 100]
power['T_live_steam'] += [abs(power_gen.P.val) / 1e6] # [MWe]
# reset to base live steam temperature
c1.set_attr(T=750)
for T in data['T_cooling_water']:
c11.set_attr(T=T)
c12.set_attr(T=T+10) # cooling water temperature in condenser exit assumed 10 °C (or K) higher than in condenser inlet
my_plant.solve('design')
eta['T_cooling_water'] += [(abs(power_gen.P.val) / sg.Q.val) * 100]
power['T_cooling_water'] += [abs(power_gen.P.val) / 1e6] # [MWe]
# reset to base cooling water temperature
c11.set_attr(T=293.15)
c12.set_attr(T=303.15)
for p in data['p_live_steam']:
c1.set_attr(p=p)
my_plant.solve('design')
eta['p_live_steam'] += [(abs(power_gen.P.val) / sg.Q.val) * 100]
power['p_live_steam'] += [abs(power_gen.P.val) / 1e6] # [MWe]
# reset to base live steam pressure
c1.set_attr(p=100)
# plotting
fig, ax = plt.subplots(2, 3, figsize=(16, 8), sharex='col', sharey='row')
ax = ax.flatten()
[a.grid() for a in ax]
i = 0
for key in data:
ax[i].scatter(data[key], eta[key], s=100, color="#1f567d")
ax[i + 3].scatter(data[key], power[key], s=100, color="#18a999")
i += 1
ax[0].set_ylabel('Efficiency (%)')
ax[3].set_ylabel('Net electric power output [MWe]')
ax[3].set_xlabel('Live steam temperature [K]')
ax[4].set_xlabel('Feed water temperature [K]')
ax[5].set_xlabel('Live steam pressure [bar]')
plt.tight_layout()
fig.savefig('Rankine_parametric analysis.svg')
plt.close()
# part-load simulation
c2.set_attr(design=["p"]) # unsetting condensation's pressure value
co.set_attr(offdesign=["kA"]) # setting condenser's area independent heat transfer coefficient
c11.set_attr(offdesign=["v"]) # setting cooling water volumetric flow
c12.set_attr(design=["T"]) # unsetting cooling water return temperature value
c1.set_attr(design=["p"]) # unsetting steam turbine's inlet pressure
tu.set_attr(offdesign=["cone"]) # Stodola’s cone law application
my_plant.solve("design")
my_plant.save("Rankine_design")
part_load_efficiency = [] # Rankine cycle part-load (electrical) efficiency
part_load_m_range = np.linspace(19.56, 19.56/2, 11) # steam mass flow range [kg/s]
for m in part_load_m_range:
c1.set_attr(m=m)
my_plant.solve("offdesign", design_path="Rankine_design")
part_load_efficiency += [(abs(power_gen.P.val) / sg.Q.val) * 100]
fig, ax = plt.subplots(1, figsize=(16, 8))
ax.grid()
ax.scatter(part_load_m_range, part_load_efficiency, s=100, color="#1f567d")
ax.set_xlabel("Steam mass flow [kg/s]")
ax.set_ylabel("Rankine cycle electrical efficiency (%)")
plt.tight_layout()
fig.savefig('Rankine_part-load analysis.svg')
plt.close() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi and thanks for reaching out! The issue here is, that your condensation pressure in the condenser is fixed and independent of the cooling water temperature:
To connect it with the cooling water temperature, you could for example do this by fixing the terminal temperature difference between condensation temperature and cooling water outlet. After your initial simulation add the following lines of code: c2.set_attr(p=None)
co.set_attr(ttd_u=5) Best |
Beta Was this translation helpful? Give feedback.
Hi and thanks for reaching out!
The issue here is, that your condensation pressure in the condenser is fixed and independent of the cooling water temperature:
c2.set_attr(p=0.13724)
To connect it with the cooling water temperature, you could for example do this by fixing the terminal temperature difference between condensation temperature and cooling water outlet. After your initial simulation add the following lines of code:
Best