OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation > Class Template Reference

Defines incoming directions on flat walls. More...

#include <rtlbmBoundaryDynamics.h>

+ Inheritance diagram for olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >:
+ Collaboration diagram for olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >:

Public Types

template<typename M >
using exchange_momenta = RtlbmDiffuseConstBoundaryDynamics<T,DESCRIPTOR,M,direction,orientation>
 
- 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

 RtlbmDiffuseConstBoundaryDynamics (T omega_)
 Constructor.
 
computeEquilibrium (int iPop, T rho, const T u[DESCRIPTOR::d]) const override
 Compute equilibrium distribution function.
 
CellStatistic< T > collide (Cell< T, DESCRIPTOR > &cell) override
 Collision step for flat boundary.
 
getOmega () const
 place holder
 
void setOmega (T omega_)
 place holder
 
- Public Member Functions inherited from olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >
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.
 
- 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 std::string getName () const
 Return human-readable name.
 
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, int direction, int orientation>
class olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >

Defines incoming directions on flat walls.

Emposed dirichlet density is distributed equivalently to all incoming/unkown directions.

Parameters
directionstakes values 0, 1, 2; which corresponds to x, y, z plane normal
orientationtakes values -1, 1; which is the sign of plane normal

Note: Dynamics ensure that cell has constant 0th moment. To set the constant 0th moment defineRho() must be called.

Definition at line 107 of file rtlbmBoundaryDynamics.h.

Member Typedef Documentation

◆ exchange_momenta

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
template<typename M >
using olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::exchange_momenta = RtlbmDiffuseConstBoundaryDynamics<T,DESCRIPTOR,M,direction,orientation>

Definition at line 110 of file rtlbmBoundaryDynamics.h.

Constructor & Destructor Documentation

◆ RtlbmDiffuseConstBoundaryDynamics()

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::RtlbmDiffuseConstBoundaryDynamics ( T omega_)

Constructor.

Definition at line 171 of file rtlbmBoundaryDynamics.hh.

172 : legacy::BasicDynamics<T,DESCRIPTOR,MOMENTA>()
173{
174 this->getName() = "RtlbmDiffuseConstBoundaryDynamics";
175}
virtual std::string getName() const
Return human-readable name.
Definition interface.h:63

References olb::Dynamics< T, DESCRIPTOR >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
CellStatistic< T > olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::collide ( Cell< T, DESCRIPTOR > & cell)
overridevirtual

Collision step for flat boundary.

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

Definition at line 184 of file rtlbmBoundaryDynamics.hh.

185{
186 // For direction i \in I_in define
187 // cell_i = w_i * dirichlet/sumWeights - w_i
188 // For direction i \in I_out defube
189 // cell_i = - w_i
190 // This construction yields
191 // sum_{i=0}^{q-1} cell_i == dirichlet - 1
192
193 typedef DESCRIPTOR L;
194 // shift all: cell_i = f_i - weight_i
195 for ( int iPop = 0; iPop < L::q; ++iPop ) {
196 cell[iPop] = - descriptors::t<T,L>(iPop);
197 }
198
199 constexpr auto missing_iPop = util::subIndexOutgoing<L,direction,orientation>();
200 // compute summ of weights for all missing directions
201 T sumWeights = 0;
202 for ( int i : missing_iPop ) {
203 sumWeights += descriptors::t<T,L>(i);
204 }
205 // construct missing directions such that 0th moment equals emposed dirichletTemperature
206 using MomentaF = typename MOMENTA::template type<DESCRIPTOR>;
207 T dirichletTemperature = MomentaF().computeRho(cell);
208 for ( int i : missing_iPop ) {
209 cell[i] = descriptors::t<T,L>(i)*dirichletTemperature/sumWeights - descriptors::t<T,L>(i);
210 }
211 return {-1, -1};
212}
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition interface.h:299

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
T olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::computeEquilibrium ( int iPop,
T rho,
const T u[DESCRIPTOR::d] ) const
overridevirtual

Compute equilibrium distribution function.

Reimplemented from olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >.

Definition at line 178 of file rtlbmBoundaryDynamics.hh.

179{
180 return descriptors::t<T,DESCRIPTOR>(iPop)*rho - descriptors::t<T,DESCRIPTOR>(iPop);
181}

◆ getOmega()

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
T olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::getOmega ( ) const

place holder

Definition at line 215 of file rtlbmBoundaryDynamics.hh.

216{
217 return T(-1);
218}

◆ setOmega()

template<typename T , typename DESCRIPTOR , typename MOMENTA , int direction, int orientation>
void olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >::setOmega ( T omega_)

place holder

Definition at line 221 of file rtlbmBoundaryDynamics.hh.

222{
223}

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