Transient Water and Air Flow in a Tank

Simulate incompressible, transient (unsteady), turbulent water and air flow through a tank in pseudo 2D using the Volume Of Fluid (VOF) solver. View velocity vectors, visualize the interface between the air and the water, and create a movie.

Final State

This tutorial is classed as advanced and you should consider completing other simpler RANS Flow tutorials as a prerequisite, such as "Incompressible Flow Through a Pipe into a Box".

Goals

In this tutorial, you will learn how to:

  • Specify fluid conditions on a multiple-volume flow domain for an incompressible, transient, turbulent, multiphase flow simulation
  • Specify boundary conditions on faces
  • Specify meshing parameters
  • Generate an air-water interface color map
  • Generate velocity vectors
  • Monitor residuals
  • Create a movie

Assumptions

  1. You have activated the Caedium RANS Flow add-on, or Caedium Professional.
  2. You are familiar with Caedium essentials.
  3. You have completed simpler RANS Flow tutorials.
  4. You have either:
    • Launched Caedium with the project file (water-tank-geom.sym) containing the geometry for this tutorial
    • Created the geometry by following the tutorial "Water Tank"

The geometry within Caedium should appear as shown below.

Geometry

The geometry for this tutorial is specially configured so that you can generate a multi-block hexahedra mesh one cell thick to perform a pseudo 2D simulation. The multiple volumes are connected through common faces that were configured in the geometry creation tutorial using the Faces->Connect tool in the Geometry Tool Palette.

Group the Geometry

For more details on the advanced multi-selection technique used in this section see "Camera View Control and Entity Selection".

Group Volumes

Right-click on the View Window (view) background, double-click sim->Volumes in the Select dialog, select Group from the menu, and select Properties from the menu.

In the Properties Panel, select the Group tab and set Name to flow-domain. Press Enter on the keyboard to apply the changes to the Properties Panel.

flow-domain Properties

To shade the geometry faces, right-click on the View Window background, double-click sim->Faces, and select Properties from the menu. In the Properties Panel, turn off the Transparent property to make all faces visible (shaded).

Faces Shaded

Group Front Faces

The 6 front faces are shown below in green:

Front Faces

In the View Window, ensure that only the background is selected (i.e., no geometry is selected). Hold down both the Shift key (to suppress the Select dialog) and the Ctrl key (to add pick to the current selection), and use successive right-clicks to select all the front faces as shown above. Be sure to confirm that you have selected a face by looking for all the face edges being highlighted. On the last selection, select Group from the menu. In the Properties Panel, select the Group tab and set the Name to front. The front group should now contain the following faces: face_45, face_50, face_55, face_59, face_63, face_68.

Group Back Faces

The 6 back faces are shown below in blue:

Back Faces

Perform the same multi-select process to create the back group for faces: face_44, face_49, face_54, face_58, face_62, face_67.

Group Side Faces

The side faces are shown below in red:

Side Faces

Multi-select all sim->Faces, Deselect (by selecting) the front group and the back group. Select the Results Tool Palette. Select the Selection Filters->Connected Topology tool. In the Properties Panel set Connected to 1 (if it is not 1 already), click the Add Connected Topology button and select Done.

Connected Topology Tool Properties

Press and hold the Ctrl key, right-click on the View Window background, double-click sim, select Group to create the sides group (red).

Specify the Substance Settings

Specify the Fluid Conditions

Select the Physics Tool Palette.

Select Multiphases->Air + Water. The Properties Panel will show the default properties for a multiphase substance consisting of air and water. To enable incompressible turbulent (viscous) multiphase flow the State->Viscous property should be set to Yes (its default value). Set State->Transient to Yes for an unsteady simulation.

Air + Water Tool Properties

Drag and drop the Air + Water tool onto a face of a volume, double-click the flow-domain group in the Select dialog, and select Done to set air and water as the fluid inside the flow domain.

flow-domain Properties

Set the Reference Properties for the Simulation

The reference properties are used by the flow solver, boundary conditions, and initial conditions. The reference velocity is used to initialize primary simulation variables, such as the turbulent scalar field k.

In the Properties Panel set Substance: Air + Water->Properties->Phase: All->Reference->U: Fixed Value->Value to [1 0 0].

For this case gravity acts in the negative Y-direction, so set Substance: Air + Water->Properties->Phase: All->Reference->g to [0 -9.81 0].

Reference Properties

Set Flow Solver Properties

Within the Substance: Air + Water property, expand the Solver: RANS Flow property and set Iterations to 10.

Expand the Control property and set Time Step to 0.001.

Solver Properties

The Time Step property is used by the flow solver to determine how far to advance the simulation in time per iteration. If the time step is too large, the simulation will become unstable and report an error. The Iterations property controls the results update frequency by specifying the number of iterations per simulation time step.

Set the Initial Properties for the Simulation

Initial values are used by the flow (simulation) solver to initialize primary fields (e.g., pressure, velocity). For a transient simulation, the initial values should reflect the conditions of the primary fields at time = zero (e.g., velocity = [0 0 0]). For a steady-state simulation the initial values should be as close as possible to the final steady-state conditions of the primary fields (e.g., the inlet or free-stream velocity is typically used to initialize velocity for internal flows).

With the flow domain already selected from the previous step, expand the Physics: Initial property in the Properties Panel and set the U property to Fixed Value. Set U: Fixed Value->Value to [0 0 0].

Initial Properties

Initially there will be water, bounded by the baffles, in the lower middle volume (shown below), so the initial value for alpha1 (where 0 = air and 1 = water) will be set accordingly.

Lower Middle Volume

Right click on a face of the lower middle volume (green), double-click volume_7, and select Properties from the menu. In the Properties Panel, select the Volume tab and set Physics: Initial->alpha1 to Fixed Value. Set alpha1: Fixed Value->Value to 1 (water).

Lower Middle Volume Initial Properties

Specify the Boundary Conditions

By creating a one cell thick mesh and not creating any boundary conditions on the front and back face groups the flow solver will perform a pseudo 2D flow simulation.

Wall Conditions

Drag and drop the Faces->Wall tool onto a face of the sides group. Double-click sides in the Select dialog and select Done to create walls on the sides of the flow domain.

A wall is a solid surface through which fluid cannot flow.

Wall Properties

Inlet Condition

The inlet (blue) and outlet (green) are shown below:

Inlet and Outlet

To create an inlet, drag and drop the Faces->Inlet tool onto the face shown above in blue. Double-click face_52 in the Select dialog and select Done to create the inlet.

An inlet is a boundary condition that specifies the properties of the fluid as it enters the flow volume.

Water enters the flow domain through the inlet, so in the Properties Panel set Physics: Inlet->Type: Default->alpha1 to Fixed Value. Set alpha1: Fixed Value->Value to 1 (water).

Inlet Properties

Outlet Condition

The outlet is shown below in green:

Inlet and Outlet

An outlet is a boundary condition that specifies the properties of the fluid as it leaves the flow volume.

To create an outlet, drag and drop the Faces->Outlet tool onto the face shown above in green. Double-click face_65 in the Select dialog and select Done to create the outlet.

Outlet Properties

Specify Meshing Parameters

The automated meshing topology recognition system will identify which meshing algorithm is best suited to a given configuration. In this case the geometry was constructed to be compatible with the multi-block hexahedra meshing algorithms.

You do not need to apply any volume or boundary condition prior to focusing on the meshing process - all that is required is an active Substance on your flow domain.

First we will focus on the surface mesh to avoid the extra time required to create the volume mesh.

To see individual surface mesh elements during the meshing process right-click on the View Window background, double-click sim->Faces, and select Properties from the menu. In the Properties Panel, turn off the Transparent property and set the Style property to Flat.

Select the Results Tool Palette. With all faces still selected from the previous operation select the Scalar Fields->A (area) tool, click Add A at the bottom of the Properties Panel and select Color Map.

The request for the area color map will cause all the faces to be meshed.

Mesh Area Color Map

Specify Accuracy

You can control the mesh resolution of a flow domain by using the Accuracy tool, as shown in this section.

Depth Edge

To make a one cell thick flow domain, select the Physics Tool Palette and select the Special->Accuracy tool. In the Properties Panel set Accuracy to Custom and set Resolution to 1.

Accuracy Properties

The edge used in this step is shown below in red:

Accuracy Edges

Drag and drop the Accuracy tool onto the red edge shown above, double-click edge_32 in the Select dialog, and select Done.

1 Cell Thick Mesh

Top Edges

The 3 top edges used in this step are shown below in green:

Accuracy Edges

Select the Special->Accuracy tool. In the Properties Panel set Accuracy: Custom->Resolution to 20. Drag and drop the Accuracy tool onto the 3 green edges shown above using multi-select, and select Done.

Top Edges Mesh

Side Edges

The 3 side edges used in this step are shown below in blue:

Accuracy Edges

Select the Special->Accuracy tool. In the Properties Panel set Accuracy: Custom->Resolution to 10. Drag and drop the Accuracy tool onto the 3 blue edges shown above using multi-select, and select Done.

Side Edges Mesh

Generate Initial Flow Results

To better see the velocity vectors (created in a subsequent operation), right-click on one of the front faces in the View Window, double-click front in the Select dialog, and then select Properties from the menu. In the Properties Panel, turn on the Transparent property.

To show velocity vectors on the front faces, select the Results Tool Palette and drag and drop Vector Fields->U (velocity) onto any front face. Double click front in the Select dialog and select Arrows.

The request for the velocity color map will cause the volumes to be meshed.

With an initial velocity of zero the arrows will not be visible.

In the View Legend, left-click on the title Arrows , and in the Properties Panel set Scale to 0.1.

Arrows

Drag and drop Scalar Fields->alpha1 onto any back face. Double click back in the Select dialog and select Color Map. In the Properties Panel set Style to Smooth and turn off the Transparent property.

Accuracy Edges

In the View Legend, left-click on the title Color Map , and in the Properties Panel set Colors to 2, set Range to Manual, set the associated Bounds to [0.49 0.51], and turn on the Reverse property.

Alpha1 Color Map Properties

Water is shown in blue and air is shown in red.

Create Residuals Monitor

Left-click in the View Window to give it focus. Drag and drop the Special->Residuals tool onto a face of the flow domain. Double-click flow-domain in the Select dialog and select Monitor to create the residuals monitor.

Drag and drop the Residuals tab over to the right-hand edge of the Caedium application window to split the window into two parts as shown below.

Residuals Monitor

Run the Flow Solver and Create a Movie

The number of flow (simulation) solver iterations is determined by multiplying the number of simulation time-steps (default = 5) by the number of iterations per simulation time-step (default = 100). After each simulation time-step (equivalent to 100 iterations by default) the results will be refreshed.

In the "Set Flow Solver Properties" section you set the number of iterations per simulation time-step (Iterations property) to 10, and so for this simulation you will set the number of simulation time-steps to 250, for a total of 2500 iterations.

This simulation is transient, therefore each iteration is equivalent to Solver: RANS Flow->Control->Time Step (0.001s) you set earlier. In total you will simulate 2.5s (2500 * 0.001s) in real time.

Right-click on the View Window background, double-click sim, and select Properties from the menu. Select the Simulation tab in the Properties Panel and set Time->Duration to 250.

Duration Property

In the Home Toolbar click the Record button . Enter the movie filename in the Record Movie dialog, and click Save.

You can record a movie of any View Window, Plot Window, or Monitor Window. You can also record movies simultaneously of any number of Windows. The Record button reflects the record-state of the current selected Window.

In the Home Toolbar click the Run button to run the flow solver.

If you wanted to interrupt the flow solver, you would re-click the Run button; the solver would then stop at the end of the current simulation time-step.

Let the solver complete its run. Note the updates of the velocity arrows, the alpha1 color map, and the residuals monitor as the simulation progresses.

Toggle the Record button to complete the movie.

Final State