Viscosity is the "thickness" of a fluid. For example, water has low viscosity, honey has higher viscosity, and raw bread dough has very high viscosity.

By default, FLIP fluids have no viscosity. These parameters let you add uniform viscosity or varying viscosity across the fluid.

Tip

The value of the Viscosity parameter depends on the scale of the particles. At the default scale, you will need values around 1000 for a thick fluid, and around 10000 for a doughy fluid.

To...Do this

Set the uniform viscosity of a FLIP fluid object

In the FLIP Solver node parameters, click the Volume Motion ▸ Viscosity sub-tab, then turn on Enable Viscosity. Then in the FLIP object parameters, click the Physical tab and set the Viscosity.

or

Use the Make Viscous tool on the Particle Fluids shelf tab. This tool does the above steps on the selected particle fluid object automatically, and sets the initial value of the Viscosity parameter of the object based on the object’s scale.

Simulate varying viscosity

You can use a per-particle viscosity attribute to control a varying viscosity field.

  1. In the FLIP Solver node parameters, click the Volume Motion ▸ Viscosity sub-tab, then turn on Enable Viscosity and Viscosity by attribute. The default attribute name is viscosity but you can change it as well scaling the value and controlling how the value of the attribute affects existing viscosity values using the other parameters on the Viscosity sub-tab.

or

If you override the Viscosity field through the Volume Velocity input to the FLIP Solver, you can arbitrarily edit the viscosity field.

Viscosity tips

If Under-Resolved Particles is set to Treat as Ballistic, the FLIP Solver will detect particles that are leaving the surface and are too small to be resolved on the grid and treat them ballistically. This works well for fluid with no viscosity, but for viscous liquids it can lead to particles creeping off the surface even with very high viscosity. Setting the Under-Resolved Particles method to No Detection turns off this behavior and should stop particle creep.

However, if your sim is only slightly viscous, individual flying particles might freeze in air if they are too small to be resolved on the grid. Increasing the Particle Radius Scale on the FLIP Object to >= sqrt(3) or decreasing the Grid Scale to about 1.4 should alleviate this problem.

The FLIP Solver computes the number of substeps to calculate based on velocity. While the viscosity solver should always be stable, it will be more accurate with smaller substeps. A slow moving, highly viscous sim might need more substeps than the 1 that the FLIP Solver will give it based on its velocity. Increase Minimum Substeps until you get sufficient viscosity.

Metaballs might provide better results than Average Position for surfacing goopy, viscous fluids with the Particle Fluid Surface SOP.

When surfacing very slow moving viscous particles, occasionally particles newly introduced by the reseeding process can be apparent. Turning off Reseeding should alleviate this problem.

The Surface visualization on the FLIP Object can be a good way to preview viscosity sims.

Choosing Float 32-bit for the precision on the Viscosity tab will speed up the viscosity solver and is sufficient accuracy for most simulations. If you have a fast GPU, enabling OpenCL acceleration via the Use OpenCL parameter on the Solver tab can further accelerate high resolution simulations of viscous fluids.

Fluids

Particle Fluids

Oceans

Viscous Fluids

Optimization