CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Yplus and ystar (http://www.cfd-online.com/Forums/openfoam-post-processing/61452-yplus-ystar.html)

guido_adriaensen September 4, 2006 09:22

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

svens September 9, 2009 14:49

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

immortality April 26, 2013 10:03

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?:)

Mojtaba.a May 2, 2013 11:40

Quote:

Originally Posted by immortality (Post 423357)
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?:)

Dear Ehsan,
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

immortality May 2, 2013 12:14

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
Making dependency list for source file yPlus.C
could not open file basicPsiThermo.H for source file yPlus.C
SOURCE=yPlus.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/turbulenceModels -I/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/opt/openfoam220/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlus.o
yPlus.C:37:28: fatal error: basicPsiThermo.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/yPlus.o] Error 1


Mojtaba.a May 2, 2013 12:52

Quote:

Originally Posted by immortality (Post 424731)
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
Making dependency list for source file yPlus.C
could not open file basicPsiThermo.H for source file yPlus.C
SOURCE=yPlus.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/turbulenceModels -I/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/opt/openfoam220/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlus.o
yPlus.C:37:28: fatal error: basicPsiThermo.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/yPlus.o] Error 1


I don't know how but maybe it is something like what Niklas did. modifying yPlusLES to be used for RAS for compressible flows.

Which file did you use to compile?

immortality May 2, 2013 13:25

the second file he has put there.are they only for LES?

Mojtaba.a May 2, 2013 13:44

1 Attachment(s)
Quote:

Originally Posted by immortality (Post 424757)
the second file he has put there.are they only for LES?

I think you got to modify them in order to use them with RAS models.
the uploaded file is the utility I used for incompressible flows using RAS models.

immortality May 2, 2013 14:47

it gives this error.maybe it should modified for 2.2.0 version.
Code:

ehsan@Ehsan-com:~/Desktop/yPlus$ wmake
Making dependency list for source file yPlus.C
could not open file nutWallFunctionFvPatchScalarField.H for source file yPlus.C
could not open file basicPsiThermo.H for source file yPlus.C
could not open file mutWallFunctionFvPatchScalarField.H for source file yPlus.C
SOURCE=yPlus.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/turbulenceModels -I/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/opt/openfoam220/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlus.o
In file included from yPlus.C:35:0:
/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H:56:47: fatal error: nutWallFunctionFvPatchScalarField.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/yPlus.o] Error 1


Mojtaba.a May 2, 2013 15:29

Quote:

Originally Posted by immortality (Post 424791)
it gives this error.maybe it should modified for 2.2.0 version.
Code:

ehsan@Ehsan-com:~/Desktop/yPlus$ wmake
Making dependency list for source file yPlus.C
could not open file nutWallFunctionFvPatchScalarField.H for source file yPlus.C
could not open file basicPsiThermo.H for source file yPlus.C
could not open file mutWallFunctionFvPatchScalarField.H for source file yPlus.C
SOURCE=yPlus.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/turbulenceModels -I/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/opt/openfoam220/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlus.o
In file included from yPlus.C:35:0:
/opt/openfoam220/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H:56:47: fatal error: nutWallFunctionFvPatchScalarField.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/yPlus.o] Error 1


Well, this is strange. I compiled for OF 2.1 and it worked fine.
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.

immortality May 3, 2013 07:55

yes.I use that file.
can anyone help how change it to adapt to 2.2.0 version?

immortality May 5, 2013 08:44

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:
Code:

y-plus=rho*u_star*y/mu which u*=aqrt(taw_w/rho)
y-star is related to turbulent kinetic energy while y-plus relates to friction velocity(that relates to wall skin friction in its own)

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);        }    }
thanks.

immortality May 5, 2013 13:41

could anyone have a look to resolve the error?
Code:

ehsan@Ehsan-com:~/Desktop/yPlus$ wmake
/bin/sh: /home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/wmake/bin/linux64Gcc/wmkdep: not found
SOURCE=yPlus.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/meshTools/lnInclude -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/transportModels -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/turbulenceModels -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/thermophysicalModels/basic/lnInclude -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/home/ehsan/OpenFOAM/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/yPlus.o
yPlus.C:32:19: fatal error: fvCFD.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/yPlus.o] Error 1


mayank.dce2k7 November 21, 2013 03:11

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


All times are GMT -4. The time now is 17:29.