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

This class computes the skordos BC on a flat wall in 2D but with a limited number of terms added to the equilibrium distributions (i.e. More...

#include <boundaryPostProcessors2D.h>

+ Collaboration diagram for olb::StraightFdBoundaryProcessor2D< T, DESCRIPTOR, direction, orientation >:

Public Member Functions

int getPriority () const
 
template<CONCEPT(Cell) CELL>
void apply (CELL &cell) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCell
 

Detailed Description

template<typename T, typename DESCRIPTOR, int direction, int orientation>
class olb::StraightFdBoundaryProcessor2D< T, DESCRIPTOR, direction, orientation >

This class computes the skordos BC on a flat wall in 2D but with a limited number of terms added to the equilibrium distributions (i.e.

only the Q_i : Pi term)

Definition at line 42 of file boundaryPostProcessors2D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int direction, int orientation>
template<CONCEPT(Cell) CELL>
void olb::StraightFdBoundaryProcessor2D< T, DESCRIPTOR, direction, orientation >::apply ( CELL & cell)

Definition at line 41 of file boundaryPostProcessors2D.hh.

42{
43 using namespace olb::util::tensorIndices2D;
44
45 T dx_u[DESCRIPTOR::d], dy_u[DESCRIPTOR::d];
46 T rho, u[DESCRIPTOR::d];
47
48 auto& dynamics = cell.getDynamics();
49
50 cell.computeRhoU(rho,u);
51
52 interpolateGradients<0>(cell, dx_u);
53 interpolateGradients<1>(cell, dy_u);
54
55 T dx_ux = dx_u[0];
56 T dy_ux = dy_u[0];
57 T dx_uy = dx_u[1];
58 T dy_uy = dy_u[1];
59 T omega = dynamics.getOmegaOrFallback(std::numeric_limits<T>::signaling_NaN());
60 T sToPi = - rho / descriptors::invCs2<T,DESCRIPTOR>() / omega;
62 pi[xx] = (T)2 * dx_ux * sToPi;
63 pi[yy] = (T)2 * dy_uy * sToPi;
64 pi[xy] = (dx_uy + dy_ux) * sToPi;
65
66 // Computation of the particle distribution functions
67 // according to the regularized formula
68 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
69 cell[iPop] = dynamics.computeEquilibrium(iPop,rho,u)
70 + equilibrium<DESCRIPTOR>::template fromPiToFneq<T>(iPop, pi);
71 }
72}
Compute number of elements of a symmetric d-dimensional tensor.
Definition util.h:210

◆ getPriority()

template<typename T , typename DESCRIPTOR , int direction, int orientation>
int olb::StraightFdBoundaryProcessor2D< T, DESCRIPTOR, direction, orientation >::getPriority ( ) const
inline

Definition at line 46 of file boundaryPostProcessors2D.h.

46 {
47 return 0;
48 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int direction, int orientation>
constexpr OperatorScope olb::StraightFdBoundaryProcessor2D< T, DESCRIPTOR, direction, orientation >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 44 of file boundaryPostProcessors2D.h.


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