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

wallShearStress, wallGradU are inconsistent

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes
  • 1 Post By dancfd
  • 12 Post By dancfd
  • 1 Post By dancfd
  • 2 Post By wyldckat
  • 1 Post By vikramaditya91

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2013, 23:57
Default wallShearStress, wallGradU are inconsistent
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 16
dancfd is on a distinguished road
Hello all,

I just tried to calculate the wallShearStress entries of my case from wallGradU (dU/dy), rho (all found using OF postprocessors and sample utility), and nu (from transportProperties). Since tau = mu * (dU/dy) = rho * nu * (dU/dy), I figure that tau / (rho * dU/dy) should be constant, however this is not the case.

Can anyone explain why there is a discrepancy? I feel like I should be able to calculate wallShearStress somehow using its constituent parameters. This is important to me since the wallShearStress utility does not work for laminar flow and I want to compare the forces on an airfoil in laminar and turbulent flow for the same case.

Thanks in advance,
Dan
immortality likes this.
dancfd is offline   Reply With Quote

Old   July 14, 2013, 15:07
Default
  #2
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 16
dancfd is on a distinguished road
Issue resolved - rather, issues:

1) for compressible cases, you must run "wallShearSress -compressible" with that flag in place. The only way to know to do this is to read the code for the wallShearStress utility. Suggestion: the utility should be able to distinguish between compressible and incompressible cases by itself, or force the user to use a flag for compressible and incompressible, to make this utility more user friendly.

2) by looking at the turbulence model (kwSST) code and the wallShearStress code, I found that OF calculates wallShearStress as follows:
tau_w = -(mu + mut) * (wallGradU)

When I made that change, the data matched.

Therefore, to calculate laminar, tau_w = -mu * (wallGradU) since mut = 0.

May others learn from my mistakes!
dancfd is offline   Reply With Quote

Old   May 25, 2014, 10:13
Default
  #3
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 16
dancfd is on a distinguished road
To continue this monologue, I noticed that when running wallShearStress with and without the compressible flag on the same case, the results differed by a factor of rho yet the dimensions in both wallShearStress files were the same. This suggests that the equation for tau_w (wallShearStress) changes as follows for compressible/incompressible cases:

wallShearStress:
\tau_w = \nu_{eff} \frac{\partial U}{\partial y}

wallShearStress -compressible:
\tau_w = \mu_{eff} \frac{\partial U}{\partial y}= \rho \nu_{eff} \frac{\partial U}{\partial y}

Therefore, if I understand correctly:
\tau_{wCompressible} = \rho\tau_{wIncompressible}

Which would not be a problem if the dimensions in both cases did not read the same (m2/s2):
Code:
dimensions      [0 2 -2 0 0 0 0];
This looks to me like a bug. Thoughts?

Regards,
Daniel
sina.s likes this.
dancfd is offline   Reply With Quote

Old   December 6, 2014, 05:30
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Daniel,

Sorry for the (very) late reply, but only now did I trip over your thread, while looking for the exact answer you've given in post #2

The explanation to your latest question is simple: OpenFOAM uses a simplification of omitting rho to save up some CPU cycles in pointless multiplications by rho, when handling incompressible simulations... at least in most cases. This should also increase accuracy, since with each multiplication, there is always an error involved, no matter how small.

This to say that wallShearStress in incompressible mode does what it can with the data we provide it, namely since rho was not provided, it cannot multiply by an unknown rho
I also explained this with other details a few months ago (which was a few months after your last post), on this post: http://www.cfd-online.com/Forums/ope...tml#post509408 post #6

Best regards,
Bruno
vikramaditya91 and gebab like this.
__________________
wyldckat is offline   Reply With Quote

Old   May 4, 2016, 04:52
Default Just a side note while calculating yPlus
  #5
New Member
 
eu sou cfd
Join Date: Jun 2012
Location: Brazil
Posts: 18
Rep Power: 13
vikramaditya91 is on a distinguished road
If you are not happy with the yplusRAS utility provided by OpenFOAM which has it's problems documented here Official OpenFOAM and here http://www.cfd-online.com/Forums/ope...earstress.html, you might want to be aware of the fact that in the equation
tau_w = -(mu + mut) * (wallGradU)
mut is almost 0 for y+<3, so it can be ignored. This means that you will not have to call the mut, but just the
tau_w= mu*wallGradU, will do the trick.
lucasbraganca likes this.
vikramaditya91 is offline   Reply With Quote

Old   July 18, 2018, 08:33
Default
  #6
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
Quote:
Originally Posted by vikramaditya91 View Post
If you are not happy with the yplusRAS utility provided by OpenFOAM which has it's problems documented here Official OpenFOAM and here http://www.cfd-online.com/Forums/ope...earstress.html, you might want to be aware of the fact that in the equation
tau_w = -(mu + mut) * (wallGradU)
but is almost 0 for y+<3, so it can be ignored. This means that you will not have to call the mut, but just the
tau_w= mu*wallGradU, will do the trick.
_______________________

I feel this would not work for the wall functions. Does the mut automatically index the corrected mut on the patch?
randolph 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
wallShearStress Monitoring Mojtaba.a OpenFOAM Running, Solving & CFD 6 July 30, 2019 05:14
Problems with YPlusRAS and wallShearStress Peter85 OpenFOAM Post-Processing 21 May 4, 2016 05:15
wallGradU components amin66 OpenFOAM Post-Processing 9 March 25, 2016 20:09
getting (0 0 0) wallGradU value when i m probing wallGradU at some points suryawanshi_nitin OpenFOAM 1 December 9, 2013 11:36
WallShearStress for settlingFoam Elise OpenFOAM Post-Processing 1 August 28, 2012 05:50


All times are GMT -4. The time now is 13:42.