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

Problems with YPlusRAS and wallShearStress

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2010, 08:54
Default Problems with YPlusRAS and wallShearStress
  #1
New Member
 
Peter
Join Date: Aug 2010
Posts: 16
Rep Power: 15
Peter85 is on a distinguished road
Dear Foamers,

I am simulating a simple compressible channel flow, using the rhoSimpleFoam solver and the k-Omega-SST turbulence model.
For postprocessing, I'd like to compute YPlus to validate my grid and the wall shear stress. The Reynolds-number is about 18000.
Also, I calculated Tau_wall and YPlus using correlations to validate my results.
For YPlus at the wall:
I used the Blasius-correlation to calculate Cf (Cf = 0.079 * Re ^(-0.25))
Then I calculated Tau_wall using Cf = Tau_wall / (0.5 * rho_0 * U_0^2).
Using Tau_wall, it was easy to calculate U_tau (= sqrt (Tau_wall/rho)) and yPlus (= U_tau * y/ nu with y = height of the closest cell to the wall, this gives me the y* of the first cell).
For Tau_wall:
Using the Blasius-correlation and calculate Tau as described above.

Unfortunately, the values of yPlus were not even close to the ones given by the openFoam utility, and the values of Tau_wall were different by about 20 percent.

The next approach to solve this problem was to write a program, calculating the wall shear stress using the wall velocity gradient, calculated by wallGradU.
The shear stress is calculated Tau_wall = nu*rho * du/dn, taking du/dn from wallGradU. This results matched the ones calculated with the correlation much better.
(better description of how to calculate wall shear stress can be found here:
http://www.cfd-online.com/Forums/ope...interfoam.html)
Therefore, I assume that wallShearStress and YPlus give wrong values. Unfortunately, I don't know why. I just know that those tools are using the wall models to calculate the values, but I don't know how this works exactly.
Is someone familiar with this problem? Can somebody tell me why these results calculated with this tools are wrong?
I think I read somewhere that those tools are only valid for incompressible flows, but not for compressible ones, is that true?

Does anyone know a tool to calculate YPlus correctly? I need to plot a diagram uplus/yplus, therefore I need the exact values.

Thanks,
Peter
Peter85 is offline   Reply With Quote

Old   October 3, 2010, 10:49
Default
  #2
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 20
Fransje will become famous soon enough
Dear Peter,

I don't know if it would be of any help, but I am doing the same thing, albeit with results based on a LES simulation of channel flow instead of RANS simulation. I'm using a 32^3 mesh.

I'm implementing the following procedure:
  • I take a y-z plane, and compute for every cell next to the wall the value Ugrad, simply taking the U component divided by dx, ie Ugrad = Ux/dx
  • Then I can compute u_tau by taking the square root of Ugrad time nu, which is read from your transportProperties file, and stored in db(). So you simply do u_tau = sqrt(nu*Ugrad)
The u_tau results I get are good, although they might be even beter with a higher order estimation of Ugrad, over two or more cells in the y direction.

Regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 4, 2010, 07:45
Default
  #3
New Member
 
Peter
Join Date: Aug 2010
Posts: 16
Rep Power: 15
Peter85 is on a distinguished road
Hi Francois!

Thank you for your answer. I did the same as you suggested in postprocessing with Tecplot, using the velocitygradient given by wallGradU and now it works.
For other users with the same problem:
Don't use wallShearStress, I don't know why, but this tool gives wrong results. And the results given by yPlus are wrong too, because this tool calculates yStar and not yPlus
Peter85 is offline   Reply With Quote

Old   October 20, 2010, 17:36
Default
  #4
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
thanks for sharing your experiences
can someone else confirm those sad conclusions ?
francois is offline   Reply With Quote

Old   October 22, 2010, 05:57
Default
  #5
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
how does this work?
Attached Files
File Type: gz yPlus.tar.gz (2.4 KB, 488 views)
chegdan, cfdonline2mohsen and mgg like this.
niklas is offline   Reply With Quote

Old   October 22, 2010, 08:22
Default
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Hmm... I thought so there might be something wrong. What I remember, even calculating yPlus/ on 0/ folder at very beginning of simulation for different related meshes it was giving the same yPlus value, whereas different value was expected.
paka is offline   Reply With Quote

Old   November 3, 2010, 06:50
Default
  #7
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Quote:
Originally Posted by niklas View Post
how does this work?
Thank you very much Niklas for your kind answer.
I've tried your yPlus app, it compiles well run well but the output is zero on my case:

Create time

Create mesh for time = 100

Time = 100
Calculating wall distance

Writing wall distance to field y

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}

Patch 2 named centerpiece y+ : min: 0 max: 0 average: 0

Patch 3 named pipewall y+ : min: 0 max: 0 average: 0

Patch 4 named fins y+ : min: 0 max: 0 average: 0

Writing yPlus to field yPlus

End


The yPlus file is created in the time directory but the boundaryField values on the patches are "uniform 0;"

I'm using OF 1.7.1 on ubuntu 10.04.
This issue with the computation of the wallShearStress and the yPlus values makes me crazy.

Francois
francois is offline   Reply With Quote

Old   November 3, 2010, 08:23
Default
  #8
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
It looks like you dont have wallFunctions as boundary conditions.

here's a new version which does the yplus calculation if its just a wall as well.
Attached Files
File Type: gz yPlus.tar.gz (2.5 KB, 666 views)
niklas is offline   Reply With Quote

Old   November 3, 2010, 08:38
Default
  #9
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Hi Niklas !
Thanks a lot to help me on this issue.

The new yPlus app has the same behavior: perhaps there is something wrong with my case ?

Will look deeper and try to find something.
Thanks

François
francois is offline   Reply With Quote

Old   December 1, 2010, 13:11
Default
  #10
New Member
 
Andreas Schwärzle
Join Date: Sep 2010
Posts: 6
Rep Power: 15
chantre is on a distinguished road
Hi Niklas,
I just had a look into your yPlus program and wondered about how you calculate y+.
Can you tell me why you use 'nut' to calculate 'u+', and for the calculation of 'y+' you use 'nu' (from RASModel)?

Thanks for your help!
/Andi

P.S.: With your second version of yPlus, I had the same problem as Francois, but only for very thin first layers (should result in appr. y+ =1)
chantre is offline   Reply With Quote

Old   March 11, 2011, 03:53
Default
  #11
jms
Member
 
José
Join Date: Jan 2011
Posts: 73
Rep Power: 15
jms is on a distinguished road
Dear Andreas, (or anybody who can help me with this problem)

Could you get a value of yplus different to 0 for thin layers too? (I am using a 1st cell height of 2.75e-05)

Thanks,

José
jms is offline   Reply With Quote

Old   March 11, 2011, 10:06
Default
  #12
New Member
 
Andreas Schwärzle
Join Date: Sep 2010
Posts: 6
Rep Power: 15
chantre is on a distinguished road
Hi Jose,
have a look at the modified yPlusLES tool that Niklas also proposed. This is the way to calculate y+ when dealing with a low-Re mesh. Note that its only for incompressible flow. (which I was calculating then, so my problem was solved this way)

/Andreas
chantre is offline   Reply With Quote

Old   March 11, 2011, 10:07
Default
  #13
New Member
 
Andreas Schwärzle
Join Date: Sep 2010
Posts: 6
Rep Power: 15
chantre is on a distinguished road
Hi Jose,
have a look at the modified yPlusLES tool that Niklas also proposed. This is the way to calculate y+ when dealing with a low-Re mesh. Note that its only for incompressible flow. (which I was calculating then, so my problem was solved this way)

http://www.cfd-online.com/Forums/ope...s-1-7-1-a.html

/Andreas
chantre is offline   Reply With Quote

Old   March 15, 2011, 10:27
Default
  #14
jms
Member
 
José
Join Date: Jan 2011
Posts: 73
Rep Power: 15
jms is on a distinguished road
Hi Andreas,

Thank you very much for your advice.
There is one very important thing I want to comment though. The equation that you can find in that file from Niklas uses a variable "d", i.e. the nearWall distance. I had a look at the values of this d. I expected them to be the same all over the airfoil I am computing (since I am using a mesh with constant 1st cell height of 2.75e-5). To be sure that this is constant after having converted it to OF, I checked that in a post processor and this 1st cell height is constant, so there are no "conversion issues"). :S

What I get is that they oscillate between 9e-6 and 1.3e-05. I don´t like this because the value of the computed yPlus then is not perfect.

Can you tell me anything about this?

Thanks,

Regards,

José
jms is offline   Reply With Quote

Old   March 15, 2011, 10:33
Default
  #15
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 18
FelixL is on a distinguished road
Hello, José,


you say your mesh is converted from another format to polyMesh (OpenFOAM). Is it the FLUENT-format, by any chance?
If so, try setting writeFormat inside the controlDict to binary and then convert the mesh using fluentMeshToFoam. This solved some issues with the meshes in my cases.


Greetings,
Felix.
FelixL is offline   Reply With Quote

Old   March 15, 2011, 10:55
Default
  #16
jms
Member
 
José
Join Date: Jan 2011
Posts: 73
Rep Power: 15
jms is on a distinguished road
Hi Felix,

I just tried what you told me and I get exactly the same as before, see the line below: :S. (All of them should be the same...)

Patch 0 named wall dmin: 0 dmax: 1.33016e-05 daverage: 5.25961e-06

This dmin is 0, but if I show in the command prompt all the "d" calculated there is no 0 appearing, the minimum one is around 9e-06 (as I said before...).

Any idea?


Thank you very much for your attention,

José

P.D.: BTW, the reason why I don´t upload the results I told you in the other thread is because, as you see, I am struggling with some other stuff.
jms is offline   Reply With Quote

Old   October 10, 2011, 10:29
Default
  #17
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 16
camoesas is on a distinguished road
Quote:
Originally Posted by niklas View Post
It looks like you dont have wallFunctions as boundary conditions.

here's a new version which does the yplus calculation if its just a wall as well.

Hey Niklas,

actually I am working with your yPlus utility. I am trying to remodel it to calculate the wallShearStress for a compressible simulation.
For calculating y+ you are using mut and mu. Why are you using mut in the square root? As I know the definition of y+ is with mu instead of mut. Am I wrong?

Code:
yPlus.boundaryField()[patchi] =
            y[patchi]
          * sqrt
            (
           mut.boundaryField()[patchi]
         * mag(U.boundaryField()[patchi].snGrad())
         / rho.boundaryField()[patchi]
                )
          / (RASModel->mu().boundaryField()[patchi]/rho.boundaryField()[patchi]);

What does this "RASModel->mu..." mean?

Thanks a lot!

Camoesas
mm.abdollahzadeh likes this.
__________________
OF - 2.0.0
camoesas is offline   Reply With Quote

Old   October 10, 2011, 11:15
Default
  #18
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Quote:
Originally Posted by camoesas View Post
Hey Niklas,

actually I am working with your yPlus utility. I am trying to remodel it to calculate the wallShearStress for a compressible simulation.
Why don't you use the utilities distributed with OpenFOAM?
See util /postProcessing/wall/
You may also want to read: http://www.cfd-online.com/Forums/ope...bend-pipe.html

Quote:
What does this "RASModel->mu..." mean?
mu() is a member function of any compressible RAS model. This one returns a volScalarField with the laminar viscosity. .boundaryField() is something similar for any geometricField type (of which volScalarField is one), you can imagine what is does probably.
Bernhard is offline   Reply With Quote

Old   October 10, 2011, 13:47
Default
  #19
Senior Member
 
Join Date: Mar 2009
Posts: 138
Rep Power: 16
camoesas is on a distinguished road
HI Bernhard,

As I know there is no utility to calculate the wallShearStress in compressible cases...

__________________
OF - 2.0.0
camoesas is offline   Reply With Quote

Old   May 2, 2013, 13:33
Default
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
the file that Niklas has put doesn't compile in 2.2.0 version.is there any modification?
__________________
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

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -4. The time now is 07:56.