Template Numerical Library version\ main:4e58ea6
Loading...
Searching...
No Matches
TNL::CFD::TurbulenceGenerator< Real, Device, Index > Struct Template Reference

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>

Collaboration diagram for TNL::CFD::TurbulenceGenerator< Real, Device, Index >:

Public Types

using Array1D = TNL::Containers::Array< Real, Device, Index >
 
using Array3D
 
using Array4D
 
enum class  TimeCorrelationMethod { none , initialNone , initialZero , initialWraparound }
 
using txyz_overlaps = TNL::Containers::StaticSizesHolder< Index, 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 = TNL::Containers::StaticSizesHolder< Index, 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, Array4DgetFluctuations (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
 

Detailed Description

template<typename Real, typename Device, typename Index>
struct TNL::CFD::TurbulenceGenerator< Real, Device, Index >

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

Member Typedef Documentation

◆ Array3D

template<typename Real , typename Device , typename Index >
using TNL::CFD::TurbulenceGenerator< Real, Device, Index >::Array3D
Initial value:
xyz_permutation,
Device,
Index,
xyz_overlaps >
Dynamic N-dimensional array.
Definition NDArray.h:569
Holds static and dynamic sizes of an N-dimensional array.
Definition SizesHolder.h:30

◆ Array4D

template<typename Real , typename Device , typename Index >
using TNL::CFD::TurbulenceGenerator< Real, Device, Index >::Array4D
Initial value:
txyz_permutation,
Device,
Index,
txyz_overlaps >

The documentation for this struct was generated from the following file: