Training Guide > Multi-Phase Flow Tutorials > Gravity-Driven Flow Tutorial > Setting Initial Conditions and Reference Values
Setting Initial Conditions and Reference Values
The direction and magnitude of the gravity vector are set via the Reference Values node. In this case, a gravity force needs to be applied in the negative y-direction.
- Select the Chambers > Reference Values > Gravity node.

- In the Properties window, set the Value to
0,-9.81.

To initialize the turbulence parameters:
- Select the Chambers > Initial Conditions > Turbulence Intensity > Constant node.

The usual practice for initially stationary fluids is to specify low, non-zero values for the turbulence parameters. This is because numerical problems may arise if these quantities are set to zero.
- In the Properties window, set the Value property to
0.1.

- Select the Turbulent Viscosity Ratio > Constant node.
- In the Properties window, set the Value property to
0
The initial condition for the spatial distribution of the two fluids in the continuum is that we only have water in the left-hand chamber and only air in the right-hand chamber and channel. Both fluids should also be stationary. A convenient way of specifying such a distribution is by creating and using a field function.
- Select the Volume Fraction node.
- In the Properties window, change the Method property to .
- Select the Volume Fraction > Composite > Air node and change the Method property to .

To define the required field function:
- Open the Tools node at the bottom of the tree.
- Right-click on the Field Functions node and select . This will create a new node named User Field Function 1.
- Right-click on the User Field Function 1 node and rename it
Initial Distribution
- In the Properties window, click on the Definition box to open the custom editor. In the editor window, enter text using the following syntax:
($$Position[0] >= -1) ? 1 : 0
- Click OK to exit from the editor.

- Return to the Air node, open it and then select the Field Function node beneath it.
- Select as the Scalar Function property.

It is not necessary to define a similar distribution for the H2O node because any user-specified initial condition for the volume fraction of the last-defined phase in multiphase flows is always ignored. Instead, this condition is obtained by subtracting the sum of the volume fraction distributions of the other phases from 1.0.
Return to CD-adapco STAR-CCM+ Index