Jump to content

Why is the pressure so different in these identical things?


Recommended Posts

I'm trying to science heat exchangers but I keep finding pressure differences between identical things. (And it matters) 

The steam is 99,999kg per tile at 1000.9 degrees (for consistency). The pipes carry 500kg/s of oil. I have reset everything with clean builds and empty rooms many times. In every case, the left one has much higher pressure than the right one. The difference is often twice as much or more. The doors at the bottom all close briefly every 15 seconds to destroy gas. I suspect some quirk of the game, but I have no idea. Anyone?

5d0c140d08a50_Screenshotfrom2019-06-2015-14-43.thumb.png.1ae16143574dc5fada739f85d584b98d.png

35 minutes ago, mathmanican said:

This is mostly likely the cause.  Can't say much else without a save attached.

I'll have another look at that. But, I originally found the problem with normal steam pressures and I've tried some variations already. The reason I'm using high pressure steam as a heat source is to maintain a constant and reliable temperature so I can eliminate that variable.

19 minutes ago, mathmanican said:

Got a save file?  This sounds like a fun one to debug. Might be something minor, or could be a huge bug.

Ah.... okay, I'll take a minute and find where they are saved and stuff.

 

59 minutes ago, mathmanican said:

This is mostly likely the cause.  Can't say much else without a save attached.

Okay, here's a save, I think. I haven't dealt in save files until now so I might very well be doing something wrong.

HeatExchangePressure.sav

3 hours ago, Tonyroid said:

Okay, here's a save, I think. I haven't dealt in save files until now so I might very well be doing something wrong.

You sent the right file. Here is my best guess. 

  • The builds are not "identical".  They are fed by the same pump, which means some of the crude goes through a longer path than others.  Insulated insulation pipes actually do transfer heat, very slowly, to surrounding objects, last I checked.
  • I rebuilt your pipes so they all get the same length, but that still doesn't fix the problem.  Since the crude and pipes do not have the EXACT same temp, then one blob of crude alters the temp a tiny bit (maybe .0001 or something-guess). And one tiny bit of difference can alter the amount of heat transfer. 
  • Try building 4 different pumps, all feeding their own setup. Separate all 4 setups so they don't touch (don't even let insulation tiles touch). Seal your entire enclosure in vacuum. The builds need to be EXACTLY the same, not almost exactly the same. I was going to do this, but figure I'll let you. 
  • Even after doing all this, you have a possible problem.  If the game code ever encounters too much heat transfer (which can happen with thermium more often than other metals), then it clamps it.  This means it rounds.  Unfortunately, 3.54349999999999999999999999 rounds to 3.5434 and 3.5435000000000000000000000000001 will round to 3.5435. Unfortunately, the same oni code run at two different milliseconds may produce this tiny error, even on the exact same input. 
  • Once a single error is introduced, it spreads to all surrounding tiles, several times a frame. So a few hundred times a second.... The same output will not occur - frustrating? 

Luckily, if you close your doors and don't delete gas, you can easily check with debug tools that the same amount of gas is in each chamber. Unfortunately, when large amounts of gas interact with small amounts (so 99999kg of gas, or 0kg vac conditions interacting with anything) the rounding errors are more prone to occur. 

My best guess to model this would be to add some kind of Brownian motion, or maybe a stochastic model with 50-50 rounding errors thrown in.  The turbulent nature of the pressure changes definitely suggests that what you see happening is a numerical scheme that has got itself stuck in some cyclic unstable loop. The fact that adding more crude continues to create vacuum like conditions means you will never break out of this problem. 

Or maybe I'm just off my rocker, and someone else will do a better job figuring it out.  :)  Hope this helps.  I don't currently see any bug, rather I just see the limitations of using numerical methods to model pseudo-realistic phenomenon. 

It's the doors. They remove a variable amount of gas (depending on the pressure inside the exchanger) and push some of that gas back into the exchanger when they close. Combined, it makes for small differences to get amplified into the big pressure difference you see.

Use pumps or a condenser to remove the gas instead. This particular setup is only feeding 1 kg/s of crude so pumps are pretty easy.

image.thumb.png.924537c359c085afcf273c9fad817991.png

Using pumps is also helpful in that it's a good way to judge when the pressure in the exchanger had reached steady state. If you are inputting 1 kg/s, the chamber is at steady state when you are removing 1 kg/s. Scaling beyond 1kg/s would of course require more piping at which point a condenser may be more practical.

 

I would also recommend a small insulated pipe section before the hot plate for diagnostic purposes. Due to the cell with the output crude constantly switching between liquid and gas, the gas at the hot plate is very bouncy. That is to say gases near the hot plate move closer to the plate and then further from the plate quite significantly. As the gas is closer to the plate, it picks up heat from the plate. As it moves further away, it deposits that heat into pipe sections. The TLDR is that the bouncy gas causes the pipe to be heated by the hot plate instead of the counter flow you are testing. This makes you think your exchanger is better than it actually is. In actual use it doesn't particularly matter, but for testing you want a small section that allows the bounciness to settle down. I also reworked the hot plate slightly to allow more space for gas creation.

image.thumb.png.31e8d7bb1b8a6616c1a4491754cfe246.png

 

HEPNew.sav

35 minutes ago, wachunga said:

It's the doors. They remove a variable amount of gas (depending on the pressure inside the exchanger) and push some of that gas back into the exchanger when they close. Combined, it makes for small differences to get amplified into the big pressure difference you see.

...

Ahh, the doors. That's a thing I didn't try. I guess I used it so much I trusted it without thinking about it.

For the project I'm working on I can't use the insulation you suggested at the hot plate, but I will change that to see if it's a source of the chaos somehow.

The insulation is only for testing. Just be aware that looking at the oil packet temperatures at the end of the heat exchanger is misleading if you're running radiant piping all the way up to the hot plate. In such a case, looking at the temperature of the sour gas at the end of the exchanger is probably better.

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