CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Yplus and ystar

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 2 Post By svens
  • 3 Post By Mojtaba.a
  • 2 Post By wc34071209
  • 1 Post By elmo555

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 4, 2006, 10:22
Default Hello, I was taking a look
  #1
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
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
guido_adriaensen is offline   Reply With Quote

Old   September 9, 2009, 15:49
Default
  #2
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 17
svens is on a distinguished road
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 and beatlejuice like this.
svens is offline   Reply With Quote

Old   April 26, 2013, 11:03
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 2, 2013, 12:40
Default
  #4
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by immortality View Post
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
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   May 2, 2013, 13:14
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; May 2, 2013 at 13:33.
immortality is offline   Reply With Quote

Old   May 2, 2013, 13:52
Default
  #6
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by immortality View Post
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?
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   May 2, 2013, 14:25
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
the second file he has put there.are they only for LES?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 2, 2013, 14:44
Default
  #8
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by immortality View Post
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.
Attached Files
File Type: gz yPlus.tar.gz (10.0 KB, 207 views)
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   May 2, 2013, 15:47
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 2, 2013, 16:29
Default
  #10
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by immortality View Post
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.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   May 3, 2013, 08:55
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
yes.I use that file.
can anyone help how change it to adapt to 2.2.0 version?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 5, 2013, 09:44
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 5, 2013, 14:41
Default
  #13
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   November 21, 2013, 03:11
Default
  #14
Member
 
India
Join Date: Oct 2012
Posts: 84
Rep Power: 14
mayank.dce2k7 is on a distinguished road
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
mayank.dce2k7 is offline   Reply With Quote

Old   June 29, 2017, 11:58
Default
  #15
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14
wc34071209 is on a distinguished road
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.
wc34071209 is offline   Reply With Quote

Old   June 29, 2017, 12:14
Default
  #16
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14
wc34071209 is on a distinguished road
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.
elmo555 and calf.Z like this.
wc34071209 is offline   Reply With Quote

Old   December 6, 2017, 11:15
Default
  #17
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10
elmo555 is on a distinguished road
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 =
                mesh.lookupObject<cmpModel>(turbulenceModel::propertiesName);
            calcYPlus(model, mesh, yPlus);
where
Code:
        template<class TurbulenceModel>
        void calcYPlus
        (
            const TurbulenceModel& turbulenceModel,
            const fvMesh& mesh,
            volScalarField& yPlus
        );
OpenFOAM 4.x, OpenFOAM latest (dev):
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] =
                d[patchi]
               *sqrt
                (
                    nuEffBf[patchi]
                   *mag(turbModel.U().boundaryField()[patchi].snGrad())
                )/nuBf[patchi];
OpenFOAM+ v1706:
src/functionObjects/field/yPlus/yPlus.C
in bool Foam::functionObjects::yPlus::execute()
Code:
                yPlusBf[patchi] =
                    d[patchi]
                   *sqrt
                    (
                        model.nuEff(patchi)
                       *mag(UBf[patchi].snGrad())
                    )/model.nu(patchi);
btgray likes this.
elmo555 is offline   Reply With Quote

Old   April 21, 2019, 04:44
Default
  #18
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
Quote:
Originally Posted by wc34071209 View Post
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.
That's what I want to do. But how can I borrow the the calculation of y-plus in my own turbulence model code successfully? There appears no declaration of yPlus or other mistakes. Thank you.
calf.Z is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to adapt yplus,ystar?(standard wall function) scott FLUENT 3 October 19, 2006 05:54
ystar and yplus sarah_ron FLUENT 2 July 4, 2005 11:51
ystar and yplus sarah_ron FLUENT 1 December 16, 2004 12:19
Yplus mefpz CFX 7 March 10, 2004 21:49
YPLUS value for RSM. cfd guy CFX 13 August 8, 2001 12:16


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