OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <spongeLayerDynamics.h>

+ Inheritance diagram for olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >:
+ Collaboration diagram for olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Types

using parameters = typename meta::list<descriptors::OMEGA>
 
using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>
 
template<typename NEW_T >
using exchange_value_type = SpongeLayerDynamics<NEW_T,DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 
template<typename M >
using exchange_momenta = SpongeLayerDynamics<T,DESCRIPTOR,M,EQUILIBRIUM>
 
- Public Types inherited from olb::dynamics::CustomCollision< T, DESCRIPTOR, MOMENTA >
using value_t = T
 
using descriptor_t = DESCRIPTOR
 
using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
- Public Types inherited from olb::Dynamics< T, DESCRIPTOR >
using value_t = T
 
using descriptor_t = DESCRIPTOR
 

Public Member Functions

std::type_index id () override
 Expose unique type-identifier for RTTI.
 
AbstractParameters< T, DESCRIPTOR > & getParameters (BlockLattice< T, DESCRIPTOR > &block) override
 Parameters access for legacy post processors.
 
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > collide (CELL &cell, PARAMETERS &parameters) any_platform
 
void computeEquilibrium (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T fEq[DESCRIPTOR::q]) const override
 Return iPop equilibrium for given first and second momenta.
 
std::string getName () const override
 Return human-readable name.
 
- Public Member Functions inherited from olb::dynamics::CustomCollision< T, DESCRIPTOR, MOMENTA >
void initialize (Cell< T, DESCRIPTOR > &cell) override
 Initialize dynamics-specific data for cell.
 
computeRho (ConstCell< T, DESCRIPTOR > &cell) const override
 Compute particle density.
 
void computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override
 Compute fluid velocity.
 
void computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const override
 Compute fluid momentum.
 
void computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override
 Compute stress tensor.
 
void computeRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override
 Compute fluid velocity and particle density.
 
void computeAllMomenta (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override
 Compute all momenta up to second order.
 
void defineRho (Cell< T, DESCRIPTOR > &cell, T rho) override
 Set particle density.
 
void defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d]) override
 Set fluid velocity.
 
void defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) override
 Define fluid velocity and particle density.
 
void defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) override
 Define all momenta up to second order.
 
void inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override
 Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU.
 
- Public Member Functions inherited from olb::Dynamics< T, DESCRIPTOR >
virtual ~Dynamics () any_platform
 
virtual CellStatistic< T > collide (Cell< T, DESCRIPTOR > &cell)
 Perform purely-local collision step on Cell interface (legacy, to be deprecated)
 
void iniEquilibrium (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])
 Initialize to equilibrium distribution.
 
void iniRegularized (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n])
 Initialize cell to equilibrium and non-equilibrum part.
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 41 of file spongeLayerDynamics.h.

Member Typedef Documentation

◆ EquilibriumF

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>

Definition at line 44 of file spongeLayerDynamics.h.

◆ exchange_momenta

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename M >
using olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::exchange_momenta = SpongeLayerDynamics<T,DESCRIPTOR,M,EQUILIBRIUM>

Definition at line 50 of file spongeLayerDynamics.h.

◆ exchange_value_type

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename NEW_T >
using olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::exchange_value_type = SpongeLayerDynamics<NEW_T,DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 47 of file spongeLayerDynamics.h.

◆ MomentaF

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 43 of file spongeLayerDynamics.h.

◆ parameters

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::parameters = typename meta::list<descriptors::OMEGA>

Definition at line 42 of file spongeLayerDynamics.h.

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::collide ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 61 of file spongeLayerDynamics.h.

61 {
62 V fEq[DESCRIPTOR::q] { };
63 const auto statistic = EquilibriumF().compute(cell, parameters, fEq);
64 const V rhoRef = cell.template getField<descriptors::DENSITY>();
65 const V uxRef = cell.template getField<descriptors::UX>();
66 const V uyRef = cell.template getField<descriptors::UY>();
67 const V uzRef = cell.template getField<descriptors::UZ>();
68 const V uRef[3] = {uxRef, uyRef, uzRef};
69
70 const V omega = parameters.template get<descriptors::OMEGA>();
71 const V sigma = cell.template getField<descriptors::DAMPING>();
72
73 V fEqRef[DESCRIPTOR::q] { };
74 EquilibriumF().compute(cell, rhoRef, uRef, fEqRef);
75
76 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
77 cell[iPop] = cell[iPop] + omega * ( fEq[iPop] - cell[iPop]) + sigma * ( fEqRef[iPop] - fEq[iPop] );
78 }
79 return statistic;
80 };
typename meta::list< descriptors::OMEGA > parameters
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
void olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::computeEquilibrium ( ConstCell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
T fEq[DESCRIPTOR::q] ) const
inlineoverridevirtual

Return iPop equilibrium for given first and second momenta.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 82 of file spongeLayerDynamics.h.

82 {
83 EquilibriumF().compute(cell, rho, u, fEq);
84 };

◆ getName()

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
std::string olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::getName ( ) const
inlineoverridevirtual

Return human-readable name.

Reimplemented from olb::Dynamics< T, DESCRIPTOR >.

Definition at line 86 of file spongeLayerDynamics.h.

86 {
87 return "SpongeLayerDynamics";
88 };

◆ getParameters()

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
AbstractParameters< T, DESCRIPTOR > & olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::getParameters ( BlockLattice< T, DESCRIPTOR > & block)
inlineoverridevirtual

Parameters access for legacy post processors.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 56 of file spongeLayerDynamics.h.

56 {
57 return block.template getData<OperatorParameters<SpongeLayerDynamics>>();
58 }

◆ id()

template<typename T , typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
std::type_index olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >::id ( )
inlineoverridevirtual

Expose unique type-identifier for RTTI.

Implements olb::Dynamics< T, DESCRIPTOR >.

Definition at line 52 of file spongeLayerDynamics.h.

52 {
53 return typeid(SpongeLayerDynamics);
54 };

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