Request for help with offdesign calculations
See original GitHub issueI have an issue with turning a design run into an offdesign one. The jacobian matrix is always ending up forming a singularity. I feel I am doing something wrong with what parameters I omit during offdesign. Any help is highly appreciated.
What I am trying to do is the follows:
- If I change the mass flow rate, I want the turbine efficiencies to change and correspondingly its output powers.
- If it is possible, I also want to be able to set a pressure change at crucial junctures and see its effect on the power output
Attached herewith is the design code. Do let me know how do I turn it into an offdesign case.
# %% Starting the Network
fluid_list = ['Ar', 'N2', 'H2O', 'CO2', 'O2']
nw = Network(fluids=fluid_list, T_unit='C', p_unit='bar', h_unit='kJ / kg')
# Parameters for fluid flow
flueflow = 604.8
hptsink = 45.3
waterflow = 425.8
iptsploffset = 0 # +-30% 190.25 | max value is 0.3*(waterflow-hptsink)/2 | min is -0.3*(waterflow-hptsink)/2
ipt1psink = 10.5
ipt2psink = 10.5
iptlptsink = 42.6
lptsploffset = 0 # Can be maximum of +-0.3*(waterflow-hptsink-ipt1psink-ipt2psink-iptlptsink)/2
lpt1spl = 6.1
lpt2spl = 6.1
lpt1pspl = 11.65
lpt2pspl = 11.65
lpt1dpspl = 5.1
lpt2dpspl = 5.1
# %% Instantiating Components
#src sink
wtr_src = Source('Water Source')
flue = Source('Flue Gas Source')
stack = Sink('Flue Gas Stack')
hpt_sink = Sink('HPT Sink')
ipt_sink_1 = Sink('IPT 1 & 2 Sink')
ipt_sink_2 = Sink('IPT 1p & 2p Sink')
lpt_sink_1 = Sink('LPT 1 & 2 Sink')
lpt_sink_2 = Sink('LPT 1p & 2p Sink')
lpt_sink_3 = Sink('LPT 1dp & 2dp Sink')
lpt_sink_4 = Sink('LPT 1tp & 2tp Sink')
#Heat Exhangers
evap_sup = SteamGenerator('Evaporator & Superheater')
reh = SteamGenerator('Reheater')
evap_sup.set_attr(pr1=0.98, pr2=0.888, design=['pr2'], offdesign=['zeta2','kA_char2'])
reh.set_attr(pr1=0.99, pr2=0.91, design=['pr2'], offdesign=['zeta2', 'kA_char2'])
#Splitter & Merger
hpt_spl = Splitter('HPT Splitter')
ipt_spl = Splitter('IPT Splitter')
ipt1_spl = Splitter('IPT1 Splitter')
ipt2_spl = Splitter('IPT2 Splitter')
ipt12_mrg = Merge('IPT1 & 2 Merger')
ipt12p_mrg = Merge('IPT1p & 2p Merger')
ipt_lpt_spl = Splitter('IPT to LPT Splitter')
lpt_spl = Splitter('LPT Splitter')
lpt1_spl = Splitter('LPT1 Splitter')
lpt1p_spl = Splitter('LPT1p Splitter')
lpt1dp_spl = Splitter('LPT1dp Splitter')
lpt2_spl = Splitter('LPT2 Splitter')
lpt2p_spl = Splitter('LPT2p Splitter')
lpt2dp_spl = Splitter('LPT2dp Splitter')
lpt12_mrg = Merge('LPT1 & 2 Merger')
lpt12p_mrg = Merge('LPT1p & 2p Merger')
lpt12dp_mrg = Merge('LPT1dp & 2dp Merger')
lpt12tp_mrg = Merge('LPT1tp & 2tp Merger')
#Turbines
hpt = Turbine('HPT', eta_s=0.89, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
ipt1 = Turbine('IPT 1', eta_s=0.903, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
ipt2 = Turbine('IPT 2', eta_s=0.903, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
ipt1p = Turbine('IPT 1p', eta_s=0.903, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
ipt2p = Turbine('IPT 2p', eta_s=0.903, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt1 = Turbine('LPT 1', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt2 = Turbine('LPT 2', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt1p = Turbine('LPT 1p', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt2p = Turbine('LPT 2p', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt1dp = Turbine('LPT 1dp', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt2dp = Turbine('LPT 2dp', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt1tp = Turbine('LPT 1tp', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
lpt2tp = Turbine('LPT 2tp', eta_s=0.851, design=['eta_s'], offdesign=['eta_s_char', 'cone'])
# %% Setting the Connections
# Air/Flue
flue_evap = Connection(flue, 'out1', evap_sup, 'in1')
evap_reh = Connection(evap_sup, 'out1', reh, 'in1')
reh_stack = Connection(reh, 'out1', stack, 'in1')
# Water
src_evap = Connection(wtr_src, 'out1', evap_sup, 'in2')
evap_hpt = Connection(evap_sup, 'out2', hpt, 'in1')
hpt_hptspl = Connection(hpt, 'out1', hpt_spl, 'in1')
hptspl_sink = Connection(hpt_spl, 'out1', hpt_sink, 'in1')
hptspl_reh = Connection(hpt_spl, 'out2', reh, 'in2')
reh_iptspl = Connection(reh, 'out2', ipt_spl, 'in1')
iptspl_1 = Connection(ipt_spl, 'out1', ipt1, 'in1')
iptspl_2 = Connection(ipt_spl, 'out2', ipt2, 'in1')
ipt1_1spl = Connection(ipt1, 'out1', ipt1_spl, 'in1')
ipt1spl_1p = Connection(ipt1_spl, 'out1', ipt1p, 'in1')
ipt1spl_mrg = Connection(ipt1_spl, 'out2', ipt12_mrg, 'in1')
ipt2_2spl = Connection(ipt2, 'out1', ipt2_spl, 'in1')
ipt2spl_2p = Connection(ipt2_spl, 'out1', ipt2p, 'in1')
ipt2spl_mrg = Connection(ipt2_spl, 'out2', ipt12_mrg, 'in2')
ipt12mrg_s = Connection(ipt12_mrg, 'out1', ipt_sink_1, 'in1')
ipt1p_mrg = Connection(ipt1p, 'out1', ipt12p_mrg, 'in1')
ipt2p_mrg = Connection(ipt2p, 'out1', ipt12p_mrg, 'in2')
ipt12pmrg_spl = Connection(ipt12p_mrg, 'out1', ipt_lpt_spl, 'in1')
iptlptspl_spl = Connection(ipt_lpt_spl, 'out1', lpt_spl, 'in1')
iptlptspl_s = Connection(ipt_lpt_spl, 'out2', ipt_sink_2, 'in1')
lptspl_1 = Connection(lpt_spl, 'out1', lpt1, 'in1')
lptspl_2 = Connection(lpt_spl, 'out2', lpt2, 'in1')
lpt1_1spl = Connection(lpt1, 'out1', lpt1_spl, 'in1')
lpt1spl_1p = Connection(lpt1_spl, 'out1', lpt1p, 'in1')
lpt1spl_mrg = Connection(lpt1_spl, 'out2', lpt12_mrg, 'in1')
lpt2_2spl = Connection(lpt2, 'out1', lpt2_spl, 'in1')
lpt2spl_2p = Connection(lpt2_spl, 'out1', lpt2p, 'in1')
lpt2spl_mrg = Connection(lpt2_spl, 'out2', lpt12_mrg, 'in2')
lpt12mrg_sink = Connection(lpt12_mrg, 'out1', lpt_sink_1, 'in1')
lpt1p_1spl = Connection(lpt1p, 'out1', lpt1p_spl, 'in1')
lpt1pspl_1dp = Connection(lpt1p_spl, 'out1', lpt1dp, 'in1')
lpt1pspl_mrg = Connection(lpt1p_spl, 'out2', lpt12p_mrg, 'in1')
lpt2p_2spl = Connection(lpt2p, 'out1', lpt2p_spl, 'in1')
lpt2pspl_2dp = Connection(lpt2p_spl, 'out1', lpt2dp, 'in1')
lpt2pspl_mrg = Connection(lpt2p_spl, 'out2', lpt12p_mrg, 'in2')
lpt12pmrg_sink = Connection(lpt12p_mrg, 'out1', lpt_sink_2, 'in1')
lpt1dp_1spl = Connection(lpt1dp, 'out1', lpt1dp_spl, 'in1')
lpt1dpspl_1tp = Connection(lpt1dp_spl, 'out1', lpt1tp, 'in1')
lpt1dpspl_mrg = Connection(lpt1dp_spl, 'out2', lpt12dp_mrg, 'in1')
lpt2dp_2spl = Connection(lpt2dp, 'out1', lpt2dp_spl, 'in1')
lpt2dpspl_2tp = Connection(lpt2dp_spl, 'out1', lpt2tp, 'in1')
lpt2dpspl_mrg = Connection(lpt2dp_spl, 'out2', lpt12dp_mrg, 'in2')
lpt12dpmrg_sink = Connection(lpt12dp_mrg, 'out1', lpt_sink_3, 'in1')
lpt1tp_mrg = Connection(lpt1tp, 'out1', lpt12tp_mrg, 'in1')
lpt2tp_mrg = Connection(lpt2tp, 'out1', lpt12tp_mrg, 'in2')
lpt12tpmrg_sink = Connection(lpt12tp_mrg, 'out1', lpt_sink_4, 'in1')
# %% Setting Connection Parameters
# Combustion
flue_evap.set_attr(p=1.01, T=1782.7, m=flueflow, fluid={'CO2': 0.25, 'N2': 0.709, 'Ar': 0.0102,
'O2': 0.0348, 'H2O': 0.028})
evap_reh.set_attr(T=802.3)
reh_stack.set_attr(T=529.8)
# Water
src_evap.set_attr(p=193.7, T=324, m=waterflow, fluid={'Ar': 0, 'N2': 0, 'H2O': 1,
'CO2': 0, 'O2': 0})
hpt_hptspl.set_attr(p=44.1)
hptspl_sink.set_attr(m=hptsink)
iptspl_1.set_attr(m=(waterflow-hptsink)/2+iptsploffset)
ipt1_1spl.set_attr(p=17.4)
ipt1spl_mrg.set_attr(m=ipt1psink)
ipt2spl_mrg.set_attr(m=ipt2psink)
ipt1p_mrg.set_attr(p=7.93)
iptlptspl_s.set_attr(m=iptlptsink)
lptspl_1.set_attr(m=(waterflow-hptsink-ipt1psink-ipt2psink-iptlptsink)/2+lptsploffset)
lpt1_1spl.set_attr(p=2.6)
lpt1spl_mrg.set_attr(m=lpt1spl)
lpt2spl_mrg.set_attr(m=lpt2spl)
lpt1p_1spl.set_attr(p=1.3)
lpt1pspl_mrg.set_attr(m=lpt1pspl)
lpt2pspl_mrg.set_attr(m=lpt2pspl)
lpt1dp_1spl.set_attr(p=0.26)
lpt1dpspl_mrg.set_attr(m=lpt1dpspl)
lpt2dpspl_mrg.set_attr(m=lpt2dpspl)
lpt1tp_mrg.set_attr(p=0.103)
nw.add_conns(flue_evap, evap_reh, reh_stack)
nw.add_conns(src_evap, evap_hpt, hpt_hptspl, hptspl_sink, hptspl_reh, reh_iptspl,
iptspl_1, iptspl_2, ipt1_1spl, ipt1spl_1p, ipt1spl_mrg, ipt2_2spl, ipt2spl_2p, ipt2spl_mrg, ipt12mrg_s,
ipt1p_mrg, ipt2p_mrg, ipt12pmrg_spl, iptlptspl_s, iptlptspl_spl,
lptspl_1, lptspl_2, lpt1_1spl, lpt1spl_1p, lpt1spl_mrg, lpt2_2spl, lpt2spl_2p, lpt2spl_mrg, lpt12mrg_sink,
lpt1p_1spl, lpt1pspl_1dp, lpt1pspl_mrg, lpt2p_2spl, lpt2pspl_2dp, lpt2pspl_mrg, lpt12pmrg_sink,
lpt1dp_1spl, lpt1dpspl_1tp, lpt1dpspl_mrg, lpt2dp_2spl, lpt2dpspl_2tp, lpt2dpspl_mrg, lpt12dpmrg_sink,
lpt1tp_mrg, lpt2tp_mrg, lpt12tpmrg_sink)
# %% Solving Plant for design
nw.solve('design')
nw.print_results()
nw.save(path='./my_char')
If it helps I have also attached a diagram of the plant

Note: The combustor was removed because of inadequate data I had
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
A new approach to off-design performance analysis of gas ...
Presenting a new method to the off-design analysis of gas turbine engines. ... a comprehensive tool to perform the off-design calculations.
Read more >Jet engine off-design and transient performance - Wikiversity
Simple Off-design CalculationEdit. Typical compressor working line generated using Simple Off-design Calculation. Design point calculations ...
Read more >(PDF) Understanding Off-Design Behavior - ResearchGate
In this chapter we describe the principles of gas turbine off-design behavior. Understanding the interactions between individual components ...
Read more >Appendix 9C: Design Calculations for Electrical Design
This appendix presents standards and guidelines for electrical design calculations for SPU projects. Design calculations establish minimum guidelines and ...
Read more >User Manuals - GasTurb
Off -design simulations describe the behavior of a gas turbine. Component performance is determined on the basis of maps and the cycle can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For completion, solution is to fix the lowest turbine stage outlet pressure for offdesign:
For now, just comment that you like to participate. We will publish a schedule and more detailed information in a separate wiki https://github.com/oemof/oemof/wiki.