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

Bugfix: Add logic for constant dT heat exchangers #396

Closed dk-teknologisk-enp closed 1 year ago

dk-teknologisk-enp commented 1 year ago

General

Describe your pull request as transparent as possible:

This PR fixes the treatment of heat exchangers with constant temperature difference. For constant temperature differences the logarithmic mean temperature difference is invalid, as it would result in division by zero. This simple bugfix just sets the logarithmic mean temperature difference to the constant temperature difference in the case that ttd_u == ttd_l.

Documentation I have not changed any documentation

Testing I have not updated any tests