Jump to content

Temperature spreading in R2


Recommended Posts

3 hours ago, Oozinator said:

Yes i came across it, but i would suggest you, to invite @R9MX4 and evil @Saturnus into your thread, because my brain has no capacity left, to handle the numbers there. ^^

Thank you for your invitation. But I won't spend my time on such a controversial patch, which might be withdrawn or reconstructed quickly. I found out my thermodynamics textbook, and reviewed what I learned several years ago. I support @Kasuha's idea, c1*c2/(c1 + c2) or k*c1*c2/(c1 + c2)   (k is regulate factor) should be most closest answer to reality

22 minutes ago, R9MX4 said:

I support @Kasuha's idea, c1*c2/(c1 + c2) or k*c1*c2/(c1 + c2)   (k is regulate factor) should be most closest answer to reality

Actually it's 2*c1*c2/(c1+c2), assuming half the thickness is c1 and half the thickness is c2. A regulating factor might be adjusting proportion of thicknesses of the two materials - I did not try to derive the correct formula for it yet. Might try later today, there's hope it will not end up too messy.

And it seems that reality/science is with Kasuha as well. Quoting from https://en.wikipedia.org/wiki/Harmonic_mean :

In certain situations, especially many situations involving rates and ratios, the harmonic mean provides the truest average.

So I think something like k*2*c1*c2/(c1+c2) should do (where k=1 normally, smaller k for insulating objects, larger k for radiant pipes). Now the question is, are the devs paying attention, and if not, what can be done about it?

8 minutes ago, Kasuha said:

A regulating factor might be adjusting proportion of thicknesses of the two materials - I did not try to derive the correct formula for it yet. Might try later today, there's hope it will not end up too messy.

What should that be good for? I rather doubt the game actually internally has a notion of thickness of anything. Or do you mean mass? I'd expect just adjusting the k factor might be a more practical solution than trying to get the math (impractically) perfect. Pipes and their content do not thermally react enough? Raise the k factor there, done.

 

7 minutes ago, llunak said:

What should that be good for? I rather doubt the game actually internally has a notion of thickness of anything.

I'm not sure how exactly is it implemented but the heat transfer coefficient assumes it just by its unit - J/K/m - the "m" here is unit of distance but it in fact stands for "m^2/m" where m^2 is unit of the contact area and the m is unit of the material thickness. All these come into the equation and need to be handled properly.

17 minutes ago, llunak said:

Raise the k factor there, done.

The best approach here is to raise the contact area and/or adjust material thicknesses. Correct formulas are not all that complicated, they just take some effort to figure out. The reward will be intuitive and realistic behavior of heat in the game.

25 minutes ago, Kasuha said:

I'm not sure how exactly is it implemented but the heat transfer coefficient assumes it just by its unit - J/K/m - the "m" here is unit of distance but it in fact stands for "m^2/m" where m^2 is unit of the contact area and the m is unit of the material thickness. All these come into the equation and need to be handled properly.

But that J/K/m is an in-game text saying the unit. Its actual in-game representation may be non-existent. I am a software developer and if I were to implement e.g. pipes and their heat transfer in ONI, I wouldn't bother with actual area or thickness, because it would be a lot of work with minimal return, if any. I would do it exactly as I said above.

27 minutes ago, Kasuha said:

The best approach here is to raise the contact area and/or adjust material thicknesses.

Which quite possibly doesn't even exist, so you cannot raise something that's not there.

28 minutes ago, Kasuha said:

Correct formulas are not all that complicated, they just take some effort to figure out. The reward will be intuitive and realistic behavior of heat in the game.

Correct formulas and realistic behaviour require correct and realistic representation. Which ONI is not, I'm pretty sure it takes its liberties and uses simplifications. And so the formulas may not need the correctness and realism either, in fact they may require the same simplifications.

 

50 minutes ago, llunak said:

But that J/K/m is an in-game text saying the unit. Its actual in-game representation may be non-existent.

May or may not be. Ultimately, you don't know. You just assume the answer that suits your idea.

Perhaps you're wrong.

I have seen some code snippets from the game's heat handling implementation. I don't have to assume that much. And while sure there are simplifications and hacks already, most of the heat implementation in ONI is rather true to reality. And I think we should not try to make it worse.

The game seems to calculate everything linearly. Thickness is not a factor. It's just adjacent tiles on 90 degree angles with simple thermal conductivity and specific heat. Then the are also multiple layers for gas pipe, water pipe, temp shift plates. Just this alone creates >~48 calculations roughly per tile if all things are present. This is why the more piping there is the more the game lags down because once you get about 400 tiles of piping now you need 19.2K calculations and each of these calculations is done as a float or double. Not even mentioning the gas/liquid in the pipes and just using easy off the cuff estimates.

Also a software dev and I believe llunak is right on how it's implemented in game. You could say each tile is 1 meter wide area and just use a constant 1 for thermal conductivity. And since that nullifies it you don't even need the distance which speeds things up. Therefore thermal conductivity (better thermal conduction) would be J/K only. Why would one do an extra calculation for no reason in a game? You wouldn't. For radiant pipes you could give a extra factor of 5E+1 to emulate thinness of the pipe. EZ. Specific heat all remains the same.

 

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