The OpenFOAM (seems to) uses a Passot-Pouquet spectrum.
-
$E_a$ will influence the scale of velocity, but not the distribution. -
$k_0$ is the characteristic wave number. Adjust$k_0$ will change the scale of the turbulence. - The Reynolds number
$Re = \frac{ul}{\nu}$ . Adjust$E_a$ will allow you to adjust the velocity. Adjusting$k_0$ will affect the integral length scale. The dynamic viscosity is a property of the fluid itself.
The integral length
It is evident that
To make the calculation of
python integralLength.py <k0value>
Please note that an integral to positive infinity might not be numerically stable, to specify a upper limit, try
python integralLength.py <k0value> <upperLimit>
Generate a initial turbulent velocity field with in a domain larger than your target domain. And map the velocity back to your target domain!
OpenFOAM does not provide a 2D initial turbulence generator. But we can easily implement one.
I offered one, modified from "boxTurb". The velocity in the
To compile it, go to the boxTurb2D folder and run
wmake
Run
boxTurb2D
to generate the 2D background turbulence.
A 2D geometry is required.
Configure
See the box2d case for more information.
OpenFOAM provides a built-in 3D initial turbulence generator. See the test case. Run
boxTurb
to generate the 3D background turbulence.
Configure
See the box3d case for more infomation.
- The domain to generate the turbulence should be a box.
- The number of cells in each direction should be
$2^n$ , for$n \in \mathbb{N}$ .
The spectrum is implemented in https://cpp.openfoam.org/v10/Ek_8H_source.html.
The generator is implemented in https://cpp.openfoam.org/v10/turbGen_8C_source.html.
Please note that K is a mesh with wave number information.