Including height and potential energy (Bernoulli) in the equations
I did not find it yet: potential energy is not yet included in the equations, right? (Bernoulli principle?) It would be one important factor in district heating - being able to indicate, which node is at which height and to include its potential energy. Is it planned to include it? Or is anyone already working on this? Thanks for all the effort put into this great project!
This has not been implemented yet. If you like to implement this feature, I can assist you on any questions. The equations regarding
- energy balance and
- pressure losses
- maybe even more?
need to be adjusted for this to work. I can think of two approaches:
- Use additional parameters in the components (height and flow velocity at inlets and outlets) and set the value to zero in case it is not set. This might be very easy to implement but is somewhat not in line with the modeling approach of tespy.
- Add velocity and height to the variables of connections. The downside of this approach is that applications become more complex, as there are two additional variables for each connection. Especially, when differences in height and velocity are insignificant to difference in thermal energy.
I would very much favor the second approach, maybe make height and velocity optional for all connections as a compromise: Only include the equations if an actual value is specified or the value is specified as "variable" and for all other values assume a value of zero. This would be quite similar to the first approach but has the advantage, that e.g. the height at the inlet of one component will be the same value as the height at the respective outlet of the connected component. Best regards!
Hi @stianchris, one might try to implement a height difference feature (for pipes only). The pressure difference calculation between inlet and outlet could be performed with darcy-weisbach/hazen-willilams and bernoulli. Default value for difference in height between inlet and outlet is zero, but may be specified by the user.
Hi @fwitte
First of all, congratulations on your work on TesPy. It is an excellent tool.
I am interested in this implementation (Height and potential energy in the equations) for the project I am working on. So far, I have been using the base code and some UDEs, so the first approach is more relatable to me, but I also think the second approach would be more in line with how TesPy is coded.
If I implemented the second approach, is there any guideline or example I can use as a reference and for proof checking?
Thank you! Best wishes,
Mauricio.
Hi @Mauricioc93,
thank you for your feedback! Excited to hear, that you are using the software and interested in contribution :). Especially, the fact you are using UDEs and they seem to working is cool :D! I think it would be best, if we have a phone call or webconference, to discuss a possible implementation and the implications of it. You can reach out to me via mail: [email protected] or if you use the Element messenger: @fwitte:matrix.org
Best regards, looking foward to meeting you
Francesco