Sloshing – dynamic mesh & expert mode

Download mesh

Download simulation

Introduction

Simulations are being utilized for sloshing problems across various fields, including LNG carriers, offshore plants, automotive fuel tanks, and cargo tanks.

This is an example using multi-phase flow and dynamic mesh functions.

The mesh used in this example is the one provided by the OpenFoam tutorial. The linear vibration of the tank, expressed by the equation below, is implemented using the dynamic mesh function.

$x(t) = x_0 + A sin(\omega t )$

  • A : amplitude
  • $\omega$ : angular frequency

Start BaramFlow and load mesh

Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [Volume of Fluid] for [Multiphase Model].

Use the given polyMesh folder. In the menu, click [File]-[Load Mesh]-[OpenFOAM] and select the polyMesh folder.

General

Change Time to Transient.

Set Gravity as (0 0 -9.81).

Models

All use defaults.

Materials

Since this example is two phase flow, two fluids are required. You can add a fluid by pressing the (+) in the top right corner of the Material Configuration section. Add [water-liquid] and rename it to water.

  • water
    • density : 1000
    • viscosity : 0.001
  • air
    • density : 1.225
    • viscosity : 1.79e-5

Cell zone Conditions

In Cell Zone Conditions, there is region0. Double-click region0 to open the setting window. Specify air as the primary material and water as the secondary material.

Boundary Conditions

There is only one boundary surface called sloshingCylinder, and the conditions are set as follows.

  • Wall
  • Wall Motion : Moving wall – Mesh Motion

Dynamic Mesh

Select Moving Cell Zone in Motion Type.

Click Add Motion at the bottom.

Click Add Motion Function and select Linear Oscillation. Enter (2 0 0) for Amplitude and 0.159 for Frequency.

If nothing is selected in CellZones, it is defined as the movement of the entire domain.

Numerical Conditions

The numerical conditions are set as follows.

  • Use Momentum Predictor : Off
  • Under-Relaxation Factors : 1 for all
  • Max Iterations per Time Step : 1
  • Number of Correctors : 2

The rest all use the default values.

Monitor

Monitor the pressure at a point (-1.5 0 0) on the tank surface and the tank’s maximum pressure.

Select [Add] – [Point]. Enter the coordinates and select sloshingCylinder in ‘Snap onto Boundary’.

Select [Add] – [Surface]. Set the Report Type to Maximum. Under Surface, select sloshingCylinder.

Initialization

The initial conditions are entered as follows.

  • Velocity : (0 0 0)
  • Pressure : 0
  • Scale of Velocity : 1
  • Turbulent Intensity : 1
  • Turbulent Viscosity Ratio : 10
  • Volume Fraction, water : 0

Create a section to provide the initial conditions for water.

Click [Initialization] – [Advanced] – [Section] – [Create], then configure as follows.

  • Section Type : Hex
  • Min.point : (-2 -2 -2)
  • Max.point : (2 2 -0.3)
  • Volume Fraction, water : 1

Do not use the [Override Boundary Value] option.

[Advanced] – [Section] has been created, and clicking the eye icon allows you to display the section.

Click the [Initialize] button below.

Run Conditions / Run

Click [Parallel] – [Environment] in the menu and enter the desired number of cores.

[Run Conditions] are set as follows.

  • Time Stepping Method : Adaptive
  • Courant Number : 2
  • Courant Number for VoF : 2
  • End Time : 5
  • Save Interval : 0.05

Click the [File]-[Save] button on the menu to save.

Enable the ‘Run Solver Only’ option and click the [Start Calculation] button to begin the calculation.

Once the calculation begins, the monitoring graph is displayed as shown below.

Post-processing

Click the [External Tools] – [ParaView] button in the menu to launch ParaView.

If running a parallel calculation, change the [Case Type] to [Decomposed Case].

In [Mesh Regions], select InternalMesh and patch/sloshingCylinder.

Use [Clip] filter to crop out regions where the volume fraction is lower than 0.5. Deactivate [Invert] and change [Coloring] to U.

Select [Filters] – [Extract Block] from the menu and choose boundary-sloshingCylinder. Change [Coloring] to [Solid Color], and under [Backface styling], select [Cull Frontface] for the backface. This will remove the front face, resulting in the appearance shown in the figure below.

Press the [Play] icon to watch the video.