Jump to content

Fluids and Pressure


Recommended Posts

I'm a planetary scientist specializing in numerical modeling. I also love games and have designed one of my own. It's not hard to imagine why I enjoy ONI so much! 

One thing I'd love to see changed is how fluid pressure is handled: both in pipes and in the general (ambient) fluid states (liquid and gas). 

Pressure in Pipes: 

The way pipes work is confusing, especially to new players. They behave more like conveyor belts than actual pipes:

  • STANDING PIPES: Suppose there's a pipe segment containing a liquid or gas. If the input (e.g. pump) is deconstructed, the fluid stops moving. In the game, I would expect the fluid to keep moving towards the output segment. In reality, I would expect the fluid to leak out both ends. 
  • "BACKFLOW": In ONI, "backflow" occasionally happens as the result of weird bridge/junction interactions. It's all predictable within the ONI system, but it's not physically intuitive. In reality, fluids would fill pipes evenly. 
  • JUNCTIONS: The way ONI splits fluids at a junction is odd. Again, it behaves more like a conveyor system than a physical system. In a physical system, fluid flow would split evenly based on the pressures of each part of the junction and would flow from high to low pressure. Fluids would flow from a higher pressure to a lower pressure -- always. For a two-way fork in ONI, every other package of (e.g.) water in a pipe goes in a different direction. If one output of the junction is full, one would expect the fluid to flow from the "input" to the "non-full output". If pressure in pipes were modelled in ONI, this would happen naturally. (I'm willing to help work out a high-performance algorithm for this.) 
  • PIPE I/O: This would necessarily mean that each "input" and "output" would have a fixed or relative pressure. "Outputs" (e.g. a gas vent) could have an output pressure equal to the ambient pressure. "Inputs" (e.g. pumps) would have a fixed output pressure, and would continue pumping until the pressure in the pipe was equal to their max pressure. This would replace (or trigger) the "pipe blocked" message. (Because of this, there would be no reason to distinguish between regular and high pressure vents; now there would be regular and high-pressure pumps.) 
  • RELATED: The developers of Factorio recently revamped how they handle fluid pressure in pipes (see their blog post). They got a performance boost, too, IIRC. 

Environmental Pressure (and compressibility):

  • Because of gravity, the pressure of a liquid at the bottom of a container is equal to the weight of the liquid above it plus the atmospheric pressure at the surface. For compressible fluids, this means that the fluid density at the bottom of a container is higher than the fluid density at the top of the container. For incompressible fluids (water is approximately incompressible), Pascal's law says that the pressure is distributed throughout the fluid. 
  • If a pipe bursts, all the fluid at or above the level of the burst pipe should drain, but the fluid below the burst pipe should not drain. (If the burst pipe was modelled as an "output" as described above, with ambient pressure, then this would happen naturally.) 
  • Allowing gasses to be compressed (even slightly) in pipes could allow for some of the pipe dynamics I described above. 

Pipe Diameter

The wider the pipe, the greater volume of fluid that can be transported through it. It'd be neat to have thin pipes (early game) and wide pipes (mid/late game).  Thin pipes could be run through everything and have a small decor penalty. Wide pipes would be like heavy-Watt wire in that they would have a significant decor penalty, but could handle large volumes of fluid. This would also motivate large/medium/small pumps. (I've never had reason to use the mini pumps so far.)  

Anyway, these are just a few of the thoughts I've had. 

Link to comment
Share on other sites

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