CHP model #374
Replies: 4 comments 6 replies
-
I realized I've posted an incomplete description. The desuperheater is an injection of water into the steam pipe. That is: it's an open heat exchanger, a mixing one. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi. I'm returning to this. Although I've been practising, I still don't quite get the logic behind the cycle closer. Currently, we (me and the student I'm tutoring in studying TESPy) are trying to implement something like this: where 1 & 13 being a source and a sink, and 12 another sink. The problem arises with the attemperation closed cycle. In any case, any hint will be indeed appreciated. Regards!! # Application notes:
from tespy.networks import Network
from tespy.components import (CycleCloser, Turbine, Source, Sink, Splitter, Valve, SimpleHeatExchanger, Pump,Merge)
my_plant = Network()
my_plant.set_attr(T_unit='C',p_unit='bar', h_unit='kJ / kg', m_unit='t / h', s_unit='kJ / kgK', iterinfo=False)
# Components
cc=CycleCloser('cycle closer')
steam_inlet = Source('hp steam')
st_ext = Turbine('extraction st',eta_s=0.9)
st_cond = Turbine('cond st', eta_s=0.9)
att_pump = Pump('att_pump', eta_s=0.7)
cond_pump = Pump('cond_pump', eta_s=0.7)
sp_1 = Splitter('st inner splitter')
sp_2 = Splitter('condensate header')
me_1=Merge('Attemper')
cond_st_cv = Valve('cond st cv')
process_steam = Sink('process IP steam')
condenser = SimpleHeatExchanger('condenser')
steam_outlet = Sink('Sumidero de prueba')
steam_outlet_2 = Sink('Sumidero de prueba 2')
steam_outlet_3 = Sink('Sumidero de prueba 3')
# Connections
from tespy.connections import (Connection, Ref)
N = 13 # number of states
c = [None] * N
names = [None] * N
c[0] = Connection(steam_inlet, 'out1', st_ext, 'in1', label='1') # hrsg outlet
c[0].set_attr(p=66, T=480, m=180, fluid={'water': 1})
names[0] = 'hp steam'
c[1] = Connection(st_ext, 'out1', sp_1, 'in1', label='2') # st inner splitter
c[1].set_attr(p=13)
names[1] = 'extraction st outlet'
c[2] = Connection(sp_1, 'out2', me_1, 'in2', label='3') # process steam
c[2].set_attr(m=130)
names[2] = 'Steam from TV to attemp'
c[3] = Connection(sp_1, 'out1', cond_st_cv, 'in1', label='4') # cond st valve inlet
names[3] = 'cond st cv inlet'
c[4] = Connection(cond_st_cv, 'out1', st_cond, 'in1', label='5') # cond st inlet
c[4].set_attr(p=11)
names[4] = 'cond st inlet'
c[5] = Connection(st_cond, 'out1', condenser, 'in1', label='6') # condenser inlet
c[5].set_attr(p=0.08)
names[5] = 'condenser inlet'
c[6] = Connection(condenser, 'out1', sp_2, 'in1', label='7') # condenser header
c[6].set_attr(x=0, p=0.08)
names[6] = 'condenser outlet'
c[7] = Connection(sp_2, 'out1', cond_pump, 'in1', label='8')
names[7] = 'cond pump inlet'
c[8] = Connection(sp_2, 'out2', att_pump, 'in1', label='9') #El caudal m=10 lo voy a sacar cuando defina x=1 para vapor a proceso
#c[8].set_attr(m=10)
names[8] = 'att pump inlet'
c[9]=Connection(att_pump,'out1',cc,'in1',label='10')
c[9].set_attr(p=13)
names[9]='att pump outlet'
c[10]=Connection(cc,'out1',me_1,'in1',label='11')
names[10]='cc outlet'
#c[10].set_attr(fluid={'water': 1})
c[11]=Connection(me_1, 'out1',process_steam,'in1',label='12')
c[11].set_attr(x=1)
names[11]='process steam'
c[12]=Connection(cond_pump,'out1', steam_outlet, 'in1', label='13')
c[12].set_attr(p=5)
names[12]='cond pump outlet'
for j in range(0,N):
my_plant.add_conns(c[j])
my_plant.solve(mode='design')
df_results_for_conns = my_plant.results['Connection']
df_results_for_conns['denomination'] = names
results = df_results_for_conns[['denomination',
'p','p_unit',
'T','T_unit',
'h','h_unit',
's','s_unit',
'x',
'm','m_unit']]
#results = results.drop(results.index[0])
def impresion(__file__, results):
results = results.round(3)
import os
path = os.path.dirname(os.path.abspath(__file__))
text_file = os.path.join(path, 'results.txt')
formatted_text = results.to_string(index=False, justify='left')
with open(text_file, 'w') as file:
file.write(formatted_text)
impresion(__file__, results) |
Beta Was this translation helpful? Give feedback.
-
Wow, this is terribly excellent. I realize that I misunderstood the merge. I mistakenly thought that I had the freedom to specify pressures for both inlets. Consequently, the outlet pressure would also need to be set. I need some time to study the answer in great detail, but I do want to participate in the Stammtisch. Firstly, to fully understand the logic of coding, and offer my user experience. And perhaps later contribute to the documentation and this forum. Contributing to the code is, unfortunately, beyond my current programming capabilities, although I want to be able someday. I have some questions and ideas. For example, when performing a thermal balance in an HRSG, there's a need to specify where the pinch occurs, whether it's in the evaporator or the economizer. Usually, I solve this by using a
I'm not quite sure how to implement this in Tespy. I've thought about using an Thanks again for your time!! |
Beta Was this translation helpful? Give feedback.
-
Hi, everyone.
In first place, I'd like to express my gratitude for such an useful software.
Let me explain my need: I'm trying to implement Tespy in my thermal cycle course in the University of Buenos Aires. I'm starting this task by modelling a conventional CHP steam cycle (a steam turbine with a condenser and a controlled extraction). In order to do so, I'd like to know which component I should use to model a desuperheater.
Although I've noticed that there is a component with this name, I understand that the outlet is dry saturated steam. In my case, because it's technologically more convenient, the steam outlet should have a little superheating, let's say 10°C above saturation.
How could I model this desuperheater?
And one more question: I need to model a steam header, with more than two outlets. Is the splitter just fine for this application? I belive so, but I'd like to double-check it.
Thanks in advance for your guidance, perhaps I'd join to the Stammtisch (only as a listener, because I'm in my office time).
Regards,
Pablo
Beta Was this translation helpful? Give feedback.
All reactions