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

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

#include <setBouzidiBoundary.h>

+ Collaboration diagram for olb::BouzidiVelocityPostProcessor:

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 velocity Bouzidi boundary.

Definition at line 148 of file setBouzidiBoundary.h.

Member Function Documentation

◆ apply()

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

Definition at line 157 of file setBouzidiBoundary.h.

157 {
158 using DESCRIPTOR = typename CELL::descriptor_t;
159 const auto q = x_b.template getFieldPointer<descriptors::BOUZIDI_DISTANCE>();
160 const auto veloCoeff = x_b.template getFieldPointer<descriptors::BOUZIDI_VELOCITY>();
161 for (int iPop=1; iPop < descriptors::q<DESCRIPTOR>(); ++iPop) {
162 // update missing population if valid bouzidi distance
163 if (q[iPop] > 0) {
164 const auto c = descriptors::c<DESCRIPTOR>(iPop);
165 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
166 auto x_s = x_b.neighbor(c); // solid side neighbor
167 auto x_f = x_b.neighbor(descriptors::c<DESCRIPTOR>(iPop_opposite)); // fluid side neighbor opposite to the missing population
168 auto veloTerm = veloCoeff[iPop] * (descriptors::t<V,DESCRIPTOR>(iPop)) * (descriptors::invCs2<V,DESCRIPTOR>());
169
170 x_b[iPop_opposite] = (q[iPop] <= V{0.5}) // cut is closer to the fluid cell
171 * (V{2} * q[iPop] * x_s[iPop] + (V{1} - V{2} * q[iPop]) * x_b[iPop] - V{2} * veloTerm)
172 + (q[iPop] > V{0.5}) // cut is closer to the solid cell
173 * (V{0.5} / q[iPop] * x_s[iPop] + V{0.5} * (V{2} * q[iPop] - V{1}) / q[iPop] * x_f[iPop_opposite] - V{1}/q[iPop] * veloTerm);
174 }
175 // if intersection point is on the cell then fall back to full-way bounce back
176 else if (q[iPop] == V{0}) {
177 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
178 auto veloTerm = veloCoeff[iPop] * (descriptors::t<V,DESCRIPTOR>(iPop)) * (descriptors::invCs2<V,DESCRIPTOR>());
179 x_b[iPop_opposite] = x_b[iPop] - V{2} * veloTerm;
180 }
181 }
182 }
platform_constant int c[Q][D]
constexpr int q() any_platform

◆ getPriority()

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

Definition at line 152 of file setBouzidiBoundary.h.

152 {
153 return -1;
154 }

Member Data Documentation

◆ scope

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

Definition at line 150 of file setBouzidiBoundary.h.


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