OpenLB 1.8.1
Loading...
Searching...
No Matches
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<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::ShearSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >

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

Definition at line 233 of file collisionLES.h.

233 {
234 parameters.template set<descriptors::OMEGA>(
235 computeEffectiveOmega(cell, parameters));
236 const auto iT = parameters.template get<descriptors::LATTICE_TIME>();
237 V piNeqNormSqr { };
238 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
239 V avShear = cell.template getField<descriptors::AV_SHEAR>();
240 avShear = (avShear*iT + util::sqrt(piNeqNormSqr)) / (iT+1);
241 cell.template setField<descriptors::AV_SHEAR>(avShear);
242 return CollisionO().apply(cell, parameters);
243 }
Expr sqrt(Expr x)
Definition expr.cpp:225
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<concepts::Cell CELL, concepts::Parameters 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 212 of file collisionLES.h.

212 {
213 V piNeqNormSqr { };
214 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
215 const V rho = MomentaF().computeRho(cell);
216 const auto iT = parameters.template get<descriptors::LATTICE_TIME>();
217 const V omega = parameters.template get<descriptors::OMEGA>();
218 const V smagorinsky = parameters.template get<collision::LES::SMAGORINSKY>();
219 V avShear = cell.template getField<descriptors::AV_SHEAR>();
220 V piNeqNorm = util::sqrt(piNeqNormSqr);
221 V preFactor = smagorinsky*smagorinsky
223 * 2 * util::sqrt(2);
224 avShear = (avShear*iT + piNeqNorm) / (iT+1);
225 V tauMol = V{1} / omega;
226 V piNeqNormSISM = piNeqNorm - avShear;
227 V tauTurb = V{0.5} * (util::sqrt(tauMol*tauMol+(preFactor*piNeqNormSISM/rho))-tauMol);
228 V tauEff = tauMol + tauTurb;
229 return V{1} / tauEff;
230 }
constexpr T invCs2() any_platform
Definition functions.h:107

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: