OpenLB 1.7
Loading...
Searching...
No Matches
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<concepts::Cell CELL, concepts::Parameters PARAMETERS, typename V = typename CELL::value_t>
computeEffectiveOmega (CELL &cell, PARAMETERS &parameters) any_platform
 
template<concepts::Cell CELL, concepts::Parameters 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 247 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 249 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 248 of file collisionLES.h.

Member Function Documentation

◆ apply()

template<typename COLLISION , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<concepts::Cell CELL, concepts::Parameters 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 283 of file collisionLES.h.

283 {
284 parameters.template set<descriptors::OMEGA>(
285 computeEffectiveOmega(cell, parameters));
286 return CollisionO().apply(cell, parameters);
287 }
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<concepts::Cell CELL, concepts::Parameters 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 252 of file collisionLES.h.

252 {
254 MomentaF().computeStress(cell, pi);
255 V piNeqNormSqr { };
256 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
257 const V rho = MomentaF().computeRho(cell);
258 const V omega = parameters.template get<descriptors::OMEGA>();
259 const V smagorinsky = parameters.template get<collision::LES::SMAGORINSKY>();
260 V piNeqNorm = util::sqrt(2*piNeqNormSqr);
263 V tauMol = V{1} / omega;
264 //Strain Tensor
265 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));
266 for (int n=0; n < util::TensorVal<DESCRIPTOR>::n; ++n) {
267 S[n] = Phi*pi[n];
268 }
269 //Strain Tensor Norm
270 V SNormSqr = S[0]*S[0] + 2.0*S[1]*S[1] + S[2]*S[2];
271 if constexpr (util::TensorVal<DESCRIPTOR>::n == 6) {
272 SNormSqr += S[2]*S[2] + S[3]*S[3] + 2.0*S[4]*S[4] + S[5]*S[5];
273 }
274 V SNorm = util::sqrt(2*SNormSqr);
276 V tauTurb = smagorinsky*smagorinsky*SNorm/cs2;
278 V tauEff = tauMol + tauTurb;
279 return V{1} / tauEff;
280 }
platform_constant Fraction cs2
Definition functions.h:66
constexpr T invCs2() any_platform
Definition functions.h:107
Expr sqrt(Expr x)
Definition expr.cpp:199
typename MOMENTA::template type< DESCRIPTOR > MomentaF
static constexpr int n
result stored in n
Definition util.h:217

References olb::descriptors::invCs2(), and 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: