jfreissmann/heatpumps

Generalize Offdesign Simulation Method

Opened this issue · 0 comments

Desription of the task

Maintaining the offdesign_simulation method of each heat pump class, as well as extending it, is a huge hassle, as it has to be changed in all classes. Most of the code is pretty repetitive, so it could and should be generalized into a method of the HeatPumpBase parent class.

Necessary steps

A generalized version of the offdesign_simulation method has to be added to the HeatPumpBase parent class. The heat pump specific code has to be off loaded into respective functions, that each heat pump class implements individually. That containts the part load parametrization of the components and/or connections and the possible recalculation of intermediate pressure levels or temperatures.

Benefits

This task ensures easier maintainablility and reduces boilerplate code. Additionally, bugs in the code duplication, like the ones fixed in PR #10, can likely be avoided all together.