Compressed Air Energy Storage (CAES) Modelisation #411
-
Hello everyone, First, has anyone ever tried to create the model of a CAES ? I've tried two different codes, using Here is the first code : from tespy.networks import Network
from tespy.components import (Source, Compressor, Sink,HeatExchangerSimple, Turbine)
from tespy.connections import Connection, Ref, Bus
from tespy.tools import document_models
fluid_list=['air']
nw1=Network(fluids=fluid_list, p_unit='bar', T_unit='K')
cp=Compressor('compresseur')
air=Source('air source')
tu=Turbine('turbine')
ac=Sink('compressed air')
he=HeatExchangerSimple('heat exchanger')
he2=HeatExchangerSimple('2nd heat exchanger')
c1=Connection(air,"out1", cp, "in1", label="1")
c2=Connection(cp,"out1", he,"in1", label="2")
c3=Connection(he,"out1", he2,"in1", label="3")
c4=Connection(he2,"out1", tu, "in1", label="4")
c5=Connection(tu,"out1",ac,"in1", label="5")
nw1.add_conns(c1,c2,c3,c4,c5)
cp.set_attr(pr=10, eta_s=0.8)
c1.set_attr(p=1, T=198, v=5, fluid={'air':1})
he.set_attr(pr=0.85, L=1,D=0.2, Tamb=198)
c3.set_attr(T=220) # cooled down gas temperature
he2.set_attr(pr=0.85, L=1, D=0.2, Tamb=198)
c4.set_attr(T=400) #heated gas temperature
tu.set_attr(pr=0.15,eta_s=0.8)
nw1.solve('design')
nw1.print_results() I've got results whith this one but I don't really know if the model matches the model that I want to do. My second code, with the casual heat exchanger is the following : from tespy.networks import Network
from tespy.components import (Source, Compressor, Sink,HeatExchanger, Turbine)
from tespy.connections import Connection, Ref, Bus
from tespy.tools import document_models
fluid_list=['air','water']
nw1=Network(fluids=fluid_list, p_unit='bar', T_unit='K')
cp=Compressor('compressor')
air=Source('air source')
eauinit=Source('water source ')
eauout=Sink('water sink')
tu=Turbine('turbine')
ad=Sink('depressured air')
he=HeatExchanger('heat exchanger')
he2=HeatExchanger('2nd heat exchanger')
c1=Connection(air,"out1", cp, "in1", label="c1")
c2=Connection(cp,"out1", he,"in1", label="c2")
c3=Connection(he,"out1", he2,"in2", label="c3")
c4=Connection(he2,"out2", tu, "in1", label="c4")
c5=Connection(tu,"out1",ad,"in1", label="c5")
c6=Connection(eauinit,"out1", he,"in2", label="c6")
c7=Connection(he,"out2", he2,"in1", label="c7")
c8=Connection(he2,"out1", eauout,"in1", label="c8")
nw1.add_conns(c1,c2,c3,c4,c5,c6,c7,c8)
cp.set_attr(pr=10, eta_s=0.8)
c1.set_attr(fluid={'air': 1, 'water': 0}, p=1, T=198, v=20)
c2.set_attr(fluid={'air': 1, 'water': 0})
#he.set_attr(pr1=0.85) #pressure ratio in the heat exchanger maybe needed but tey where too many parameters
c3.set_attr(fluid={'air': 1, 'water': 0},T=220) # cooled down gas temperature
#he2.set_attr(pr2=0.85) #same as he
c4.set_attr(fluid={'air': 1, 'water': 0},T=400) #heated gas temperature
tu.set_attr(pr=0.15)
c6.set_attr(fluid={'air': 0, 'water': 1}, T=168 ,v=2)
nw1.solve('design')
nw1.print_results() This code doesn't run. Apparently, I shouldn't give both pressure and temperature as initial parameters for the gas and I don't understand how to replace it whith enthropy. What I want is to be able to know pressure, temperature, air flow speed at the entrance, and how much power I can get in the output (turbine). Parameters in the middle of the systems can be adapted for it to work, it just requires that the temperature of the gas in the tank is not too high. I tried my best to understand tespy language and to use it but it is kind of hard for me given that I'm just discovering it and that i've got to understand in english ! PS : sorry if there are english mistakes :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
thanks for reaching out and welcome to the TESPy and oemof community :)! Actually, CAES was one of the projects I worked wiht TESPy originally a couple of years ago, it is very possible to model these systems with the software. I can give you a quick overview on the approach I would take for this topic:
Try to build these things up step by step, everything at once might be quite a lot to do. If the time fits for you, I'd invite you to discuss this topic at the next online user meeting on May 15th. Best Francesco |
Beta Was this translation helpful? Give feedback.
-
Hi, I have one other question if you can also help me : My calculs are the following for a compression from air at T1=283 K and p1=1 bar to air at p2= 10 bar : where : with this calculation I get P=9.1*10e8 W whereas the model gives me P=2.65*10e5 W from tespy.components import Sink, Source, HeatExchangerSimple, Compressor
from tespy.connections import Connection
from tespy.networks import Network
fluids = ['air']
nw = Network(fluids=fluids)
nw.set_attr(p_unit='bar', T_unit='K', h_unit='kJ / kg', m_unit='kg / s', iterinfo=False)
so1 = Source('source 1')
si1 = Sink('sink 1')
heat_sink = HeatExchangerSimple('heat sink')
cp = Compressor('compressor')
cp.set_attr(pr=10,eta_s=1)
heat_sink.set_attr(Tamb=283, pr=0.95, design=['pr'])
c1 = Connection(so1, 'out1', cp, 'in1', label='c1')
c2 = Connection(cp, 'out1', heat_sink, 'in1', label='c2')
c3 = Connection(heat_sink, 'out1', si1, 'in1', label='c3')
nw.add_conns(c1, c2, c3)
c1.set_attr(fluid={'air': 1}, m=1, T=283, p=1)
c3.set_attr(T=300, design=['T'])
nw.solve('design')
nw.print_results() I understand there might be some gaps between the calculations I make (which are modelised as if air was a perfect gas) but here there is a huge gap ! Thank you for reading me, Baptiste |
Beta Was this translation helpful? Give feedback.
I am not sure, I do think your formula is incorrect. It should be
P = m*c_p*T_1*[(p_2/p_1)^((y-1)/y)-1]
for ideal gases, for example see https://en.m.wikipedia.org/wiki/Isentropic_process
Best