# Cooling via hydrogen pipe network.

## Recommended Posts

Hi there, been playing for some 100 hours or so, since the last update I started a new colony, got up to the point where I need to cool my base so did the usual and created a room filled with chilled hydrogen for piping through the base to cool it down using the chilled pipes kind of like a radiator but it's not working as it did!

Hopefully someone can help!

Questions are ;

Since the update the gases I'm piping through are being warmed up very quickly by the pipes I'm running it through. Is the game now taking notice of the temp of the pipe as it effects the gas inside it, as in giving more priority to the external temperature affecting the pipe rather than the temperature of the liquid/gas being pumped through. I've noticed that running hydrogen through a pipe at -25c will quickly warm even if the pipes are only at 35c over a small period of time, 2 cycles or so.(Just re read that and not sure if I'm making sense, feel free to correct me!)

Secondly since my method isn't working I'm trying to figure out a water drip/wheezlewort method of cooling water and  oxygen at the same time and piping both through the colony in order to cool, my question is does the total surface area of the pipe network and the temperature around it outweigh the internal temp of the liquids/gad inside to the point that it's a pointless task to try?

Thirdly and finally, is there a point at which decor expectations max out for the dupes or is it torally dependent on the level they are up to?

Again if I'm not making sense then sorry, sounds better in my head than when I actually type it out!

Thanks.

##### Share on other sites

The gas in the pipe will exchange heat with the pipe, the pipe will exchange heat with the surroundings - it takes a while.

##### Share on other sites

To elaborate on this a little, when you first start a circuit like this, the gas will warm up a lot very quickly. It often takes tens of cycles to stabilize, however even when stabilized you'll have a temperature gradient over the whole pipe system-- coldest at the start and warmest returning. If you have the pipes follow the input on the way back you can mediate this effect (this is called countercurrent exchange), and doing this in a spiral pattern can help make the distribution over the cooled area more even (because rather than a right-to-left temperature gradient, you have an edge-to-center one, which has more area to do the transfer).

##### Share on other sites

I just created an expensive water cooling system of wolframite meshes on top of my wolframite pipe coils... just to find out that the oxygen gas (thing to be cooled) was heating up my pipes rather than the other way around. This is frustrating (and unrealistic) tbh though I am not sure whether the physics are correct.

If I am not mistaken, in the physics of heat exchange, the pipe should follow closely to the temperature of the coolant inside (water at 2-3°C in my case). My logic is:

• Water is a good conductor of heat with a high heat capacity (it will be resistant to thermal change)
• 10 kg of water is being pumped through
• Static oxygen is cooled fast
• Oxygen that moving across isn't

In static oxygen, the oxygen cools down fast. However, when oxygen is being pumped into and away from the system, the heat exchange seems a bit wonky. I think there is something wrong behind the aerodynamics.

This leads me to believe the Devs really need to look into this. I looked up that heat exchange for gases is mainly due to convection and it seems like ONI is just calculating the heat exchange based on conduction.

And for conduction only, everyone is screwed. Oxygen is a poor conductor of heat

##### Share on other sites

The old solution was at its heart based around exploiting a bug. You'd cool the hydrogen in a thermoregulator and then cut the thermoregulator off after that, and then the hydrogen would stay cold forever provided you kept it in motion, despite consuming heat from the surroundings. You could leave the thermoregulator on if you wanted, using the same cold hydrogen to cool it off, but there was not really any point to doing so.

Klei says this bug is gone, and thermoregulators still emit a lot of heat (though I think less than they consume even now). Without this bug, you're dependent on wheezeworts and voids. You can use thermoregulators as essentially a way to move heat from various areas to where your wheezeworts and/or void are, but that's about the extent of their utility now. And even that utility is quite limited, because as has been mentioned, heat conduction is slow in ONI. You are better off just not generating much heat to begin with, keeping your hot water pool outside your base, moving your hot water in abyssalite pipes, and using wheezeworts where you do generate considerable heat (e.g. near electrolyzers).

Unrelated: decor expectation maxes out at +50.

##### Share on other sites

57 minutes ago, CodingKitteh said:

In static oxygen, the oxygen cools down fast. However, when oxygen is being pumped into and away from the system, the heat exchange seems a bit wonky. I think there is something wrong behind the aerodynamics.

This leads me to believe the Devs really need to look into this. I looked up that heat exchange for gases is mainly due to convection and it seems like ONI is just calculating the heat exchange based on conduction.

And for conduction only, everyone is screwed. Oxygen is a poor conductor of heat

Gases in the real world behave very differently than how they are modeled in ONI.  You have two options. A. Decide that a game that models physics in a simplified, somewhat cartooney manner is still very fun and still illustrates many real principles of ecology/engineering, despite being a very poor simulator of gas physics.  B.  Decide that you're going to only play games like ONI if they have realistic gas physics modeling.  This means you can't play any games like ONI, now or for the foreseeable future.

So yes, gases in the real world transfer heat mainly based on convection.  ONI doesn't have convection. That's not going to change.  However.  I'm not certain, but it seems like what you're seeing might be related to the common bug everyone is talking about, the one about how if you drop a small amount of cold water on top of a large tank of hot water, it cools the hot tank down way too fast.  I think this bug is possibly hitting you here, but in reverse.  Because, in essence, you are trying to cool very small pieces of heat containing fluid with larger pieces of heat containing fluid.  If this is true, then the next hotfix should fix your problem, or so I've heard.

##### Share on other sites

56 minutes ago, Ciderblock said:

thermoregulators still emit a lot of heat (though I think less than they consume even now).

According to the files, AirConditioner.cs, they emit exactly the amount of heat that they remove from the gas:

```        float num1 = Game.Instance.gasConduitFlow.AddElement(this.cooledAirOutputCell, component.ElementID, component.Mass, temperature);
component.KeepZeroMassObject = true;
component.Mass -= num1;
float num2 = (temperature - component.Temperature) * component.Element.specificHeatCapacity * num1;
float display_dt = (double) this.lastSampleTime <= 0.0 ? 1f : Time.time - this.lastSampleTime;
this.lastSampleTime = Time.time;
GameComps.StructureTemperatures.ProduceEnergy(this.structureTemperature, -num2, (string) BUILDING.STATUSITEMS.OPERATINGENERGY.PIPECONTENTS_TRANSFER, display_dt);```

(unfortunately decompiled code like this is a bit hard to read, but I'm pretty sure num1 is the mass of gas passing through it, and then it calculates the change in its temperature, multiplied by the specific heat of the gas, multiplied by the mass, which is exactly how much energy was removed from it.

##### Share on other sites

1 hour ago, CodingKitteh said:

just to find out that the oxygen gas (thing to be cooled) was heating up my pipes rather than the other way around.

Heat transfer in real world depends on factors that don't have sense in ONI. You expect the pipe to have temperature closer to temperature of the gas in it because "the gas is pressurized in the pipe" but there's no such thing like pressure and there's more gas in the ambient than inside the pipe. The pipe also has no surface area, neither inner nor outer, through which the heat is transferred. So transfer of heat between ambient gas and pipe is governed by one arbitrary constant that represents pressure and surface area and heat exchange within material of the pipe and material of the ambient gas, while heat transfer between pipe and gas in it is governed by another arbitrary constant representing all of these. That doesn't mean it's wrong, it's game physics and what we need to achieve is just heat conservation to make the physics kind of right.

##### Share on other sites

Hey Rezecib or Kasuha, I was writing a thing for the suggestion forum about different cooling machines and how they are currently balanced poorly.  Can you verify my math?

Hydrofan--requires 1 duplicant operation, some water which is lost, and provides 80 watts of cooling.

water purifier,requires some wattage of electrical power,  supplied with some sand which is lost,and which i'm going to neglect thermodynamically until such point in the future as sand is easier to produce renewably, supplied with polluted water at 120 celsius, outputs clean water at 40 celsius, so 80 degrees Celsius of difference.  specific heat of water/polluted water is 6 J/g/K, water purifier uses 5000 g/s, so wattage cooling of water purifier operating thusly is 6*5000*80 = 2.4 million watts of cooling power.  Is this right?

Originally I was just comparing hydrofans to wheezes but then I thought I'd try to calculate cooling effects of things like water purifiers.

edit: Oh, I see that in ONI polluted water has a specific heat capacity of 6, but water is 4.179, so doing everything in Kelvin and comparing absolute heat energy, you could say that the situation with the water purifier is 393 kelvin * 6 * 5000 - (313 kelvin * 4.179 * 5000) = 11.790 MW - 6,540,135 watts, or ~ 5.25 megawatts of cooling? The fact that water and polluted water have different specific heats makes these calculations dicey, because if you include that fact, then things like using showers/lavatories become incredibly significant heat additions, as does the air scrubber, but if you don't then your math is fudgy.  I'm a bit confused, to me polluted water should just have the same specific heat as regular water, since the amount of impurity is generally represented as not that much actual mass.

##### Share on other sites

2 hours ago, CodingKitteh said:

oxygen gas (thing to be cooled) was heating up my pipes rather than the other way around.

Giving it another thought, however ...

There's probably some 2 kg of oxygen in the chamber, and 1 kg of hydrogen in the chamber. And the pipe is made of 25 kg of granite.

It should actually be the temperature of the pipe what's moving the temperature around. The fact that when you send any gas to the chamber the pipe quickly adopts its temperature suggests there might be the same bug involved as with water cooling - the large heavy pipe and the little of the gas exchange heat as if their masses are swapped, i.e. 25 kg of oxygen and 2 kg of granite.

##### Share on other sites

Okay, I ran an experiment and there is something wrong with heat transfer, though it is not wrong the way I thought.

I used this setup:

It was set of abyssalite chambers filled with vacuum initially, and I placed obsidian pipes in it at default temperature 293.2 K (20 C). Then I filled different chambers with different amounts of oxygen at 400 K and watched what happens and where the temperature settles down.

1 kg of oxygen per tile settled at 346.6 K

2 kg of oxygen per tile settled at 364.5 K

25 kg of oxygen per tile settled at 395.9 K

100 kg of oxygen per tile settled at 398.9 K

The temperature equalization was the faster the higher the amount of oxygen was. Also the resulting temperatures suggest the masses are not swapped. The resulting temperatures are not okay, though. They should have been 311, 323, 382, and 395 K respectively according to my calculations.

I tried to calculate what mass would the pipe have, assuming the mass used in the calculation is wrong, to give these results. It gave me 5025, 5003, 5015, and 5229 grams, respectively. So it seems to me that exchange of heat between pipe and the environment uses 5 kg as mass of the pipe, not 25 kg of material used for it.

I may be wrong about it, though, and this is just one end of the equation - heat exchange between the pipe and gas in it needs another experiment.

##### Share on other sites

3 hours ago, Trego said:

Gases in the real world behave very differently than how they are modeled in ONI.

I know this is the ONI universe and I am accepting if heat calculations are based on conduction solely. However the mechanics aren't well speculated and clarified. Maybe I should bring in the numbers and screenshots like @Kasuha.

I should do some testing using simple in-game models

##### Share on other sites

So for some sort of conclusion, I put a piece of empty granite pipe in 1 kg of ambient oxygen at 100 K higher temperature, and filled a piece of granite pipe in vacuum with 1 kg of oxygen at 100 K higher temperature. In both cases the temperature converged to the same value, so the heat exchange is consistent, i.e. the pipe acts as having the same mass for both outside and inside. The only difference is that heat exchange with ambient oxygen is much, much faster than with whatever is inside the pipe.

##### Share on other sites

50 minutes ago, Kasuha said:

The only difference is that heat exchange with ambient oxygen is much, much faster than with whatever is inside the pipe.

Which has up- and downsides. When you simply want to pipe stuff from A to B it might even be beneficial.

But I think the speed of heat transfer between the inside and pipe is something that needs to be looked at as using pipes as gas/gas heat exchangers is currently crippled in an unfun way, preventing us from building interesting contraptions.

##### Share on other sites

4 minutes ago, Masterpintsman said:

Which has up- and downsides. When you simply want to pipe stuff from A to B it might even be beneficial.

Yes, it's definitely a choice devs made for balancing the game.

Though I think for normal pipes the heat transfer between gas inside and the pipe should be faster than heat transfer between the pipe and equal amount of gas outside, exactly due to the idea that there's more space outside the pipe and so there's less contact between the pipe and ambient gas. Only insulated pipe should IMO strongly suppress heat transfer between itself and its contents. That could actually make insulated pipes viable again.

##### Share on other sites

10 hours ago, Kasuha said:

So it seems to me that exchange of heat between pipe and the environment uses 5 kg as mass of the pipe, not 25 kg of material used for it.

Actually, it matches exactly with the pipes being modeled as 1kg. I'm guessing this an unintended side-effect of the SolidSurfaceAreaMultiplier, which for all gases is set to 25?

Edit: Redid my math and must've made a mistake somewhere, 5kg is right.

##### Share on other sites

8 hours ago, rezecib said:

According to the files, AirConditioner.cs, they emit exactly the amount of heat that they remove from the gas:

```
float num1 = Game.Instance.gasConduitFlow.AddElement(this.cooledAirOutputCell, component.ElementID, component.Mass, temperature);
component.KeepZeroMassObject = true;
component.Mass -= num1;
float num2 = (temperature - component.Temperature) * component.Element.specificHeatCapacity * num1;
float display_dt = (double) this.lastSampleTime <= 0.0 ? 1f : Time.time - this.lastSampleTime;
this.lastSampleTime = Time.time;
GameComps.StructureTemperatures.ProduceEnergy(this.structureTemperature, -num2, (string) BUILDING.STATUSITEMS.OPERATINGENERGY.PIPECONTENTS_TRANSFER, display_dt);```

(unfortunately decompiled code like this is a bit hard to read, but I'm pretty sure num1 is the mass of gas passing through it, and then it calculates the change in its temperature, multiplied by the specific heat of the gas, multiplied by the mass, which is exactly how much energy was removed from it.

Thanks for that. Is that in addition to the baseline 2W or so that it puts out, or total?

##### Share on other sites

10 minutes ago, Ciderblock said:

Thanks for that. Is that in addition to the baseline 2W or so that it puts out, or total?

It looks to be in addition to me.  Now, I remember someone doing a closed box test of thermoregulators in debug mode, and coming up with the conclusion that they had a strong overall cooling effect.  combining that test with this code, occam's razor suggests that the result of that test is most simply explained by thermoregulator cooling having been aided by the same bug which causes the small amount of water dropped on a large amount of water to cool it too much, which is apparently about to be fixed; so we should be alert for thermoregulators, and many other machines, to possibly become much more difficult to cool.  I think I'm going to try to make a setup which both tests the overall cooling of thermoregulators in a closed box in debug mode, and which attempts to use the gas product of thermoregulators to cool the thermoregulator itself somehow, and then run that save immediately after that bugfix to see if there's a drastic difference.

##### Share on other sites

9 hours ago, rezecib said:

According to the files, AirConditioner.cs, they emit exactly the amount of heat that they remove from the gas:

```
float num1 = Game.Instance.gasConduitFlow.AddElement(this.cooledAirOutputCell, component.ElementID, component.Mass, temperature);
component.KeepZeroMassObject = true;
component.Mass -= num1;
float num2 = (temperature - component.Temperature) * component.Element.specificHeatCapacity * num1;
float display_dt = (double) this.lastSampleTime <= 0.0 ? 1f : Time.time - this.lastSampleTime;
this.lastSampleTime = Time.time;
GameComps.StructureTemperatures.ProduceEnergy(this.structureTemperature, -num2, (string) BUILDING.STATUSITEMS.OPERATINGENERGY.PIPECONTENTS_TRANSFER, display_dt);```

(unfortunately decompiled code like this is a bit hard to read, but I'm pretty sure num1 is the mass of gas passing through it, and then it calculates the change in its temperature, multiplied by the specific heat of the gas, multiplied by the mass, which is exactly how much energy was removed from it.

How do you do this? I want to see the formulas @.@

##### Share on other sites

***I also just discovered that heat transfer will occur only when there is gases/liquids present. It doesn't matter if solid objects are touching in a vacuum.****

##### Share on other sites

1 minute ago, CodingKitteh said:

***I also just discovered that heat transfer will occur only when there is gases/liquids present. It doesn't matter if solid objects are touching in a vacuum.****

Yeah I can confirm, tested that today too. Tried to measure temperature of gas in pipe with thermo switch placed over the pipe in vacuum chamber. Not that the switch was showing absolute zero but its own temperature wasn't changing at all.

Using very small amount of gas in the chamber might help with that, though. Except the pipe still adjusts to the gas in it very, very slowly.

##### Share on other sites

Quote

Using very small amount of gas in the chamber might help with that, though. Except the pipe still adjusts to the gas in it very, very slowly.

Just tried it. The thermo switch is 200 kg of metal. It may not be measuring its own temperature but it definitely affects temperature of the gas around it. So the gas in the pipe has to equalize with the pipe, with the gas in the chamber, and with the thermo switch itself before the reading is correct.

I want abyssalite thermo switch.

##### Share on other sites

An abyssalite one would eternally measure the temperature it was build with, wouldn't it?

Try wolframite.

##### Share on other sites

Just now, Masterpintsman said:

An abyssalite one would eternally measure the temperature it was build with, wouldn't it?

Try wolframite.

No thermo switch does not measure its own temperature, it measures temperature of surrounding gas. Abyssalite switch would be ideal since it would not move the gas temperature around with its own thermal inertia.

But yes, wolframite is the best option available since it has the lowest heat capacity.

##### Share on other sites

@CodingKitteh I'm using JetBrains dotPeek, looking at OxygenNotIncluded_Data\Managed\Assembly-CSharp.dll.

2 hours ago, Ciderblock said:

Thanks for that. Is that in addition to the baseline 2W or so that it puts out, or total?

It has no baseline, that was from an earlier patch I believe. If you look at the recipes and at the device in operation, it doesn't list any heat output, and the files don't seem to mention it either. I compared it to GeneratorConfig.cs, which has this:

```    buildingDef.ExhaustKilowattsWhenActive = 8f;
buildingDef.OperatingKilowatts = 1f;```

That didn't make much sense to me until I found this in Building.cs:

```   if ((double) def.ExhaustKilowattsWhenActive > 0.0 || (double) def.OperatingKilowatts > 0.0)
{
Descriptor descriptor = new Descriptor();
descriptor.SetupDescriptor(string.Format((string) UI.BUILDINGEFFECTS.HEATGENERATED, (object) GameUtil.GetFormattedWattage((float) (5.0 * ((double) def.ExhaustKilowattsWhenActive + (double) def.OperatingKilowatts)), string.Empty)), string.Format((string) UI.BUILDINGEFFECTS.TOOLTIPS.HEATGENERATED, (object) GameUtil.GetFormattedWattage((float) (5.0 * ((double) def.ExhaustKilowattsWhenActive + (double) def.OperatingKilowatts)), string.Empty)), Descriptor.DescriptorType.Effect);
}```

So for whatever reason it has those separated, but the heat generated in Watts is the sum of those times 5, which matches the 45W for a Coal Generator. I matched this with the Space Heater as well, which has 2 + 16 listed there, and 18*5 = 90. But AirConditionerConfig.cs lists only buildingDef.OperatingKilowatts = 0.0f;, and no ExhaustKilowattsWhenActive. So I'm pretty sure there's no baseline.

However, the observed heat around the Thermo Regulator doesn't seem consistent with the 18kW ish I calculated, so I wonder if the factor of 25 is relevant there too (that is, the Thermo Regulator heats itself up at the correct mass, but transfers its heat away to the surrounding gas as if it had 1/25 the mass).