OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z > Class Template Reference

PostProcessor for the density / velocity outflow boundaries in the free energy model. More...

#include <boundaryPostProcessors3D.h>

+ Collaboration diagram for olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >:

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 NORMAL_X, int NORMAL_Y, int NORMAL_Z>
class olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >

PostProcessor for the density / velocity outflow boundaries in the free energy model.

The density / order parameters are prescribed to the outflow nodes such that they obey the local-velocity convective boundary condition given in Lou, Gou, Shi (2013).

Definition at line 261 of file boundaryPostProcessors3D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
template<CONCEPT(Cell) CELL>
void olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::apply ( CELL & cell)

Definition at line 553 of file boundaryPostProcessors3D.hh.

553 {
554
555 T rho, rho0, rho1, u[3];
556
557 rho0 = cell.computeRho();
558
559 cell.neighbor({-NORMAL_X,-NORMAL_Y,-NORMAL_Z}).computeRhoU(rho1, u);
560
561 T uPerp = 0;
562
563 Vector<T, 3> normalVec({NORMAL_X,NORMAL_Y,NORMAL_Z});
564
565 if (normalVec[2] == 0) {
566 if (normalVec[1] == 0) {
567 if (normalVec[0] < 0) {
568 uPerp = -u[0];
569 } else {
570 uPerp = u[0];
571 }
572 } else if (normalVec[0] == 0) {
573 if (normalVec[1] < 0) {
574 uPerp = -u[1];
575 } else {
576 uPerp = u[1];
577 }
578 } else {
579 uPerp = util::sqrt(u[0] * u[0] + u[1] * u[1]);
580 }
581 } else if (normalVec[1] == 0) {
582 if (normalVec[0] == 0) {
583 if (normalVec[2] < 0) {
584 uPerp = -u[2];
585 } else {
586 uPerp = u[2];
587 }
588 } else {
589 uPerp = util::sqrt(u[0] * u[0] + u[2] * u[2]);
590 }
591 } else if (normalVec[0] == 0) {
592 uPerp = util::sqrt(u[1] * u[1] + u[2] * u[2]);
593 } else {
594 uPerp = util::sqrt(u[0] * u[0] + u[1] * u[1] + u[2] * u[2]);
595 }
596
597 rho = (rho0 + uPerp * rho1) / (1. + uPerp);
598 cell.defineRho(rho);
599}
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References olb::util::sqrt().

+ Here is the call graph for this function:

◆ getPriority()

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
int olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::getPriority ( ) const
inline

Definition at line 265 of file boundaryPostProcessors3D.h.

265 {
266 return 0;
267 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
constexpr OperatorScope olb::FreeEnergyConvectiveProcessor3D< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 263 of file boundaryPostProcessors3D.h.


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