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

Questions about LES filtering

Register Blogs Community New Posts Updated Threads Search

Like Tree13Likes
  • 1 Post By FMDenaro
  • 2 Post By FMDenaro
  • 2 Post By FMDenaro
  • 3 Post By sbaffini
  • 2 Post By sbaffini
  • 3 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2021, 16:12
Default Questions about LES filtering
  #1
Senior Member
 
Join Date: Jan 2018
Posts: 121
Rep Power: 8
Moreza7 is on a distinguished road
Hello,

I'm confused about filtering in LES. I have some questions about LES.

1-
How can we say that large scales are resolved like DNS in LES while by using filters, we are averaging over neighbor cells. For example filtered u velocity is equal to the average of neighbor cells velocity using box filter. But in DNS the velocity in each cell is not averaged.

2-
Suppose that we have cubic cells all over the domain which they have equal length, width and height and our solver is collocated. So Delta, which is the filter width(using box filter) becomes equal to the width of the cell as it is equal to the cubic root of the volume of the cell. Then if we use box filter, the G kernel becomes zero because we don't have any cells nearby that it's distance with the center of a specific cell is less than Delta/2 (because the minimum distance with a neighbor cell's center is Delta). So the filtered velocity becomes zero all over the domain!

3-
How does the dynamic subgrid-scale model detect that the cell is in laminar region(to set the turb viscosity equal to zero) or small scale region(to determine the turb viscosity)?

4-
In this topic(LES Filtering: how are the small and large scales equations solved?) it is mentioned that in laminar region the wave lengths are small and the value of filter kernel is near 1. But how does a cfd code detect that the wave number is small in a cell?

Please do not refer me to this topic: LES Filtering: how are the small and large scales equations solved? I have read that.

Regards
Moreza7 is offline   Reply With Quote

Old   January 18, 2021, 16:38
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
There are many similar discussions, for example


Implicit Filtering concept in LES
Moreza7 likes this.
FMDenaro is offline   Reply With Quote

Old   January 19, 2021, 00:34
Default
  #3
Senior Member
 
Join Date: Jan 2018
Posts: 121
Rep Power: 8
Moreza7 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
There are many similar discussions, for example


Implicit Filtering concept in LES
Hello and thank you very much dear Prof.

I used your replies in that topic and they were great.

But two of my questions remained unanswered:
Quote:
1-
How can we say that large scales are resolved like DNS in LES while by using filters, we are averaging over neighbor cells. For example filtered u velocity is equal to the average of neighbor cells velocity using box filter. But in DNS the velocity in each cell is not averaged.
And

2-
In this topic(https://www.cfd-online.com/Forums/ma...ns-solved.html) it is mentioned that in laminar region the wave lengths are small and the value of filter kernel is near 1. But how does a cfd code detect that the wave number is small in laminar region while it is using same procedure of filtering on both laminar and turbulent regions?
Moreza7 is offline   Reply With Quote

Old   January 19, 2021, 04:08
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Moreza7 View Post
Hello and thank you very much dear Prof.

I used your replies in that topic and they were great.

But two of my questions remained unanswered:


And

2-
In this topic(https://www.cfd-online.com/Forums/ma...ns-solved.html) it is mentioned that in laminar region the wave lengths are small and the value of filter kernel is near 1. But how does a cfd code detect that the wave number is small in laminar region while it is using same procedure of filtering on both laminar and turbulent regions?



- A LES filter should be analysed by looking also at the transfer function G(k). You will see that the effect of the filter vanishes at low wavenumbers (large wavelenght) and the variable is practically unfiltered at that level. This justifies the fact the LES resolves in a DNS-like the large characteristic scales.
- The CFD code often adopts the implicit filtering, that is the filter is never really applied but it acts only by measn of the numerical formulation
- The dynamic procedure produces a test-filtering that in laminar region is practically equal to the grid-filtering. This way the eddy viscosity vanishes.



You can read also these notes and the cited textbooks https://www.researchgate.net/publica..._Part_I_and_II
Moreza7 and aero_head like this.
FMDenaro is offline   Reply With Quote

Old   January 19, 2021, 04:15
Default
  #5
Senior Member
 
Join Date: Jan 2018
Posts: 121
Rep Power: 8
Moreza7 is on a distinguished road
Thanks a lot, Prof.

What I noticed from this topic is that Filter definition has nothing to do with solving velocity field in LES and filter definition is just a formal definition. (what do we want to filter while the smallest scales can only be in the size of the grid?!)

The velocity field is solved just like DNS but with additional terms related to eddy viscosity.

Then, if we use dynamic subgrid-scale models, the filter now has a meaning because we use a test filter that filters the scales bigger than a size that is bigger than grid size. (test filter usually equals 2times of the grid width).

Am I right?
Moreza7 is offline   Reply With Quote

Old   January 19, 2021, 04:28
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Moreza7 View Post
Thanks a lot, Prof.

What I noticed from this topic is that Filter definition has nothing to do with solving velocity field in LES and filter definition is just a formal definition. (what do we want to filter while the smallest scales can only be in the size of the grid?!)

The velocity field is solved just like DNS but with additional terms related to eddy viscosity.

Then, if we use dynamic subgrid-scale models, the filter now has a meaning because we use a test filter that filters the scales bigger than a size that is bigger than grid size. (test filter usually equals 2times of the grid width).

Am I right?



A LES code is often like a DNS code with the adding of the evaluation of the SGS model terms. The filter acts implicitly when the computational grid is coarser than the required for a DNS solution. But if you run a LES code on a DNS-grid the result is a DNS solution.
However, the filter size induced implicitly by the discretization is larger than the grid size. Thus, the test filter has to take into account this issue.
Moreza7 and aero_head like this.
FMDenaro is offline   Reply With Quote

Old   January 19, 2021, 04:38
Default
  #7
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
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 Moreza7 View Post
1-
How can we say that large scales are resolved like DNS in LES while by using filters, we are averaging over neighbor cells. For example filtered u velocity is equal to the average of neighbor cells velocity using box filter. But in DNS the velocity in each cell is not averaged.
By simply looking at how a (typical LES) filter affects the field it is applied upon. It leaves the largest scales barely intact (or exactly intact for spectral cutoff filters). Explicit LES filters, the grid filter, the implicit filtering effect due to the numerical discretization, they are all known to have this property, they simply act on the smallest scales, not the largest ones.

Quote:
Originally Posted by Moreza7 View Post
2-
Suppose that we have cubic cells all over the domain which they have equal length, width and height and our solver is collocated. So Delta, which is the filter width(using box filter) becomes equal to the width of the cell as it is equal to the cubic root of the volume of the cell. Then if we use box filter, the G kernel becomes zero because we don't have any cells nearby that it's distance with the center of a specific cell is less than Delta/2 (because the minimum distance with a neighbor cell's center is Delta). So the filtered velocity becomes zero all over the domain!
This is a very subtle issue. First of all, you would still have the orignal cell in the kernel, so, if anything, you get an identity. That is, the original fiel would be untouched, not switched to 0. But, this is not, indeed, what happens. The error comes from reasoning at the discrete level which, due to the grid filter, has some idiosyncrasies.

Instead, one can show (or, at least, I think I am able to show) that the original box filtered field on the grid is, indeed, the result of the product of two filters, in this very precise sequence:

1. A sampling filter: the original continuous field is sampled at the cell center locations and everything in between is interpolated. Doesn't really matter here what interpolation is used (but keep in mind that different numerical methods imply different interpolations).

2. A box filter with given width

Now, subtlety comes in from the fact that, if you apply a third filter, still a box one with the same width as in 2, it leaves untouched the cell center values of the field you got in 2, but it alters their interpolation between the cell centers. So, at the discrete level, you will always see the same cell center values but, formally, the underlying interpolation between them is changed.

Took me several years to figure this out.

Quote:
Originally Posted by Moreza7 View Post
3-
How does the dynamic subgrid-scale model detect that the cell is in laminar region(to set the turb viscosity equal to zero) or small scale region(to determine the turb viscosity)?
In layman terms, as simply as comparing the fields on the smallest resolved scale and a slightly larger one (obtained by an explicit test filter). If their differences are negligible it means that they are equal. If they are equal it means that the explicit filter didn't affect the smallest resolved scales. If the explicit filter didn't affect the smallest resolved scales, it means they were not present, in the first place, on the given grid. If, for a given grid, there is no energy at the smallest scales on the grid it means that the flow is well resolved on that grid. If the flow is well resolved on a grid, than it is a DNS. In a DNS we don't need any SGS model. End of the story

Quote:
Originally Posted by Moreza7 View Post
4-
In this topic(LES Filtering: how are the small and large scales equations solved?) it is mentioned that in laminar region the wave lengths are small and the value of filter kernel is near 1. But how does a cfd code detect that the wave number is small in a cell?
I already explained in the answer above how, explicitly filtering a field and comparing it with its unfiltered counterpart, for a given grid, can tell you if that grid is well resolved or not for the given field. Dynamic and scale similar models use this information with specific formulations, but nowhere there is something like a kernel becoming 1 nor explicit wave number evaluation, which, per se, both mean nothing.
FMDenaro, Moreza7 and aero_head like this.
sbaffini is offline   Reply With Quote

Old   January 19, 2021, 07:05
Default
  #8
Senior Member
 
Join Date: Jan 2018
Posts: 121
Rep Power: 8
Moreza7 is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
By simply looking at how a (typical LES) filter affects the field it is applied upon. It leaves the largest scales barely intact (or exactly intact for spectral cutoff filters). Explicit LES filters, the grid filter, the implicit filtering effect due to the numerical discretization, are all known to have this property, they simply act on the smallest scales, not the largest ones.



This is a very subtle issue. First of all, you would still have the original cell in the kernel, so, if anything, you get an identity. That is, the original fiel would be untouched, not switched to 0. But, this is not, indeed, what happens. The error comes from reasoning at the discrete level which, due to the grid filter, has some idiosyncrasies.

Instead, one can show (or, at least, I think I can show) that the original box filtered field on the grid is, indeed, the result of the product of two filters, in this very precise sequence:

1. A sampling filter: the original continuous field is sampled at the cell center locations and everything in between is interpolated. Doesn't really matter here what interpolation is used (but keep in mind that different numerical methods imply different interpolations).

2. A box filter with given width

Now, subtlety comes in from the fact that, if you apply a third filter, still a box one with the same width as in 2, it leaves untouched the cell center values of the field you got in 2, but it alters their interpolation between the cell centers. So, at the discrete level, you will always see the same cell center values but, formally, the underlying interpolation between them is changed.

Took me several years to figure this out.



In layman terms, as simply as comparing the fields on the smallest resolved scale and a slightly larger one (obtained by an explicit test filter). If their differences are negligible it means that they are equal. If they are equal it means that the explicit filter didn't affect the smallest resolved scales. If the explicit filter didn't affect the smallest resolved scales, it means they were not present, in the first place, on the given grid. If, for a given grid, there is no energy at the smallest scales on the grid it means that the flow is well resolved on that grid. If the flow is well resolved on a grid, than it is a DNS. In a DNS we don't need any SGS model. End of the story



I already explained in the answer above how, explicitly filtering a field and comparing it with its unfiltered counterpart, for a given grid, can tell you if that grid is well resolved or not for the given field. Dynamic and scale similar models use this information with specific formulations, but nowhere there is something like a kernel becoming 1 nor explicit wave number evaluation, which, per se, both mean nothing.
Thank you very much.

Just a new question:
As I understood, in implicit filtering for solving N-S equations, actually, we have no filtering because the smallest scales are equal to the width of the grid. (We don't need to filter our captured small scales!)

The question is: Why should someone use explicit filtering to solve N-S equations?
I mean in every LES we want to capture the scales as small as possible according to the size of the cell, then we model the scales that are smaller than them.
As you know, filters remove the small scales and keep the large scales.
Then why should we filter(and remove some of) our captured small scales in the domain using explicit filtering?
I'm not talking about using the explicit test filter in the SGS model. I'm talking about solving N-S equations.

Best Regards
Moreza7 is offline   Reply With Quote

Old   January 19, 2021, 07:29
Default
  #9
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
This is both obvious and not so much at the same time, because there is some contrasting evidence.

On purely theoretical grounds, explicitly filtering has the main advantage of reducing the effect of the numerical error (the filter will act on the very scales where the error is more pronounced). The additional benefit is that you also have the chance of achieving a grid converged LES, with no error at all.

It also appears that you can reliably model the scales lost in the explicit filtering process because, except for cutoff filters, they do not actually disappear, but are just lowered in their energetic component. Still, and this is my own personal bias I guess, I still don't get, as of today, how comes the same fate is not reserved to the error (that is, it shouldn't disappear as well, just lower its energy content as well). But there is evidence that this actually works.

The main problem with this approach is that it puts a higher burden on the model. As stated above, this can be compensated, but there is some evidence that, in some cases, such compensation is not better than not filtering at all and just give a shot with the given grid as it is.

The problem in deciding effectively which route is better is that, unfortunately, it is very dependent on the code and implementation, but the LES community doesn't even 100% agree on which equations they are actually solving, imagine picking up a code and implementation.

From a practical perspective, there is practically no one doing explicit filtering in applications (with few exceptions, of course)
Moreza7 and aero_head like this.
sbaffini is offline   Reply With Quote

Old   January 19, 2021, 07:58
Default
  #10
Senior Member
 
Join Date: Jan 2018
Posts: 121
Rep Power: 8
Moreza7 is on a distinguished road
Thanks a lot, I really appreciate your help.

Just the last question:
In all books talking about box filter, they also plot the filter in spectral space as you can see below:



In a CFD book by Kajishima, he warns the reader that filter function damps high wavenumber components but in an oscillatory manner. It should be noted with caution that this filter provides negative values for certain wavenumber.
I didn't get this! It's OK that the filter removes the scales bigger than filter size \Delta/2, but:

-Why should it be important to have the filter function in spectral space?

-How does the filter remove small scales in physical space, but does not remove them in the spectral space for the corresponding wavenumber of the scale? Does this affect the accuracy of results?(Especially when used in test filter)

Kind Regards
Moreza7 is offline   Reply With Quote

Old   January 19, 2021, 11:13
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Moreza7 View Post
Thanks a lot, I really appreciate your help.

Just the last question:
In all books talking about box filter, they also plot the filter in spectral space as you can see below:



In a CFD book by Kajishima, he warns the reader that filter function damps high wavenumber components but in an oscillatory manner. It should be noted with caution that this filter provides negative values for certain wavenumber.
I didn't get this! It's OK that the filter removes the scales bigger than filter size \Delta/2, but:

-Why should it be important to have the filter function in spectral space?

-How does the filter remove small scales in physical space, but does not remove them in the spectral space for the corresponding wavenumber of the scale? Does this affect the accuracy of results?(Especially when used in test filter)

Kind Regards



I suppose you are a newcomer in the LES field, so I will try to explain what is misleading in that figures.


When you read a theoretical introduction in LES, some filter functions are always introduced and plotted. Be aware about the fact that the resulting filtered function is a continuous function since the convolution with the filter kernel is illustrated as an analytical process.
Actually, this analytical convolution is never really applied but the whole LES procedure is on a numerical ground where you work with discrete values and discrete filters. What is more, neither a discrete filter is actually applied so the real shape of the filter depends on the type of discretization. The exact (continuous) top-hat filter will be only approximatively obtained (implicitly) by using a Finite Volume numerical formulation.


"In a CFD book by Kajishima, he warns the reader that filter function damps high wavenumber components but in an oscillatory manner. It should be noted with caution that this filter provides negative values for certain wavenumber."


This is only in theory but never happens in practice since the computational grid introduces a cut-off (Nyquist theorem) that cut away the negative/positive oscillations after the first zero.



Note that we don't use the spectral space in a practical way but we are only analysing the filter shape, comparing it in physical and in wavenumbers space.
sbaffini, Moreza7 and aero_head like this.
FMDenaro is offline   Reply With Quote

Reply

Tags
les, les filter


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 filtering in post-processing. rr3245 OpenFOAM Post-Processing 4 June 11, 2020 10:46
Difference of averaging and filtering in RANS and LES Friendly Main CFD Forum 1 February 1, 2018 17:43
LES SpalartAllmaras Simulation questions Matt1986 OpenFOAM Running, Solving & CFD 11 June 15, 2015 06:08
2 LES questions Djub Main CFD Forum 5 March 27, 2013 12:23
LES explicit filtering Paul Main CFD Forum 0 March 17, 2006 08:03


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