oemof / tespy

Thermal Engineering Systems in Python (TESPy). This package provides a powerful simulation toolkit for thermal engineering plants such as power plants, district heating systems or heat pumps.
https://tespy.readthedocs.io
MIT License
256 stars 80 forks source link

Calculation of td_log in heat exchangers with constant temperature difference #395

Closed fwitte closed 1 year ago

fwitte commented 1 year ago

Discussed in https://github.com/oemof/tespy/discussions/394

Originally posted by **dk-teknologisk-enp** February 24, 2023 Currently it seems that if ttd_u == ttd_l for a heat exchanger, then td_log ends up as nan, and thus also the kA. However, this is a perfectly valid situation, for example in a heat exchanger with purely boiling/condensing on both sides. I suggest making the following changes to base.py, such that td_log is set to the constant temperature difference in case ttd_u == ttd_l: ![image](https://user-images.githubusercontent.com/124161512/221202216-e5fe14ef-0504-41ac-a52f-0143149971ad.png) (base.py:838-840)
fwitte commented 1 year ago

solved by #396