OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
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 758 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 761 of file elements.h.

762 {
764 }
static void computeJ(CELL &cell, J &j) any_platform
Computation of momentum.
Definition lbm.h:197

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 768 of file elements.h.

769 {
770 lbm<DESCRIPTOR>::computeU(cell, u);
771
772 const V epsilon = cell.template getField<descriptors::EPSILON>();
773 const V nu = cell.template getField<descriptors::NU>();
774 const V k = cell.template getField<descriptors::K>();
775
776 auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
777
778 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
779 u[iDim] += 0.5*epsilon*bodyF[iDim];
780 }
781
782 const V uMag = util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
783 const V Fe = 0.;//1.75/util::sqrt(150.*util::pow(epsilon,3));
784
785 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
786 const V c_1 = 0.5*epsilon*Fe/util::sqrt(k);
787
788 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
789 u[iDim] /= (c_0 + util::sqrt(c_0*c_0 + c_1*uMag));
790 }
791 }
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References 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 795 of file elements.h.

795{ }

◆ getName()

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

Definition at line 803 of file elements.h.

803 {
804 return "GuoZhaoMomentum";
805 }

◆ initialize()

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

Definition at line 798 of file elements.h.

798{ }

◆ inverseShift()

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

Definition at line 801 of file elements.h.

801{};

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