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

The conduction is computed from density and population. More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::FixedTemperatureMomentum< direction, orientation >:

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

template<int direction, int orientation>
struct olb::momenta::FixedTemperatureMomentum< direction, orientation >

The conduction is computed from density and population.

Be careful that computeU(...) computes the conduction whereas compute(...) computes the transport (= conduction + convective transport)

Definition at line 575 of file elements.h.

Member Function Documentation

◆ compute()

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

Definition at line 578 of file elements.h.

579 {
580 const V temp = TYPE().computeRho(cell);
581 const auto uNS = cell.template getFieldPointer<descriptors::VELOCITY>();
582 computeU<TYPE>(cell, j);
583 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
584 j[iD] += temp * uNS[iD];
585 }
586 }

◆ computeU()

template<int direction, int orientation>
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedTemperatureMomentum< direction, orientation >::computeU ( CELL & cell,
U & u )
inline

Definition at line 590 of file elements.h.

591 {
592 constexpr auto onWallIndices = util::populationsContributingToVelocity<DESCRIPTOR,direction,0>();
593 constexpr auto normalIndices = util::populationsContributingToVelocity<DESCRIPTOR,direction,orientation>();
594
595 const V temp = TYPE().computeRho(cell);
596 const auto uNS = cell.template getField<descriptors::VELOCITY>();
597
598 V uOnWall[DESCRIPTOR::d] = { V{} };
599 for (unsigned fIndex=0; fIndex<onWallIndices.size(); ++fIndex) {
600 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
601 uOnWall[iD] += (cell[onWallIndices[fIndex]]
602 - equilibrium<DESCRIPTOR>::firstOrder(onWallIndices[fIndex],temp,uNS.data()))
603 * descriptors::c<DESCRIPTOR>(onWallIndices[fIndex],iD);
604 }
605 }
606
607 V uNormal[DESCRIPTOR::d] = { V{} };
608 for (unsigned fIndex=0; fIndex<normalIndices.size(); ++fIndex) {
609 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
610 uNormal[iD] += (cell[normalIndices[fIndex]]
611 - equilibrium<DESCRIPTOR>::firstOrder(normalIndices[fIndex],temp,uNS.data()))
612 * descriptors::c<DESCRIPTOR>(normalIndices[fIndex],iD);
613 }
614 }
615
616 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
617 u[iD] = uOnWall[iD] + V(2) * uNormal[iD];
618 }
619 }
static V firstOrder(int iPop, const RHO &rho, const U &u) any_platform
Computation of equilibrium distribution, first order in u.
Definition lbm.h:37

References olb::equilibrium< DESCRIPTOR >::firstOrder().

+ Here is the call graph for this function:

◆ define()

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

Definition at line 623 of file elements.h.

623{};

◆ getName()

template<int direction, int orientation>
static std::string olb::momenta::FixedTemperatureMomentum< direction, orientation >::getName ( )
inlinestatic

Definition at line 631 of file elements.h.

631 {
632 return "FixedTemperatureMomentum";
633 }

◆ initialize()

template<int direction, int orientation>
template<typename TYPE , typename CELL >
void olb::momenta::FixedTemperatureMomentum< direction, orientation >::initialize ( CELL & cell)
inline

Definition at line 626 of file elements.h.

626{};

◆ inverseShift()

template<int direction, int orientation>
template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedTemperatureMomentum< direction, orientation >::inverseShift ( CELL & cell,
U & u )
inline

Definition at line 629 of file elements.h.

629{};

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