Simple Flow in a 3D Channel

Navigate: ← Test Case Channel 3D

Simple Flow in a Channel 3D

In this example, we will investigate the flow in a simple 3D channel. The objectives of this example are to introduce how to:

• Create a mesh with boundaries using Seeder.
• Post-process the mesh using sdr_harvester and visualize it with ParaView.
• Simulate the flow in the channel using Musubi.
• Validate the numerical results.
• Visualize the simulation results in ParavView.
• Create a 2D plot using the Gleaner tool. Gleaner is a Python tool which extracts data from Musubi ascii output and uses matplotlib in python library to create a plot.

Problem Description

The test case is based on the well-known paper: Schäfer, M. et al. (1996) ‘Benchmark Computations of Laminar Flow Around a Cylinder’, in Hirschel, E. H. (ed.) Flow Simulation with High-Performance Computers II: DFG Priority Research Programme Results 1993--1995. Wiesbaden: Vieweg+Teubner Verlag, pp. 547–566. doi: 10.1007/978-3-322-89849-4_39.

As we want to increase the complexity step by step, we start with the channel, but without the cylinder in it. The geometry configurations and the boundary conditions are depicted in the figure below.

The channel has a squared cross-section, where height and width are H = 0.41m. The length of the channel is L = 2.5m.

The fluid can be described as incompressible Newtonian fluid, with a kinematic viscosity of $\nu = 10^{−3} m^2/s$, where the fluid density is $\rho = 1.0 kg/m^3$.

The Reynolds number is defined as where, $\bar{U}$ - the mean velocity. The mean velocity can be computed with $\mathbf{\bar U} = 4 \mathbf{U}_{m} /9$ where, $\mathbf{U}_{m}$ - the maximum fluid velocity at the channel center axis.

The flow is induced by defining velocity at inlet and pressure at outlet of the channel. At the inlet (green in the figure above), a parabolic velocity inflow condition in x-direction is used: with $U_m = 0.45 \text{m/s}$ resulting in a mean velocity of $\bar{U} = 0.2 \text{m/s}$ and a Reynolds number (\ Re = 20 ). At the outlet (red in the figure above), the ambient pressure is prescribed with (\ p=0.0 ) . For all the other boundaries (north, south, top and bottom), wall boundary conditions are used.

For a better overview of the parameters used, one can use the printParams.lua. By running it with 'lua printParams.lua' one gets the following information:

-----------------------------------------------------------------------
Simulation name:    C3D_Simple
-----------------------------------------------------------------------
------Mesh parameters------
height       =  0.41
width        =  0.41
length       =  2.5
in length    =  391
length_bnd   =  3.28
level        =  9
-----Number of elements----
in height    =  64
in width     =  64
in length    =  391
--------Resolution---------
spatial    =    0.00640625
temporal   =    0.00036529878143171
-----------------------------------------------------------------------
------Flow parameters------
------In physical units----
Re                = 20
Vel. mean         = 0.45    [m/s]
Vel. max.         = 1.0125  [m/s]
Kinematic visc.   = 0.001   [m^s/2]
Density           = 1.0 [kg/m^3]
Press. ambient    = 0.0 [N/m^2]
Element size (dx) = 0.00640625  [m]
Time step (dt)    = 0.00036529878143171 [s]
------In lattice units-----
Vel.              = 0.057735026918963
Ma                = 0.1
Kinematic lattice visc. =   0.0089010339604062
Relaxation param. = 1.8986028303769
-----------------------------------------------------------------------


Post-Processing

Here are the results from the simulation.

Velocity along the height of the channel:

Pressure across the length of the channel:

To create these plots, run python plot_track.py to create the plots. Before running the plot script, open 'plot_track.py' and update path to Gleaner script in 'glrPath'. Download Gleaner script using hg clone https://hg.osdn.net/view/apes/gleaner.

Musubi was developed by University of Siegen