Skip to content

Reply To: Using addWallFunctionBoundary

#5223
Marc
Participant

Dear Vinh,
at the moment we don’t have a suitable example to show the working principle of the wall function. We will include a helpful example in the next release. Here is a step by step summary how to use the wall function:
1. you need a suitable Descriptor e.g.

#define DESCRIPTOR WallFunctionForcedD3Q19Descriptor

2. Then you should define your wallfunction parameter:

/* Used method for density reconstruction
* 0: Zou-He
* 1: extrapolation
* 2: constant
*/
int rhoMethod = 0;

/* Used method for non-equilibrium particle distribution reconstruction
* 0: regularized NEBB (Latt)
* 1: extrapolation NEQ (Guo Zhaoli)
* 2: regularized second order finite Differnce
* 3: equilibrium scheme
*/
int fneqMethod = 3;

/* Used wall profile
* 0: Musker profile
* 1: power law profile
*/
int wallProfile = 0;

/// special formulation for straight boundaries
bool curved = false;

/// use van Driest damping function in boundary cell
bool useVanDriest = true;

/// von Karman constant for van Driest model
T vonKarman = 0.375;

wallFunctionParam<T> wallFunctionParam;
wallFunctionParam.curved = curved;
wallFunctionParam.bodyForce = true;
wallFunctionParam.wallProfile = wallProfile;
wallFunctionParam.rhoMethod = rhoMethod;
wallFunctionParam.fneqMethod = fneqMethod;
wallFunctionParam.latticeWalldistance = latticeWalldistance;
wallFunctionParam.vonKarman = vonKarman;

3. define a suitable Dynamics on your wall function boundary

ExternalTauEffLESForcedBGKdynamics<T, DESCRIPTOR> boundaryDynamics (converter.getLatticeRelaxationFrequency(), instances::getBulkMomenta<T,DESCRIPTOR>());

In Prepare Lattice

sLattice.defineDynamics(superGeometry, 2, &boundaryDynamics);
sBC.addWallFunctionBoundary(superGeometry, 2, converter, wallFunctionParam);

I hope this helps you!

Best,
Marc