CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How to tackle volume loss in FLIP? (https://www.cfd-online.com/Forums/main/181208-how-tackle-volume-loss-flip.html)

usirev December 9, 2016 17:09

How to tackle volume loss in FLIP?
 
Hi,

I created a primitive FLIP simulation - a starting point which I'll further enhance in terms of performance.

Right now I have a problem with volume loss - when external forces are
applied to particles, the volume of the liquid gets significantly smaller after a
while (30% of starting fluid volume).

Next follows description my current implementation of FLIP. I'll be glad for
any advice on how to improve my implementation and most importantly,
what plays the major role in the volume loss.

(How can I constrain the fluid volume in FLIP?)


Info about my primitive solver:
The main loop:
  1. Mark cells containing fluid.
  2. Convert velocity from particles -> grid. (Inverse trilinear interpolation - particle transfers its velocity to the closest 4 grid points in each X, Y and Z velocity grids)
  3. Apply external forces to grid (just add gravity force to every vertex on the Y-velocity grid).
  4. Compute divergence.
  5. Solve the (pseudo)pressure Poisson equation using Gauss-Seidel. Subtract pressure gradient.
  6. Convert velocity from grid -> particles. (Trilinear interpolation - similar to step 2.).
  7. Integrate using Forward Euler.

Other info:
  • I do not extrapolate velocity outside fluid cells.
  • I do not use CFL condition - the time step is always 16ms.
  • Boundary conditions are of type free-slip.
  • I do not remove or add particles.
  • I clamp the integrated positions of particles to stay withing fluid domain ([0;1]x[0;1]x[0;1] cube).
    (Can this be the potential source of volume loss?)


All times are GMT -4. The time now is 17:11.