-
Notifications
You must be signed in to change notification settings - Fork 61
Example 7 : Periodic Hills
This example shows the 3D Periodic Hills using Lethe. This example is a benchmark case for computing separated flow. More details about the 2D case : https://kbwiki.ercoftac.org/w/index.php?title=UFR_3-30_Description
- bc = 0 : Periodic boundary with bc = 1
- bc = 2 : No slip
- bc = 3 : No slip
- bc = 4 : Periodic boundary with bc = 5
The boundary conditions for this benchmark are periodic for x and z directions and no slip for y direction. Boundary conditions for y direction may be a function if a wall law is used instead of no slip. The solver used is "gls_navier_stokes_3d".
# --------------------------------------------------
# Boundary Conditions
#---------------------------------------------------
subsection boundary conditions
set number = 4
subsection bc 0
set type = periodic
set id = 0
set periodic_id = 1
set periodic_direction = 0
end
subsection bc 2
set id = 2
set type = noslip
end
subsection bc 3
set id = 3
set type = noslip
end
subsection bc 4
set type = periodic
set id = 4
set periodic_id = 5
set periodic_direction = 2
end
end
The standard geometry is included in the Lethe code with 6 polynomials designing the curve of the hill. The type
parameter has to be set to periodic_hills
and the 5 following parameters in the grid argument
parameter of the subsection have to be adjusted.
- Spacing y lines : The periodic hill grid is generated with equally spaced horizontal lines or with gradually spaced line which means more lines near upper and lower walls. This parameter may be set in the range from 0 to 1, with 0 meaning equally spaced lines and 1 the maximum of shifting lines.
- alpha : While the geometry of the benchmark is fixed, it can be elongated to compare the behaviour of the flow with the slope. Actually, this parameter elongates the slopes of the geometry and the flat region has the same length. This parameter should be set in the range from 0.5 to 3, meaning 1 has no effect on the geometry.
- repetitions x, repetitions y and repetitions z : To get cells with an aspect ratio different on the domain, different number of subdivisions are set, given by repetition in different coordinate directions. The minimum number of subdivisions in each direction is 1.
grid argument
= spacing y lines; alpha; repetitions x; repetitions y; repetitions z
#---------------------------------------------------
# Mesh
#---------------------------------------------------
subsection mesh
set type = periodic_hills
set initial refinement = 3
set grid arguments = 1;1;3;3;1
end
Since the flow is periodic and a specific Reynolds number is targeted for the simulation, the flow has to be controlled at each time step. To allow flow control, the subsection flow control
has to be enabled. The volumetric flow rate has to be negative if the flow goes in x positive direction. See the section "Understanding the Parameter file" of this wiki to have more details on the parameters.
- Tip for the initial beta : it's a good method to test 2 or 3 different initial beta parameters, write down the given flow rate at the first time step in the simulation and do a regression. The correlation is pretty linear and having a proper beta speed up the convergence. In this case, the Reynolds number is 5600 with the height of the hill and the bulkv
#---------------------------------------------------
# Flow control
#---------------------------------------------------
subsection flow control
set enable = true
set boundary id = 0
set flow direction = 0
set volumetric flow rate = -1
set initial beta = 0.833
set verbosity = verbose
end
#---------------------------------------------------
# Physical Properties
#---------------------------------------------------
subsection physical properties
set kinematic viscosity = 1.95E-05 # Re = 5600
end
This example is run using Q2-Q2 elements to demonstrate the underlying high-order mesh for the periodic hills. Therefore, in the FEM subsection, Qmapping all
has to be set to true, velocity order
to 2 and pressure order
to 2 as well.
#---------------------------------------------------
# FEM
#---------------------------------------------------
subsection FEM
set velocity order = 2
set pressure order = 2
set qmapping all = true
end
Prior to have time-averaged velocities and pressure and reynolds stresses, calculate average velocities
is enable and the outcome is display in the visualization software. initial time
must be a time when the flow is stable. In this example, the time is random because of the short total time of the simulation.
#---------------------------------------------------
# Post-Processing
#---------------------------------------------------
subsection post-processing
set calculate average velocities = true
set initial time = 4
end
Grid of this example :
As seen, horizontal lines are shifted with the associated parameter to get more lines near walls. Here, repetitions for x, y, z allow to get more cells in x and y directions since ratio is 3:3:1.
Results for average velocities from t = 4 to t = 5 (<u> and <v>) :
Results for Reynolds stresses from t = 4 to t = 5 (normal <u'u'> and shear <u'v'>) :
Because of the short simulation time, it is not possible to observe the specific aspects of this flow which is the recirculation at the crest, however, after 5 seconds some Reynolds stresses are noticeable on the left slope.