Jump to content

Building heat exchange mystery (solved)


Recommended Posts

So I'm familiar with the heat exchange formulas on the Wiki, and have often managed to get them to corroborate with in-game measurements: this typically involving using Debug mode "sample" tool to measure the precise temperature of a cell first one tick then the next tick, and multiplying that out by the mass * SHC of the cell.

This post is concerned with the equation for building:cell heat exchange:

961490bed39821da53d8ec4b306c8a8d7859b260

THE ANOMALOUS TEST

For this test I have an Igneous Rock Tempshift Plate at 20 C, overlapping a 160 kg Igneous Rock cell ("natural tile") at either 220 C or -180 C, so the temperature delta is 200 C or -200 C.

The reason for using a cell at 160 kg, is that is the same as the thermal mass of a Tempshift Plate, as the real mass is divided by 5 to get the thermal mass. This is easily demonstrated to be true in sandbox/debug by like placing a Tempshift Plate next to 160 kg of the same material in cell form, and letting the temperatures equalize: and it will be observe they equalize at halfway, so the thermal mass of an 800 kg Tempshift Plate, is equal to a 160 kg cell.

Getting back to the Igneous Rock Tempshift Plates, overlapping the same amount of Igneous Rock in cell form. Because they both have the same thermal mass, we expect them both to change temperature by the same magnitude, but they don't.

  • TSP is hotter: 1 tick temperature change = 8.88891 C
  • Cell is hotter: 1 tick temperature change = 20 C (precisely)

In both cases, both the Tempshift Plate and cell changed temperature by a precisely equal amount.

But even though the two cases are totally symmetrical except the sign of the temperature difference, when the cell was hotter the heat exchange was 2.25x (precisely) greater.

THE CALCULATED VALUE

Based on the wiki formula shown, the expected DTU per tick should be: 

1000 C * 0.2 * 2 * 2 * 1 / 2 * 160000 / 9 = 1422222 DTU, divide that by the mass (160,000) - or just leave out that component - to get the temperature change.

1 tick temperature change = 8.888888 (repeating) C. Matching the "building is hotter" case perfectly.

WEIRD

Curiously, the "2.25x" factor results in very clean numbers, 20 C exactly. I chose Igneous Rock because it has very clean numbers: SHC of 1 and TC of 2, so then we expect nice clean numbers. It's also worth noting that 9 / 2.25 = 4, which is an integer. That is, the 2.25 likely has something to do with the area of the building.

I confirmed that the Coal Generator, which is thermally identical to a Tempshift Plate being an 800 kg building which covers 9 tiles, behaves identically to a Tempshift Plate when they are made of identical materials. So there's nothing funny about a Tempshift Plate in particular, it's an anomaly in building heat transfer.

FURTHER INVESTIGATIONS

Having hypothesized it has something to do with building area, I decided to test some different areas. In all cases I used both a building and cell of Igneous Rock.

1 Tile: Liquid Pipe (100 kg)

  • cell is hotter: 80 C
  • building is hotter: 80 C

2 Tile: Fridge (400 kg)

  • cell is hotter: 66.6667 C
  • building is hotter: 40 C

4 Tile: Ration Box (400 kg)

  • cell is hotter: 40 C
  • building is hotter: 20 C

6 Tile: Triage Cot (200 kg)

  • cell is hotter: 28.5714
  • building is hotter: 13.3383 C

9 Tile: Tempshift Plate (800 kg)

  • cell is hotter: 20 C
  • building is hotter: 8.88891 C

12 Tile: Metal Refinery (800 kg)

  • cell is hotter: 15.3846 C.
  • building is hotter: 6.67166 C, the calculated amount.

20 Tile: Glass Forge (800 kg)

  • cell is hotter: 9.5238 C 
  • building is hotter: 4 C (precisely)

In all cases the "building is hotter" number is correct, while, except for A = 1, the "cell is hotter" number is too large.

DIFFERENT MATERIALS

So far I tested Igneous Rock : Igneous Rock, but what about if the materials are not the same?

So I decided to try different Tempshift Plate materials, but matching it with the same thermal mass in Igneous Rock

Cobalt Tempshift Plate: 67.2 kg Igneous Cell

  • cell is hotter: 20 C (precisely)
  • building is hotter: 17.7828
  • Ratio = 1.12468

Dirt Tempshift Plate: 236.8 kg Igneous cell

  • cell is hotter: 20 C (precisely)
  • building is hotter: 8.8939
  • Ratio = 2.248

Diamond Tempshift Plate: 

  • cell is hotter: 20 C (precisely)
  • building is hotter: 19.9963 C (calculated = 356 C)
  • Ratio = 1.0

This is not surprising, as when the TC is so high we expect to see "clamping" dominate. However the fact that the temperature change is very close to the "clamping" threshold is likely a lead. It seems that in every case so far the "cell is hotter" case is being clamped, while the "building is hotter" is not being clamped.

DIFFERENT MASSES

Because "thermal mass of the hotter object" is a direct multiplier, we should expect the mass of the hot cell shouldn't effect the temperature change.

Igneous Tempshift Plate vs different masses of cell

image.png.ee8d4a22334226e42da91a08880f849e.png

Now we see here, that while the temperature change of the TSP should be proportional to the mass of the "donor cell", instead it is relatively constant. It is getting clamped.

HYPOTHESIS

The calculated heat transfer in "the cell is hotter" case, is so high that the temperature change observed is being limited by clamping.

In the "equal thermal mass" case, the game uses logic something like this: For every cell, suppose that the building is exchanging heat with an identical cell over its entire area. So consider the Tempshift Plate is exchanging heat with 9 cells, each with the same thermal mass, that is the game's clamping logic is that the Tempshift Plate is exchanging heat with 9x its mass, and so the equilibrium temperature is 9/10th of the way to the hotter tile. So if the delta is 200 C, the increase that achieves equilibrium temperature is 180 C.

The game is like "In this house we obey the laws of thermodynamics!" (at least in this particular case), so it can't allow more than 180 / 9 = 20 C to be exchanged per tile, to allow more than this would risk overshooting the equilibrium temperature once the contribution from every cell has been added.

We can run that again, for let's say 80 kg, so we have 720 kg of mass at 220 C and 160 kg of mass at 20 C, the equilibrium temperature is 183.64 C, the maximum permitted increase is 18.18 C, exactly what I measured. 

So what we are seeing is simply the heat transfer getting clamped to the maximum allowed. This limit is something I've known about for a very long time because it's simple and makes a lot of sense, in fact I probably should've noticed earlier that I was just measuring the clamping temperature. Nevertheless, whatever it's getting clamped down from, is still too high according to the equation.

FURTHER TESTING OF LOWER CONDUCTIVITY

Having established that everything seen so far has been clamped. I wanted to explore unclamped territory, so I needed something with way lower thermal conductivity. So I tested exchanging heat with gases and liquids instead. I decided to use chlorine gas and liquid chlorine (they are identical), and also hydrogen.

Igneous Tempshift Plate exchanging heat with 333 kg of Liquid Chlorine or Chlorine Gas (-100 C and +100 C delta).

  • cell is hotter: 0.1627 C
  • building is hotter: 0.018 C (calculated = 0.01778 C)
  • Ratio = 9.04

 

Igneous Tempshift Plate exchanging heat with 66.67 kg of Hydrogen Gas (-200 C and +200 C delta).

  • cell is hotter: 6.7214 C
  • building is hotter: 0.74814 C (calculated = 0.746666667 C)
  • Ratio = 9 (exactly)

And look at that: this mysterious increase, when liberated from clamping, is in fact A - the building area!

Or in short, the mistake in the equation is that when the cell is hotter, the heat transfer is not divided by A. Or to understand it using ONI dev logic: the multiplier is the thermal mass in that cell. If the hotter object is the cell, it's simply the thermal mass of the cell. If the hotter object is the building, it's the thermal mass of the building divided by the area of the building.

HOW COULD THIS HAVE GONE UNNOTICED SO LONG

So I know most players don't, but I pretty regularly actually calculate stuff, and I've certainly calculated heat exchange between buildings and cells plenty of times before.

But the thing is, that a great deal of the time, in fact nearly all the time with the Tempshift Plates that players actually use, the temperature change is clamped. The equation returns a number higher than the actual in-game result, but the actual result is clearly clamped. So the natural assumption is that the equation is correct, and it's just clamping to blame.

The main situation where Tempshift Plates are not getting clamped, is when they are made of lower conductivity material exchanging heat with lower conductivity substances at lower masses, and if you're using crap for tempshift plates it's probably a "I don't care" kind of scenario, if you care you use better materials. I noticed this discrepancy because an Aluminium Tempshift Plate was pulling an order of magnitude more heat out of Abyssalite than the equation said it should, the very low TC of Abyssalite brought the heat transfer below the clamping limit even for an Aluminium Tempshift Plate: so I actually cared that it was wrong because I was doing everything in my power to maximize heat transfer.

TL;DR
The equation given on the wiki:
961490bed39821da53d8ec4b306c8a8d7859b260

Is correct when the building is hotter. When the cell is hotter, the "divide by A" should be removed.

Furthermore, not mentioned on the wiki - surprisingly since I've known it a long time - is the building heat transfer limit. But I just edited the wiki to add a section explaining the building heat transfer limit.

Link to comment
Share on other sites

41 minutes ago, blakemw said:

So I'm familiar with the heat exchange formulas on the Wiki, and have often managed to get them to corroborate with in-game measurements: this typically involving using Debug mode "sample" tool to measure the precise temperature of a cell first one tick then the next tick, and multiplying that out by the mass * SHC of the cell.

This post is concerned with the equation for building:cell heat exchange:

961490bed39821da53d8ec4b306c8a8d7859b260

THE ANOMALOUS TEST

For this test I have an Igneous Rock Tempshift Plate at 20 C, overlapping a 160 kg Igneous Rock cell ("natural tile") at either 220 C or -180 C, so the temperature delta is 200 C or -200 C.

The reason for using a cell at 160 kg, is that is the same as the thermal mass of a Tempshift Plate, as the real mass is divided by 5 to get the thermal mass. This is easily demonstrated to be true in sandbox/debug by like placing a Tempshift Plate next to 160 kg of the same material in cell form, and letting the temperatures equalize: and it will be observe they equalize at halfway, so the thermal mass of an 800 kg Tempshift Plate, is equal to a 160 kg cell.

Getting back to the Igneous Rock Tempshift Plates, overlapping the same amount of Igneous Rock in cell form. Because they both have the same thermal mass, we expect them both to change temperature by the same magnitude, but they don't.

  • TSP is hotter: 1 tick temperature change = 8.88891 C
  • Cell is hotter: 1 tick temperature change = 20 C (precisely)

In both cases, both the Tempshift Plate and cell changed temperature by a precisely equal amount.

But even though the two cases are totally symmetrical except the sign of the temperature difference, when the cell was hotter the heat exchange was 2.25x (precisely) greater.

THE CALCULATED VALUE

Based on the wiki formula shown, the expected DTU per tick should be: 

1000 C * 0.2 * 2 * 2 * 1 / 2 * 160000 / 9 = 1422222 DTU, divide that by the mass (160,000) - or just leave out that component - to get the temperature change.

1 tick temperature change = 8.888888 (repeating) C. Matching the "building is hotter" case perfectly.

WEIRD

Curiously, the "2.25x" factor results in very clean numbers, 20 C exactly. I chose Igneous Rock because it has very clean numbers: SHC of 1 and TC of 2, so then we expect nice clean numbers. It's also worth noting that 9 / 2.25 = 4, which is an integer. That is, the 2.25 likely has something to do with the area of the building.

I confirmed that the Coal Generator, which is thermally identical to a Tempshift Plate being an 800 kg building which covers 9 tiles, behaves identically to a Tempshift Plate when they are made of identical materials. So there's nothing funny about a Tempshift Plate in particular, it's an anomaly in building heat transfer.

FURTHER INVESTIGATIONS

Having hypothesized it has something to do with building area, I decided to test some different areas. In all cases I used both a building and cell of Igneous Rock.

1 Tile: Liquid Pipe (100 kg)

  • cell is hotter: 80 C
  • building is hotter: 80 C

2 Tile: Fridge (400 kg)

  • cell is hotter: 66.6667 C
  • building is hotter: 40 C

4 Tile: Ration Box (400 kg)

  • cell is hotter: 40 C
  • building is hotter: 20 C

6 Tile: Triage Cot (200 kg)

  • cell is hotter: 28.5714
  • building is hotter: 13.3383 C

9 Tile: Tempshift Plate (800 kg)

  • cell is hotter: 20 C
  • building is hotter: 8.88891 C

12 Tile: Metal Refinery (800 kg)

  • cell is hotter: 15.3846 C.
  • building is hotter: 6.67166 C, the calculated amount.

20 Tile: Glass Forge (800 kg)

  • cell is hotter: 9.5238 C 
  • building is hotter: 4 C (precisely)

In all cases the "building is hotter" number is correct, while, except for A = 1, the "cell is hotter" number is too large.

DIFFERENT MATERIALS

So far I tested Igneous Rock : Igneous Rock, but what about if the materials are not the same?

So I decided to try different Tempshift Plate materials, but matching it with the same thermal mass in Igneous Rock

Cobalt Tempshift Plate: 67.2 kg Igneous Cell

  • cell is hotter: 20 C (precisely)
  • building is hotter: 17.7828
  • Ratio = 1.12468

Dirt Tempshift Plate: 236.8 kg Igneous cell

  • cell is hotter: 20 C (precisely)
  • building is hotter: 8.8939
  • Ratio = 2.248

Diamond Tempshift Plate: 

  • cell is hotter: 20 C (precisely)
  • building is hotter: 19.9963 C (calculated = 356 C)
  • Ratio = 1.0

This is not surprising, as when the TC is so high we expect to see "clamping" dominate. However the fact that the temperature change is very close to the "clamping" threshold is likely a lead. It seems that in every case so far the "cell is hotter" case is being clamped, while the "building is hotter" is not being clamped.

DIFFERENT MASSES

Because "thermal mass of the hotter object" is a direct multiplier, we should expect the mass of the hot cell shouldn't effect the temperature change.

Igneous Tempshift Plate vs different masses of cell

image.png.ee8d4a22334226e42da91a08880f849e.png

Now we see here, that while the temperature change of the TSP should be proportional to the mass of the "donor cell", instead it is relatively constant. It is getting clamped.

HYPOTHESIS

The calculated heat transfer in "the cell is hotter" case, is so high that the temperature change observed is being limited by clamping.

In the "equal thermal mass" case, the game uses logic something like this: For every cell, suppose that the building is exchanging heat with an identical cell over its entire area. So consider the Tempshift Plate is exchanging heat with 9 cells, each with the same thermal mass, that is the game's clamping logic is that the Tempshift Plate is exchanging heat with 9x its mass, and so the equilibrium temperature is 9/10th of the way to the hotter tile. So if the delta is 200 C, the increase that achieves equilibrium temperature is 180 C.

The game is like "In this house we obey the laws of thermodynamics!" (at least in this particular case), so it can't allow more than 180 / 9 = 20 C to be exchanged per tile, to allow more than this would risk overshooting the equilibrium temperature once the contribution from every cell has been added.

We can run that again, for let's say 80 kg, so we have 720 kg of mass at 220 C and 160 kg of mass at 20 C, the equilibrium temperature is 183.64 C, the maximum permitted increase is 18.18 C, exactly what I measured. 

So what we are seeing is simply the heat transfer getting clamped to the maximum allowed. This limit is something I've known about for a very long time because it's simple and makes a lot of sense, in fact I probably should've noticed earlier that I was just measuring the clamping temperature. Nevertheless, whatever it's getting clamped down from, is still too high according to the equation.

FURTHER TESTING OF LOWER CONDUCTIVITY

Having established that everything seen so far has been clamped. I wanted to explore unclamped territory, so I needed something with way lower thermal conductivity. So I tested exchanging heat with gases and liquids instead. I decided to use chlorine gas and liquid chlorine (they are identical), and also hydrogen.

Igneous Tempshift Plate exchanging heat with 333 kg of Liquid Chlorine or Chlorine Gas (-100 C and +100 C delta).

  • cell is hotter: 0.1627 C
  • building is hotter: 0.018 C (calculated = 0.01778 C)
  • Ratio = 9.04

 

Igneous Tempshift Plate exchanging heat with 66.67 kg of Hydrogen Gas (-200 C and +200 C delta).

  • cell is hotter: 6.7214 C
  • building is hotter: 0.74814 C (calculated = 0.746666667 C)
  • Ratio = 9 (exactly)

And look at that: this mysterious increase, when liberated from clamping, is in fact A - the building area!

Or in short, the mistake in the equation is that when the cell is hotter, the heat transfer is not divided by A. Or to understand it using ONI dev logic: the multiplier is the thermal mass in that cell. If the hotter object is the cell, it's simply the thermal mass of the cell. If the hotter object is the building, it's the thermal mass of the building divided by the area of the building.

HOW COULD THIS HAVE GONE UNNOTICED SO LONG

So I know most players don't, but I pretty regularly actually calculate stuff, and I've certainly calculated heat exchange between buildings and cells plenty of times before.

But the thing is, that a great deal of the time, in fact nearly all the time with the Tempshift Plates that players actually use, the temperature change is clamped. The equation returns a number higher than the actual in-game result, but the actual result is clearly clamped. So the natural assumption is that the equation is correct, and it's just clamping to blame.

The main situation where Tempshift Plates are not getting clamped, is when they are made of lower conductivity material exchanging heat with lower conductivity substances at lower masses, and if you're using crap for tempshift plates it's probably a "I don't care" kind of scenario, if you care you use better materials. I noticed this discrepancy because an Aluminium Tempshift Plate was pulling an order of magnitude more heat out of Abyssalite than the equation said it should, the very low TC of Abyssalite brought the heat transfer below the clamping limit even for an Aluminium Tempshift Plate: so I actually cared that it was wrong because I was doing everything in my power to maximize heat transfer.

TL;DR
The equation given on the wiki:
961490bed39821da53d8ec4b306c8a8d7859b260

Is correct when the building is hotter. When the cell is hotter, the "divide by A" should be removed.

Furthermore, not mentioned on the wiki - surprisingly since I've known it a long time - is the building heat transfer limit. But I just edited the wiki to add a section explaining the building heat transfer limit.

I'm both impressed and concerned. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...