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

Standard stress computation as second moment of the population. More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::IncompressibleBulkStress:

Public Member Functions

template<typename TYPE , typename CELL , typename P , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void compute (CELL &cell, const P &p, const U &u, PI &pi) any_platform
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

Standard stress computation as second moment of the population.

Utilizes the implementation in lbHelpers.

Definition at line 1639 of file elements.h.

Member Function Documentation

◆ compute()

template<typename TYPE , typename CELL , typename P , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::IncompressibleBulkStress::compute ( CELL & cell,
const P & p,
const U & u,
PI & pi )
inline

Definition at line 1641 of file elements.h.

1642 {
1643 int iPi = 0;
1644 const auto rho = cell.template getField<descriptors::RHO>();
1645 for (int iAlpha=0; iAlpha < DESCRIPTOR::d; ++iAlpha) {
1646 for (int iBeta=iAlpha; iBeta < DESCRIPTOR::d; ++iBeta) {
1647 pi[iPi] = V();
1648 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
1649 pi[iPi] += descriptors::c<DESCRIPTOR>(iPop,iAlpha)*
1650 descriptors::c<DESCRIPTOR>(iPop,iBeta) * cell[iPop];
1651 }
1652 // stripe off equilibrium contribution
1653 pi[iPi] -= rho*u[iAlpha]*u[iBeta];
1654 if (iAlpha==iBeta) {
1655 pi[iPi] -= p;
1656 }
1657 ++iPi;
1658 }
1659 }
1660 }
constexpr int c(unsigned iPop, unsigned iDim) any_platform
Definition functions.h:83

References olb::descriptors::c().

+ Here is the call graph for this function:

◆ getName()

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

Definition at line 1662 of file elements.h.

1662 {
1663 return "IncompressibleBulkStress";
1664 }

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