|
Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website |
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) |
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.
| 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 | ||
| ) |
| boundary | The [[boundaries]] entry (with its turbulence table). |
| where | Its name for messages. |
| stream | Random stream of the inlet (its index among the boundaries). |
| mesh | Mesh. |
| faces | The inlet's faces on this rank. |
| char_index | Index of each face into BoundaryData::char_*. |
|
inline |
Convection velocity of Taylor's hypothesis.
Write the target velocity (mean plus fluctuation) of the inlet's faces at time t into target(k).
|
inline |
One-line description for the run log.
|
inline |
Time between filtered planes.