jfreissmann/heatpumps

Models especially at higher sink Temperature fails (Singularity in Jacobian matrix)

Closed this issue · 6 comments

In all models when the the Sink temperature goes beyond particular temperature system fails to solve. For example, when the working fluid is NH3, if Temperature Rücklauf is greater than or equal to 100°C, solver fails to find the solution. Here, Teperature Vorlauf is not an issue. It can be any value less than T_crit.

@jfreissmann
I went through this issue. And I found out that when we assign temperature value to the connection C1, instead of C0, we can avoid this issue and will get the solution. So I am planned to do the following changes.

  1. in all models self.conns['C1'].set_attr(T=self.params['C1']['T'])
  2. In params change C0 to C1
  3. In dashboard update the Temperature Rücklauf user input to params['C1']['T]

or

Simply self.conns['C1'].set_attr(T=self.params['C0']['T']) without modifying others.

Or any other solution for better starting values to solve the system. What do you think ?

Hey @bilwint,

thank you for finding this bug. I could reproduce it on my machine and your fix seemed to work as well, but I only tried it on the HeatPumpSimple. Is this something you observed throughout multiple models?
It seems to be an issue that was introduced with the update of TESPy. I hope there are not to many other instabilities with the newer version.
If the setting of the return flow temperature of the heat sink after the cycle closer solves our issue, I am not against implementing it. In that case I would also change the underlying parameter files, so we don't confuse users.

yes, I observed this in multiple in models. I tried each model from each Grundtopologie. The same problem exists.

Okay, then let's change it to 'C1'. Are you inclined or should I do it? I am open to both options.

I am loosely planning to build some automated tests, so that we do not have to do it manually each time. Hopefully there will be time for that soon.

ok, I will do

Resolved with PR #22.