OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 > Class Template Reference

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

#include <boundaryPostProcessors3D.h>

+ Collaboration diagram for olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 >:

Public Member Functions

int getPriority () const
 
template<concepts::DynamicCell CELL>
void apply (CELL &cell) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCell
 

Detailed Description

template<typename T, typename DESCRIPTOR, int plane, int normal1, int normal2>
class olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 >

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

only the Q_i : Pi term)

Definition at line 88 of file boundaryPostProcessors3D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int plane, int normal1, int normal2>
template<concepts::DynamicCell CELL>
void olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 >::apply ( CELL & cell)

Definition at line 168 of file boundaryPostProcessors3D.hh.

169{
170 using V = typename CELL::value_t;
171 using namespace olb::util::tensorIndices3D;
172
173 constexpr auto direction1 = (plane+1)%3;
174 constexpr auto direction2 = (plane+2)%3;
175
176 auto& dynamics = cell.getDynamics();
177
178 V rho10 = getNeighborRho(cell, 1,0);
179 V rho01 = getNeighborRho(cell, 0,1);
180 V rho20 = getNeighborRho(cell, 2,0);
181 V rho02 = getNeighborRho(cell, 0,2);
182 V rho = (V)2/(V)3*(rho01+rho10)-(V)1/(V)6*(rho02+rho20);
183
184 V dA_uB_[3][3];
185
186 interpolateGradients<plane,0> (cell, dA_uB_[0]);
187 interpolateGradients<direction1,normal1>(cell, dA_uB_[1]);
188 interpolateGradients<direction2,normal2>(cell, dA_uB_[2]);
189
190 V dA_uB[3][3];
191 for (int iBeta=0; iBeta<3; ++iBeta) {
192 dA_uB[plane][iBeta] = dA_uB_[0][iBeta];
193 dA_uB[direction1][iBeta] = dA_uB_[1][iBeta];
194 dA_uB[direction2][iBeta] = dA_uB_[2][iBeta];
195 }
196 V omega = dynamics.getOmegaOrFallback(std::numeric_limits<V>::signaling_NaN());
197 V sToPi = - rho / descriptors::invCs2<V,DESCRIPTOR>() / omega;
199 pi[xx] = (V)2 * dA_uB[0][0] * sToPi;
200 pi[yy] = (V)2 * dA_uB[1][1] * sToPi;
201 pi[zz] = (V)2 * dA_uB[2][2] * sToPi;
202 pi[xy] = (dA_uB[0][1]+dA_uB[1][0]) * sToPi;
203 pi[xz] = (dA_uB[0][2]+dA_uB[2][0]) * sToPi;
204 pi[yz] = (dA_uB[1][2]+dA_uB[2][1]) * sToPi;
205
206 // Computation of the particle distribution functions
207 // according to the regularized formula
208 V u[DESCRIPTOR::d];
209 cell.computeU(u);
210
211 V fEq[DESCRIPTOR::q] { };
212 dynamics.computeEquilibrium(cell, rho, u, fEq);
213 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
214 cell[iPop] = fEq[iPop] + equilibrium<DESCRIPTOR>::template fromPiToFneq<V>(iPop, pi);
215 }
216}
constexpr T invCs2() any_platform
Definition functions.h:107
Compute number of elements of a symmetric d-dimensional tensor.
Definition util.h:216

References olb::descriptors::invCs2().

+ Here is the call graph for this function:

◆ getPriority()

template<typename T , typename DESCRIPTOR , int plane, int normal1, int normal2>
int olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 >::getPriority ( ) const
inline

Definition at line 92 of file boundaryPostProcessors3D.h.

92 {
93 return 0;
94 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int plane, int normal1, int normal2>
OperatorScope olb::OuterVelocityEdgeProcessor3D< T, DESCRIPTOR, plane, normal1, normal2 >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 90 of file boundaryPostProcessors3D.h.


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