CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   question about how wall functions are implemented (https://www.cfd-online.com/Forums/openfoam-programming-development/158619-question-about-how-wall-functions-implemented.html)

LuisAlberto August 30, 2015 13:59

question about how wall functions are implemented
 
Hello everybody,

I am trying to go into how Wall Functions are implemented in detail.

turbulence->correct() is called by the solver. In such function (let's think about kEpsilon.C for instance), the dissipation equation is solved first and the kinematic energy equation afterwards.

When using a standard Wall Function, epsilon_p and G_p values for the first nodes P from the walls are computed as a new boundary condition, while for k_p, such values are not set because the boundary condition is dk/dn=0 at the physical wall, i.e, in the dissipation equation the epsilon values at the P nodes are not unknown, while for the kinematic energy equation (as for U and p fields) the values at all cells are unknown.

In the description of 'epsilonWallFunctionFvPatchScalarField.C" you can read:
"inserts near wall epsilon values directly into the epsilon equation to act as a constraint".

From this, I understand that also for the dissipation equation the whole computational domain is solved but the values at the "P" nodes are set by additional constraints (equations?)

How is this implemented in OF? I don't see which functions are called for this and where.

Any hints are welcomed.

Thanks in advance,

LuisAlberto September 5, 2015 14:11

Hello,

I got it. For instance, in kEpsilon.C, the function boundaryManipulate() is called, which is implemented in fvMatrix.C and which calls the manipulateMatrix() function, in this case, the one implemented in epsilonWallFunctionFvPatchScalarField.C. There is where it "inserts near wall epsilon values directly into the epsilon equation to act as a constraint" by calling to setValues() which "Set solution in given cells to the specified values and eliminate the corresponding equations from the matrix."

Everything all right.


All times are GMT -4. The time now is 20:46.