Template Numerical Library version\ main:481315e2
|
Synthetic turbulence generator based on the code from [1, 2]. Usable for initial as well as inlet boundary conditions. More...
#include <TNL/CFD/TurbulenceGenerator.h>
Public Types | |
using | Array1D = TNL::Containers::Array< Real, Device, Index > |
using | Array3D = TNL::Containers::NDArray< Real, TNL::Containers::SizesHolder< Index, 0, 0, 0 >, xyz_permutation, Device, Index, xyz_overlaps > |
using | Array4D = TNL::Containers::NDArray< Real, TNL::Containers::SizesHolder< Index, 0, 0, 0, 0 >, txyz_permutation, Device, Index, txyz_overlaps > |
enum class | TimeCorrelationMethod { none , initialNone , initialZero , initialWraparound } |
using | txyz_overlaps = std::index_sequence< 0, 0, 0, 0 > |
using | txyz_permutation = std::index_sequence< 0, 3, 2, 1 > |
using | Vector = TNL::Containers::Vector< Real, Device, unsigned > |
using | xyz_overlaps = std::index_sequence< 0, 0, 0 > |
using | xyz_permutation = std::index_sequence< 2, 1, 0 > |
Public Member Functions | |
TurbulenceGenerator (unsigned seed=std::random_device()()) | |
template<typename Array1 , typename Array2 , typename Array3 > | |
void | generateFluctuations (Array1 &u, Array2 &v, Array3 &w, const Array1D &xc, const Array1D &yc, const Array1D &zc, Real minSpaceStep, Real timeStep, Real timeScale, TimeCorrelationMethod timeCorrelation=TimeCorrelationMethod::none) |
std::tuple< Array4D, Array4D, Array4D > | getFluctuations (const Array1D &xc, const Array1D &yc, const Array1D &zc, Real minSpaceStep, unsigned ntimes=1, Real timeStep=1, Real timeScale=1, TimeCorrelationMethod timeCorrelation=TimeCorrelationMethod::none) |
Public Attributes | |
Real | kineticEnergy = 1e-2 |
Real | lengthScale = 0.1 * 0.1 |
unsigned | nmodes = 3000 |
std::mt19937 | rng |
Real | smallestWaveNumberFactor = 5 |
Real | viscosity = 1.5e-5 |
Static Public Attributes | |
static constexpr Real | c_E = 1.452762113 |
Synthetic turbulence generator based on the code from [1, 2]. Usable for initial as well as inlet boundary conditions.
[1] http://www.tfd.chalmers.se/~lada/projects/inlet-boundary-conditions/proright.html [2] Lars Davidson - Fluid mechanics, turbulent flow and turbulence modeling http://www.tfd.chalmers.se/~lada/postscript_files/solids-and-fluids_turbulent-flow_turbulence-modelling.pdf