OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::momenta::GuoZhaoMomentum Struct Reference

#include <elements.h>

+ Collaboration diagram for olb::momenta::GuoZhaoMomentum:

Public Member Functions

template<typename TYPE , typename CELL , typename J , typename DESCRIPTOR = typename CELL::descriptor_t>
void compute (CELL &cell, J &j) any_platform
 
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void computeU (CELL &cell, U &u) any_platform
 
template<typename TYPE , typename CELL , typename U >
void define (CELL &cell, const U &u) any_platform
 
template<typename TYPE , typename CELL >
void initialize (CELL &cell) any_platform
 
template<typename TYPE , typename CELL , typename U >
void inverseShift (CELL &cell, U &u) any_platform
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

Definition at line 999 of file elements.h.

Member Function Documentation

◆ compute()

template<typename TYPE , typename CELL , typename J , typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::GuoZhaoMomentum::compute ( CELL & cell,
J & j )
inline

Definition at line 1002 of file elements.h.

1003 {
1005 }
static void computeJ(CELL &cell, J &j) any_platform
Computation of momentum.
Definition lbm.h:279

References olb::lbm< DESCRIPTOR >::computeJ().

+ Here is the call graph for this function:

◆ computeU()

template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::GuoZhaoMomentum::computeU ( CELL & cell,
U & u )
inline

Definition at line 1009 of file elements.h.

1010 {
1011 lbm<DESCRIPTOR>::computeU(cell, u);
1012
1013 const V epsilon = cell.template getField<descriptors::EPSILON>();
1014 const V nu = cell.template getField<descriptors::NU>();
1015 const V k = cell.template getField<descriptors::K>();
1016
1017 auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
1018
1019 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
1020 u[iDim] += 0.5*epsilon*bodyF[iDim];
1021 }
1022
1023 const V uMag = util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
1024 const V Fe = 0.;//1.75/util::sqrt(150.*util::pow(epsilon,3));
1025
1026 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
1027 const V c_1 = 0.5*epsilon*Fe/util::sqrt(k);
1028
1029 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
1030 u[iDim] /= (c_0 + util::sqrt(c_0*c_0 + c_1*uMag));
1031 }
1032 }
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

References olb::util::normSqr(), and olb::util::sqrt().

+ Here is the call graph for this function:

◆ define()

template<typename TYPE , typename CELL , typename U >
void olb::momenta::GuoZhaoMomentum::define ( CELL & cell,
const U & u )
inline

Definition at line 1036 of file elements.h.

1036{ }

◆ getName()

static std::string olb::momenta::GuoZhaoMomentum::getName ( )
inlinestatic

Definition at line 1044 of file elements.h.

1044 {
1045 return "GuoZhaoMomentum";
1046 }

◆ initialize()

template<typename TYPE , typename CELL >
void olb::momenta::GuoZhaoMomentum::initialize ( CELL & cell)
inline

Definition at line 1039 of file elements.h.

1039{ }

◆ inverseShift()

template<typename TYPE , typename CELL , typename U >
void olb::momenta::GuoZhaoMomentum::inverseShift ( CELL & cell,
U & u )
inline

Definition at line 1042 of file elements.h.

1042{};

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