MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn > Class Template Reference

LB sponge source term : sponge viscosity towards outside. More...

Inheritance diagram for maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >:
[legend]
Collaboration diagram for maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >:
[legend]

Public Types

using Base = LbSrcTerm_sponge< nDim, nDist, SysEqn >
 
- Public Types inherited from maia::lb::LbSrcTerm< nDim, nDist, SysEqn >
using SysEqn = SysEqn
 

Public Member Functions

 LbSrcTerm_spongeVisocity (LbSolverDxQy< nDim, nDist, SysEqn > *p_solver)
 
void apply_preCollision () override
 
void apply_postCollision () override
 
void apply_postPropagation () override
 
- Public Member Functions inherited from maia::lb::LbSrcTerm_sponge< nDim, nDist, SysEqn >
 LbSrcTerm_sponge (LbSolverDxQy< nDim, nDist, SysEqn > *p_solver)
 
void init () override
 Initialize properties common by all lb sponge terms. More...
 
- Public Member Functions inherited from maia::lb::LbSrcTerm< nDim, nDist, SysEqn >
virtual void init ()=0
 
virtual void apply_preCollision ()=0
 
virtual void apply_postCollision ()=0
 
virtual void apply_postPropagation ()=0
 
virtual ~LbSrcTerm ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from maia::lb::LbSrcTerm< nDim, nDist, SysEqn >
static constexpr MInt nDim
 
static constexpr MInt nDist
 
- Protected Member Functions inherited from maia::lb::LbSrcTerm_sponge< nDim, nDist, SysEqn >
MInt a_spongeCellId (const MInt cellId)
 Get index of cellId in m_spongeCells, returns -1 if unavailable. More...
 
void readProperties () override
 Reading basics properties common for all lb sponge terms. More...
 
virtual void readProperties ()=0
 
- Protected Attributes inherited from maia::lb::LbSrcTerm_sponge< nDim, nDist, SysEqn >
LbSolverDxQy< nDim, nDist, SysEqn > * m_solver
 
MBool m_isActive = false
 
std::vector< SpongeCellm_spongeCells
 
std::unordered_map< MInt, MIntm_mapCellId2SpongeCellId
 
MFloat m_spongeLayerThickness = 0.0
 
std::array< MFloat, 2 *nDimm_spongeThicknessFactor {}
 
MFloat m_spongeSigma = 0.0
 
MFloat m_spongeBeta = 2.0
 
MFloat m_trgRho = 1.0
 
std::array< MFloat, nDimm_trgU {}
 

Detailed Description

template<MInt nDim, MInt nDist, class SysEqn>
class maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >
Author
Miro Gondrum
Date
04.01.2024 The PPDF f is damped towards a its equilibrium state f_eq following: f -= omega_sponge *(f_eq - f)

Definition at line 123 of file lbsrctermsponge.cpp.

Member Typedef Documentation

◆ Base

template<MInt nDim, MInt nDist, class SysEqn >
using maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >::Base = LbSrcTerm_sponge<nDim, nDist, SysEqn>

Definition at line 125 of file lbsrctermsponge.cpp.

Constructor & Destructor Documentation

◆ LbSrcTerm_spongeVisocity()

template<MInt nDim, MInt nDist, class SysEqn >
maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >::LbSrcTerm_spongeVisocity ( LbSolverDxQy< nDim, nDist, SysEqn > *  p_solver)
inline

Definition at line 126 of file lbsrctermsponge.cpp.

126: Base(p_solver){};
LbSrcTerm_sponge< nDim, nDist, SysEqn > Base

Member Function Documentation

◆ apply_postCollision()

template<MInt nDim, MInt nDist, class SysEqn >
void maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >::apply_postCollision ( )
inlineoverridevirtual

Implements maia::lb::LbSrcTerm< nDim, nDist, SysEqn >.

Definition at line 128 of file lbsrctermsponge.cpp.

128{};

◆ apply_postPropagation()

template<MInt nDim, MInt nDist, class SysEqn >
void maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >::apply_postPropagation ( )
inlineoverridevirtual

Implements maia::lb::LbSrcTerm< nDim, nDist, SysEqn >.

Definition at line 129 of file lbsrctermsponge.cpp.

129{};

◆ apply_preCollision()

template<MInt nDim, MInt nDist, class SysEqn >
void maia::lb::LbSrcTerm_spongeVisocity< nDim, nDist, SysEqn >::apply_preCollision
overridevirtual

Implements maia::lb::LbSrcTerm< nDim, nDist, SysEqn >.

Definition at line 135 of file lbsrctermsponge.cpp.

135 {
136 TRACE();
137 LbSolverDxQy<nDim, nDist, SysEqn>* const s = this->m_solver; // alias for readability
138
139 const MInt timeStep = s->getCurrentTimeStep();
140 const MUint noSpongeCells = this->m_spongeCells.size();
141 maia::parallelFor<true>(0, noSpongeCells, [=](MInt spongeCellId) {
142 auto& cell = this->m_spongeCells[spongeCellId];
143 const MInt cellId = cell.cellId;
144 if((timeStep - 1) % IPOW2(s->maxLevel() - s->a_level(cellId)) != 0) return;
145 s->a_nu(cellId) *= (1.0 + cell.spongeFactor);
146 });
147}
This class represents all LB models.
Definition: lbsolverdxqy.h:29
LbSolverDxQy< nDim, nDist, SysEqn > * m_solver
std::vector< SpongeCell > m_spongeCells
constexpr MLong IPOW2(MInt x)
int32_t MInt
Definition: maiatypes.h:62
uint32_t MUint
Definition: maiatypes.h:63
void const MInt cellId
Definition: collector.h:239

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