OpenLB 1.7
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
olb::guoZhao::guoZhao_lbm< DESCRIPTOR > Struct Template Reference

#include <guoZhaoDynamics.h>

+ Collaboration diagram for olb::guoZhao::guoZhao_lbm< DESCRIPTOR >:

Static Public Member Functions

template<typename CELL , typename RHO , typename U , typename OMEGA , typename EPSILON , typename K , typename NU , typename FORCE , typename V = typename CELL::value_t>
static void addExternalForce (CELL &cell, const RHO &rho, const U &u, const OMEGA &omega, const EPSILON &epsilon, const K &k, const NU &nu, const FORCE &force) any_platform
 Add a force term after BGK collision.
 
template<typename CELL , typename U , typename EPSILON , typename K , typename NU , typename FORCE , typename BODY_F , typename V = typename CELL::value_t>
static void updateExternalForce (CELL &cell, const U &u, const EPSILON &epsilon, const K &k, const NU &nu, FORCE &force, BODY_F &bodyF) any_platform
 Updates the force terms with the reaction from the porous matrix, before applying it.
 

Detailed Description

template<typename DESCRIPTOR>
struct olb::guoZhao::guoZhao_lbm< DESCRIPTOR >

Definition at line 75 of file guoZhaoDynamics.h.

Member Function Documentation

◆ addExternalForce()

template<typename DESCRIPTOR >
template<typename CELL , typename RHO , typename U , typename OMEGA , typename EPSILON , typename K , typename NU , typename FORCE , typename V = typename CELL::value_t>
static void olb::guoZhao::guoZhao_lbm< DESCRIPTOR >::addExternalForce ( CELL & cell,
const RHO & rho,
const U & u,
const OMEGA & omega,
const EPSILON & epsilon,
const K & k,
const NU & nu,
const FORCE & force )
inlinestatic

Add a force term after BGK collision.

Definition at line 78 of file guoZhaoDynamics.h.

79 {
80 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
81 V c_u = V();
82 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
83 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
84 }
85 c_u *= descriptors::invCs2<V,DESCRIPTOR>()*descriptors::invCs2<V,DESCRIPTOR>()/epsilon;
86 V forceTerm = V();
87 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
88 forceTerm +=
89 ( (epsilon*(V)descriptors::c<DESCRIPTOR>(iPop,iD)-u[iD]) * descriptors::invCs2<V,DESCRIPTOR>()/epsilon
90 + c_u * descriptors::c<DESCRIPTOR>(iPop,iD)
91 )
92 * force[iD];
93 }
94 forceTerm *= descriptors::t<V,DESCRIPTOR>(iPop);
95 forceTerm *= V(1) - omega/V(2);
96 forceTerm *= rho;
97 cell[iPop] += forceTerm;
98 }
99 }
+ Here is the caller graph for this function:

◆ updateExternalForce()

template<typename DESCRIPTOR >
template<typename CELL , typename U , typename EPSILON , typename K , typename NU , typename FORCE , typename BODY_F , typename V = typename CELL::value_t>
static void olb::guoZhao::guoZhao_lbm< DESCRIPTOR >::updateExternalForce ( CELL & cell,
const U & u,
const EPSILON & epsilon,
const K & k,
const NU & nu,
FORCE & force,
BODY_F & bodyF )
inlinestatic

Updates the force terms with the reaction from the porous matrix, before applying it.

Definition at line 103 of file guoZhaoDynamics.h.

104 {
105 const V uMag = util::sqrt( util::normSqr<V,DESCRIPTOR::d>(u) );
106 const V Fe = 0;//1.75/util::sqrt(150.*util::pow(epsilon,3));
107
108 // Linear Darcy term, nonlinear Forchheimer term and body force
109 for (int iDim=0; iDim <DESCRIPTOR::d; iDim++) {
110 force[iDim] = -u[iDim]*epsilon*nu/k - epsilon*Fe/util::sqrt(k)*uMag*u[iDim] + bodyF[iDim]*epsilon;
111 }
112 }
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:
+ Here is the caller graph for this function:

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