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

#include <collisionLES.h>

+ Collaboration diagram for olb::collision::detail::ConStrainSmagorinskyEffectiveOmega< 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::ConStrainSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 121 of file collisionLES.h.

Member Typedef Documentation

◆ CollisionO

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

Definition at line 123 of file collisionLES.h.

◆ MomentaF

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

Definition at line 122 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::ConStrainSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 157 of file collisionLES.h.

157 {
158 parameters.template set<descriptors::OMEGA>(
159 computeEffectiveOmega(cell, parameters));
160 return CollisionO().apply(cell, parameters);
161 }
V computeEffectiveOmega(CELL &cell, PARAMETERS &parameters) any_platform
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO

References olb::collision::detail::ConStrainSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEffectiveOmega().

+ 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::ConStrainSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEffectiveOmega ( CELL & cell,
PARAMETERS & parameters )
inline

Turbulent realaxation time

Effective realaxation time

Definition at line 126 of file collisionLES.h.

126 {
128 MomentaF().computeStress(cell, pi);
129 V piNeqNormSqr { };
130 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
131 const V rho = MomentaF().computeRho(cell);
132 const V omega = parameters.template get<descriptors::OMEGA>();
133 const V smagorinsky = parameters.template get<collision::LES::Smagorinsky>();
134 V piNeqNorm = util::sqrt(2*piNeqNormSqr);
136 V cs2 = V{1} / descriptors::invCs2<V,DESCRIPTOR>();
137 V tauMol = V{1} / omega;
138 //Strain Tensor
139 V Phi = (-0.5*(-rho*tauMol*cs2+util::sqrt(rho*rho*tauMol*tauMol*cs2*cs2+V{2}*(smagorinsky*smagorinsky)*rho*piNeqNorm))/(smagorinsky*smagorinsky*rho*piNeqNorm));
140 for (int n=0; n < util::TensorVal<DESCRIPTOR>::n; ++n) {
141 S[n] = Phi*pi[n];
142 }
143 //Strain Tensor Norm
144 V SNormSqr = S[0]*S[0] + 2.0*S[1]*S[1] + S[2]*S[2];
145 if constexpr (util::TensorVal<DESCRIPTOR>::n == 6) {
146 SNormSqr += S[2]*S[2] + S[3]*S[3] + 2.0*S[4]*S[4] + S[5]*S[5];
147 }
148 V SNorm = util::sqrt(2*SNormSqr);
150 V tauTurb = smagorinsky*smagorinsky*SNorm/cs2;
152 V tauEff = tauMol + tauTurb;
153 return V{1} / tauEff;
154 }
platform_constant Fraction cs2
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
typename MOMENTA::template type< DESCRIPTOR > MomentaF
static constexpr int n
result stored in n
Definition util.h:211

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: