The tutorial project is a sample tank filling 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.
As a first step, import the tutorial project into the SimScale workbench.
By importing the tutorial project, a new project will be created for you, and the ‘Workbench’ will open with the prepared tutorial geometry already loaded into the viewer.
To create a new simulation, click on the “+” button next to ‘Simulations’ in the tree or the “Create Simulation” button on the geometry panel.
Select the “Multiphase” analysis type and click “CreateSimulation“.
A new simulation tree containing all parameters and settings needed to define the conditions of the analysis will be created.
All setup steps that are completed are highlighted with a green check. Steps that require some user input are shown with a red circle. Steps that have a blue circle indicate optional settings.
Give an appropriate name to the simulation and apply a laminar turbulence model. Example: Multiphase
The geometry is automatically assigned to the simulation
We will create a geometry primitive to define the initial distribution between water and air in the geometry.
In the top right of the workbench, there will be a “Geometry” box which has a “Geometry primitives” section.
Select “Cartesian box” as our geometry primitives. A dialog box will pop up and ask for the minimum and maximum values for the box.
After assigning the values, confirm the operation.
A gravity model will assigned in the vertical direction.
Select “Model” in the simulation tree and assign the value of gravity in the vertical direction (\(g_z\)).
The value of Surface tension may also be assigned, in this case the default value between air and water will suffice.
Since the simulation consists of two phases, two materials, water and air, will be assigned to the simulation.
First, air will be assigned for the simulation.
The next step will be to select water as our second material. This will be the same step as above.
Next, a phase will be assigned for each material. Air will be assigned as “phase 0” and water will be “phase 1“.
We will assign each material to the whole domain.
The above step will be repeated for water.
After applying all the materials and phases, confirm the operation.
A subdomain for the phase fraction initial condition will be assigned. This will be used to define where water will be at the initial state.
Choose the “Initial Conditions” in the simulation tree.
Choose “Phase fractions“
Assign water as the phase of the subdomain
Assign the cartesian box created before as the subdomain.
This simulation will use three boundary condition. An inlet to define where the water comes in, an atmospheric layer to define where the atmosphere starts, and a slip wall for the other parts of the geometry.
Select “Velocity inlet” as the first boundary condition.
Assign a velocity for the fluid at the inlet in the x direction (\(U_x\)).
Assign a fluid for the inlet, in this case water will be assigned (“Value“= 1)
Assign the face for the inlet.
Next, a custom boundary condition will be defined for the atmosphere.
Select “Custom” from the boundary conditions list.
Define the velocity as “Pressure inlet-outlet“
Define the modified pressure as “Total Pressure“
Define the phase fraction as “Inlet-outlet“
Assign the inlet value as “0“
Assign the face for where this boundary condition will be, assign the top of the domain.
A no-slip wall boundary condition will be created for the other walls. This does not have to be manually set as SimScale automatically detects all
The tree item Numerics allows us the control the solving mechanism in detail, where default values are left as such for this case
The next important tree item is Simulation Control which allows to steer the overall simulation settings. For example, the end time of the simulation and the size of the template. In this tutorial, we will leave everything as it is.
For this tutorial, the default mesh settings will be modified so the simulation will produce reasonable results
A refinement for the domain will be defined by using a “Region refinement“.
In this simulation, the maximum edge length will be 0.05 m and will be assigned to the whole volume
Confirm the refinement
A geometry primitive will be defined for the volume. A cartesian box will be used as the geometry primitive.
Select the “Geometry primitives” under the mesh in the simulation tree and select “Cartesian box” as the geometry primitive.
Set the minimum and maximum values as in the picture below.
Confirm the operation
Go back to the main menu of the mesh settings and generate the mesh.
After the mesh operation has finished, the mesh immediately appears in the viewer and mesh elements that have been created
Now the simulation setup is complete and you’re ready to start your simulation. To begin the simulation, a simulation Run needs to be created. A simulation Run creates a snapshot of the current setup and tries to compute the results based on the snapshot settings.
To create a new Run, click “+” next to Simulation Runs. Name your simulation and click on “Start“.
Computation of the results can take up to a few hours. You’ll be informed via email once your simulation run is finished. Once finished, you’re ready to analyze the results.
Next we will visualize the results of the simulation we just completed
Click on the Post-process Results button to load the results on the viewer
For example, the distribution of the phases for each timestep can be visualized.
We can use further post-processing filters to generate a different visualization of the connecting rod according to the computed displacement field
A list of all the available filters can be seen on the left side.
In order to view the phases clearly, an isosurface on the domain can be enabled and this can be done by clicking the isosurface option in the post-processor and choosing the alpha.phase1 in the Iso scalar and the Map scalar box.
To visualize the flow correctly, the isovolume settings should be configured as such:
Min iso value: 0.5
Max iso value: 1
Iso scalar: alpha.phase1 [node]
Map scalar: Z velocity [node]
It should be considered that there are special values of the phase:
0.5 : free surface of water
0.1 – 1 : water
Congratulations! This concludes this multiphase flow tutorial.
Last updated: March 25th, 2020
Did you find this article helpful?
How can we do better?
We appreciate and value your feedback.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.