If you know the temperature of a volume in the 2D space and all the thermal properties such as mass and specific heat, you can compute the total thermal energy in that space. If you can identify which component a volume belongs to, you can sum those volumes that belong to the same component to obtain the total thermal energy stored in that component. This is just the definition of thermal energy: U = m*c*T
So, in reference to the example: “Thermal equilibrium between identical objects”,
you compute the background energy, as you see in the Model properties\medium then summing the energy of Part#0/#1 properties>medium you must obtain as written 7651J.
I have tried in the same way you told, as you can see in the file attached. But Ihaven’t got that result
Forgot to say the reference point is zero Celsius, not zero Kelvin. In that way, the total should be 7224 J, smaller than 7651 J as it is shown.
Let me look into the code to see why the number gets enlarged. This is possible because the grid resolution is only 100 x 100. The calculation discards the grid points along the boundary lines. So only 98 x 98 points are added. It makes a difference if a grid point happens to be in or out of a shape. A shape might get more grid point allocation that it deserves. For instance, if a square sits exactly on 3 x 3 grid lines, it gets nine points, but in reality it occupies only 2 x 2 grid cells.
I will find a way to fix this. For now, the great news is that the total number does not change when the simulation runs. This doesn’t mean that the solver has a problem. It just means that the solver sees a slightly larger object than what appears on the screen to the end user.
PS: I just confirmed this by offsetting the centers of the two blocks by a mere of 0.005 m, basically shifting them out of the grid. The total thermal energy relative to 0 degree C is now exactly 7224 J. See the attached revised model and a screenshot.