# heat solution A Better Solution For Heat Transfer

## Recommended Posts

Check comments below for an alternative approach (Harmonic vs Geometric)

The latest hotfix for the preview build changed heat transfer between materials to be based on an arithmetic mean rather than the minimum of the two objects.

While this made heat transfer much better between things that should, such as radiant pipes and metal tiles, it also made any form of insulation other than vacuum sealing impractical.

I propose using a geometric mean between materials rather than arithmetic, which improves things for both insulation and for heating:

(Edit: Realized that the whole conversion from 0 things was totally unnecessary, so I removed that.)

Water 0.609 (W/m)/K
Abyssalite 0.00001 (W/m)/K

0.609 * 0.00001 = 0.00000609
Square Root of 0.00000609 = 0.0025
0.0025 (W/m)/K between Water/Abyssalite

Water 0.609 (W/m)/K
Diamond 80 (W/m)/K

0.609 * 80 = 48.72
Square Root of 48.72 = 6.98
6.98 (W/m)/K between Water/Diamond

Here is a table to compare each result when using previous methods:

Using the Minimum:

Water/Abyssalite = 0.00001 (W/m)/K

Water/Diamond = 0.609 (W/m)/K

Using the Arithmetic Mean:

Water/Abyssalite = 0.304505 (W/m)/K

Water/Diamond = 40.3045 (W/m)/K

Using the Geometric Mean (Seen Above):

Water/Abyssalite = 0.0025 (W/m)/K

Water/Diamond = 6.98 (W/m)/K

Using the Harmonic Mean (See Comments Below):

Water/Abyssalite = 0.00002 (W/m)/K

Water/Diamond = 1.21 (W/m)/K

Potential Problem

Spoiler

Geometric means require more steps to calculate than arithmetic or using the minimum of two values. This could cause performance issues in the game.

A tedious solution might be to calculate the arithmetic means between every type of building/material/object before-hand, and have those values in memory to quickly access rather than constantly calculating them during gameplay.

I'm not a great programmer, but maybe a program could be written to calculate all of these values quickly and put them in an array upon loading the game?

##### Share on other sites

Goemetric mean is not the right approach. If you want at least somewhat real-world-alike solution, harmonic mean is the way to go.

##### Share on other sites

1 hour ago, Kasuha said:

Goemetric mean is not the right approach. If you want at least somewhat real-world-alike solution, harmonic mean is the way to go.

Using harmonic, I got these results:

Water/Abyssalite = 0.00002 (W/m)/K

Water/Diamond = 1.21 (W/m)/K

While it does keep Abyssalite basically the same, I don't know if the heating improvement with conductors (diamond in this case) are significant enough. I also don't know how thermodynamics works in real life, so the small increase with harmonic might be realistic.

##### Share on other sites

30 minutes ago, Koningkrush said:

Using harmonic, I got these results:

Water/Abyssalite = 0.00002 (W/m)/K

Water/Diamond = 1.21 (W/m)/K

While it does keep Abyssalite basically the same, I don't know if the heating improvement with conductors (diamond in this case) are significant enough. I also don't know how thermodynamics works in real life, so the small increase with harmonic might be realistic.

I tried to be as realistic as feasible in my derivation of that formula. And most importantly, it came out simple and easy to calculate.

You can't significantly improve heat conduction of a heat insulator by attaching strongly conductive material to it, you just reduce thickness of the insulator and add some thickness of something less insulating. So the half of the resistance that's in the way is reduced, but the other half stays in place. For better results, we would need to assume thickness of the pipe (and other buildings in general) and adjust the formula to it in each case. Possible but complicated, and I believe unnecessarily complicated for purposes of ONI.

There's something seriously wrong with heat transfer between pipe and its contents, and that's haunting us for a long time. Devs seems only ran into it now when they tried to add radiant pipes and they failed - exactly for that reason.

##### Share on other sites

I added a line of text to the original post to have people check the comments for your approach. I also added the harmonic results to the result list.

I just hope they don't stick with the arithmetic mean because it makes gameplay a total headache when dealing with heat.

##### Share on other sites

2 minutes ago, Koningkrush said:

I just hope they don't stick with the arithmetic mean because it makes gameplay a total headache when dealing with heat.

I couldn't agree more with that.

##### Share on other sites

6 hours ago, Koningkrush said:

Check comments below for an alternative approach (Harmonic vs Geometric)

The latest hotfix for the preview build changed heat transfer between materials to be based on an arithmetic mean rather than the minimum of the two objects.

While this made heat transfer much better between things that should, such as radiant pipes and metal tiles, it also made any form of insulation other than vacuum sealing impractical.

I propose using a geometric mean between materials rather than arithmetic, which improves things for both insulation and for heating:

(Edit: Realized that the whole conversion from 0 things was totally unnecessary, so I removed that.)

Water 0.609 (W/m)/K
Abyssalite 0.00001 (W/m)/K

0.609 * 0.00001 = 0.00000609
Square Root of 0.00000609 = 0.0025
0.0025 (W/m)/K between Water/Abyssalite

Water 0.609 (W/m)/K
Diamond 80 (W/m)/K

0.609 * 80 = 48.72
Square Root of 48.72 = 6.98
6.98 (W/m)/K between Water/Diamond

Here is a table to compare each result when using previous methods:

Using the Minimum:

Water/Abyssalite = 0.00001 (W/m)/K

Water/Diamond = 0.609 (W/m)/K

Using the Arithmetic Mean:

Water/Abyssalite = 0.304505 (W/m)/K

Water/Diamond = 40.3045 (W/m)/K

Using the Geometric Mean (Seen Above):

Water/Abyssalite = 0.0025 (W/m)/K

Water/Diamond = 6.98 (W/m)/K

Using the Harmonic Mean (See Comments Below):

Water/Abyssalite = 0.00002 (W/m)/K

Water/Diamond = 1.21 (W/m)/K

Potential Problem

Reveal hidden contents

Geometric means require more steps to calculate than arithmetic or using the minimum of two values. This could cause performance issues in the game.

A tedious solution might be to calculate the arithmetic means between every type of building/material/object before-hand, and have those values in memory to quickly access rather than constantly calculating them during gameplay.

I'm not a great programmer, but maybe a program could be written to calculate all of these values quickly and put them in an array upon loading the game?

It's not like this thermodynamics works, the minimum thermal conductivity rules the heat transfer. Thermal conductivity means of much energy material can transfer at maximum

Also i think it's easiest to program it for dev