Open niveK77pur opened 1 year ago
Running the soon to be merged final-simulation
from #1 reveals this graph.
The flat line indicates that the heat exchange is not taking place properly. One would expect the line to go upwards as well, indicating an increase in temperature.
The suspicion is that there is an issue internally with how the values are being updated after each iteration/timestep in the thermalmodel.py's simulate()
method.
Problem
There seems to be a bug when creating a link between nodes with different temperatures. The heat exchange produces a disproportionate amount causing the temperatures to visibly diverge towards unreasonable seeming values.
Clues
Creating a heat generating HSN by itself (with no links to anything else), then you can observe the temperature increasing steadily without escalating towards unreasonable values.
As soon as there is a link, there is some heat exchange being computed (see
_computeHeatExchange
method forHeatStorageNode
class), which immediately makes temperatures evolve badly.Hence the suspicion that there is a bug somewhere within the heat exchange computations. Possibly, the cause being mismatching units or possibly even a logical error in the computations.