niveK77pur / ISM-Thermal-Model

Implementation for a simple thermal model as part of one of our university projects.
1 stars 1 forks source link

Temperatures seem way too high #12

Open niveK77pur opened 1 year ago

niveK77pur commented 1 year ago

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 for HeatStorageNode 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.

niveK77pur commented 1 year ago

Running the soon to be merged final-simulation from #1 reveals this graph.

temps-normal

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.