- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Modelling packed bed thermal storage
Modelling packed bed thermal storage
Modelling packed bed thermal storage
I need to model the dynamics in a thermal energy storage with pebble rocks in a pressurized tank.
Charging of the storage is by heating with hot air from the top until the temperature rises in the bottom outlet.
Likewise, discharging is by sending cold air from the bottom until the hot end temperature drops. Hot/cold temperatures are 540/80°C for this tank, and a similar "cold tank" is used as a cold reservoir as well.
An important aspect of the storage performance is the development of the temperature gradient in the stone filling during charge/discharge cycles and the temperature-dependent heat capacity of the stones. Being able to monitor the temperature through the stone filling over time would be valuable.
I have no experience with Modelica whatsoever and was initially considering using Matlab/Octave for the modelling when I came across Modelica. Before starting out to learn a new and very different language I would like to know if it it is suitable for my purpose.
My simple question to the experienced people in this forum is whether Modelica is the right tool for the task?
From my limited study of the thermal libraries in OMEdit I get the impression that I would need to model the storage as individual layers in Modellica just as with a finite-difference model made in Matlab only "manually".
/Hans
Re: Modelling packed bed thermal storage
Hello Hans,
I think Modelica would be perfectly suited for the task. You can model a slice/layer of your heat storage as a component (class) and test it separately. Then you can instantiate and interconnect an array of N layers to simulate the distributed effect with the spatial resolution necessary for your studies.
In my work with disctrict heating systems I often use a model of of a thermal heat storage tank modelled in a similar way. It lets me take into account the stratification of water in the tank. The tank model is based on model in the freely available Modelica Buildings Library (Buildings.Fluid.Storage.Stratified.mo). I would advise you to take a look at that library and its excellent documentation and use the mentioned tank model as inspiration.
Best regards
Rene Just Nielsen
- justnielsen
- 40 Posts
Re: Modelling packed bed thermal storage
justnielsen wrote:
You can model a slice/layer of your heat storage as a component (class) and test it separately. Then you can instantiate and interconnect an array of N layers to simulate the distributed effect with the spatial resolution necessary for your studies.
Hi Rene,
Thank you for replying so quick.
You mention "instantiate and interconnect an array of layers". Can this be implemented in OpenModelica as freely as that without defining explicit connections between the layers?
Just to be clear that my understanding is correct. The problem can be formulated as PDFs in time and position and the dt is handled by modelica whereas I need to take care of the dx resolution in the way I build the model?
With e.g. Matlab this can be done by adjusting the number of elements in the vectors representing a given tank size and I can then reference layers by indexes in the vector. Is a similar technic available in modelica?
I am not sure stratified water can correctly mimic the behaviour of solid/gas properties but I will locate the building library and have a look.
/Hans
Re: Modelling packed bed thermal storage
Yes, you can declare a vector of N layer models and subsequently use a 'for' loop to connect the outlet of layer[n-1] with inlet of layer[n]. See, for example, https://mbe.modelica.university/compone … _transfer/
Modelica currently hasn't go any language constructs for PDEs, so you will have to make the spatial discretization yourself.
You are right, stratified water is not the solution for you — that was just an example to point you in the direction of what is possible. You probably want each of your layers to be the combination of a flow resistance (air through pebble bed) and the convective heat transfer to the bed mass. For a start that can be constructed with a Modelica.Fluid.Pipes.DynamicPipe connected to a Modelica.Thermal.HeatTransfer.Components.HeatCapacitor via the heat port. The dynamic pipe model has a lot of features that you may want to disable. For instance, you could use a simple pressure drop model (NominalTurbulentFlow) and disable the dynamic mass, energy and momentum balance.
BR. Rene
PS. It's a great question. If you (re)post it on Stack Exchange (https://stackoverflow.com/questions/tagged/modelica) with tags 'modelica' and 'openmodelica' you may get many more replies and comments.
- justnielsen
- 40 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Modelling packed bed thermal storage