OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
olb::momenta::InnerCornerStress2D< normalX, normalY > Struct Template Reference

Computation of the stress tensor in an inner corner (2D case) More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::InnerCornerStress2D< normalX, normalY >:

Public Member Functions

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

Static Public Member Functions

static std::string getName ()
 

Detailed Description

template<int normalX, int normalY>
struct olb::momenta::InnerCornerStress2D< normalX, normalY >

Computation of the stress tensor in an inner corner (2D case)

Definition at line 1260 of file elements.h.

Member Function Documentation

◆ compute()

template<int normalX, int normalY>
template<typename TYPE , typename CELL , typename RHO , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::InnerCornerStress2D< normalX, normalY >::compute ( CELL & cell,
RHO & rho,
const U & u,
PI & pi )
inline

Definition at line 1262 of file elements.h.

1263 {
1264 FieldD<V,DESCRIPTOR,descriptors::POPULATION> newCell(
1265 cell.template getField<descriptors::POPULATION>());
1266 int v[DESCRIPTOR::d] = { -normalX, -normalY };
1267 int unknownF = util::findVelocity<DESCRIPTOR >(v);
1268
1269 if (unknownF != DESCRIPTOR::q) {
1270 int oppositeF = descriptors::opposite<DESCRIPTOR>(unknownF);
1271
1272 V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
1273
1274 newCell[unknownF] = newCell[oppositeF]
1275 - equilibrium<DESCRIPTOR>::secondOrder(oppositeF, rho, u, uSqr)
1276 + equilibrium<DESCRIPTOR>::secondOrder(unknownF, rho, u, uSqr);
1277 }
1278
1279 lbm<DESCRIPTOR>::computeStress(newCell, rho, u, pi);
1280 }
static V secondOrder(int iPop, const RHO &rho, const U &u, const USQR &uSqr) any_platform
Computation of equilibrium distribution, second order in u.
Definition lbm.h:51
static void computeStress(CELL &cell, const RHO &rho, const U &u, PI &pi) any_platform
Computation of stress tensor.
Definition lbm.h:229

References olb::lbm< DESCRIPTOR >::computeStress(), and olb::equilibrium< DESCRIPTOR >::secondOrder().

+ Here is the call graph for this function:

◆ getName()

template<int normalX, int normalY>
static std::string olb::momenta::InnerCornerStress2D< normalX, normalY >::getName ( )
inlinestatic

Definition at line 1282 of file elements.h.

1282 {
1283 return "InnerCornerStress2D";
1284 }

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