Struggle with heat pump values #488
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
thanks for reaching out. There is three things in your setup:
from tespy.components import Condenser, Valve, Compressor, HeatExchanger, CycleCloser, Source, Sink
from tespy.connections import Connection
from tespy.networks import Network
cd = Condenser('Condenser')
va = Valve('Expnsion Valve')
cp = Compressor('Compressor')
ev = HeatExchanger('Evaporator')
cc_hp = CycleCloser('CC Heat Pump')
so_cd = Source('so_cd')
si_cd = Sink('si_cd')
so_ev = Source('so_ev')
si_ev = Sink('si_ev')
c20 = Connection(ev, 'out2', cc_hp, 'in1', label='20')
c20a = Connection(cc_hp, 'out1', cp, 'in1', label='20a')
c21 = Connection(cp, 'out1', cd, 'in1', label='21')
c22 = Connection(cd, 'out1', va, 'in1', label='22')
c23 = Connection(va, 'out1', ev, 'in2', label='23')
c11 = Connection(so_cd, 'out1', cd, 'in2', label='11a')
c12 = Connection(cd, 'out2', si_cd, 'in1', label='12')
c17 = Connection(so_ev, 'out1', ev, 'in1', label='17')
c18 = Connection(ev, 'out1', si_ev, 'in1', label='18')
nwtest = Network(T_unit='C', p_unit='bar', h_unit='kJ / kg', m_unit = 'kg / s')
nwtest.add_conns(c20, c20a, c21, c22, c23, c11, c12, c17, c18)
cd.set_attr(pr1=0.98, pr2=0.98)
ev.set_attr(pr1=0.98, pr2=0.98)
cp.set_attr(eta_s=0.85)
c20.set_attr(x=1, fluid={'NH3': 1}, T=35) # h=1700 from diagram this one lower than 17/18!!
c22.set_attr(T=63) #h=600 # this temperature must be higher than 11/12!!
c11.set_attr(fluid={'water': 1}, p=1, T=65, v=700/3600)
c12.set_attr(T=72)
c17.set_attr(fluid={'water': 1}, p=1, T=37) # ,v=700/3600)
c18.set_attr(T=30)
nwtest.solve('design')
nwtest.print_results() Btw. the temperature levels for condensation and evaporation do not check out, the condensation temperature must be higher than the respective cold part and in the evaporator its the other way round (see warnings after simulation). To your second question: I do not think you will need a |
Beta Was this translation helpful? Give feedback.
-
OT: seems like you draw these figures using draw.io (or similar)? Do you have a template for the components and would you like to share it? In case it is draw.io one could potentially also leverage the .json structure of the diagram to generate a tespy network... What do you think? |
Beta Was this translation helpful? Give feedback.
@gregorlein,
thanks for reaching out. There is three things in your setup:
Condenser
class has inbuiltx=0
at hot side outlet (out1
), therefore you cannot specifyx=0
there.