Boundary Conditions#
The boundary conditions (BCs) must be configured in order to run a simulation. The computational domain is a parallelepiped as illustrated below:

Computational domain#
The BCs are defined for each plane in the models.BC
field.
The example below, shows a basic wind tunnel setup with a uniform inlet inflow:
models:
BC:
periodic_dims: [false, true, false]
BC_map:
- pos: W
BC: UniformFlow
wall_normal: W
rho: 1.0
ux: 0.05
uy: 0
uz: 0
order: 2
- pos: E
BC: RegularizedNeumannOutlet
rho: 1.0
wall_normal: E
order: 2
- pos: F
BC: Neumann
wall_normal: F
order: 1
- pos: B
BC: RegularizedHWBB
wall_normal: B
order: 1
If periodicity is set true for a certain direction, it does not require definition of a BC. The order determines which BC will overwrite the other at edges and corners of computational domain.
Important
It’s recommended to execute the lateral boundaries first, then top/floor, and inlet/outlet.
It’s also possible to define a BC for edges as shown below:
models:
BC:
BC_map:
- pos: NW
BC: Neumann
wall_normal: W
order: 3
The wall_normal
determines the offset direction to perform certain BCs and can only be defined for the domain face boundaries.
Turbulent inflow#
In many simulations it’s desired to use a turbulent inflow.
To do this, the synthetic eddy method (SEM) is used.
The use of SEM is limited to the W
boundary, and a simulation set to use SEM as inlet will have the following aspect:
models:
BC:
periodic_dims: [false, false, false]
BC_map:
- pos: E
BC: RegularizedNeumannOutlet
rho: 1.0
wall_normal: E
order: 2
- pos: F
BC: Neumann
wall_normal: F
order: 1
- pos: B
BC: RegularizedHWBB
wall_normal: B
order: 1
- pos: N
BC: Neumann
wall_normal: N
order: 0
- pos: S
BC: Neumann
wall_normal: S
order: 0
SEM:
eddies:
lengthscale: {x: 14, y: 14, z: 14}
eddies_vol_density: 10
seed_rand: 0
domain_limits_yz:
start: [-14, -14]
end: [174, 78]
profile:
csv_profile_data: "../SEM/vprofile.csv"
z_offset: 3.6
K: 1
csv_y_height: "../SEM/y_heights.csv"
length_mul: 1
vel_mul: 1
The .csv
file for profile.csv_profile_data
describe the velocity profile and its stress tensor.
It must contain the headers: z,ux,Rxx,Ryy,Rzz,Rxz,Rxy,Ryz
z
: Height for given valuesux
: Average velocity for the given heightRxx,Ryy,Rzz,Rxz,Rxy,Ryz
: Reynolds stress tensor for given height
Note
The values in between are found using linear interpolation, or constant extrapolation for values higher or lower than z
max, min.
Density of eddies is given by eddies_vol_density
, which is the density of eddies by volume, so for 10 it means that every SEM domain node will have 10 eddies affecting it in average.
The randomization of eddies generation can be controlled using the seed_rand
, so when using the same seed_rand
and other configurations the same series of eddies are generated (making it possible to reproduce the same inlet multiple times).
The height of velocity profile can be adjusted with profile.z_offset
.
Also, if a variable height in y direction is desired \(z(y)\), a csv file with the height profile can be provided in profile.csv_y_height
.
The .csv
for csv_y_height
must contain the headers y,z_height
.
Note
Examples can be found in nassu/fixture/SEM/
folder.
Important
For more details check the models documentation.