Hello,
I was taking a look
Hello,
I was taking a look at the calculation of y-plus with the checkYPlus utility, but isn't this in fact a check for y-star? Y-star = rho*Cmu^0.25*sqrt(k)*y/mu y-plus = rho*sqrt(tau_w/rho_w)*y/mu Thus Y-star is related to the turbulent kinetic energy and y-plus to the wallshearstress, or am I now overlooking something? kind regards Guido |
Hey Guido
I'm running some calculations with RSTMs and while checking y+ for the first cell I recognized the same. Checking via the yPlusRAS command creates totally different values than the calculation with: y+ = Utau*y/nu with Utau = SQRT(Tau_wall/rho) Meanwhile did you figured out something to avoid this curio? Thanks and regards, Sven |
although its old.but I have found that yPlusRAS uses y* furmula in return of y+.could anyone guide me or give an explanation on why?:)
|
Quote:
Check out this post, Niklas has came up with a solution by modifying the file yPlusLES.C: http://www.cfd-online.com/Forums/ope...tml#post280296 best |
thanks Mojtaba.
but my case is compressible.do you know how to change the incompressible yPlus code? and also it doesn't compile in OF 2.2.0: Code:
ehsan@Ehsan-com:~/Desktop/yPlus$ wmake |
Quote:
Which file did you use to compile? |
the second file he has put there.are they only for LES?
|
1 Attachment(s)
Quote:
the uploaded file is the utility I used for incompressible flows using RAS models. |
it gives this error.maybe it should modified for 2.2.0 version.
Code:
ehsan@Ehsan-com:~/Desktop/yPlus$ wmake |
Quote:
There is no nutWallFunctionFvPatchScalarField.H inside yPlus.C that it can't find. instead nutkWallFunctionFvPatchScalarField.H is used. Are you sure you are using the file I uploaded? I don't know if it has changed in OF 2.2 or not. maybe its dependency issues. |
yes.I use that file.
can anyone help how change it to adapt to 2.2.0 version? |
in mutkWallFunctionFvPatchScalarField the equation uses for y-plus is related to y-star not y-plus
Code: Code:
y-star=pow(0.09,0.25)*sqr(k)*nearDist()/mu Code:
y-plus=rho*u_star*y/mu which u*=aqrt(taw_w/rho) in the code of mut : Code: Code:
forAll(mutw, faceI) { label faceCellI = patch().faceCells()[faceI]; scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/(muw[faceI]/rhow[faceI]); if (yPlus > yPlusLam_) { mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1); } } |
could anyone have a look to resolve the error?
Code:
ehsan@Ehsan-com:~/Desktop/yPlus$ wmake |
Hi Mojtaba,
I used your yPlus utility. I ran a case using KKLOmega turbulence model with simpleFoam solver. I ran your yPlus utility after the simulation was completed. For every time step I am getting values of yPlus as "min=0, max=0, average=0". How to fix this? Also, the yPlusRAS utility that comes with OF-2.1.1 also has the problem of reporting y* instead of y+? Regards, Mayank |
Hi,
My understanding of this issue is that the quantities of y-plus and y-star are approximately the same for equilibrium turbulent boundary layers. In equilibrium turbulent boundary layers, the friction velocity u_tau is approximately equal to Cmu^0.25*sqrt(k) in the log-law region, which is exactly the definition of u_star. However, in local non-equilibrium conditions such as separation and re-attachment, a deviation exists between u_tau and u_star, as u_tau is no longer approximately equal to Cmu^0.25*sqrt(k). I look forward to anyone correcting me if I am wrong here. |
As regards OpenFOAM , nutLowReWallFunctions/mutLowReWallFunctions calculates y-plus according to the wall shear stress and the friction velocity. Other wall functions for nut/mut, such as mutkWallFunction, calculates y-plus in the way of calculating y-star.
You can borrow the code for the calculation of y-plus in nutLowReWallFunctionFvPatchScalarField.C/mutLowReWallFunctionFvPatchScalarField.C to write your own utility or function object to calculate y-plus. |
Whether the utility calculates y+ or y* seems to depend on the OpenFOAM version you're using. The latest versions of both OpenFOAM and OpenFOAM+ seems to use the equation for y+. In older versions, it can be either y+, y* or depending on the turbulence model.
OpenFOAM 3.0.x: OpenFOAM-3.0.x/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C in void Foam::yPlus::execute() Code:
const cmpModel& model = Code:
template<class TurbulenceModel> OpenFOAM-4.x/src/functionObjects/field/yPlus/yPlus.C in void Foam::functionObjects::yPlus::calcYPlus(turbModel, mesh, yPlus) OpenFOAM-dev/src/functionObjects/field/yPlus/yPlus.C in void Foam::functionObjects::yPlus::calcYPlus(turbModel, yPlus) Code:
yPlusBf[patchi] = src/functionObjects/field/yPlus/yPlus.C in bool Foam::functionObjects::yPlus::execute() Code:
yPlusBf[patchi] = |
Quote:
|
All times are GMT -4. The time now is 05:11. |