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

Spalding's law with LES

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2023, 10:19
Default Spalding's law with LES
  #1
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Hi all,

I am hoping to clarify my understanding of Spalding's law, and how one might use it to implement a wall function with an LES code.
As I understand it, Spalding's law is a single equation describing the relation between y+ and u+ in the boundary layer, and is a good approximation for any boundary layer profile through the linear, buffer, and log-law regions.

To use this in a CFD code, we can use the relations:

y+ = (y_p)x(u*)/nu

and

u+ = u_p/u*

To re-write Spalding's equation in terms of u*. Here, y_p and u_p are the perpendicular distance from the wall and the velocity respectively, at the first node from the wall for finite element codes, or the cell centre for finite volume codes.
Since u_p and y_p are known, we can use something like Newton's method to solve for u*. We substitute this back in to find y+ at that node/cell centre using the equation above.

So far, so good. Now, suppose we want to take advantage of this to relax the mesh resolution requirements of an LES model. In my case, this is the Smagorinsky model with Van Driest damping applied.

For this case, our subgrid scale eddies are modelled by introducing a turbulent viscosity, which is a function of the fluid strain rate tensor and the cell size.
Near the wall, we apply damping to this viscosity to account for the fact that only eddies below a certain size can form in this region. The damping we apply is a function of y+.
When we try to combine these, is it simply the case that Spalding's law enables a better approximation of the true y+ value, and hence we can apply a more appropriate level of damping at that location through the Van Driest damping function?

Some additional questions: Firstly, is this an example of wall-modelled LES? Or does that term refer to something else?

Also, there are some constants in Spalding's law. Would these change for different types of flow, or should the function be truly universal?

The reason for asking is that the y+ I am currently calculating tends to be significantly lower at the first node from the wall in a simple flat plate case than the 'true' y+. I am estimating the true y+ by resolving near the wall at y+<1, then on a coarser mesh, noting that y+ scales linearly with y.
For some particular node on the coarser mesh, Spalding's law as described above is giving y+ ~25, where the 'true' value is ~40. This has me wondering if the constants need changing for internal vs external flows, or something like this. If not, it is of course possible that my implementation in code is wrong.


Thanks in advance for your help!
eilloo is offline   Reply With Quote

Old   July 7, 2023, 15:49
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
First of all, wall functions and Van Driest damping are two different things. In fact, you need Van Driest when your y+ is such that you don't need wall functions (it's slightly more complex, but let's stop there).

Second, wall functions are heuristics used to compute wall stresses in case of scarce resolution and implicitly hoping that their feedback into the flow is such that the whole thing is stable around the correct flow condition (well, actually not differently from rans). They were explicitly developed for rans (or its experimental equivalent) and the largest experience on their use (which point, which functions, etc.) is explicitly tied to it.

In LES the typical wall functions are kind of questionable, yet people have found that they work, and they work best when the point where they match the external flow is kind of further away from the wall wrt the first near wall point.

So, in LES you need to use wall functions just like for RANS, but you might need a different specific function and procedure.

Van Driest is needed because standard Smagorinsky has the wrong near wall behavior, but that comes into play only if your grid allows you to get close to the wall.
sbaffini is offline   Reply With Quote

Old   July 10, 2023, 05:41
Default
  #3
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Interesting... the reason I have been looking specifically at Spalding's law is that I have seen it recommended as suitable for LES due to the fact it is insensitive to y+. As I understand it, this means the first layer height doesn't make much difference when it comes to matching the external flow, if we were to assume that the external flow is modelled well.

My thinking was that you could therefore choose a first near-wall point height that might still be in the region requiring van Driest damping, but would still not resolve the boundary layer well.
Here, the wall function might still improve the accuracy of the simulation, compared to using the same grid with only the damped Smagorisnky model.
I would also expect this to be more accurate than using a grid coarse enough near the wall that no damping is applied, with Spalding's law applied at the first near wall point.

Looking at my own results, this is roughly the pattern that is followed if we consider either wall shear stress or calculated y+ compared to 'true' values as a metric.
However, it's fair to say that neither method are especially close to the 'true' value (maybe 30% out at best).

Perhaps I am over-estimating how accurate wall functions tend to be, or Maybe Spalding's Law is not suitable for use with the Smagorinsky model in this way, despite the fact it describes all three boundary layer regions?
eilloo is offline   Reply With Quote

Old   July 10, 2023, 06:03
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Spalding law, like others with similar features (e.g., Musker, Reichardt, etc.) is y+ insensitive in the sense that they are valid for an y+ range going from 0 to the outer layer.

Note, however, that in my previous post I didn't mention dependence from y+, I mentioned dependence from the point location: first cell center, second one, etc. This has been observed in LES, not y+ dependence.

I probably was too rigid in my explanation about Van Driest. Indeed, as you say, in the context of an all y+ wall law, and especially in LES, where y+ fluctuations are expected, it might have sense to have both a wall function and a van Driest damping.

However, the reason I was so rigid was in order to make clear that they are two completely different things, to the point that you can have a fully resolved LES with no wf but damping in Smagorinsky or a fully coarse LES with wf but no damping.

So, let me stress it again.

The van Driest damping is solely related to the deficiency of the Smagorinsky model to properly behave near a wall. In practice, Smagorinsky adds a spurious stress at the wall (there is, actually, a whole theme about if such spurious stress is actually always bad, as its effects must be assessed with respect to all the stresses numerically computed at the wall) and van Driest damps that.

Wall functions are needed to properly compute wall stresses when y+ is large. Even if you have a sgs model that doesn't need van driest (say, wale) you might still need them.

Thus, van driest is really just part of the sgs model, and it is just accidental that it needs y+. In fact, in most unstructured codes, it is too costly to have such y+ for all the cells and a different approach is used for the near wall damping
acgnipper likes this.
sbaffini is offline   Reply With Quote

Old   July 10, 2023, 07:25
Default
  #5
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Thanks for the clarification, and the quick reply.

I think I understand most of what's going on here, and I am happy with the distinction between damping and a wall function.

To check then, this means that if I were to use the Smagorinsky model with a y+ far enough from the wall that no damping is needed, the use of a wall function would not - and should not - affect the solved flow. Rather, it simply calculates the wall shear stress based on this flow.

In the case where damping is involved, it is something of a coincidence that the wall function can affect the flow, since this particular choice of damping happens to be formulated as a function of y+.

Regarding y+ dependence, I had indeed misunderstood the previous post and assumed the point location and y+ would be interchangeable in this context. I'm not sure I have fully understood this part - by 'the point where they match the external flow', do we mean the point at which we stop using the wall function and start using the solved flow?
In other words, where I described a procedure which uses the first cell height, we could apply the wall function to the first X number of layers instead (or when y+ is below some threshold)?
That said, I'm not sure this is much different from simply increasing the first cell height in terms of how it affects the flow.
eilloo is offline   Reply With Quote

Old   July 10, 2023, 08:24
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Both wall functions and damping actually affect the flow (otherwise, why bothering to use them?). The wall function stress output is actually the main viscous bc at the wall.

It is a coincidence that the damping uses the y+, if we want (as other possibilities exist). But this has nothing to do with both actually affecting the flow.

For what concerns the point you use for wall functions, in rans it is always such that: you have a near wall cell needing the stress on the wall face, then you pick the cell center velocity and assume it obeys a wall function. No other approach has ever been tested, to the best of my knowledge.

In LES, where again I have serious doubts about the applicability of wall functions born in a rans context, people have found that the following works better: you have a near wall cell needing the stress on the wall face, then you pick the velocity in a point somehow farther away from the wall (no rigorous criterion is available so far) along the normal projection to the wall passing trough the cell center and assume it obeys a wall function. You might need to interpolate velocity in that point as it might not fall in any cell center. In practice this is how it is done in immersed boundary methods and, for some reasons, it works better in LES. However, not everyone does that in LES, some just use the classical rans recipe with no modifications.
sbaffini is offline   Reply With Quote

Old   July 10, 2023, 10:55
Default
  #7
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
I think where I am confused then is the viscous BC at the wall. Typically, I would impose a no-slip BC at the wall, setting the velocity to zero for the on-wall nodes (or, in FV, I gather this is achieved using 'ghost' cells on the other side of the wall?). Wall shear stress itself is never set as a BC in this case.

Previously, I had thought that we would choose a node/cell centroid near the wall, and assume that it obeys a wall function. By looking at the velocity, we can determine the wall shear based on this wall function. Here, that wall shear never gets coupled back in to the solver - it may as well be a post-processing step. Clearly this is wrong, as you say, since why would we bother with them.

What I am missing is how the wall shear is coupled back into the solve?
It sounds from your previous answer like this would be set as a BC, as well as the no-slip condition we already have.
This sounds similar to applying a Neumann BC to the velocity - and also suggests that if we only have no slip, inlet and outlet BCs, the problem is not fully conditioned?
eilloo is offline   Reply With Quote

Old   July 10, 2023, 12:42
Default
  #8
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
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
I think where I am confused then is the viscous BC at the wall. Typically, I would impose a no-slip BC at the wall, setting the velocity to zero for the on-wall nodes (or, in FV, I gather this is achieved using 'ghost' cells on the other side of the wall?). Wall shear stress itself is never set as a BC in this case.

Previously, I had thought that we would choose a node/cell centroid near the wall, and assume that it obeys a wall function. By looking at the velocity, we can determine the wall shear based on this wall function. Here, that wall shear never gets coupled back in to the solver - it may as well be a post-processing step. Clearly this is wrong, as you say, since why would we bother with them.

What I am missing is how the wall shear is coupled back into the solve?
It sounds from your previous answer like this would be set as a BC, as well as the no-slip condition we already have.
This sounds similar to applying a Neumann BC to the velocity - and also suggests that if we only have no slip, inlet and outlet BCs, the problem is not fully conditioned?
Ok, now I see where your confusion comes from. Honestly, my experience with wall functions is solely in the FV context, where the viscous bc is just the area average wall shear stress, while the convective/inviscid bc is the normal mass flux.

You should search about fem specific wall function implementations or, similarly, for node based fv implementations (CFX is an example), or even finite difference ones, I guess. I have looked at them several times in the past but, as I don't work with those methods then the memory typically fades away.
sbaffini is offline   Reply With Quote

Old   July 11, 2023, 09:36
Default
  #9
New Member
 
Oliver
Join Date: Jan 2023
Posts: 17
Rep Power: 3
eilloo is on a distinguished road
Okay, I'll see what I can find - thanks for the insight!
eilloo is offline   Reply With Quote

Reply

Tags
les model, smagorinsky model, van driest damping, wall functions


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
LES unboundedness in high order schemes and recommendations mjavrincon OpenFOAM Running, Solving & CFD 0 June 8, 2023 11:49
applyBoundaryLayer for LES Pipe Flow simulation 1/7th power law with recycle plane JM27 OpenFOAM Pre-Processing 1 April 14, 2023 13:35
Grid difference between wall modeled LES and wall resolved LES hityangsir Main CFD Forum 9 April 17, 2015 12:59
OpenFOAM LES capability questions siw OpenFOAM Running, Solving & CFD 3 January 6, 2015 09:50
Turbulence dampening due to magnetic field in LES and RAS eelcovv OpenFOAM 0 June 8, 2010 12:35


All times are GMT -4. The time now is 03:52.