OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <collisionLES.h>

+ Collaboration diagram for olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using CollisionO = typename COLLISION::template type<DESCRIPTOR, MOMENTA, EQUILIBRIUM>
 

Public Member Functions

template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
computeEffectiveOmega (CELL &cell, PARAMETERS &parameters) any_platform
 
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Detailed Description

template<typename COLLISION, typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 81 of file collisionLES.h.

Member Typedef Documentation

◆ CollisionO

template<typename COLLISION , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::CollisionO = typename COLLISION::template type<DESCRIPTOR, MOMENTA, EQUILIBRIUM>

Definition at line 83 of file collisionLES.h.

◆ MomentaF

template<typename COLLISION , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 82 of file collisionLES.h.

Member Function Documentation

◆ apply()

template<typename COLLISION , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 107 of file collisionLES.h.

107 {
108 parameters.template set<descriptors::OMEGA>(
109 computeEffectiveOmega(cell, parameters));
110 const auto iT = parameters.template get<descriptors::LATTICE_TIME>();
111 V piNeqNormSqr { };
112 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
113 V avShear = cell.template getField<descriptors::AV_SHEAR>();
114 avShear = (avShear*iT + util::sqrt(piNeqNormSqr)) / (iT+1);
115 cell.template setField<descriptors::AV_SHEAR>(avShear);
116 return CollisionO().apply(cell, parameters);
117 }
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
typename MOMENTA::template type< DESCRIPTOR > MomentaF
V computeEffectiveOmega(CELL &cell, PARAMETERS &parameters) any_platform
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO

References olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEffectiveOmega(), and olb::util::sqrt().

+ Here is the call graph for this function:

◆ computeEffectiveOmega()

template<typename COLLISION , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
V olb::collision::detail::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEffectiveOmega ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 86 of file collisionLES.h.

86 {
87 V piNeqNormSqr { };
88 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
89 const V rho = MomentaF().computeRho(cell);
90 const auto iT = parameters.template get<descriptors::LATTICE_TIME>();
91 const V omega = parameters.template get<descriptors::OMEGA>();
92 const V smagorinsky = parameters.template get<collision::LES::Smagorinsky>();
93 V avShear = cell.template getField<descriptors::AV_SHEAR>();
94 V piNeqNorm = util::sqrt(piNeqNormSqr);
95 V preFactor = smagorinsky*smagorinsky
96 * descriptors::invCs2<V,DESCRIPTOR>()*descriptors::invCs2<V,DESCRIPTOR>()
97 * 2 * util::sqrt(2);
98 avShear = (avShear*iT + piNeqNorm) / (iT+1);
99 V tauMol = V{1} / omega;
100 V piNeqNormSISM = piNeqNorm - avShear;
101 V tauTurb = V{0.5} * (util::sqrt(tauMol*tauMol+(preFactor*piNeqNormSISM/rho))-tauMol);
102 V tauEff = tauMol + tauTurb;
103 return V{1} / tauEff;
104 }

References olb::util::sqrt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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