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

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

#include <boundaryPostProcessors2D.h>

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

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

PostProcessor for pressure / 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 122 of file boundaryPostProcessors2D.h.

Member Function Documentation

◆ apply()

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

Definition at line 499 of file boundaryPostProcessors2D.hh.

499 {
500
501 T rho, rho0, rho1, u[2];
502
503 rho0 = cell.computeRho();
504
505 cell.neighbor({-NORMAL_X,-NORMAL_Y}).computeRhoU(rho1, u);
506
507 T uPerp = 0;
508
509 Vector<T,2> normalVec({NORMAL_X,NORMAL_Y});
510
511 if (normalVec[0] == 0) {
512 uPerp = normalVec[1] * u[1];
513 } else if (normalVec[1] == 0) {
514 uPerp = normalVec[0] * u[0];
515 }
516
517 rho = (rho0 + uPerp * rho1) / (1. + uPerp);
518 cell.defineRho(rho);
519}

◆ getPriority()

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

Definition at line 126 of file boundaryPostProcessors2D.h.

126 {
127 return 0;
128 }

Member Data Documentation

◆ scope

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

Definition at line 124 of file boundaryPostProcessors2D.h.


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