OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::collision::detail::IncompressibleSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <collisionLES.h>

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

Definition at line 92 of file collisionLES.h.

Member Typedef Documentation

◆ CollisionO

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

Definition at line 94 of file collisionLES.h.

◆ MomentaF

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

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

Definition at line 123 of file collisionLES.h.

123 {
124 parameters.template set<descriptors::OMEGA>(
125 computeEffectiveOmega(cell, parameters));
126 return CollisionO().apply(cell, parameters);
127 }
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
V computeEffectiveOmega(CELL &cell, PARAMETERS &parameters) any_platform

References olb::collision::detail::IncompressibleSmagorinskyEffectiveOmega< 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::IncompressibleSmagorinskyEffectiveOmega< COLLISION, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEffectiveOmega ( CELL & cell,
PARAMETERS & parameters )
inline

Molecular realaxation time

Turbulent realaxation time

Effective realaxation time

Definition at line 97 of file collisionLES.h.

97 {
98 V piNeqNormSqr { };
99 MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
100 V u[DESCRIPTOR::d];
101 MomentaF().computeU(cell, u);
102 //const V rho = MomentaF().computeRho(cell);
103 const V rho = cell.template getField<descriptors::RHO>();
104 const auto nablaRho = cell.template getField<descriptors::NABLARHO>();
105 V nablaRhoSqr = util::normSqr<V,DESCRIPTOR::d>(nablaRho);
106 V nablaRhoU = nablaRho[0]*u[0]+nablaRho[1]*u[1];
107 const V omega = parameters.template get<descriptors::OMEGA>();
108 const V smagorinsky = parameters.template get<collision::LES::SMAGORINSKY>();
109 V piNeqNorm = util::sqrt(piNeqNormSqr);
110 V preFactor = smagorinsky*smagorinsky
112 * 2 * util::sqrt(2);
114 V tauMol = V{1} / omega;
116 V tauTurb = V{0.5} * (util::sqrt(tauMol*tauMol + preFactor / rho * piNeqNorm) - tauMol);
118 V tauEff = tauMol + tauTurb;
119 return V{1} / tauEff;
120 }
constexpr T invCs2() any_platform
Definition functions.h:107
Expr sqrt(Expr x)
Definition expr.cpp:225
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
Definition util.h:145
typename MOMENTA::template type< DESCRIPTOR > MomentaF

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