Jump to content

Water is disappearing from merged liquid vents after loading game.


sheaker
  • Branch: Live Branch Version: Windows Pending

Dear Klei,

I found that after loading the game water in my output liquid vents from steam turbines is disappearing. I captured it on video:

 


Steps to Reproduce

1. Build working steam turbine heat removing system and merge output liquid vents in crude oil.

2. Capture steam amount.

3. Save game.

4. Load game.

5. Watch steam mass carefully after loading the game. Mass is decreasing.

 

  • Thanks 2



User Feedback


My best guess on this one is the 718g of crude oil that you have (4 seconds into the video).  Increase the mass of crude, and I bet this won't occur. Similar issues happen with electrolyzers (have for years).  You need sufficient liquid over the vent, otherwise mass gets deleted. 

Clearly it is a bug that should not happen, but my guess on this particular build in the low level of crude you have on the floor. I'll be replicating the issue myself, if I can. A save file is always appreciated. 

I just build a turbine similar, and didn't see any mass loss.

 image.png.162f2efe284bb8fb98d569675eb94de0.png

Something is going on.  Care to share a save?  I want to look into this issue. 

Just tried low mass. No deletion. Please share a save with issue.

Maybe it requires two or more turbines in same room to obtain turbulent flow. I'll try that next.

Edited by mathmanican

Share this comment


Link to comment
Share on other sites

Recreating same bug was a real pain but finally I was able to make it.  May this be my small contribution.

How to:
1. Load game.
2. Wait till steam turbine shutdown.
3. Let water drain from ST.
4. Pause the game.
5. Check steam amount. (3720 or 3760 at first try)
6. Load game again without closing the game and go to point 2.

 

Repeat until bug happen. It should be 2-4 loads.

 

2.png

mathmanican.sav

  • Thanks 1

Share this comment


Link to comment
Share on other sites

Ahh!!  My potato computer takes forever to load this 2345 cycle base. :)  Thanks for the save though.  I'll build the thing exactly as it appears in your save, and test it on a fresh world.  

Do you have FPS issues when you run it?  I wonder if the mass deletion here is a later game issue directly connected to FPS issues and multi-threading. Just musing while I wait. 

I also noticed that you have a mod enabled (AutoMapSharing). I'll tag @Cairath here just in case it's related. I don't see why it would be, but you never know. Now time to dissect the issue. 

3 hours ago, sheaker said:

Repeat until bug happen. It should be 2-4 loads.

To what levels did your steam drop? The turbine does store liquid inside it, so minor fluctuations are normal. Did you see it drop to 300g like in the original video?

I also see that you have things connected via automation to turn the turbines on/off.  I wonder if that is an issue. I played around with a timer for an hour, trying to get mass to delete in a turbine, but did not succeed.  So I doubt this is it (though I wonder if the automation on timers id connected to a different setting than the automation on thermosensors). Just thinking out loud. .... I can't take the torture of opening this.  I opened it once, waited, closed it, and now don't know if I can stomach waiting for it to load a second time.... 10+ minutes have gone by...

I saw over 2/3 of the steam disappear on the second load, so I concur that steam was deleted (not just held in the turbine).  Mass is down to 1135g. I'll rebuild on a clean save, and try again. 

Edited by mathmanican
  • Like 1

Share this comment


Link to comment
Share on other sites

1 hour ago, mathmanican said:

Do you have FPS issues when you run it?

Just minor. In general I am not facing any performance issues apart time when game is saving. When the video was recorded there were no lags or performance issues.

 

1 hour ago, mathmanican said:

I also noticed that you have a mod enabled (AutoMapSharing).

Well I forgot about that. At the very beginning of my ONI journal I donated about 200 maps for ToolsNotIncluded. The mod was left enabled I guess...

1 hour ago, mathmanican said:

To what levels did your steam drop?

Despite it happened not long time ago I do not remember. I guess it was below 1000g so I was hundred percent sure steam disappeared. I was rather excited seeing deletion than actually focused on analysis.

1 hour ago, mathmanican said:

though I wonder if the automation on timers id connected to a different setting than the automation on thermosensors

They are under the same circuit. Automation is shutting of aquatuners and steam turbines. Water from steam turbines is then released via drain pipe into steam chamber. This is designed to keep the steam hot while the aquatuners are offline.

 

1 hour ago, mathmanican said:

I can't take the torture of opening this.  I opened it once, waited, closed it, and now don't know if I can stomach waiting for it to load a second time.... 10+ minutes have gone by...

That's why I said it was a real pain :/

I will try to copy this scheme into fresh world and see the results.

  • Like 1

Share this comment


Link to comment
Share on other sites

2 hours ago, mathmanican said:

I can't take the torture of opening this.  I opened it once, waited, closed it, and now don't know if I can stomach waiting for it to load a second time.... 10+ minutes have gone by...

Here is 1st cycle map where the same bug happened after second load.mathmanican_Cycle1.sav

  • Thanks 1

Share this comment


Link to comment
Share on other sites

I opened the file and upon first load, I lost a lot of steam.  Then I reloaded the file 3 more times (without restarting ONI), with no steam loss. St o then I decided to restart ONI and open the file fresh. Steam loss.  I repeated several times (restart ONI, open file, steam loss). I captured screenshots of my results (65kg, 89kg,41kg) and got different amounts of steam loss each time. In each case, I turned the turbines off via automation, and waited for the pipes to empty. 

Spoiler

r1.thumb.png.0985efe29b0117832d554303cf4c7a15.png

r2.thumb.png.5c214ae77ada04b7d08d402fed4e2078.png

r3.thumb.png.08745f3c56a331dcbe18fdb629399775.png

I then reopened the file without restarting ONI, and got much more steam each time (101, 113, 100), again waiting for the pipes to empty.  The differences I see here can completely be explained by the steam turbine's internal engine. 

Spoiler

r4.thumb.png.1e9731c757f7ceb6f9ab66ffaec21af6.png

r5.thumb.png.f3a17fb83b16f812ee9d8008e33faa63.png

r6.thumb.png.9b86850739c002f1f492b7a08449f991.png

Steam is disappearing on save/load from a fresh restart. 

  • Like 1

Share this comment


Link to comment
Share on other sites

Here is another save where it is occurring. This save does not have any mods on it, so it is not the mod you have running. 

The Quarantined League.sav

When I open this file from a fresh restart of ONI, the steam amount drops. The amount it drops changes each time, and doesn't appear to be related to anything I understand. There is definitely something going on.  Does anyone else want to confirm that this save deletes heat?

  1. Open ONI. Open this save. 
  2. Unpause and let the machine run till it stabilizes, and then toggle the temperature automation. 
  3. Let the water drain from the pipes. 
  4. Use debug to measure your total steam content in the 10 squares below the turbine. 

From a fresh restart, here is a picture of what I see (the 10.4kg is different each time I load). :

image.thumb.png.4926223c6091d0ca9625483661152300.png

Then reload the game (without restarting ONI). Repeat the above. image.thumb.png.878e33b57e37e63f6fec1e5e2f87bbc2.png

You should get pretty close to this amount (43.7kg, plus or minus a couple). 

Same save, but when I reload the game matters. 

I wonder if it is connected to the temp sensor automation.  Gonna test that now. 

 

It has nothing to do with the temp sensor automation. I deleted it, let the game run, saved, restarted ONI, and BOOM I lost tons of steam. 

image.png.4871778e858ddcc22918c59e27e16d8a.png

This is definitely a save/load issue. I'm going to test if I can prevent this by having the turbine turn off automatically on restart.  

Before I could test the "turn turbine off at start", I reloaded without restarting ONI, and lost a ton of steam (that value should be above 3000g). That has now happened a couple of times.  It does NOT appear to be related to whether your restart ONI or not, but seems to happen 100% of the time for me when I restart, but not that often when I just reload. 

image.png.c7f3181f929e50dcac6c984677ba5590.png

 

I increased the mass of crude oil to 400kg and the problem completely stopped. I cannot get steam deletion now with any kind of save/load (fresh restart, or reload).  I wonder if the issue either has to do with viscosity (crude =50) or min flow (100g). Gonna test those. 

Edited by mathmanican
  • Like 2

Share this comment


Link to comment
Share on other sites

With a crude mass below 50kg/tile, I was able to get mass deletion pretty quickly after a restart. (Steam should never be below 3000g at that cell in this setup.)

image.png.7d1036a5eab86ef240e18b32ca135a27.png

Painted 70kg, and got one of the worst results yet (though I don't know if that value has to do with the content of liquid). 

image.png.198338167fc65c9887ba813ca811a143.png

I have another theory. The max flow of crude moving left or right each tick is 50kg. If I can guarantee that the amount of crude placed over the vent is always 50kg or above, then maybe that will do it. If the volume of the liquid left of the vent is always 4 times this amount (so 200kg), then we should be good. However, I need to also make sure the value is above 200kg after liquid has been sent left (so the value needs to be a bit more than 200kg.  That's my best guess. Time to experiment. 

 

 

 

Every single one of these deleted almost 4kg of steam per tile (40kg of steam). Starting masses of crude were 200kg/tile, 210kg/tile, up to 240kg/tile.  Gonna keep on testing to see if I can find the best amount of liquid, as 400 seemed to be plenty. 

image.thumb.png.0359e743a9e50f5dd13d9f44878cc22c.png

Edited by mathmanican
  • Like 1

Share this comment


Link to comment
Share on other sites

Found something very interesting.  The starting crude mass per tile below is 250, 300, 350, 400, and 450kg. The 4 left turbines all deleted steam upon load.  The right most turbine did not. 

image.thumb.png.bdd43acbc5ecd2a674ba8f7be3a0efb9.png

Right before the liquid vents, the right most turbine is the only turbine that reaches 250kg total mass (the most it can reach from having 5 ticks of 50kg moving right (max viscosity)).  The 400kg crude turbine reaches about 245.5kg over the vent. 

So, is the issue 5*max viscosity must be over the vent, or is it 250kg must be over the vent, or is it something completely different?  All i know is that the issue is quite weird. It also happens on restart or reload. Both of my last two experiments were saved while the liquid over the vent was 50kg (so one tick after the liquid vents). I wonder if the timing of the save matters?

Well, that theory (about 5*max viscosity) is debunked. On my next startup, that room lost almost all it's steam.....  Not really sure what is going on now. The only last thought I have to follow is which tick of the game the save is occurring on, however after several reloads of the exact same setup as before, sometimes deletion occurred, sometimes it did not. Frustrating. :wilson_confused:

Conclusions:

  • Upon starting the game (restart or reload), steam turbines can delete mass. 
  • Mass deletion occurs with the liquid over the vent. The mass of liquid doesn't appear to be related to whether it occurs or not. 
  • I was unable to get mass deletion ever without liquid in the steam room. So don't put crude oil on the bottom of your turbine rooms. 
  • The issue does not appear to be related to automation at all. It appears to be a save/load issue. 
  • The amount of steam can drop a lot, or a little.  The actual amount seems random and has nothing to do with initial conditions (the same save, when opened repeatedly, can result in various amounts of steam loss, or none at all. 
  • There does not appear to be any way to mitigate it. If you have liquid at the bottom of your turbine, you may eventually lose steam (or get lucky and never see it...)

Without having access to more about what is going on during save/load, I don't think tracking any more information about this bug is really possible.  I don't know of any way to prevent it. 

 

  • Like 1
  • Sanity 1

Share this comment


Link to comment
Share on other sites

I tried one more thing, namely changing the game speed from x3 back to x1.  It did not help. Still got steam deletion. :( Time to move on....

  • Like 1

Share this comment


Link to comment
Share on other sites

44 minutes ago, sheaker said:

Look closely. At first the crude oil is somehow

This one has to do with 1 element per tile issues, along with some interesting facts with airflow tiles.  Infinite gas rooms with airflow tiles next to the liquid tend to delete the liquid, but with solid tiles they don't delete the liquid.  Odd stuff is happening.  It would be really nice to have a consistent system. i'm not sure it's the same issue as the save/load issue here, because the one you showed will happen mid game with no reloading. 

  • Like 1

Share this comment


Link to comment
Share on other sites

On 6/26/2020 at 8:49 AM, mathmanican said:

This one has to do with 1 element per tile issues, along with some interesting facts with airflow tiles.  Infinite gas rooms with airflow tiles next to the liquid tend to delete the liquid, but with solid tiles they don't delete the liquid.  Odd stuff is happening.  It would be really nice to have a consistent system. i'm not sure it's the same issue as the save/load issue here, because the one you showed will happen mid game with no reloading. 

This one is similar to my hydrogen deleting experiment but in the opposite direction.

Process is roughly as follows:
Oil is a liquid and denser than steam, so it is below steam and must displace downward relative to it, and steam must displace upward of oil if possible.

Vent emits water; the vent must emit if permitted and the condition checked is the pressure of the tile in front of the vent; the oil has insufficient mass to block the vent; therefore, water is emitted into the tile occupied by the oil.

The oil must displace because oil and water and steam can not occupy the same space; none of the oil, water, or steam can displace the solid tiles and have insufficient pressure to burst the tile, therefore, the oil must displace to a non-solid adjacent tile. The only valid tile is above the vent and on top of the water; the tile is only valid because it is occupied by a gas with many degrees of freedom.

One of four things happens at this point. 1) water transitions to steam. 2) water transitions to a droplet. 2) the vent emits water. 3) oil and steam or water swap via displacement with the oil returning to its starting position.

There exists a race condition at this point. In your video specifically, I am pretty sure what happens at the moment of the oil deletion is that there is a nearly invisible layer of water on top of the oil. The vent emits; emission does not itself cause displacement; vent emission is insensitive to displacement conditions of the adjacent tiles; it tries to displace the tile in front of it, but it has no awareness or direct interaction it seems with any of the adjacent tiles.

At this point, the oil is in a strictly confined state. There is water above it; there is three solid blocks on its other degrees of freedom. The vent must emit water. The oil can not displace the water above it, so it is simply destroyed and replaced with the emitted water.
Screenshot from 2020-07-12 04-53-16.png
At 0:19 in the video you can see the race condition manifest between the oil droplet and the water droplet. Droplets while in motion seem unable to phase change, so a droplet of water can potentially fall an unlimited distance without ever transitioning to steam; the droplet has to hit a valid tile to transition to a tile of liquid at which point it can phase change as far as I know. The oil ends up hitting the ground first which rapidly bumps the water droplet up for a split second. Then almost immediately there after the vent emits and the oil is destroyed.

Not sure where to put this, but it is relevant that oil must displace downward relative to water and water must displace upward relative to oil. This in effect pushes the oil into the solid tile below the vent which is invalid. The sum total of the invalid conditions by strict confinement of degrees of freedom is the mass deletion condition.

On 6/26/2020 at 8:49 AM, mathmanican said:

This one has to do with 1 element per tile issues, along with some interesting facts with airflow tiles.  Infinite gas rooms with airflow tiles next to the liquid tend to delete the liquid, but with solid tiles they don't delete the liquid.  Odd stuff is happening.  It would be really nice to have a consistent system. i'm not sure it's the same issue as the save/load issue here, because the one you showed will happen mid game with no reloading. 

The save load issue as far as I can tell is related to inconsistencies in the temperatures of objects that are "preloaded" during the initialization of a save. The deletion we're seeing in the referred video is due to confinement rather than the model inconsistencies introduced by the improper serialization of the save or improper decoding of that serialization into the playable state of the world on load.

I've noticed that you can pause during the loading of a save if the save takes long enough to register and queue the input from the keyboard. You can catch the game in a state where it has rendered the world, but it hasn't quite loaded all the properties and set all the values of the different things, and you'll catch things having absurd temperatures during this brief tick.

I think there's also something related though I can't recall exactly what it manifests as with the brief creation of vacua during loads; there are I suspect some problems with saves which capture tiles in transition from one state to another particularly when droplets are in mid air.

On 6/28/2020 at 12:09 AM, sheaker said:

Ok. I found that this is NOT just a save/load issue. Here it happened not straight after loading the game:

 

 

I will test it more.

In this case, I suspect what is happening is that the water droplets are being emitted, hitting the oil and becoming tiles, displacing above the oil then spreading out over the length of the top of the oil.

if the tiles of water advance less than 10g at a time then the mass of the liquid is deleted. This combines also with the water converting in part to steam. As you might have noticed, tiles of water will partially evaporate. So say the vent emits 1000g of water. The water displaces to one tile on the top of the oil and in a small amount of time 1000g of water becomes 500g of steam; the 500g water tile spreads out to the adjacent tiles resulting in three tiles with 500g/3 mass or 166 2/3 g per tile. Say half the mass of each tile converts to steam, so each tile now has 83g of water. And again, the water spreads out to adjacent tiles result in 41g mass tiles at the end. Half of that evaporates to steam. A more precise treatment of this is possible using the mechanics outlined by @mathmanican in this thread

An exact treatment would require explicitly accounting for the flaking mechanics particularly with the current patch's (419840, Summer 2020 patch) changes.

  • Fix partial melting/partial evaporation heat calculations. Energy used should be the energy required, not the difference of what's available
  • Fix solid flaking temperature deletion. Uses the actual energy required for the melt, as well as the SHC of the transition element
  • Fix gas temperature swapping heat loss

 

So 1000 g of water pops straight above the oil. It would be important on the tic where water has formed a tile either under the oil or on top of it whether flaking takes priority over displacement. I'm going to assume the water doesn't start flaking until after displacement, but the measurements would significantly differ based on order of operations, so this is a non-negligible assumption. We get three squares on top of the oil 1 tick after the water forms a tile. They have from left to right, 250g, 562.5g, and 187.5g of water. The steam above them is approximately 180 C and the oil below them is approximately 185 C. 4.179 SHC for water and steam. 1.69 SHC for oil. The primary conduction of thermal energy is from oil to water and the secondary is from steam to water due to liquid to liquid conduction rates vs liquid to gas conduction rates. As long as the water on top of the vent is less than 5Kg then I guess we don't have to worry about flaking; I might run some tests on that?

I am aware of an equation that predicts the final temperature of two blocks in thermal contact, but I am unaware of the specific expression for predicting the amount of temperature or energy transferred per tick. We'd need to know the quantum of thermal energy or the quantum of thermal wattage.

Te = (HC1 * m1 * Ts1 + HC2 * m2 * Ts2) / (HC1 * m1 + HC2 * m2)



You can see by this process we eventually have water tiles where the mass of the water tile is < 10g and the water is perhaps not guaranteed to turn to steam.

Now consider the heat deletion implications of mass deletion in this case. The water cools the steam or the oil. If the steam cools enough it turns to water. If the oil cools then it may prevent vent emitted water from heating quickly or it may reduce the temperature of the steam. This means more time for the emitted water to spread out over the top of the oil or potentially more steam condensation to water on top of the oil and spreading out.

Now, consider this as a system where you have a wide length across the top of the oil, and you recursively cycle this through a heat deletion engine. The oil is being cooled. Every time water flows into this system some of it is deleted. The more water deleted the more heat deleted. The cooler the oil. The more likely steam is to condensate and delete more mass and more heat. We have a potential death spiral.

Edited by DaClown
Additional info
  • Like 1

Share this comment


Link to comment
Share on other sites

Here is another thread on the issue. (The latter half of the thread has an example and save from @JRup that shows the issue in single gas environments, like this one. 

 

Here is another link for cross-referencing, to a collection of mass deletion issues related to steam turbines. 

 

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...