TransiEnt-official / transient-lib

official and current version of TransiEnt library
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

Modulating heat pumps with electric heater lead to failed simulations #8

Open sebglom opened 1 year ago

sebglom commented 1 year ago

Recently, we discovered that a simulation using systems with heat pumps from the EnergyHouseHoldConverter package fails when the Modulating option is set true and the power output of the electric heater is calculated. The simulation fails at the timestep where the electric heater switches on for the first time. However, if there is no additional heating power required to meet the demands, the simulation succeeds.

An example output of the log file looks like this:

grafik

The error can be traced back to the controller model. We assume that there is an issue with the handling of state events by the solver. A possible solution might be to rewrite the controller models using the noEvent() function instead of switch blocks. I will try to implement such a solution myself in the upcoming weeks and provide a merge request if I am successful. Please comment on the issue if you have another idea to solve the problem or if you would like to work on this bug.

Currently, I have found a somewhat workaround for this issue. In models where several buildings in the same grid are set up with a modulating heat pump, the simulation error does not appear if only one of the buildings uses a non-modulating heat pump model. You can try to reproduce this by using the TestEnergyConverter_All model and parameterizing the building accordingly.