Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Water; volume/density vs pressure/boyancy
#1
Pregunta 
Hi.

Obi Fluid seems to pack the fluid particles as the fluid gets deeper. This is perhaps to simulate increasing pressure and hence boyancy?

Water is incompressible, the density is the same in different depths. My 2d simulation has a vertical tube with closed bottom. I want the surface to rise according to the water volume inserted. What are the best settings to achieve this as good as possible, still maintaining boyancy/pressure gradient?
Reply
#2
(18-07-2019, 09:34 PM)Belisica Wrote: Hi.

Obi Fluid seems to pack the fluid particles as the fluid gets deeper. This is perhaps to simulate increasing pressure and hence boyancy?

Water is incompressible, the density is the same in different depths. My 2d simulation has a vertical tube with closed bottom. I want the surface to rise according to the water volume inserted. What are the best settings to achieve this as good as possible, still maintaining boyancy/pressure gradient?

Hi there,

No, this is inherent to the iterative nature of the solver. This happens because particles at the bottom experiment more pressure, and hence would need more iterations (or a shorter timestep) to maintain constant density.

Most SPH solvers would just blow up once pressure is too high, or take an enormous amount of computation time to maintain density (IISPH). PBF (position-based fluid) is unconditionally stable though, so you can apply few iterations and still get a passable (though compressible) result. This is its main feature as an algorithm, that allows to trade performance for precision.

If you use more density constraint iterations/substeps, or a smaller timestep, the fluid will become less compressible, at the expense of performance.
Note: reducing gravity in the solver would work too, as it would reduce the pressure at the bottom and hence the need for more iterations, albeit this is can be considered a "hack" it is used a lot in games.

kind regards,
Reply