OpenLB 1.7
|
Implementation of the MRT collision step with stochastic relaxation based on " A stochastic subgrid model with application to turbulent flow and scalar mixing"; Phys. More...
#include <stochasticSGSdynamics.h>
Public Types | |
template<typename M > | |
using | exchange_momenta = StochasticSGSdynamics<T,DESCRIPTOR,M> |
Public Types inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
using | MomentaF = typename COMBINATION_RULE::template combined_momenta<DESCRIPTOR,MOMENTA> |
using | EquilibriumF = typename COMBINATION_RULE::template combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM> |
using | CollisionO = typename COMBINATION_RULE::template combined_collision<DESCRIPTOR,MOMENTA,EQUILIBRIUM,COLLISION> |
using | parameters = typename COMBINATION_RULE::template combined_parameters<DESCRIPTOR,MOMENTA,EQUILIBRIUM,COLLISION> |
template<typename NEW_MOMENTA > | |
using | exchange_momenta |
template<typename NEW_RULE > | |
using | exchange_combination_rule |
template<template< typename > typename WRAPPER> | |
using | wrap_collision |
Public Types inherited from olb::Dynamics< T, DESCRIPTOR > | |
using | value_t = T |
using | descriptor_t = DESCRIPTOR |
Public Member Functions | |
StochasticSGSdynamics (T omega_, T turbulenceInt_, T charU_, T smagoConst_, T dx_=1, T dt_=1) | |
Constructor. | |
virtual CellStatistic< T > | collide (Cell< T, DESCRIPTOR > &cell, LatticeStatistics< T > &statistics_) |
virtual void | setOmega (T omega_) |
Set local relaxation parameter of the dynamics. | |
virtual T | getSmagorinskyOmega (Cell< T, DESCRIPTOR > &cell_, T X_lang_n_) |
Get local smagorinsky relaxation parameter of the dynamics. | |
virtual T | getRandBMTrans (Cell< T, DESCRIPTOR > &cell_, T turbulenceInt_, T charU_) |
Get local Random number of BoxMüllertransform -> returns randBM. | |
virtual T | getRandomWalk (Cell< T, DESCRIPTOR > &cell_, T drift_, T result_) |
Get local Random number of BoxMüllertransform -> returns randBM. | |
Public Member Functions inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
std::type_index | id () override |
Expose unique type-identifier for RTTI. | |
std::string | getName () const override |
Return human-readable name. | |
template<typename FIELD > | |
constexpr bool | hasParameter () const |
Return true iff FIELD is a parameter. | |
AbstractParameters< T, DESCRIPTOR > & | getParameters (BlockLattice< T, DESCRIPTOR > &block) override |
Interim workaround for accessing dynamics parameters in legacy post processors. | |
void | initialize (Cell< T, DESCRIPTOR > &cell) override |
Initialize MOMENTA-specific data for cell. | |
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t> | |
CellStatistic< V > | apply (CELL &cell, PARAMETERS ¶meters) any_platform |
Apply purely-local collision step to a generic CELL. | |
T | computeEquilibrium (int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform |
Return iPop equilibrium for given first and second momenta. | |
T | computeRho (ConstCell< T, DESCRIPTOR > &cell) const override |
Compute particle density. | |
void | computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override |
Compute fluid velocity. | |
void | computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const override |
Compute fluid momentum. | |
void | computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override |
Compute stress tensor. | |
void | computeRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override |
Compute fluid velocity and particle density. | |
void | computeAllMomenta (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override |
Compute all momenta up to second order. | |
void | defineRho (Cell< T, DESCRIPTOR > &cell, T rho) override |
Set particle density. | |
void | defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d]) override |
Set fluid velocity. | |
void | defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) override |
Define fluid velocity and particle density. | |
void | defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) override |
Define all momenta up to second order. | |
void | inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override |
Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU. | |
Public Member Functions inherited from olb::Dynamics< T, DESCRIPTOR > | |
virtual | ~Dynamics () any_platform |
virtual CellStatistic< T > | collide (Cell< T, DESCRIPTOR > &cell) |
Perform purely-local collision step on Cell interface (legacy, to be deprecated) | |
void | iniEquilibrium (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) |
Initialize to equilibrium distribution. | |
void | iniRegularized (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) |
Initialize cell to equilibrium and non-equilibrum part. | |
Additional Inherited Members | |
Static Public Attributes inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
static constexpr bool | is_vectorizable = is_vectorizable_v<CollisionO> |
Implementation of the MRT collision step with stochastic relaxation based on " A stochastic subgrid model with application to turbulent flow and scalar mixing"; Phys.
of Fluids 19; 2007
Definition at line 39 of file stochasticSGSdynamics.h.
using olb::StochasticSGSdynamics< T, DESCRIPTOR, MOMENTA >::exchange_momenta = StochasticSGSdynamics<T,DESCRIPTOR,M> |
Definition at line 42 of file stochasticSGSdynamics.h.
olb::StochasticSGSdynamics< T, DESCRIPTOR, MOMENTA >::StochasticSGSdynamics | ( | T | omega_, |
T | turbulenceInt_, | ||
T | charU_, | ||
T | smagoConst_, | ||
T | dx_ = 1, | ||
T | dt_ = 1 ) |
Constructor.
Implementation of the Stochastic relaxation based on " A stochastic subgrid model with application to turbulent flow and scalar mixing"; Phys.
of Fluids 19; 2007
vs2_ | speed of sound |
momenta_ | a Momenta object to know how to compute velocity momenta |
momenta_ | a Momenta object to know how to compute velocity momenta |
Definition at line 60 of file stochasticSGSdynamics.hh.
|
virtual |
Definition at line 103 of file stochasticSGSdynamics.hh.
References olb::LatticeStatistics< T >::incrementStats(), and olb::mrt< DESCRIPTOR >::mrtSGSCollision().
|
virtual |
Get local Random number of BoxMüllertransform -> returns randBM.
Random number generator based on Box Müller transform to produuce random normal distributed numbers with zero mean and
Definition at line 170 of file stochasticSGSdynamics.hh.
References olb::util::log(), olb::util::nearZero(), and olb::util::sqrt().
|
virtual |
Get local Random number of BoxMüllertransform -> returns randBM.
Create Random walk.
initialisation of model standard variation, see Pope pp 484
Definition at line 209 of file stochasticSGSdynamics.hh.
References olb::util::sqrt().
|
virtual |
Get local smagorinsky relaxation parameter of the dynamics.
Definition at line 159 of file stochasticSGSdynamics.hh.
|
virtual |
Set local relaxation parameter of the dynamics.
Definition at line 152 of file stochasticSGSdynamics.hh.