Docs

Multi-Phase Flow - Water Fall

Note

The content of this tutorial is not up to date with the current live version of SimScale. The tutorial setup and the results are still valid! Please do not get confused if styles like buttons and entity names have changed in the meantime.

Overview:

Multiphase Analysis type enables you to simulate the time dependent behavior of 2 fluid mixtures, for example air and water. This tutorial provides a step-by-step guide on how to set up an internal multiphase flow simulation using the New Material Library for Fluid Dynamics analysis.

The material library provides pre-defined Fluid materials with the required properties at standard conditions. It will be shown, how these can be easily added and used. The user may modify these properties based on the requirements.

The tutorial project is a sample Water Fall case setup. The Channel is enclosed by walls on all sides with an open boundary for the top face. Initially there will be column of water in the fall area, while water enters from an Inlet and discharges into the column. The rest of the domain is filled with air as the base medium.

The link below provides the tutorial project.

Import the tutorial project into workspace

Step-by-Step

The project already has an uploaded mesh, which was created in a normal manner without any special assignments. So, the tutorial starts with creating a new simulation set-up for multiphase flow. The two different phases are defined and assigned in the simulation setup to follow.

1) Import tutorial project

  • To start this tutorial, you have to import the tutorial project into your ‘Dashboard’ via the link above.
  • In the workbench, you will be in the ‘Mesh Creator‘ tab. The tutorial project already contains the mesh, so the tutorial starts with creating a new simulation set-up.

2) Create a multiphase simulation

  1. To create a new simulation, switch to the Simulation Designer tab and click on “New simulation”. Enter a name for the simulation e.g ‘Multi-Phase_Flow’ and click OK.
  2. From the analysis type choose: Fluid Dynamics section of the analysis types, then Multiphase and setup the properties as shown in the figure below and click on ‘save’. After saving a new tree will be automatically generated in the left panel with all the parameters and settings that are necessary to completely specify such an analysis.

All parts that are completed are highlighted with a green check. Parts that need to be specified have a red circle. While, the blue circle indicates an optional settings that does not need to be filled out

MP_Tut-Fig-1

Selecting a domain

  1. Now, click on the “Domain” entry in the tree and select the mesh “waterfall-hex-dominant-mesh” to assign it to this simulation from the options panel. Clicking on ‘save’ will automatically load the selected mesh in the viewer.
MP_Tut-Fig-2
  1. So click on “Topological Entity Sets” from the tree. Also for easier working with the viewer we switch from ‘Surfaces with Edges’ to the ‘Surfaces’ view via the menu on top of the viewer. Then click in “pick faces” icon from the tool-bar above the viewer and select all faces except “inlet” and “Outlet” from the viewer. change the entity type filter to ‘face sets’ and click on “Create set from viewer selection” to create set named ‘walls’.
MP_Tut-Fig-3
  1. Now, create 2 more sets for “Inlet” and “outlet” one by one in similar way to have a total of 3 sets.

Setting up the Model:

Adding materials to the domain and assigning phases

  1. After, creating the sets move to the “model” entry in the tree where global variables of the simulation are defined. Here we will add the materials from the ‘Material Library’, assign a ‘Phase’ to each and assign the materials to the simulation domain or mesh. This would then determine the materials that will exist in the flow domain and be used for the simulation. First, we start with clicking on sub-tree “materials”. Click on “Add material” from the options panel as shown.
MP_Tut-Fig-4
  1. Re-name the material, e.g Air. We do not need to enter the material properties as we will import pre-defined ones by clicking on “Import from material library” at the bottom.
MP_Tut-Fig-5

This pops-up a ‘Material Library’ from which we select “Air” and click on save. This will then automatically load the standard properties for air.

MP_Tut-Fig-6
  • As our domain/mesh will have two fluids for this simulation, we must select their “Associated phase” and assign them to a volume mesh region.
  • So, we change the “Associated phase” for air to ‘Phase 0’ to set it as the primary fluid phase and assign it to the mesh volume called ‘volumeOnGeoVolumes_0’ (volume of the chosen mesh) and click ‘save’.
MP_Tut-Fig-7

Important

The associated phase of ‘Phase 0’ means that the fluid material will be the primary fluid phase. This is then represented by a ‘Phase fraction’ of value 0 that corresponding to 100% of this fluid. Further, Every fluid material must be assigned at least 1 volume (and vice-versa).

Important

At this stage, we are only defining the properties of the two fluid materials that will be present in the domain/mesh and assigning them to the corresponding mesh volume (in this case the same one). As for the initial distribution of the fluid materials, it will be defined later under “Initial Conditions” sub-tree entry (under “Model”) with the help of “Geometry Primitives”.

  1. Similarly, now add the secondary fluid material named ‘water’ by clicking “Add material” as before. Click on “Import from material library” at the bottom and add “Water”.
MP_Tut-Fig-8
  • Now select the options as indicated in the figure below, assign it ‘Phase 1’ and ‘save’ it.
MP_Tut-Fig-9

Important

“So now as water is assigned ‘Phase 1’, it will be represented by a phase fraction value of 1”.

Creating a geometry Primitive:

  1. As the initial distribution of the fluid materials is defined with the help of “geometry Primitives”. So we first click on “Geometry Primitives” under “Domain” and click on ” Create new geometry primitive” from the options panel to select a type “Cartesian Box”. This will be used to define the initial distribution of the column of water in the channel.
MP_Tut-Fig-10
  1. Re-name the cartesian box to a meaningful name and specify the values as shown in the figure below.
MP_Tut-Fig-11

Important

Remember: “Geometry primitives are used to specify the initial distribution (state) of the fluid materials”.

Initial Conditions (Defining initial flow variables and distribution for fluid phases):

  1. The next tree item “Initial conditions” allows to define the initial velocity, pressure and “phase fraction” (in other words, initial phase distribution) for the fluids. For pressure and velocity we keep the default values. Then click on ‘Phase fraction’ , change type to ‘sub-domain-based’, keep “Default phase fraction value” of 0 ( that is air ) and click save. This means for now all the volume is filled with air.
MP_Tut-Fig-12
  1. Now click on “Add subdomain” at the bottom under ‘Subdomains’ to add the water domain as shown in figure above. Enter the settings as shown in the figure below (phase fraction value of 1 means water phase) and assign the previously created geometry primitive to this sub-domain and save.
MP_Tut-Fig-13
  • So, the common region of the geometry primitive and the volume mesh will now define the initial distribution of the water phase.

Important

Remember: “Under Initial Conditions the initial distribution (before start of simulation) of the fluid materials is defined (by using geometry primitives)”.

Boundary Conditions:

Now, we come to define the boundary conditions using the topological entity sets created earlier.

  1. Click on “Boundary conditions” in the tree and click “Add boundary condition” button to create a new entry as shown below.
MP_Tut-Fig-14
  1. Re-name the entry as “water-Inlet” and specify the values shown in the figure below and click on save at the bottom. Note: you do not need to select from the viewer in this case.
MP_Tut-Fig-15
  1. Add another boundary condition ( as before ), re-name it as “outlet” and specify the settings as shown in figure below and save it.
MP_Tut-Fig-16
  1. Lastly, add the 3rd boundary condition, re-name it to “walls” and specify the settings as shown in the following figure. Note: you do not need to select from the viewer in this case.
MP_Tut-Fig-17

Numerics:

  1. Based on the type of problem, we now modify some of the numerics as is illustrated in the figure below. This includes specifying the number of solver iterations per time step in “Number of correctors” and selecting the solvers based on the flow variables. These changes will help in better stability and convergence on the simulation.
MP_Tut-Fig-18

Simulation Control:

  1. Next, in simulation control we define some main control settings such as start and end times, time step size, auto time-stepping and number of processors for this simulation run. Follow the figure below to set up as shown and click ‘save’.
MP_Tut-Fig-19
  1. Finally click on “Simulation Runs” and click on “Create New Run” from the options panel. Then click “Start” to start the simulation run. Thats it ...!

Results:

  • Once the run finishes, the results can be post-processed by clicking on “Post-processor” tab.
  • Loading the results by clicking on “Solution fields” as shown in figure below.
  • Goto the last simulation step by clicking the last step button
  • Add a ‘Slice’ filter with shown settings
  • switch the flow variable to ‘alpha.phase1’ as shown.
MP_Tut-Fig-20