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

#include <elements.h>

+ Collaboration diagram for olb::momenta::ForcedPSMMomentum:

Public Member Functions

template<typename TYPE , typename CELL , typename J , typename V = typename CELL::value_t, 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 958 of file elements.h.

Member Function Documentation

◆ compute()

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

Definition at line 960 of file elements.h.

961 {
962 const V rho = TYPE().computeRho(cell);
963 computeU<TYPE>(cell, j);
964 for (int iVel=0; iVel<DESCRIPTOR::d; ++iVel) {
965 j[iVel] *= rho;
966 }
967 }
void computeU(CELL &cell, U &u) any_platform
Definition elements.h:970

References computeU().

+ 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::ForcedPSMMomentum::computeU ( CELL & cell,
U & u )
inline

Definition at line 970 of file elements.h.

971 {
972 V rho{};
973 lbm<DESCRIPTOR>::computeRhoU(cell, rho, u);
974 V epsilon = 1. - cell.template getField<descriptors::POROSITY>();
975 V omega = cell.template getField<descriptors::OMEGA>();
976 V paramA = 1 / omega - 0.5;
977 V paramB = (epsilon * paramA) / ((1. - epsilon) + paramA);
978 V paramC = (1. - paramB);
979 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
980 u[iVel] = paramC * (u[iVel] + cell.template getFieldComponent<descriptors::FORCE>(iVel) * 0.5)
981 + paramB * cell.template getFieldComponent<descriptors::VELOCITY_SOLID>(iVel);
982 }
983 }
static void computeRhoU(CELL &cell, RHO &rho, U &u) any_platform
Computation of hydrodynamic variables.
Definition lbm.h:301

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ define()

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

Definition at line 986 of file elements.h.

986{}

◆ getName()

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

Definition at line 994 of file elements.h.

994 {
995 return "ForcedPSMMomentum";
996 }

◆ initialize()

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

Definition at line 989 of file elements.h.

989{}

◆ inverseShift()

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

Definition at line 992 of file elements.h.

992{};

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