<aside>

$$ \large \mathbf{\text{The Secret (for real):}} \quad \text{Incompressibility is enforced by correcting velocity, not by stopping the fluid from moving.} $$

</aside>

<aside>

Download:

Re1mon_flip_sim_learning_tool.hdalc

</aside>

<aside> ➡️

Start Here

Open the HDA.

🖥️ Keep this page on your second screen.

Go through:

00 → 01 → 02 → 03 → 04 → 05 → 06 → 07 → 08 → 09

and ask yourself one question at each stage:

What changed?

Then try different velocity patterns and resolutions

</aside>

<aside> ⚠️

What This Tool Is — And Isn't

This is an educational model of the pressure-projection stage of FLIP.

It intentionally simplifies many aspects of a production FLIP solver.

It is not intended to replace Houdini's FLIP Solver.

</aside>

flip_learning_tool_red.mp4

The FLIP Pipeline

Each stage represents a specific transformation of the data.

$$ \begin{array}{c} \text{Initial Particles}\\ \downarrow\\ \text{Initial Velocity}\\ \downarrow\\ \text{Divergence}\\ \downarrow\\ \text{Pressure}\\ \downarrow\\ \text{Pressure Gradient}\\ \downarrow\\ \text{Corrected Velocity}\\ \downarrow\\ \Delta\text{Velocity}\\ \downarrow\\ \text{FLIP Particle Velocity} \end{array} $$


01 — The Core Idea

Incompressibility

A fluid can have velocity without being incompressible.

The important question is:

Is the velocity field expanding or compressing?

That's what divergence tells us.

$$ \begin{array}{c}\nabla \cdot \mathbf{v} < 0 \quad \rightarrow \quad \text{Compression}\\\nabla \cdot \mathbf{v} = 0 \quad \rightarrow \quad \text{Incompressible}\\\nabla \cdot \mathbf{v} > 0 \quad \rightarrow \quad \text{Expansion}\end{array} $$

For an incompressible fluid, we want:

Divergence ≈ 0

This is the problem pressure projection is trying to solve.

02 — Pressure Projection

$$ \begin{array}{c}\text{Velocity}\\\downarrow\\\text{Divergence}\\\downarrow\\\text{Pressure Solve}\\\downarrow\\\text{Pressure Gradient}\\\downarrow\\\text{Velocity Correction}\\\downarrow\\\text{Divergence} \approx 0\end{array} $$

Pressure itself is a scalar field.

Its gradient turns that scalar field into a vector field that tells us:

Which way should velocity be corrected, and by how much?


03 — Explore the Velocity Fields

$$ \begin{array}{c|c} \text{Pattern} & \text{What to observe}\\ \hline \text{Inward} & \text{Compression} \rightarrow \text{pressure response}\\ \text{Outward} & \text{Expansion} \rightarrow \text{pressure response}\\ \text{Vortex} & \text{Strong motion with little divergence}\\ \text{Compression} & \text{Converging velocity}\\ \text{Expansion} & \text{Diverging velocity}\\ \text{Wave} & \text{Spatially varying divergence} \end{array} $$

04 — The Pressure Solve

$$ \begin{array}{c}\text{Pressure}\\\downarrow\\\text{Neighbor values}\\\downarrow\\\text{New pressure}\\\downarrow\\\text{Repeat}\\\downarrow\\\text{Converged pressure field}\end{array} $$

Increasing the number of iterations gives the solver more opportunity to reduce the divergence.

This is where your Pressure Iterations control becomes meaningful.


05 — Correcting Velocity

Once pressure has been solved, we calculate its gradient.

$$ \begin{array}{c}\text{Pressure}\\\downarrow\\\nabla \text{Pressure}\\\downarrow\\\text{Velocity Correction}\end{array} $$

Then:

$$ {\Large v_{\text{corrected}} = v - \nabla p} $$

We calculate divergence again:

$$ {\Large \text{Divergence After} \approx 0} $$

This gives us a way to verify whether the projection worked.

06 — From Grid Back to Particles

Now we finally close the loop.

The grid calculated a change in velocity:

$$ {\Large \Delta v = v_{\text{corrected}} - v} $$

That change is what FLIP uses to update the particles.

PIC

$$ {\Large \text{Particle} \leftarrow \text{Grid Velocity}} $$

FLIP

$$ {\Large \text{Particle} \leftarrow \text{Particle} + \Delta v} $$

This is one of the fundamental differences between PIC and FLIP.


07 — Experiment With Resolution

The HDA allows you to change the grid resolution.

For example:

20 × 20 → 40 × 40 → 80 × 80

Higher resolution gives the pressure solver a finer spatial representation.

But resolution also affects the relationship between:

Grid spacing ↔ Particle spacing ↔ Transfer radius

So resolution isn't simply a visual-quality setting.


In Plain English:

If you remember only one thing:

$$ \text{\Large Pressure doesn't make the fluid move. Pressure corrects the velocity field.} $$

The whole process becomes: