CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Y+, and wall shear calculation in LES

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2023, 09:20
Default Y+, and wall shear calculation in LES
  #1
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Hi all,


I've been exploring large eddy simulations - specifically, the Smagorinsky model with Van Driest damping, as this seems like a relatively simple place to start. However, I'm not certain I am understanding something correctly:

Using a fine mesh (y+ < 1) and calculating wall shear stress (wss) directly from the velocities in the first cell has given good results for a flat plate. So far, so good, and this makes sense to me as we are in the viscous sublayer, so we are getting a pretty good approximation of the true du/dy at the wall.

For coarser meshes (y+>30), my understanding is that calculating du/dy directly as above would result in an underestimate of WSS (and also throw out our y+ calculations as a result).
So, to compensate, we calculate an increased 'effective viscosity' through something similar to a wall function. Specifically, we use the equation shown here:

https://doc.cfd.direct/notes/cfd-gen...wall-functions

I've seen the equation in slightly different forms (such as the excellent CFD 101 series on YouTube), and have re-arranged to confirm it is indeed the same equation showing up.

However...

When implementing this formula (I'm using the Newton Rhapson method to get u_star) on meshes with y+ > 30, my wss is coming out much lower than the fine mesh, direct calculation method. When I say 'much lower', it's around a quarter of the fine mesh version, which in turn agrees pretty well with experiments.

My question is... should this be the case?

I am aware that using wall functions generally does not give good results for wss, so I would expect some difference. However, I have no real sense of how far out they should typically be. I'm hoping some more experienced folk on here can offer some insight.

I'm still a little fuzzy on choosing mesh resolutions for LES, since the cell size has an influence on the modified viscosity terms and so on.
Is LES simply not formulated to be compatible with wall functions like this? And if not, why not, as it seems to me the principle for calculating wss should still be valid here.

Of course, if the answer is 'no, it should be a much better approximation than that!', then I will go away and triple check my implementation.


Thanks in advance!
eilloo is offline   Reply With Quote

Old   January 27, 2023, 05:01
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I am not sure about your question and what is your goal. However, if you use a wall modelled BC then there is no sense in computing the shear at the wall. Actually, this is something you (statistically) assume at the y+ you have.
Maybe it is useful for you if you first run a simulation for a classic plane channel flow with resolved and unresolved BL.
FMDenaro is offline   Reply With Quote

Old   January 27, 2023, 05:27
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,156
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by eilloo View Post
Hi all,


I've been exploring large eddy simulations - specifically, the Smagorinsky model with Van Driest damping, as this seems like a relatively simple place to start. However, I'm not certain I am understanding something correctly:

Using a fine mesh (y+ < 1) and calculating wall shear stress (wss) directly from the velocities in the first cell has given good results for a flat plate. So far, so good, and this makes sense to me as we are in the viscous sublayer, so we are getting a pretty good approximation of the true du/dy at the wall.

For coarser meshes (y+>30), my understanding is that calculating du/dy directly as above would result in an underestimate of WSS (and also throw out our y+ calculations as a result).
So, to compensate, we calculate an increased 'effective viscosity' through something similar to a wall function. Specifically, we use the equation shown here:

https://doc.cfd.direct/notes/cfd-gen...wall-functions

I've seen the equation in slightly different forms (such as the excellent CFD 101 series on YouTube), and have re-arranged to confirm it is indeed the same equation showing up.

However...

When implementing this formula (I'm using the Newton Rhapson method to get u_star) on meshes with y+ > 30, my wss is coming out much lower than the fine mesh, direct calculation method. When I say 'much lower', it's around a quarter of the fine mesh version, which in turn agrees pretty well with experiments.

My question is... should this be the case?

I am aware that using wall functions generally does not give good results for wss, so I would expect some difference. However, I have no real sense of how far out they should typically be. I'm hoping some more experienced folk on here can offer some insight.

I'm still a little fuzzy on choosing mesh resolutions for LES, since the cell size has an influence on the modified viscosity terms and so on.
Is LES simply not formulated to be compatible with wall functions like this? And if not, why not, as it seems to me the principle for calculating wss should still be valid here.

Of course, if the answer is 'no, it should be a much better approximation than that!', then I will go away and triple check my implementation.


Thanks in advance!
There are two answers to your question.

The first one is that NO, generally speaking, LES should not use the same wall function that you can use in RANS, at least in principle. The RANS wall function can indeed be obtained from the RANS equations under suitable assumptions for the equations (i.e., only wall normal diffusive terms are retained) and the eddy viscosity (in order to be able to integrate the equations). Now, even if the eddy viscosity assumption is not different from what one does in LES, the problem is in the equation assumptions. LES is unsteady and 3D and if you analyze the instantaneous velocity profiles you have in your wall resolved LES you will notice that very few of them really resemble the wall function velocity profile. This is because it is constantly in non equilibrium.

If you forget for a moment the wall function concept and just focus on the BC at wall, what you are doing with a wall function is moving from a simple linear approximation between the wall and the first cell center, which is just \partial^2U/\partial n^2 = 0, to a more complex function that, indeed, can be derived by including more terms in the equation assumed to hold near the wall. The problem with using classical wall functions in LES is that the terms that you include in the near wall equation for the BC, even for equilibrium boundary layers, are quite not the only ones of a given order and possibly not even the highest order ones.

The second answer, as you might imagine, tells another story.

First, one can assume that, for sufficiently large wall adjacent cells, for statistically steady flows, the filtering in LES is such that most instantaneous fluctuations are indeed filtered out (yet, it is easy to do such an experiment with a wall resolved LES and realize that, indeed, it is quite not so).

Second, even if the terms included in the wall function BC only partially cover what is needed in LES, they still typically cover the average part of the stress, which is better than nothing and would still be needed in more advanced LES wall functions.

Long story short, while it shouldn't, in practice it turns out that standard RANS wall functions also work well in LES, at least for certain kind of flows. And, in my experience, they won't do worst than a solution on the same grid without wall functions.

Going to your problem, testing and debugging a wall function OUTSIDE your code is of paramount importance. That is, you can't pretend to test it just in production with a real LES flow. There's no way you are making everything correctly if it is your first time. I suggest you to put up a dedicated testbed just for the wall functions, with a simple 1D problem where you can easily check that your wf exactly matches the underlying profile.
sbaffini is offline   Reply With Quote

Old   January 30, 2023, 09:04
Default
  #4
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Thanks for the responses:


Filipo, allow me to rephrase this:

What I'm getting at is whether artificially increasing the viscosity according to the formula linked to makes sense when implementing a Smagorinsky model with Van Driest damping for meshes where y+ > 30?
Albeit simplified, the idea behind the damped Smagorinsky model is to artificially increase the viscosity to account for turbulence.
In the case of van Driest damping, the amount we modify the viscosity by depends on y+, which in turn, is a function of the wall shear stress. For a mesh where the first cell height is not within the viscous sublayer, we would get a bad estimate for wall shear stress through calculating du/dy directly (ie, u_p/y_p).
Therefore, it makes sense to artificially increase the viscosity during this calculation to get a better estimate for the wall shear, and hence a more accurate y+ value, and so finally, a more appropriate level of damping from the damping function.

My question is whether the above reasoning is true?
So far, I haven't thought of a good reason why this approach shouldn't work to enable the use of the Smagorinsky model with coarser meshes, even if it wouldn't be as accurate as resolving the boundary layer.


Paolo, that first answer certainly gives me a lot to try and visualise, especially in the context of the above explanation of my thinking... On a simple level, is this to say that the equation linked to is derived specifically from the RANS equations, but the terms accounted for in RANS vs LES are different - therefore, I should be using a different equation to modify the viscosity if I were to attempt LES for meshes with y+>30? (If so, do you happen to have any links or resources which would point me in the right direction as I've not come across LES specific wall functions yet)

The second answer is interesting, and sounds to me like this might not be such a bad approach for something like this flat plate, zero pressure gradient flow. As you mention, I have indeed found that the results are better with the wall function than without when I use a coarser mesh - although both are a long way off the the results when resolving the boundary layer instead.
Good point on testing wall functions separately, and this is definitely something I will look into implementing. I started off down this road to see if the approach described above looked at all reasonable to get away with coarser meshes than I have been using up to now!
eilloo is offline   Reply With Quote

Old   January 30, 2023, 12:18
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by eilloo View Post
Thanks for the responses:


Filipo, allow me to rephrase this:

What I'm getting at is whether artificially increasing the viscosity according to the formula linked to makes sense when implementing a Smagorinsky model with Van Driest damping for meshes where y+ > 30?
Albeit simplified, the idea behind the damped Smagorinsky model is to artificially increase the viscosity to account for turbulence.
In the case of van Driest damping, the amount we modify the viscosity by depends on y+, which in turn, is a function of the wall shear stress. For a mesh where the first cell height is not within the viscous sublayer, we would get a bad estimate for wall shear stress through calculating du/dy directly (ie, u_p/y_p).
Therefore, it makes sense to artificially increase the viscosity during this calculation to get a better estimate for the wall shear, and hence a more accurate y+ value, and so finally, a more appropriate level of damping from the damping function.

My question is whether the above reasoning is true?
So far, I haven't thought of a good reason why this approach shouldn't work to enable the use of the Smagorinsky model with coarser meshes, even if it wouldn't be as accurate as resolving the boundary layer.


Paolo, that first answer certainly gives me a lot to try and visualise, especially in the context of the above explanation of my thinking... On a simple level, is this to say that the equation linked to is derived specifically from the RANS equations, but the terms accounted for in RANS vs LES are different - therefore, I should be using a different equation to modify the viscosity if I were to attempt LES for meshes with y+>30? (If so, do you happen to have any links or resources which would point me in the right direction as I've not come across LES specific wall functions yet)

The second answer is interesting, and sounds to me like this might not be such a bad approach for something like this flat plate, zero pressure gradient flow. As you mention, I have indeed found that the results are better with the wall function than without when I use a coarser mesh - although both are a long way off the the results when resolving the boundary layer instead.
Good point on testing wall functions separately, and this is definitely something I will look into implementing. I started off down this road to see if the approach described above looked at all reasonable to get away with coarser meshes than I have been using up to now!



I don't believe that makes sense to try in getting a better evaluation of tau_wall (that is y+=0) but at the grid point y+=30. On the other hand, artificially increasing the viscosity means you artificially change the y+ function, too.

In some way, seems your are trying to accomodate your geometry.
The van Driest damping is just an accomodation for taking into accout that at y+<1 there is no turbulence, just a laminar regime. On the other hand, a dynamic Smagorinsky model will get automatically such a result.
FMDenaro is offline   Reply With Quote

Old   January 30, 2023, 13:51
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,156
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by eilloo View Post
Thanks for the responses:


Filipo, allow me to rephrase this:

What I'm getting at is whether artificially increasing the viscosity according to the formula linked to makes sense when implementing a Smagorinsky model with Van Driest damping for meshes where y+ > 30?
Albeit simplified, the idea behind the damped Smagorinsky model is to artificially increase the viscosity to account for turbulence.
In the case of van Driest damping, the amount we modify the viscosity by depends on y+, which in turn, is a function of the wall shear stress. For a mesh where the first cell height is not within the viscous sublayer, we would get a bad estimate for wall shear stress through calculating du/dy directly (ie, u_p/y_p).
Therefore, it makes sense to artificially increase the viscosity during this calculation to get a better estimate for the wall shear, and hence a more accurate y+ value, and so finally, a more appropriate level of damping from the damping function.

My question is whether the above reasoning is true?
So far, I haven't thought of a good reason why this approach shouldn't work to enable the use of the Smagorinsky model with coarser meshes, even if it wouldn't be as accurate as resolving the boundary layer.


Paolo, that first answer certainly gives me a lot to try and visualise, especially in the context of the above explanation of my thinking... On a simple level, is this to say that the equation linked to is derived specifically from the RANS equations, but the terms accounted for in RANS vs LES are different - therefore, I should be using a different equation to modify the viscosity if I were to attempt LES for meshes with y+>30? (If so, do you happen to have any links or resources which would point me in the right direction as I've not come across LES specific wall functions yet)

The second answer is interesting, and sounds to me like this might not be such a bad approach for something like this flat plate, zero pressure gradient flow. As you mention, I have indeed found that the results are better with the wall function than without when I use a coarser mesh - although both are a long way off the the results when resolving the boundary layer instead.
Good point on testing wall functions separately, and this is definitely something I will look into implementing. I started off down this road to see if the approach described above looked at all reasonable to get away with coarser meshes than I have been using up to now!
I suggest you to read carefully each page of this site, as it resumes what the current general consensus on Wall Modeled LES is, so to speak. The specific page I linked explicitly addresses the general issue on the applicabilty of certain wall models to LES.

You can also have a look at how I do my wall functions here, on my blog https://www.cfd-online.com/Forums/blogs/sbaffini/, following the series of posts named "Closing on Wall Functions".

In general, I tend to disagree on the general consensus about anything in LES. In this case, invoking as on that site the taylor series expansions for LES with wall functions is just as wrong as it sounds, in my opinion. Still, one must admit that the everyday experience says that classical wall functions indeed work in LES just as they are.

However, to elucidate what the issue is, wall functions are originally derived from the RANS equations. Under equilibrium boundary layer assumptions most terms drop from the equations and the wall normal diffusive and turbulence terms are all that remains (see the site or my blog for the equations). Now, independently from the model you use for the turbulent stresses in the simplified equations, which determines the final form of wall function you use, you started from simplified equations that miss terms that are important in LES even for equilibrium boundary layers.

It's difficult to explain why succintly. But if you understand that the flow solved in RANS is very different from the one solved in LES, you also understand that most terms dropped in equations leading to wall functions are relevant in LES even for equilibrium boundary layer flows.
sbaffini is offline   Reply With Quote

Old   January 30, 2023, 14:21
Default
  #7
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,156
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Let me add that, from your other post, I understand that you are using a FEM code. FEM codes have their own peculiarities in terms of wall function implementation, so pay attention to that as well.
sbaffini is offline   Reply With Quote

Old   February 6, 2023, 06:51
Default
  #8
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Thanks for your thoughts, and for the links - both pages look like useful resources, which I will spend more time reading.
I think I understand the problem with my approach, although as you say it's hard to put into words.
I'll read up on WMLES and hopefully determine a more appropriate approach
eilloo 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
Evaluation of Wall shear stress in LES nukecrafts OpenFOAM Verification & Validation 0 October 6, 2022 04:41
I would like to know the factors involved in the calculation of the wall shear stress dhehdxhdaus FLUENT 0 August 29, 2022 20:58
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 00:04
Wall Shear Stress calculation DudaAPD Fluent Multiphase 2 October 27, 2014 11:21
twoPhaseEulerFoam BC calculated from wall shear and alpha potac OpenFOAM Running, Solving & CFD 0 October 6, 2014 08:08


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