---
title: "Liquid Dynamics"
canonical: "https://documentation.chaos.com/space/PHX4MAYA/125637296/Liquid%20Dynamics"
format: markdown
---
## **Overview**

---

> Macro (ui-text-box)
> 
> UI Path: ||Select [PhoenixFDSim](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125765148)|| **> Attribute Editor > Dynamics **rollout

## <span style="color: #3b3b3b">**Parameters**</span>

---

> Macro (ui-text-box)
> 
> When running liquid simulations with the **Initial Fill Up** option and **Open Container Wall** conditions, the surface of the generated liquid should remain smooth. If you encounter artifacts in the form of horizontal lines perpendicular to the direction of movement, with **Motion Inertia** enabled, please ensure that the **Scene Scale** is reasonable considering the type of effect being simulated. Other possible solutions in case tweaking the scale is not possible are to either increase the **Steps Per Frame**, or to reduce the **Cell Size** of the Simulator.
> 
> Liquid artifacts usually appear when the liquid particles move a great distance between frames. Increasing the Scene Scale or the Steps Per Frame allows them to stabilize, which in turn keeps the surface smooth.

> Macro (ui-text-box)
> 
> The liquid created through the **Initial Fill Up** option will be initialized with the values set for the **Default RGB** and **Default Viscosity** parameters below.

> Macro (ui-text-box)
> 
> All simulator walls must be set to Open for **Fill Up For Ocean** to take effect.

### **Example: Motion Inertia**

---

> Macro (ui-text-box)
> 
> The following video provides examples of moving containers with **Motion Inertia** enabled to show the differences between values of *0*, *0.5*, and *1.0*.

> Macro (iframe)


### **Example: Fill Up For Ocean and Clear Inside**

---

> Macro (ui-text-box)
> 
> This example shows the Liquid voxels, with a submerged **Solid** ellipsoid. There are never FLIP particles inside it, but disabling **Clear Inside** will fill it with Liquid voxels so the liquid mesh can intersect it.

---

> Macro (ui-text-box)
> 
> **Steps Per Frame (SPF)** is one of the most important parameters of the simulator, with a significant impact on quality and performance. To understand how to use it, keep in mind that the simulation is a sequential process and happens step by step. You cannot take a shortcut to simulate the last frame of a simulation, without first simulating all of the frames that come before it, one by one.
> 
> **The simulation produces good results if each step introduces small changes to the sim**.
> 
> For example, if you have an object that is hitting a liquid surface with a high speed, the result will not be very good if at the first step, the object is far away from the water, and at the second step, the object is already deep under the water. You need to introduce intermediate steps, until the object's movement becomes small enough that it happens smoothly across all steps for that frame.
> 
> The **SPF** parameter creates these steps within each frame. A value of 1 means that there are no intermediate steps, and each step is exported into the cache file. A value of 2 means that there is one intermediate step, i.e. each second step is exported to the cache file, while intermediate steps are simply calculated, but not exported.

> Macro (ui-text-box)
> 
> Increasing the **Steps Per frame (SPF) **also comes with significant trade-offs to performance and detail.
> 
> **A higher SPF decreases performance in a linear way. **For example, if you increase the **SPF** twice, your simulation will take twice as long. However, quality does not have a linear relation to **SPF**.
> 
> **For maximum detail, it is best to use the lowest possible SPF **that runs without any of the issues described in the tip box below, since each additional step kills fine details. For more information, please refer to the [Phoenix Explained](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125829240) docs.

> Macro (ui-text-box)
> 
> Signs that the **Steps Per Frame (SPF)** needs to be increased include:
> 
> - Liquid simulations that have too many single liquid particles.
> - Liquid simulations that appear torn and chaotic.
> - Liquid simulations of streams that have visible steps or other periodical artifacts.
> - Fire/Smoke simulations with artifacts that produce a grainy appearance.
> 
> 
> More often than not, these issues will be caused by the simulation moving too quickly (e.g. the emission from the source is very strong, or the objects in the scene are moving very fast). In such cases, you should use a higher **SPF**.

> Macro (ui-text-box)
> 
> In order to achieve the same simulation look when changing the **Time Scale**, the **Steps Per Frame** value must be changed accordingly. For example, when decreasing the **Time Scale** from 1.0 to 0.5, **Steps Per Frame** must be decreased from 4 to 2. All animated objects in the scene (moving objects and sources) must be adjusted as well.
> 
> **Time Scale** different than 1 will affect the **Buildup Time** of Particle/Voxel Tuners and the Phoenix Mapper. In order to get predictable results you will have to adjust the buildup time using this formula:  
> ***Time Scale * Time in frames / Frames per second***

### Example: Steps Per Frame

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Steps Per Frame** values of *1*, *5*, and *15*.

> Macro (iframe)

---

> Macro (ui-text-box)
> 
> Here is the difference between **Steps Per Frame** values of 1 and 10 when a Source emits liquid with high velocity

### **Example: Time Scale**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Time Scale** with values of *0.3*, *1.0*, and *2.0*.

> Macro (iframe)


---

> Macro (ui-text-box)
> 
> - All FLIP liquid particles are set to this viscosity value at simulation start. You should use higher viscosity for thicker liquids such as chocolate, cream, etc.
> - The **Default Viscosity** is also used for the fluid generated by **Initial Fill Up**, or by **Initial Liquid Fill** from the [Phoenix Node Properties](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125961264) of a geometry - both of these options create liquid only at the start of the simulation.
> - If a [Liquid Source](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125895877) does not have **Viscosity **enabled, it also emits using the **Default Viscosity **value.
> - During simulation, liquids of *variable viscosity* can be mixed into the sim by using a [Liquid Source](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125895877) with **Viscosity** enabled.
> - The **Viscosity **Grid Channel export has to be enabled in the [Liquid Output](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125899086) rollout for *variable viscosity* simulations to work.
> - The viscosity of existing liquid can be changed over time by using a [Mapper](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125896041) in order to achieve melting or solidifying of fluids.
> - You can shade the liquid mesh or particles using the fluid's viscosity with the help of the Phoenix [Grid Texture](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125731978) or [Particle Texture](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125961145).
> - **It's important to note that using viscosity does not automatically make the liquid sticky**. For example, molten glass is viscous, but not sticky at all. Stickiness can be enabled explicitly from the **Wetting** parameters section below. If **Sticky Liquid** is not enabled, even the most viscous fluid would slide from the surfaces of geometries or from the jammed walls of the Simulator.

### **Example: RGB Diffusion**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **RGB Diffusion** with values of 0.0, 0.5, and 1.0.

> Macro (iframe)


### **Example: Default Viscosity**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of** Default Viscosity** with values of 0.0, 0.5, and 1.0.

> Macro (iframe)


---

### **Example: Non-Newtonian**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Non-Newtonian** with values of *0*, *0.1*, and *1.0*.

> Macro (iframe)


### **Example: Droplets Surfing**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Droplets Surfing** with values of *0.0*, *0.5*, and *1.0*.

> Macro (iframe)


## **Surface Tension**

---

> Macro (ui-text-box)
> 
> Increasing the **Droplet Radius** can dramatically slow down the simulation. Please use it with caution.

### **Example: Surface Tension**

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Surface Tension **with values of *0.0*, *0.07*, *0.28 *and* ***Droplet Formation **with value of *0.0*.

> Macro (iframe)


### Example: Droplet Formation

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Droplet Formation **with values of *0.0*, *0.5*, *1.0 *and **Surface Tension** with value of *0.1.*

> Macro (iframe)


## **Wetting**

---

> Macro (ui-text-box)
> 
> Geometry transforming or deforming at a high velocity may cause some or all of the **Wetting** particles stuck to it to disappear. To resolve this, dial up the [Steps Per Frame](https://docs-chaos.atlassian.net/wiki/spaces/PHX3MAYA4EDIT/pages/117277016) parameter from the [Dynamics ](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125637296)tab of the Simulator.

### Example: Consumed Liquid

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Consumed Liquid** values of *0*, *0.1*, and *0.3*.

> Macro (iframe)


### Example: Sticky Liquid without Viscosity

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Sticky Liquid** values of *0*, *0.5*, and *1*, when the **Viscosity **is set to *0*.

> Macro (iframe)


### Example: Sticky Liquid and Viscosity

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Viscosity** values of *0.1*, *0.5*, and *1.0 *and **Sticky Liquid** with value of *1.0*.

> Macro (iframe)


### Example: Sticky Liquid with different amount of fluid

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Surface Force** values of *50*, *500*, and *1000*, **Sticky Liquid **with value of *0.5 *and **Viscosity **with value of *0.3*.

> Macro (iframe)


## **Active Bodies**

---

> Macro (ui-text-box)
> 
> The Active Bodies simulation currently supports interaction between scene geometry and Phoenix Liquid simulations. When an object is selected as an Active Body, the simulation both influences and is influenced by the Active Body's movement.

> Macro (ui-text-box)
> 
> For more information on Active Bodies, please check out the [Active Body Solver](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125633652) and the [Active Bodies Setup Guide](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125633545).

## **Texture UVW**

---

> Macro (ui-text-box)
> 
> For Fire/Smoke rendering with TexUVW coordinates, textures need to be connected the the simulator through a Maya **Projection node** in **Perspective** mode**.**

**Interpolation Amount** | *texUVWInterpol* –  Blends between the UVW coordinates of the liquid particle at time of birth and its UVW coordinates at the current position in the Simulator. When set to 0, no interpolation will be performed - as a consequence, textures assigned to the fluid mesh will be stretched as the simulation progresses. This is best used for simulations of melting objects. When set to 1, the UVW coordinates of the fluid mesh will be updated with a frequency based on the **Interpolation Step** parameter - this will essentially re-project the UVWs to avoid stretching but cause the textures assigned to the fluid to 'pop' as the re-projection is applied. If you intend to apply e.g. a displacement map to a flowing river, set this parameter to a value between 0.1 and 0.3 - this will suppress both the effects of stretching and popping. *See the **[Interpolation example](https://docs-chaos.atlassian.net/wiki/spaces/PHX3MAYA4EDIT/pages/117277016)** below.*

**Interpolation Step** | *texUVWInterpolStep* – Specifies the update frequency for the UVW coordinates. When set to 1, the UVWs are updated on every frame, taking into account the **Interpolation** parameter. *See the **[Interpolation Step](https://docs-chaos.atlassian.net/wiki/spaces/PHX3MAYA4EDIT/pages/117277016)** example below.*

### Example: Interpolation

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Interpolation** values of *0*, *0.1*, and *1*, and an **Interpolation Step** with value of *1.0*.

> Macro (iframe)


> Macro (anchor)



### Example: Interpolation Step

---

> Macro (ui-text-box)
> 
> The following video provides examples to show the differences of **Interpolation Step** values of *1*, *3*, and *6*, and an **Interpolation** with value of *1.0.*

> Macro (iframe)