Custom Fluid

A Custom Fluid is a user-defined C++ expression for the local fluid viscosity as a function of fluid properties, particle volume/surface areas, species concentration, temperature, time, etc. This expression is evaluated locally at each lattice position at each time step. This function should return a physically realistic viscosity across all possible input parameters. Higher viscosities may require smaller time steps to remain stable.

In addition to returning physically realistic numbers, care must be taken to ensure that the values returned by this user-defined function are real. For example, a negative base raised to a non-integer exponent is not defined in real space and should not be used to define a transport coefficient.

Property Grid

Fluid Properties

Rheology Type

Apply a Custom Expression rheology. A user-defined expression for the local fluid viscosity as a function of fluid, particle, species, temperature, time, etc.

Custom Expression

Apply a custom expression rheology.

Density

kg/m 3 | The density of the fluid.

Kinematic Viscosity UDF

m 2 /s | This UDF defines the fluid’s local viscosity. It requires a single output: a floating-point variable named nu, which represents the local viscosity of the fluid. This is a voxel-based local UDF, calculated on a voxel-by-voxel basis using the local fluid properties.

Download Sample File: Kinematic Viscosity