MAIA bb96820c
Multiphysics at AIA
|
In this tutorial you will learn how to create a structured body-fitted grids for the simple geometry of the flat plate, which are provided to the MAIA solver in the next tutorials of this series. For that purpose, you will create two grids, i.e., a two-dimensional grid for a Reynolds-Averaged-Navier-Stokes simulation (2D RANS) and a three-dimensional grid for a Large Eddy Simulation (LES) to approximately solve the Navier-Stokes equations with a structured finite volume solver. For more details about the numerical methods, please refer to the following sections on the structured grid and the structured finite volume solver.
In the following tutorials, the zero-pressure gradient (ZPG) turbulent boundary layer flow over a wall actuated by a sinusoidal wave motion is analyzed in a Cartesian domain with the x-axis in the main flow direction, the y-axis in the wall-normal direction, and the z-axis in the spanwise direction. All lengths are non-dimensionalized by the momentum thickness of the boundary layer at \( x_0 = 0 \) such that \( \theta (x_0 = 0) = 1 \). The momentum thickness based Reynolds number is \( \mathrm{Re}_{\theta} = u_{\infty} \theta / \nu = 1,000 \) at \( x_0 \). The Mach number is \( \mathrm{M} = u_{\infty} / a_{\infty} = 0.1 \), i.e., the flow is nearly incompressible. Starting with the reference resp. unactuated case, the setup is sketched as follows, where BC stands for boundary condition:
At the end of this series of tutorials the wall is actuated by spanwise traveling transversal surface waves to reduce the friction drag. Note that unlike standard ZPG turbulent boundary layer flow, the actuated flow is statistically three-dimensional due to the wave propagating in the \( z \)-direction. More information about the numerical setup and methods can be found in this paper [Albers2020].
Download and unzip this tutorial here and change the directory to the grid generation folder 1_grid
.
Create symbolic links to the compiled MAIA executable (if not already, please refer to the setup tutorial) and to the Python files which are needed to create/make, visualize the grid and to reset/clear the tutorial for the next test run. The last mentioned files are located one level up in the tools
folder.
Test if MAIA is correctly linked by opening MAIA's help:
Open and have a look at the properties_grid.toml
file, which contains the settings used for creating the structured grid.
Porperty | Explanation |
---|---|
ma | Mach number \( \mathrm{M} = u_{\infty} / a_{\infty} \) with the free stream velocity \( u_{\infty} \) and the speed of sound of the free stream \( a_{\infty} \) |
re_theta | momentum thickness based Reynolds number \( \mathrm{Re}_{\theta} = u_{\infty} \theta / \nu \) at \( x_0 \) |
les_grid_name | Name for the 3D LES grid to be generated and saved |
rans_grid_name | Name for the 2D RANS grid to be generated and saved |
les | Boolean if to create a grid for LES |
rans | Boolean if to create a grid for RANS |
les_inflow_bc | LES inflow boundary condition, 7909 for the synthetic turbulence generation (STG) method. At the initial startup a restart file with a RANS velocity profile and \nu_t profile needs to be provided. The methods computes a given number of synthetic eddies and induces their fluctuations to the mean flow, thus creating turbulent boundary layer flow. Not necessarily needed for make_grid.py . |
les_wall_bc | LES wall boundary condition, 1000 for no-slip wall |
rans_wall_bc | RANS wall boundary condition, 1000 for no-slip wall |
les_outflow_bc | LES outlfow boundary condition, 2004 for subsonic outflow |
rans_outflow_bc | RANS outlfow boundary condition, 2004 for subsonic outflow |
x_start_rans | Streamwise starting point of the domain of the RANS |
x_start | Streamwise starting point of the domain of the LES, i.e., \( x_0 = 0 \) |
y_wall | Wall location, i.e., \( y = 0 \) |
lx_rans | Streamwise domain size of the RANS |
lx | Streamwise domain size of the LES |
lx_fringe_start | Streamwise starting point of the region in which the streamwise grid resolution is coarsened towards the outlfow |
lx_fringe_growth | Growth factor, like 1.05 for \( 5 \% \), of the region in which the streamwise grid resolution is coarsened towards the outlfow |
ly | Wall-normal domain size |
lz_plus | Spanwise domain size in inner units |
dx_plus | Streamwise grid resolution in inner units |
dy_plus_wall | Wall-normal grid resolution at the wall in inner units |
dy_plus_edge | Wall-normal grid resolution at the edge (distant from the wall) in inner units |
dz_plus | Spanwise grid resolution in inner units |
rans_stretch | Stretch factor of the streamwise resolution of the RANS grid in comparison to the LES grid, i.e., dx_rans = rans_stretch * dx_les |
bl_edge | Number of boundary layer edge points |
wall_normal_method | NOT USED RIGHT NOW IN THE TUTORIAL in make_grid.py : Method number of how to construct the wall normal points, i.e., 1,2,3 , where 3 is the method described in the paper [Albers2020] |
_plus
in the code. For more information, please refer to the "law of the wall".
Create the grids used for the next tutorials by running the make_grid.py
file and using the settings defined in the properties_grid.toml
file.
When running make_grid.py
with properties_grid.toml
the following is printed to the console:
clear_grid.py
file. This step is required since make_grid.py
can not overwrite existing grid files. clear_grid.py
the following is printed to the console:
Have a closer look at the grids by running the post_grid.py
file:
The created 2D RANS grid should look like this:
The x-y-slice of the created 3D LES grid should look like this:
As can be seen in the plots above, the grid (mesh) becomes finer near the wall ( \( y = 0 \)) than distant from the wall ( \( y > 0 \)).
Moreover, some important information and properties are also printed to the console:
Alternatively you can open the hdf5 grid files with HDFView and have a closer look at the data structure used in the hdf5-files.
When opened with HDFView, the created 2D RANS grid should look like this:
When opened with HDFView, the x-y-slice of the created 3D LES grid should look like this:
Change some properties in the properties_grid.toml
file, such as modifying the domain size using lx, ly
or coarsening the grid resolution using dx_plus, dy_plus_wall, dy_plus_edge
or using lx_fringe_growth = 1.05
, and rerun steps 3 to 5 and have a look how the changed settings affect the created grids. Tip: Clear the previously created grids by running clear_grid.py
and deleting them manually.