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

#include <boundaryPostProcessors3D.h>

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

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, int zNormal>
struct olb::OuterVelocityCornerProcessor3D< T, DESCRIPTOR, xNormal, yNormal, zNormal >

Definition at line 111 of file boundaryPostProcessors3D.h.

Member Function Documentation

◆ apply()

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

Definition at line 240 of file boundaryPostProcessors3D.hh.

241{
242 using namespace olb::util::tensorIndices3D;
243
244 auto& dynamics = cell.getDynamics();
245
246 T rho100 = cell.neighbor({-1*xNormal, -0*yNormal, -0*zNormal}).computeRho();
247 T rho010 = cell.neighbor({-0*xNormal, -1*yNormal, -0*zNormal}).computeRho();
248 T rho001 = cell.neighbor({-0*xNormal, -0*yNormal, -1*zNormal}).computeRho();
249 T rho200 = cell.neighbor({-2*xNormal, -0*yNormal, -0*zNormal}).computeRho();
250 T rho020 = cell.neighbor({-0*xNormal, -2*yNormal, -0*zNormal}).computeRho();
251 T rho002 = cell.neighbor({-0*xNormal, -0*yNormal, -2*zNormal}).computeRho();
252
253 T rho = (T)4/(T)9 * (rho001 + rho010 + rho100) - (T)1/(T)9 * (rho002 + rho020 + rho200);
254
255 T dx_u[DESCRIPTOR::d], dy_u[DESCRIPTOR::d], dz_u[DESCRIPTOR::d];
259
260 T dx_ux = dx_u[0];
261 T dy_ux = dy_u[0];
262 T dz_ux = dz_u[0];
263 T dx_uy = dx_u[1];
264 T dy_uy = dy_u[1];
265 T dz_uy = dz_u[1];
266 T dx_uz = dx_u[2];
267 T dy_uz = dy_u[2];
268 T dz_uz = dz_u[2];
269 T omega = dynamics.getOmegaOrFallback(std::numeric_limits<T>::signaling_NaN());
270 T sToPi = - rho / descriptors::invCs2<T,DESCRIPTOR>() / omega;
272 pi[xx] = (T)2 * dx_ux * sToPi;
273 pi[yy] = (T)2 * dy_uy * sToPi;
274 pi[zz] = (T)2 * dz_uz * sToPi;
275 pi[xy] = (dx_uy + dy_ux) * sToPi;
276 pi[xz] = (dx_uz + dz_ux) * sToPi;
277 pi[yz] = (dy_uz + dz_uy) * sToPi;
278
279 // Computation of the particle distribution functions
280 // according to the regularized formula
281 T u[DESCRIPTOR::d];
282 cell.computeU(u);
283
284 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
285 cell[iPop] = dynamics.computeEquilibrium(iPop,rho,u)
286 + equilibrium<DESCRIPTOR>::template fromPiToFneq<T>(iPop, pi);
287 }
288}
static void interpolateVector(T velDeriv[DESCRIPTOR::d], BlockLattice< T, DESCRIPTOR > const &blockLattice, int iX, int iY, int iZ)
Compute number of elements of a symmetric d-dimensional tensor.
Definition util.h:210

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

+ Here is the call graph for this function:

◆ getPriority()

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

Definition at line 114 of file boundaryPostProcessors3D.h.

114 {
115 return 1;
116 }

Member Data Documentation

◆ scope

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

Definition at line 112 of file boundaryPostProcessors3D.h.


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