CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Wall functions and turbulence models implementations (https://www.cfd-online.com/Forums/openfoam-solving/58303-wall-functions-turbulence-models-implementations.html)

jposunz November 11, 2008 00:39

Hi All, This is my first po
 
Hi All,

This is my first post so I hope its in the right place. I've also searched thoroughly without any luck but I'm sorry if I've missed something obvious and this questions been answered.

I'm going to write some new wall functions to use with turbFoam and simpleFoam. At first it's just a change to include a roughness length and then something a little more sophisticated.

Before doing that I'm trying to understand exactly how the turbulence model and wall functions are implemented. I'm new to OpenFoam and have only been back in CFD for a year so I'm a bit rusty and I'm having some problems even understanding the k-epsilon implementation.

For example, what exactly is DivDevRef and why is it calculated by:

- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(fvc::grad(U)().T()))

I can't seem to reconcile this with the theoretical equations for the k-epsilon model.

Also why is G accumulated then averaged in WallFunctionsI.H using:

G[faceCelli] +=
(nutw[facei] + nuw[facei])
*magFaceGradU[facei]
*Cmu25*sqrt(k_[faceCelli])
/(kappa_.value()*RASModel::y_[patchi][facei]);

Where is nuEff set?

I guess I have a general query which is where can I find notes or references for the implementations of the various methods?

Thanks very much in advance!

kbr November 24, 2008 04:17

Hi John, I'll try to answer
 
Hi John,

I'll try to answer one of your questions:

G is accumulated then averaged due to cells which belong to more than one face. Being precise, "faceCelli" is the cell belonging to the face "facei". If there's a corner there a two or more faces belonging to the same cell. In case of just taking the value without averaging it is not clear which face's value of muw and mutw is been taken. Therefore, the values are summed and then averaged by the number "cellBoundaryFaceCount" of faces belonging to a single cell.

"nuEff" is set in "turbulenceModel.H".

I hope my answer is helpful for you.

Kerstin

david October 23, 2009 04:02

Hi all,

I know that this thread is already a year old but my questions fits to this topic. My question is the following:

The division by cellBoundaryFaceCount is done more than once for a corner cell. Why that? Wouldn't it be better to set cellBoundaryFaceCount=1 after the averaging was performed the first time for a corner cell? Or has it another reason?

Best regards
David


All times are GMT -4. The time now is 03:22.