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

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

#include <boundaryPostProcessors2D.h>

+ Collaboration diagram for olb::OuterVelocityCornerProcessor2D< T, DESCRIPTOR, xNormal, yNormal >:

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 xNormal, int yNormal>
class olb::OuterVelocityCornerProcessor2D< T, DESCRIPTOR, xNormal, yNormal >

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

only the Q_i : Pi term)

Definition at line 251 of file boundaryPostProcessors2D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
template<CONCEPT(Cell) CELL>
void olb::OuterVelocityCornerProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::apply ( CELL & cell)

Definition at line 410 of file boundaryPostProcessors2D.hh.

411{
412 using namespace olb::util::tensorIndices2D;
413
414 T rho10 = cell.neighbor({-1*xNormal, -0*yNormal}).computeRho();
415 T rho01 = cell.neighbor({-0*xNormal, -1*yNormal}).computeRho();
416
417 T rho20 = cell.neighbor({-2*xNormal, -0*yNormal}).computeRho();
418 T rho02 = cell.neighbor({-0*xNormal, -2*yNormal}).computeRho();
419
420 T rho = (T)2/(T)3*(rho01+rho10) - (T)1/(T)6*(rho02+rho20);
421
422 T dx_u[DESCRIPTOR::d], dy_u[DESCRIPTOR::d];
425 T dx_ux = dx_u[0];
426 T dy_ux = dy_u[0];
427 T dx_uy = dx_u[1];
428 T dy_uy = dy_u[1];
429
430 auto& dynamics = cell.getDynamics();
431 T omega = dynamics.getOmegaOrFallback(std::numeric_limits<T>::signaling_NaN());
432
433 T sToPi = - rho / descriptors::invCs2<T,DESCRIPTOR>() / omega;
435 pi[xx] = (T)2 * dx_ux * sToPi;
436 pi[yy] = (T)2 * dy_uy * sToPi;
437 pi[xy] = (dx_uy + dy_ux) * sToPi;
438
439 // Computation of the particle distribution functions
440 // according to the regularized formula
441 T u[DESCRIPTOR::d];
442 cell.computeU(u);
443
444 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
445 cell[iPop] = dynamics.computeEquilibrium(iPop,rho,u)
446 + equilibrium<DESCRIPTOR>::template fromPiToFneq<T>(iPop, pi);
447 }
448}
static void interpolateVector(T velDeriv[DESCRIPTOR::d], BlockLattice< T, DESCRIPTOR > const &blockLattice, int iX, int iY)
Compute number of elements of a symmetric d-dimensional tensor.
Definition util.h:210

References olb::fd::DirectedGradients2D< T, DESCRIPTOR, direction, orientation, orthogonal >::interpolateVector().

+ Here is the call graph for this function:

◆ getPriority()

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
int olb::OuterVelocityCornerProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::getPriority ( ) const
inline

Definition at line 255 of file boundaryPostProcessors2D.h.

255 {
256 return 1;
257 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
constexpr OperatorScope olb::OuterVelocityCornerProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 253 of file boundaryPostProcessors2D.h.


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