OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
olb::LESADECoupling< T > Struct Template Reference

LES-ADE coupling with Schmidt number stabilization. More...

#include <navierStokesAdvectionDiffusionCoupling.h>

+ Collaboration diagram for olb::LESADECoupling< T >:

Classes

struct  OMEGA_ADE
 
struct  OMEGA_NSE
 
struct  SCHMIDT
 
struct  SMAGORINSKY_PREFACTOR
 

Public Types

using parameters = meta::list<SMAGORINSKY_PREFACTOR, SCHMIDT, OMEGA_NSE, OMEGA_ADE>
 

Public Member Functions

template<typename CELLS , typename PARAMETERS >
void apply (CELLS &cells, PARAMETERS &parameters) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCellWithParameters
 

Detailed Description

template<typename T>
struct olb::LESADECoupling< T >

LES-ADE coupling with Schmidt number stabilization.

Definition at line 311 of file navierStokesAdvectionDiffusionCoupling.h.

Member Typedef Documentation

◆ parameters

template<typename T >
using olb::LESADECoupling< T >::parameters = meta::list<SMAGORINSKY_PREFACTOR, SCHMIDT, OMEGA_NSE, OMEGA_ADE>

Definition at line 319 of file navierStokesAdvectionDiffusionCoupling.h.

Member Function Documentation

◆ apply()

template<typename T >
template<typename CELLS , typename PARAMETERS >
void olb::LESADECoupling< T >::apply ( CELLS & cells,
PARAMETERS & parameters )
inline

Molecular realaxation time

Turbulent realaxation time

Definition at line 322 of file navierStokesAdvectionDiffusionCoupling.h.

323 {
324 using DESCRIPTOR = typename CELLS::template value_t<names::NavierStokes>::descriptor_t;
325 using DESCRIPTOR_ADE = typename CELLS::template value_t<names::Concentration0>::descriptor_t;
326 // Velocity coupling
327 auto u = cells.template get<names::Concentration0>().template getField<descriptors::VELOCITY>();
328 T rho, pi[util::TensorVal<DESCRIPTOR>::n] { };
329 cells.template get<names::NavierStokes>().computeAllMomenta(rho, u.data(), pi);
330 cells.template get<names::Concentration0>().template setField<descriptors::VELOCITY>(u);
331 // Stress tensor
332 T PiNeqNormSqr = pi[0]*pi[0] + 2.0*pi[1]*pi[1] + pi[2]*pi[2];
333 if constexpr (util::TensorVal<DESCRIPTOR>::n == 6) {
334 PiNeqNormSqr += pi[2]*pi[2] + pi[3]*pi[3] + 2*pi[4]*pi[4] +pi[5]*pi[5];
335 }
336 T PiNeqNorm = util::sqrt(PiNeqNormSqr);
338 T tau_mol_NS = T{1} / parameters.template get<OMEGA_NSE>();
339 T tau_mol_AD = T{1} / parameters.template get<OMEGA_ADE>();
341 T smagoPrefactor = parameters.template get<SMAGORINSKY_PREFACTOR>();
342 T tau_turb_NS = T{0.5}*(util::sqrt(tau_mol_NS*tau_mol_NS + smagoPrefactor/rho*PiNeqNorm) - tau_mol_NS);
343 // Schmidt number stabilization
344 T tauTurbADPrefactor = descriptors::invCs2<T,DESCRIPTOR_ADE>() / descriptors::invCs2<T,DESCRIPTOR>() / parameters.template get<SCHMIDT>();
345 T tau_turb_AD = tau_turb_NS * tauTurbADPrefactor;
346 cells.template get<names::Concentration0>().template setField<descriptors::OMEGA>(T{1} / (tau_mol_AD + tau_turb_AD));
347 }
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
meta::list< SMAGORINSKY_PREFACTOR, SCHMIDT, OMEGA_NSE, OMEGA_ADE > parameters
static constexpr int n
result stored in n
Definition util.h:211

References olb::util::sqrt().

+ Here is the call graph for this function:

Member Data Documentation

◆ scope

template<typename T >
constexpr OperatorScope olb::LESADECoupling< T >::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 312 of file navierStokesAdvectionDiffusionCoupling.h.


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