Skip to content

Domain Advanced Settings

Ryan Guy edited this page Jul 24, 2019 · 35 revisions

This page documents the domain settings for the 'FLIP Fluid Advanced' panel.

Parameters

All parameters in this panel must be set before baking for changes in the simulation to take effect.

Frame Substeps

Min Substeps Minimum number of substeps per frame calculatation.
Max Substeps Maximum number of substeps per frame calculatation.
Enable Adaptive Time Stepping for Obstacles Take into account obstacle velocities when calculating the number of frame substeps. Enabling may improve the accuracy of fluid-solid interactions for fast moving obstacles.

Simulation Stability

Particle Jitter The amount of random jitter that is added to newly spawned fluid particles. Higher values may improve simulation accuracy. Lower values may introduce symmetric artifacts into the resulting simulation.
Jitter Surface Particles If disabled, only fluid that is within the interior of the fluid or inflow object will be jittered. Enabling this object will jitter both surface and interior particles and may cause bumpy mesh artifacts.
PIC/FLIP Ratio The ratio of PIC velocity to FLIP velocity to use when updating particle velocities. The PIC method is not very accurate, but stable. The FLIP velocity method is very accurate, but less stable. Using a value of 0.0 results in a completely FLIP simulation, while using a value of 1.0 results in a completely PIC simulation.

TIP: If you are simulating a very low viscosity fluid, try increasing this value instead of using the viscosity solver in the World Panel. For very low viscosity or thin fluids, enabling the viscosity solver can be overkill. A trick to bypass the solver for very low viscosity fluids is to instead increase the PIC/FLIP Ratio. This will lower the accuracy of the simulation which naturally results in a more viscous looking fluid. Try comparing the default value of 0.05 with a value of 1.0 to get an idea for how this changes the behaviour of the fluid.

TIP: If your simulation is too splashy, try increasing this value. A higher PIC/FLIP Ratio will damp/dissipate the motion of the fluid which will help the fluid settle more quickly. The default value of 0.05 is good for a large splashy ocean, but you may want to increase this value to 0.5 or higher for simulating a small scale glass of water.
CFL Condition Number (Safety Factor) The maximum number of grid cells that a particle may travel in a single time step. A larger number may speed up simulation computation time by reducing the number of required substeps at the cost of accuracy. A smaller number may slow down simulation computation time by increasing the number of required substeps, but may produce a more accurate simulation.
Remove Particles With Extreme Velocities Attempt to remove particles with extreme velocities that would cause the simulator to exceed the maximum number of allowed frame substeps. Enabling this option may prevent simulation blow-up in extreme cases. Disable this option if fast moving fluid is disappearing from the simulation domain.

Multithreading Settings

Threading Mode Specify how to choose the number of simulation threads.
Auto-detect
    Automatically determine the number of threads to use based on CPU.
Fixed
    Manually set the number of simulation threads to use.

Performance and Optimization

Enable Async Meshing Run the mesh generation process in a separate thread while the simulation is running. Enabling may increase simulation performance but will use more RAM.
Precompute Static Obstacles Precompute and save data for static obstacles. If enabled, the simulator will avoid recomputing data for non-animated obstacles. Enabling may increase simulation performance in scenes with both static and animated obstacles, but will use more RAM.
Reserve Temporary Grid Memory Reserve space in memory for temporary grids. If enabled, the simulator will avoid reallocating/deallocating memory for temporary grids. Enabling may increase performance in scenes with animated obstacles, but will use more RAM.

What are substeps, and how do the min, max, and CFL parameters relate to each other?

Substeps are the number of times that the fluid solver will perform calculations during a frame. Sometimes the fluid solver will only require one substep during a frame. Sometimes multiple substeps will be needed in order to keep the simulation accurate and stable.

The simulator automatically figures out how many substeps to calculate during a frame. The number of substeps required is based on the velocity of the fluid and the density of the simulation grid. The faster the fluid particles, the more substeps the simulator will take. The simulator calculates the fluid physics equations on a grid and if fluid particles are moving fast, they will be travelling over multiple grid cells during a frame. The grid cells that the particles travel over are 'skipped' in calculations and this is what leads to decreased accuracy. The skipped grid cells could have important data that would have altered the trajectory of the particle, such as velocity data telling the particle to move away from an obstacle instead of passing through it. Taking more substeps leads to particles skipping less grid cells and also leads to more consistent physics.

In general, more substeps during a frame increases simulation accuracy. The Min Substeps and Max Substeps parameters are guidelines for the simulator on the range of substeps it should take during a frame.

  • The Min Substeps parameter is like a minimum threshold of accuracy that will force the simulator to take at least this many substeps during a frame.
  • The Max Substeps parameter sets the limit for how many substeps the simulator is allowed to take during a frame. If some fluid particles are moving fast enough so that the required number of substeps exceeds this parameter, the simulator will remove these particles from the simulation. The reason for having this parameter is to prevent simulation 'blow ups' in extreme cases. There is a chance that a particle may become unstable and take on an extremely high velocity. This could cause the simulator to require a very large number of substeps during a frame, blowing up the baking time. There is also a chance this particle could affect the data of other particles leading to a chain reaction. Having a limit for the number of substeps will eliminate this unstable particle before it can cause any trouble.
  • The CFL Number (which is short for Courant–Friedrichs–Lewy condition number and is a common parameter in simulation) is a constraint on how the simulator figures out how many substeps to take during a frame. This number is the maximum number of grid cells a particle can travel in a single substep. So if the CFL is set to two, the simulator will perform enough substeps so that the fastest moving particle travels no more than two grid cells during a single substep.
Clone this wiki locally