Transcritical CO2 Heat Pump Design #497
Unanswered
MikeSennis
asked this question in
Q&A
Replies: 3 comments 9 replies
-
UPDATE Hello again, Code: from tespy.networks import Network
from tespy.components import (
HeatExchanger, CycleCloser, Compressor, Turbine, Source, Sink
)
from tespy.connections import Connection, Bus
from CoolProp.CoolProp import PropsSI as PSI
working_fluid = "CO2" # cycle's refrigerant
nw = Network(T_unit="C", p_unit="bar", h_unit="kJ / kg")
# components
ev = HeatExchanger('evaporator')
gc = HeatExchanger('gas cooler')
cp = Compressor('centrifugal compressor')
tu = Turbine('turbo-expander')
cc = CycleCloser('cycle closer')
sw_so = Source('source water source')
sw_si = Sink('source water sink')
dw_so = Source('district water source')
dw_si = Sink('district water sink')
# connections
# source water loop
c11 = Connection(sw_so, "out1", ev, "in1", label="11") # in1 for heat exchanger's hot side inlet
c12 = Connection(ev, "out1", sw_si, "in1", label="12") # out1 for heat exchanger's hot side outlet
nw.add_conns(c11, c12)
# refrigerant (closed) loop
c0 = Connection(cc, "out1", gc, "in1", label="0")
c1 = Connection(gc, "out1", tu, "in1", label="1")
c2 = Connection(tu, "out1", ev, "in2", label="2")
c3 = Connection(ev, "out2", cp, "in1", label="3")
c4 = Connection(cp, "out1", cc, "in1", label="4")
nw.add_conns(c0, c1, c2, c3, c4)
# district water loop
c21 = Connection(dw_so, "out1", gc, "in2", label="21") # in2 for heat exchanger's cold side inlet
c22 = Connection(gc, "out2", dw_si, "in1", label="22") # out2 for heat exchanger's cold side outlet
nw.add_conns(c21, c22)
# power bus
motor = Bus("electric motor")
motor.add_comps(
{"comp": tu, "char": 1, "base": "component"},
{"comp": cp, "char": 1, "base": "bus"},
)
nw.add_busses(motor)
# parametrization
# making a good guess of pressure levels and enthalpy values
p_wf_GC_inlet = 181 # working fluid pressure in gas cooler inlet [bar], design (point) value,
# for CO2 it has to be > Pcrit = 73.773 bar (for supercritical state)
T_wf_GC_exit = 45 # working fluid temperature in gas cooler exit [oC], assuming its value,
# for CO2 it has to be > Tcrit = 30.978 °C (for supercritical state)
h_wf_GC_exit = PSI('H', 'P', (0.98*p_wf_GC_inlet)*1e5, 'T', T_wf_GC_exit + 273.15, working_fluid) # [J/kg]
T_wf_ev = -5 # working fluid temperature in evaporator [oC], evaporation temperature, assuming its value,
# for CO2 it has to be < Tcrit = 30.978 °C (for subcritical state)
h_wf_ev_exit = PSI('H', 'Q', 1, 'T', T_wf_ev + 273.15, working_fluid) # [J/kg], saturated gas (gas CO2)
p_wf_ev_exit = PSI('P', 'Q', 1, 'T', T_wf_ev + 273.15, working_fluid) # [Pa], saturated gas (gas CO2)
h_wf_ev_inlet = PSI('H', 'P', p_wf_ev_exit / 0.98, 'T', T_wf_ev + 273.15, working_fluid) # [J/kg], in case of two-phase region
# occurs in turbine exit (temperature and pressure combination isn't enough for this thermodynamic state)
gc.set_attr(pr1=0.98, pr2=0.98) # Q=48.4 MWth (Q=48.4e6), design (point) value (assuming pressure ratios)
ev.set_attr(pr1=0.98, pr2=0.98)
motor.set_attr(P=15.9e6) # P=15.9 MWe, design (point) value
c1.set_attr(h=h_wf_GC_exit / 1e3, fluid={working_fluid: 1}) # [kJ/kg]
c2.set_attr(h=h_wf_ev_inlet / 1e3) # [kJ/kg], using enthalpy and pressure combination in case of two-phase region occurs
c3.set_attr(p=p_wf_ev_exit / 1e5, h=h_wf_ev_exit/ 1e3) # [bar], [kJ/kg]
c4.set_attr(T=200, p=p_wf_GC_inlet) # design (point) values
c11.set_attr(T=10, p=10, fluid={'HEOS::Water': 1}) # design (point) values (assumption for pressure value and mass flow rate)
c12.set_attr(T=7) # design (point) value
c21.set_attr(T=40, p=10, fluid={'HEOS::Water': 1}) # design (point) values (assumption for pressure value)
c22.set_attr(T=110) # design (point) value
nw.solve("design")
nw.print_results()
COP = abs(gc.Q.val) / abs(motor.P.val)
print(f"Heating COP = {round(COP, 3)}")
print(f"Thermal output (heating capacity) = {round(abs(gc.Q.val)/1e6, 3)} MWth")
# unsetting stable starting values' specifications and setting target values instead
c1.set_attr(h=None, T=40) # assumption for the working fluid temperature in gas cooler exit (common range: 35°C - 55°C)
c2.set_attr(h=None, T=-10) # assumption for the evaporation temperature
tu.set_attr(eta_s=0.85) # assumption
c3.set_attr(h=None, p=None)
cp.set_attr(eta_s=0.85) # assumption
# ev.set_attr(ttd_l=5) # assuming 5 K [oC] pinch point temperature difference (ttd_l=5)
nw.solve("design")
nw.print_results()
COP = abs(gc.Q.val) / abs(motor.P.val)
print(f"Heating COP = {round(COP, 3)}")
print(f"Thermal output (heating capacity) = {round(abs(gc.Q.val)/1e6, 3)} MWth") |
Beta Was this translation helpful? Give feedback.
2 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
from tespy.networks import Network
working_fluid = "CO2"
nw = Network(
T_unit="C", p_unit="bar", h_unit="kJ / kg", m_unit="kg / s", s_unit="kJ / kgK"
)
from tespy.components import Condenser
from tespy.components import SimpleHeatExchanger
from tespy.components import Sink
from tespy.components import Source
from tespy.components import Compressor
c_in = Source("refrigerant in")
amb_out = Sink("sink ambient")
c_in1 = Source("refrigerant in1")
amb_out1 = Sink("sink ambient1")
cp_o = Compressor(" Compressor1")
cp_t = Compressor(" Compressor2")
cd = Condenser("condenser")
cons = SimpleHeatExchanger("SimpleHeatExchanger")
from tespy.connections import Connection
c0 = Connection(c_in, "out1", cp_o, "in1", label="0")
c1 = Connection(cp_o, "out1", cons, "in1", label="1")
c2 = Connection(cons, "out1", cp_t, "in1", label="2")
c3 = Connection(cp_t, "out1", cd, "in2", label="3")
c4 = Connection(cd, "out2", amb_out, "in1", label="4")
c10 = Connection(c_in1, "out1", cd, "in1", label="10")
c20 = Connection(cd, "out1",amb_out1, "in1", label="20")
nw.add_conns(c0, c1, c2, c3, c4, c10,c20 )
cd.set_attr(pr1=0.99, pr2=0.99)
cp_o.set_attr(eta_s=0.85)
cp_t.set_attr(eta_s=0.85)
cons.set_attr(pr=0.99)
c0.set_attr(p=30,fluid={working_fluid: 1})
c1.set_attr(p=80,h=500)
c2.set_attr(T=35)
c3.set_attr(T=90,p=150)
c4.set_attr(T=50)
c20.set_attr(T=25, fluid={"water": 1},m=1)
nw.solve(mode='design')
nw.print_results() |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to model a transcritical (compression cycle) heat pump unit in TESPy, with CO2 as the working fluid (closed cycle's refrigerant). A turboexpander (turbine) is used in the cycle, instead of an expansion valve, with the aim of work recovery. The recovered work from the turbine moves the compressor (through a shaft between the turbine and compressor), and any additional power requirement for the compression process is satisfied by an electric motor.
During model setup, I've tried to follow the recommended practices for stable starting values so that the solving process converges. But, for some reason, it doesn't, and the following error occurs:
I assume that a possible reason for the solving process failure is that, after the turbine, a two-phase region occurs, or it may be because of a "bad" value for any of the used parameters. However, I checked for possible solutions for the above issues (e.g. forcing the CO2 state as liquid after the turbine with PropsSI function), but nothing worked.
Any help or suggestion for these issues would be much appreciated!
Thank you very much in advance.
Heat Pump topology:
Code:
Beta Was this translation helpful? Give feedback.
All reactions