Jump to content

Zero Heat Exchange Issue


Recommended Posts

Hello friends,

something inexplicable caught my eye in the sandbox. To find out how much temperature is "lost" over a certain period of time, I've came up with the super-simple scenario in the picture.

OxygenNotIncluded_S0XQLArbob.thumb.jpg.afd5774f496a8f66514dd4e52e3789eb.jpg

Each box was filled with the indicated amount of 150°C steam. After 100 cycles I checked the temperature. Everything as expected, except the 6400 kg box. As you can see in the picture, all tiles are green. Because absolutely no heat exchange has taken place (all tiles at 20°C, complete steam at 150 °C).

This puzzled me and so I looked around in the sandbox, where other, comparable experiments were going on. Well, I've found a roughly 400 cycle old chamber filled with 3700 °C Niobium in the same circumstances. What I ask myself now: can this be explained by game mechanics or is this simple a bug? If that's a bug: how does it happen and how can you avoid it?

 

Thanks for your attention!

Kind regards

Link to comment
Share on other sites

27 minutes ago, ghkbrew said:

My gut reaction is you're running into some of the strange heat conduction rules in ONI. The wiki has a pretty good description of them. Maybe the total heat content clamp and a minimum flow restriction.

What material are the insulated tiles?

I've read the wiki very often. Unfortunately my understanding of mathematics is not as pronounced as I would like it to be (shame). Somebody would have to spend an afternoon with me to explain it to me. Anyway, the tiles are made of ceramic.

Link to comment
Share on other sites

Read numbers, use calculator. If you want an accuracy number, use debug sampling or subscribe a mod which allows you to see more digits.

During simulation, make sure your 【FPS ÷ Game Speed】 is always bigger than 5

 

About your simulation, my opinion is, your heat transfer is limited by the minimum delta temperature in every tick. More precisely, Float VS Double

Link to comment
Share on other sites

Read the second half of this thread.

The TLDR summary is heat exchanges that result in a very small change in temperature don't happen. Whether this is explicitly designed or just an emergent phenomenon is unknown.

In the OPs example, the amount of heat exchange remains fixed regardless of steam mass (because that's just how the game works).  As the mass of steam increases, it's change in temperature per tick become less and less. At a certain point, the temperature change drops below the threshold and all heat exchange stops.

The cutoff point happens somewhere between 388 and 389 kg of 150C steam interacting with a 20C insulated ceramic tile. We can do the math to see what the temperature change would be for these two masses.

Temperature change = (heat exchanged)/(steam mass)/(steam SHC).

Heat exchanged = (governing conductivity)*(temperature difference)*(gas to solid multiplier)*200

For 388 kg: Temperature change = ((0.62/16256.25)*130*25*200)/388000/4.179 = 0.00001529C

For 389 kg: 0.00001525C

 

Link to comment
Share on other sites

5 hours ago, MooChiChi said:

This puzzled me and so I looked around in the sandbox, where other, comparable experiments were going on. Well, I've found a roughly 400 cycle old chamber filled with 3700 °C Niobium in the same circumstances. What I ask myself now: can this be explained by game mechanics or is this simple a bug? If that's a bug: how does it happen and how can you avoid it?

 

Thanks for your attention!

Kind regards

Have you tried the opposite? With very cold stuff inside?

Link to comment
Share on other sites

Insulated cell to cell Heat exchanged (kJ)= lowre_fixed_conductivity*insulation_factor*tick_time*temperature_difference*AtoB_multiplier*BtoA_multiplier
insulation_factor=The Insulation factor of the cell which has the lower fixed conductivity.
tick_time=0.2s
AtoB_multiplier: 

  Gas Liquid Solid
Gas 1 1 25
Liquid 1 25 1
Solid 1 1 1

=============================================
At 【293.15 VS 423.15K】, the critical point is 【321/322kg steam per tile】&【insulated ceramic tile】
0.62*0.01*0.01*0.2*130*25*1=0.0403kJ
For 322 kg: ΔT = 0.0403/322/4.179 = 0.00002995
For 321 kg: ΔT = 0.0403/321/4.179 = 0.00003004
423.15≈0x43d39333
0x43d39333-0x43d39332=0.000030517

=============================================
At 【1000 VS 1130K】, the boundary is 【80.4/80.5kg】
0.62*0.01*0.01*0.2*130*25*1=0.0403kJ
For 80.4 kg: ΔT = 0.0403/80.4/4.179 = 0.00011994
For 80.5 kg: ΔT = 0.0403/80.5/4.179 = 0.00011979
1130=0x448d4000
0x448d4000-0x448d3fff=0.00012207

=============================================
https://www.h-schmidt.net/FloatConverter/IEEE754.html

=============================================

The result is close but not same, because I didn't take float round-off error into account during step-by-step calculation. And I can't do it because I dont know the sequence of calculation. If I know, then I may be able to get a more accuracy result.

=============================================
It is similar to measurement error. 
i.e. You can't use a rough meter rule to measure the diameter of your hair.

 

 

=============================================

For reader don't like math

Spoiler

If you have money, then you have a super strong computer, then you have a more accurate result.

 

 

 

 

 

 

But you don't have money

Link to comment
Share on other sites

@FIXBUGFIXBUGFIXLinux? Base game or DLC?

For me on windows base game, the critical point is between 388 and 389 kg in your first example. I also double checked the insulation factor with insulated 20C granite vs 500g of 9020C gaseous gold. It's still 4/65025 here.

Wouldn't be the first time that the sim ran differently under a different OS. Nor would it be the first time for an undocumented change during a major update.

Link to comment
Share on other sites

24 minutes ago, wachunga said:

@FIXBUGFIXBUGFIXLinux? Base game or DLC?

For me on windows base game, the critical point is between 388 and 389 kg in your first example. I also double checked the insulation factor with insulated 20C granite vs 500g of 9020C gaseous gold. It's still 4/65025 here.

Wouldn't be the first time that the sim ran differently under a different OS. Nor would it be the first time for an undocumented change during a major update.

DLC, win10, steam

  • InsulationTileConfig
    • def.ThermalConductivity = 0.01f;

I also switch to base game and check the code. It is still 0.01. Not sure where you get 4/65025

Unfortunately, I can't repeat this experiment in basegame. If I want to play basegame, game will crash and the log file shows Klei.YamlIO.LoadFile Error. So I can only test it in DLC

 

Everything is fine before I purchased DLC. I shouldnt bought DLC.

 

Well, maybe I purchased a fake game.

Link to comment
Share on other sites

The 4/65025 comes from the famous @Yothiel post from way back when.

"an insulation factor noted f (dimensionless, varies between 0 (total insulation) and 255 (no insulation). Actually, this value is always 255, excepted insulated tiles which have 2."

"the insulated conductivity noted k' is derived from (gasp) the insulation factor and the thermal conductivity using the following formula: k' = k * (f/255)²"

As ridiculous as it seems, it still behaves that way. For me at least. The 0.01 factor only effects the displayed conductivity when selecting an insulated tile, with no meaningful relevance anywhere as far as I can tell. My test was interacting extremely hot low mass gold with insulated granite to get numbers large enough to work with. Actual results nearly match with what a 4/65025 factor would predict. I presume the minor slop comes from the extreme numbers involved.

Spoiler

Prediction is 9147.6603K with the 4/65025 factor. Sorry for the C/K mismatch, editing pics in a spoiler is a pain.image.thumb.png.4ec3f5944a6dc6c331fc22dc1e17400e.pngimage.thumb.png.d9636c67b2e26239f0964c9fcb446765.png

 

 

53 minutes ago, FIXBUGFIXBUGFIX said:

I shouldnt bought DLC

 

I learned my lesson from Klei's unwillingness to seriously address bugs and other issues that have existed for years. No DLC for me!

Link to comment
Share on other sites

7 hours ago, FIXBUGFIXBUGFIX said:

During simulation, make sure your 【FPS ÷ Game Speed】 is always bigger than 5

This is a very interesting information for me. I will always keep an eye on that form now on.

3 hours ago, FIXBUGFIXBUGFIX said:

Everything is fine before I purchased DLC. I shouldnt bought DLC.

Can confirm. My experiment took place with the dlc.

6 hours ago, wachunga said:

Read the second half of this thread.

The TLDR summary is heat exchanges that result in a very small change in temperature don't happen. Whether this is explicitly designed or just an emergent phenomenon is unknown.

In the OPs example, the amount of heat exchange remains fixed regardless of steam mass (because that's just how the game works).  As the mass of steam increases, it's change in temperature per tick become less and less. At a certain point, the temperature change drops below the threshold and all heat exchange stops.

The cutoff point happens somewhere between 388 and 389 kg of 150C steam interacting with a 20C insulated ceramic tile. We can do the math to see what the temperature change would be for these two masses.

Temperature change = (heat exchanged)/(steam mass)/(steam SHC).

Heat exchanged = (governing conductivity)*(temperature difference)*(gas to solid multiplier)*200

For 388 kg: Temperature change = ((0.62/16256.25)*130*25*200)/388000/4.179 = 0.00001529C

For 389 kg: 0.00001525C

 

That solved the mystery and answered my question. Thanks a lot! EDIT: I've tested it and can confirm.

5 hours ago, TheMule said:

Have you tried the opposite? With very cold stuff inside?

No. The mystery has already been solved. See above.

Link to comment
Share on other sites

11 hours ago, wachunga said:

The 4/65025 comes from the famous @Yothiel post from way back when.

That post is a masterpiece. But you know, it is a pre-historic masterpiece. The way how insulation works has changed for a pretty long time.

11 hours ago, wachunga said:

The 0.01 factor only effects the displayed conductivity when selecting an insulated tile, with no meaningful relevance anywhere as far as I can tell.

I do test by editing game code, not decompiled simdll. Here is the result.

Cell to Cell heat transfer

  • Cell A:   Conductivity=C_A    Insulation Factor=I_A
  • Cell B:   Conductivity=C_B    Insulation Factor=I_B
  • Finalized conductivity=C_F

 

  • If I_A=I_B=1, Which means no insulation cell
    • C_F=√(C_A · C_B)
  • I_A≠1 or I_B=1, Which means at least one insulation cell
    • Fixed Conductivity: C_FA=C_A · I_A
    • Fixed Conductivity: C_FB=C_B · I_B
    • If C_FA<C_FB
      • C_F=C_FA· I_A
    • If C_FB<C_FA
      • C_F=C_FB· I_B

Which means, in most case, Insulation Factor will be multiplied twice.

 

12 hours ago, MooChiChi said:

This is a very interesting information for me. I will always keep an eye on that form now on.

Game time=Real time × Game Speed

Most of important simulations will be executed every 200ms, based on Game time. But if the game time between two frames is bigger than 200ms, the execution sequences will be disrupted.
i.e.12341234→11234234
This will only cause a very very slight effect. If you are just playing game, it doesn't matter. But if you are collecting data, don't do that.

Link to comment
Share on other sites

16 minutes ago, FIXBUGFIXBUGFIX said:

Game time=Real time × Game Speed

Most of important simulations will be executed every 200ms, based on Game time.

The exception is automation which is calculated every 100ms which is why buffers, filters and timers borks out for a lot of people with older pcs and/or old bases.

Link to comment
Share on other sites

5 hours ago, FIXBUGFIXBUGFIX said:

The way how insulation works has changed for a pretty long time.

But my testing shows that isn't the case. The intention may have been to change it, but the execution did nothing.

In this test I first edited these elements in solid.yaml:

Obsidian: 1 SHC and 65025 conductivity

Sedimentary: 1 SHC and 6 conductivity

Gold: 1 SHC and 0.001 conductivity

Iron: 1 SHC and 100000 conductivity

 

tiles.thumb.png.0a78092ed062a70904155618867fb9ab.png

The temperature values for the igneous and sedimentary are starting conditions above and after 1 tick below. Governing conductivity is the lower conductivity when insulated tiles are involved. After the 4/65025 insulation modifier, obsidian ends up at 4.

With igneous at 2, the predicted heat exchange will be 2*100*200 or 40000 kDTU. This is exactly what we see with the igneous changing by exactly 4K.

With sedimentary at 6, the obsidian tile now has the lower conductivity and the predicted heat exchange will be 4*100*200 or 80000kDTU. This is exactly what we see with the sedimentary changing by exactly 8K.

 

My hypothesis for this is because buildings that act as a solid tile actually create a solid behind the building. The building itself interacts with nothing so the fact that it has a 0.01 insulation modifier means nothing. The solid behind has the conductivity of the material but is special cased with the 4/65025 modifier. There was once a bug where debris sitting on an insulated tile didn't respect the insulated property. Presumably because the special casing wasn't added to the debris/tile interaction.

There are some "tile buildings" that are bugged however, see here (note that transit crossing appears to have been fixed since then):

The weight plate portion of the test demonstrates this. Cell to cell conduction happens first then cell to building. Normally this interaction never happens, but for these bugged buildings it does. However you can't see it because the rate is so high. By crippling gold's conductivity we can see a difference between tile and building. Boosting iron's conductivity is necessary to get heat into the tile in the first place.

image.thumb.png.d15e3068269e4902ce006a7f6abe1436.png

The underlying gold tile has changed by exactly 4k as expected with the values I set, but the building portion remains unchanged.

 

The summary is Klei may have intended to change how insulated tiles work. But they apparently don't understand how their game works so their change didn't actually do anything. Or maybe I'm bashing them for no good reason. They never communicate so who the hell knows. The real answer is probably that they simply don't care. It makes no financial sense to spend limited resources on things I want (fixing stuff like this) when they can pander to a much greater audience.

Link to comment
Share on other sites

54 minutes ago, wachunga said:

The building itself interacts with nothing so the fact that it has a 0.01 insulation modifier means nothing

I have changed factor 0.01 to different numbers, and I am sure this parameter indeedly make effect.

All building have a parameter named UseStructureTemperature. For most of tile, the value is false, but Klei forgot to set it false to weight plate.
That is why Weight Plates have 20% increased HC. BTW, doors have 100% extra HC.

54 minutes ago, wachunga said:

The underlying gold tile has changed by exactly 4k as expected with the values I set, but the building portion remains unchanged.

Strange. I repeat this in DLC. But the cell and the building always show the same number. Did you try to click building again before taking screenshot?

 image.png.61f683702bc627352d76808c6b19a52d.png

 

StructureTemperature Disabled List

Spoiler
  • Rocket Module
  • Rocket Platform
  • Rocket Window
  • Rocket
  • Tile
  • Tile(POI)
  • Bunker Tile
  • Carpeted Tile
  • Glass Tile
  • Insulation Tile
  • Mesh Tile
  • Metal Tile
  • Trimming Tile
  • Plastic Tile
  • Hydroponic Farm
  • Heavi-Watt Joint Plate
Spoiler

Mesh Tile and Hydroponic Farm are listed. But no Airflow tile nor Farm Tile

 

WHY? WHY? WHY?

1195370703_srchttp___e0.ifengimg.com_06_2018_1129_8D71114C7811074EF26451679B88439FE77C7ABE_size996_w270_h270.gifreferhttp___e0.ifengimg.gif.ac4bf5594c04e4cd116f95ec75b7c674.gif

Link to comment
Share on other sites

38 minutes ago, FIXBUGFIXBUGFIX said:

Strange. I repeat this in DLC. But the cell and the building always show the same number.

I had to modify values in solid.yaml to see the difference. Upon further testing 0.001 conductivity isn't needed. You can do something like 1 (depending on other values) and see the building portion change some but not as much as the solid portion did.

38 minutes ago, FIXBUGFIXBUGFIX said:

I have changed factor 0.01 to different numbers, and I am sure this parameter indeedly make effect.

Maybe it's 40000/65025 (200/255 squared) and the 0.01 squared. Or maybe it was fixed for the DLC. My coding experience was years and years ago, I'm not up to the task of compiling a mod to check myself. It's all very strange.

Link to comment
Share on other sites

On 1/15/2021 at 9:15 PM, wachunga said:

I learned my lesson from Klei's unwillingness to seriously address bugs and other issues that have existed for years. No DLC for me!

+1

Btw I don't grasp a word from what you're all saying, but it seems really interesting (not kidding). You're just going far over my equation : "Time available for ONI deep mechanisms" x "Maths knowledges" ; coz I miss both.

Link to comment
Share on other sites

On 1/15/2021 at 4:51 PM, wachunga said:

For 389 kg: 0.00001525C

That is close to the resolution of a single float holding a temperature of 0C in Kelvin. That resolution is around 0.000016C.

Experiment with C to verify: Let a, b, c be "float" i.e. 32 bit IEEE 754 "single" float numbers. 

1.  a = 256, b = 0.00001525 -> a + b = 256

2.  a = 255, b = 0.00001525 -> a + b = 255.00001525878906250000

Not really surprising, at 256 the exponent is one larger than at 255 and resolution is halved. Hence there is a point around -18C, where the step needed to make a difference above becomes 0.000016C and directly below is 0.000008C

Yes, I have had a (legal) photocopy if IEEE 754 for about 30 years now  ;-)

Also, if Klei bases the change in the temperature of the insulated tile on the change in the steam temperature, the insulated tile will, as a result, also not change its temperature. Whether this is by random chance, or intent, I cannot say. My guess is they know and understand the limits of the numbers used and made sure that if there is no change in one material, then there is no change in the other either. They have called ONI a "thermal simulation" on some occasions, after all.

 

Link to comment
Share on other sites

2 hours ago, Gurgel said:

My guess is they know and understand the limits of the numbers used and made sure that if there is no change in one material, then there is no change in the other either.

This fits with my experience. Though only for tile-tile interactions. Tile-building interactions will happily break this rule. Which isn't too surprising. Building will also exchange heat with a delta T less than 1C too.

Try painting a billion tons of thermium in debug. It will quickly heat up a temp shift plate, but won't exchange heat with any adjacent tiles.

Link to comment
Share on other sites

On 1/16/2021 at 9:48 AM, Saturnus said:

The exception is automation which is calculated every 100ms which is why buffers, filters and timers borks out for a lot of people with older pcs and/or old bases.

The price of real-time. If you cannot make it in the time-slot allotted, your only choice is to drop calculations. For slow things like thermal, you can compensate, but for automation  trying that may make things worse.

Maybe there should be a config option at run-time: "Drop automation calculations" vs. "Do full automation calculation, but slow down game if needed". Automation is really the one place where this can have a large impact.

Personally, I would try to compile the whole automaton to, say, Lua and run it as emulation instead of simulation. But that may have strange effects at the start when you change something. On the other hand, when you (de-)construct pipes, you already get such effects, so it may not be that bad.

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