Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
SyntheticInflow Class Reference

Synthetic turbulence for one nscbc_inlet: the digital filter of Klein, Sadiki & Janicka (2003), with the inlet's Reynolds stress imposed by the Cholesky factor of Lund, Wu & Squires (1998) (docs/design/synthetic_inflow.md). More...

#include <synthetic_inflow.h>

Public Member Functions

 SyntheticInflow (const toml::value &boundary, const std::string &where, uint64_t stream, const Mesh &mesh, const std::vector< uint32_t > &faces, const std::vector< int32_t > &char_index)
 
void fill (double t, const Kokkos::View< rtype *[N_DIM]> &target)
 Write the target velocity (mean plus fluctuation) of the inlet's faces at time t into target(k).
 
std::string summary () const
 One-line description for the run log.
 
double time_spacing () const
 Time between filtered planes.
 
double convection_velocity () const
 Convection velocity of Taylor's hypothesis.
 
uint32_t plane (int64_t m)
 
void random_plane (int64_t m, uint32_t slot)
 
void time_filter (int64_t m, uint32_t slot)
 
void net_flux (uint32_t slot)
 

Detailed Description

Synthetic turbulence for one nscbc_inlet: the digital filter of Klein, Sadiki & Janicka (2003), with the inlet's Reynolds stress imposed by the Cholesky factor of Lund, Wu & Squires (1998) (docs/design/synthetic_inflow.md).

Unit-variance random numbers on an auxiliary uniform grid on the inlet plane (one plane per generator time step) are filtered with Gaussian kernels along the two transverse directions and in time, the third direction of Klein's filter by Taylor's hypothesis. Face centroids interpolate the filtered field (bilinear in space, linear in time), and the interpolated value is divided by its exact standard deviation, so that the fluctuation of every face has unit variance before the Cholesky factor scales it.

Random numbers come from a counter-based hash of (seed, inlet, component, grid point, plane): every plane is a function of its index alone, so the field at time t does not depend on the number of ranks, on the time steps taken before, or on a restart; the generator has no state to store.

Constructor & Destructor Documentation

◆ SyntheticInflow()

SyntheticInflow::SyntheticInflow ( const toml::value &  boundary,
const std::string &  where,
uint64_t  stream,
const Mesh &  mesh,
const std::vector< uint32_t > &  faces,
const std::vector< int32_t > &  char_index 
)
Parameters
boundaryThe [[boundaries]] entry (with its turbulence table).
whereIts name for messages.
streamRandom stream of the inlet (its index among the boundaries).
meshMesh.
facesThe inlet's faces on this rank.
char_indexIndex of each face into BoundaryData::char_*.

Member Function Documentation

◆ convection_velocity()

double SyntheticInflow::convection_velocity ( ) const
inline

Convection velocity of Taylor's hypothesis.

◆ fill()

void SyntheticInflow::fill ( double  t,
const Kokkos::View< rtype *[N_DIM]> &  target 
)

Write the target velocity (mean plus fluctuation) of the inlet's faces at time t into target(k).

◆ net_flux()

void SyntheticInflow::net_flux ( uint32_t  slot)

◆ plane()

uint32_t SyntheticInflow::plane ( int64_t  m)

◆ random_plane()

void SyntheticInflow::random_plane ( int64_t  m,
uint32_t  slot 
)

◆ summary()

std::string SyntheticInflow::summary ( ) const
inline

One-line description for the run log.

◆ time_filter()

void SyntheticInflow::time_filter ( int64_t  m,
uint32_t  slot 
)

◆ time_spacing()

double SyntheticInflow::time_spacing ( ) const
inline

Time between filtered planes.


The documentation for this class was generated from the following files: