OpenLB 1.8.1
Loading...
Searching...
No Matches
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<concepts::DynamicCell 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 506 of file boundaryPostProcessors3D.h.

Member Function Documentation

◆ apply()

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

Definition at line 559 of file boundaryPostProcessors3D.hh.

559 {
560
561 T rho, rho0, rho1, u[3];
562
563 rho0 = cell.computeRho();
564
565 cell.neighbor({-NORMAL_X,-NORMAL_Y,-NORMAL_Z}).computeRhoU(rho1, u);
566
567 T uPerp = 0;
568
569 Vector<T, 3> normalVec({NORMAL_X,NORMAL_Y,NORMAL_Z});
570
571 if (normalVec[2] == 0) {
572 if (normalVec[1] == 0) {
573 if (normalVec[0] < 0) {
574 uPerp = -u[0];
575 } else {
576 uPerp = u[0];
577 }
578 } else if (normalVec[0] == 0) {
579 if (normalVec[1] < 0) {
580 uPerp = -u[1];
581 } else {
582 uPerp = u[1];
583 }
584 } else {
585 uPerp = util::sqrt(u[0] * u[0] + u[1] * u[1]);
586 }
587 } else if (normalVec[1] == 0) {
588 if (normalVec[0] == 0) {
589 if (normalVec[2] < 0) {
590 uPerp = -u[2];
591 } else {
592 uPerp = u[2];
593 }
594 } else {
595 uPerp = util::sqrt(u[0] * u[0] + u[2] * u[2]);
596 }
597 } else if (normalVec[0] == 0) {
598 uPerp = util::sqrt(u[1] * u[1] + u[2] * u[2]);
599 } else {
600 uPerp = util::sqrt(u[0] * u[0] + u[1] * u[1] + u[2] * u[2]);
601 }
602
603 rho = (rho0 + uPerp * rho1) / (1. + uPerp);
604 cell.defineRho(rho);
605}
Expr sqrt(Expr x)
Definition expr.cpp:225

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 510 of file boundaryPostProcessors3D.h.

510 {
511 return 0;
512 }

Member Data Documentation

◆ scope

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

Definition at line 508 of file boundaryPostProcessors3D.h.


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