OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
olb::BouzidiPostProcessor Class Reference

Post processor for the zero-velocity Bouzidi boundary. More...

#include <setBouzidiBoundary.h>

+ Collaboration diagram for olb::BouzidiPostProcessor:

Public Member Functions

int getPriority () const
 
template<typename CELL , typename V = typename CELL::value_t>
void apply (CELL &x_b) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCell
 

Detailed Description

Post processor for the zero-velocity Bouzidi boundary.

Definition at line 67 of file setBouzidiBoundary.h.

Member Function Documentation

◆ apply()

template<typename CELL , typename V = typename CELL::value_t>
void olb::BouzidiPostProcessor::apply ( CELL & x_b)
inline

Definition at line 76 of file setBouzidiBoundary.h.

76 {
77 using DESCRIPTOR = typename CELL::descriptor_t;
78 const auto q = x_b.template getFieldPointer<descriptors::BOUZIDI_DISTANCE>();
79 for (int iPop = 1; iPop < descriptors::q<DESCRIPTOR>(); ++iPop) {
80 // update missing population if valid bouzidi distance
81 if (q[iPop] > V{0}) {
82 const auto c = descriptors::c<DESCRIPTOR>(iPop);
83 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
84 auto x_s = x_b.neighbor(c); // solid side neighbor
85 auto x_f = x_b.neighbor(descriptors::c<DESCRIPTOR>(iPop_opposite)); // fluid side neighbor opposite to the missing population
86
87 x_b[iPop_opposite] = (q[iPop] <= V{0.5}) // cut is closer to the fluid cell
88 * (V{2} * q[iPop] * x_s[iPop] + (V{1} - V{2} * q[iPop]) * x_b[iPop])
89 + (q[iPop] > V{0.5}) // cut is closer to the solid cell
90 * (V{0.5} / q[iPop] * x_s[iPop] + V{0.5} * (V{2} * q[iPop] - V{1}) / q[iPop] * x_f[iPop_opposite]);
91 }
92 // if intersection point is on the cell then fall back to full-way bounce back
93 else if (q[iPop] == V{0}) {
94 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
95 x_b[iPop_opposite] = x_b[iPop];
96 }
97 }
98 }
platform_constant int c[Q][D]
constexpr int q() any_platform

◆ getPriority()

int olb::BouzidiPostProcessor::getPriority ( ) const
inline

Definition at line 71 of file setBouzidiBoundary.h.

71 {
72 return -1;
73 }

Member Data Documentation

◆ scope

constexpr OperatorScope olb::BouzidiPostProcessor::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 69 of file setBouzidiBoundary.h.


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