CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

scale similarity models and mixed models in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2020, 04:52
Default scale similarity models and mixed models in OpenFOAM
  #1
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
HI all,

If anyone has had experience with implementation of dynamic mixed models in FOAM, please respond. I recently stumbled across such implementation of dynamic mixed smagorinksy by LEMOS,
https://github.com/LEMOS-Rostock/LEM...amicMixedModel

In the .C file, the authors have defined two filters- testFIlter_ and gridFilter_. If you look closely, you won't find any difference between the definitions of these two filters. Both are explicit filters. While we know that LES in FOAM is implicitly filtered LES, howcome the authors could be using an explicitly defined filter 'gridFilter_' to compute the quantities at the grid-level.
Any help/discussion is aprreciated.
Thanks.
backscatter is offline   Reply With Quote

Old   September 1, 2020, 17:54
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
For it to work the test filter is larger than the grid filter (and still in the inertial range). Presumably the filter size ratio is set in the case itself, as opposed to within the model (and the grid filter would be set to be the same size as the grid).

Caelan
clapointe is offline   Reply With Quote

Old   September 1, 2020, 21:36
Default
  #3
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by clapointe View Post
For it to work the test filter is larger than the grid filter (and still in the inertial range). Presumably the filter size ratio is set in the case itself, as opposed to within the model (and the grid filter would be set to be the same size as the grid).

Caelan
Thanks Caelan for your response. I doubt that is the case. It is not possible to filter anything at grid level explicitly in openfoam because if you look at the simpleFilter.C definition, you will find we can't define an explicit filter of width \delta. simpleFilter uses the interpolated values of the unfiltered variable from neighbor cells on the faces surrounding the cell, and then interpolates those face values on to the cell center, that in a sense is filtering with a width of 2\delta (the explicit test filter). To customize such an implementation for filtering at the grid level is not possible.
I think what they are doing is essentially applying the test filter twice, which is pretty much justifiable. Essentially to write,

\tau_{ij} = \overline{\overline{u}_i \overline{u}_j} - \overline{\overline{u}}_i \overline{\overline{u}}_j

for the second bar filter (which is supposed to represent the grid filter), they may be using a filter of larger width.
The second bar above the velocity components in the equation represents a second filter at a scale γΔ, where γ ≥ 1. The original model by Bardina used γ =1 while Liu et al. used γ = 2.
It is not wrong to do it but the authors have not mentioned it clearly in the model.
backscatter is offline   Reply With Quote

Old   September 1, 2020, 21:57
Default
  #4
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
In my experience the test filter should be about double the actual/grid filter. And taking a look at their code I agree that the filter is applied twice to obtain the test-filtered velocity field. So this appears to implicitly incorporate the factor of 2 for (at least) the simple filter as you've noted. As for the grid-filter scale that's a different problem, but it's worth noting they have a variety of custom filters also in the repo.

Caelan
clapointe is offline   Reply With Quote

Old   September 2, 2020, 10:21
Default
  #5
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by backscatter View Post
HI all,

If anyone has had experience with implementation of dynamic mixed models in FOAM, please respond. I recently stumbled across such implementation of dynamic mixed smagorinksy by LEMOS,
https://github.com/LEMOS-Rostock/LEM...amicMixedModel

In the .C file, the authors have defined two filters- testFIlter_ and gridFilter_. If you look closely, you won't find any difference between the definitions of these two filters. Both are explicit filters. While we know that LES in FOAM is implicitly filtered LES, howcome the authors could be using an explicitly defined filter 'gridFilter_' to compute the quantities at the grid-level.
Any help/discussion is aprreciated.
Thanks.
I have made a thorough discussion of some mathematical inconsistencies in the smagorinsky LES models present in OF, plus I have proposed a lagrangian mixed model here:

HTML Code:
https://www.mdpi.com/2311-5521/4/3/171
I hope it offers clarity to your questions.

SIDE NOTE: the convolution model used in the LEMOS package (last time I checked, 4 years ago) is mathematically inconsistent (the Bardina model), in the sense that is not exactly a deconvolution but a truncated taylor expansion.
Santiago is offline   Reply With Quote

Old   September 2, 2020, 21:21
Default
  #6
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by Santiago View Post
I have made a thorough discussion of some mathematical inconsistencies in the smagorinsky LES models present in OF, plus I have proposed a lagrangian mixed model here:

HTML Code:
https://www.mdpi.com/2311-5521/4/3/171
I hope it offers clarity to your questions.

SIDE NOTE: the convolution model used in the LEMOS package (last time I checked, 4 years ago) is mathematically inconsistent (the Bardina model), in the sense that is not exactly a deconvolution but a truncated taylor expansion.
Thank you Santiago for your reply. Yes, I happened to find your paper on Mixed Lagragian model in openfoam a couple of days ago. Since you seem to have implemented the mixed lagragian model in FOAM, I still have the same question, in openfoam, how do you implement the scale-similar (SS) terms \tau^{SS}_{ij} = \overline{\overline{u}_i \overline{u}_j} - \overline{\overline{u}}_i \overline{\overline{u}}_j in the expression of the mixed model at grid and test filter level?
If you have the source code of your mixed lagragian model handy, it would be great if you share it.
Any insights are appreciated. Thank you!
backscatter is offline   Reply With Quote

Old   September 3, 2020, 05:02
Default
  #7
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by backscatter View Post
Thank you Santiago for your reply. Yes, I happened to find your paper on Mixed Lagragian model in openfoam a couple of days ago. Since you seem to have implemented the mixed lagragian model in FOAM, I still have the same question, in openfoam, how do you implement the scale-similar (SS) terms \tau^{SS}_{ij} = \overline{\overline{u}_i \overline{u}_j} - \overline{\overline{u}}_i \overline{\overline{u}}_j in the expression of the mixed model at grid and test filter level?
If you have the source code of your mixed lagragian model handy, it would be great if you share it.
Any insights are appreciated. Thank you!
All variables are assumed to be filtered in the context of finite volumes, and LES, by virtue of the Schumman hypothesis. The first thing that needs clarification is this "myth" that Openfoam implicitly filters: This has nothing to do with OF, it's an assumption made once you make use of the midpoint rule.

That being said, you need to apply a grid-level filter ONCE, to the residual stress tensor's terms.
Santiago is offline   Reply With Quote

Old   September 3, 2020, 05:21
Default
  #8
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by Santiago View Post
All variables are assumed to be filtered in the context of finite volumes, and LES, by virtue of the Schumman hypothesis. The first thing that needs clarification is this "myth" that Openfoam implicitly filters: This has nothing to do with OF, it's an assumption made once you make use of the midpoint rule.

That being said, you need to apply a grid-level filter ONCE, to the residual stress tensor's terms.
Yes, it is essentially the FV discretization that accounts for the 'implicit' grid filter in all of the FV codes, including OF. Nothing special about FOAM here, I agree.
When you say, I need to apply the grid-filter once to the tensors' terms, how is that possible because we don't have an explicit grid-filter. The top-hat filter that we have is an explicit (test) filter of twice the width of the grid size.
For clarity, a term like \widehat{\overline{u}_i \overline{u}_j} can be implemented as
Code:
filter_( U() * U() )
.
Now, if we have a term like \overline{\overline{u}_i \overline{u}_j} (which is one of the terms present in the scale-similar part of your mixed model at the grid level), how do we go about implementing it in FOAM?
backscatter is offline   Reply With Quote

Old   September 3, 2020, 06:25
Default
  #9
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by backscatter View Post
Yes, it is essentially the FV discretization that accounts for the 'implicit' grid filter in all of the FV codes, including OF. Nothing special about FOAM here, I agree.
When you say, I need to apply the grid-filter once to the tensors' terms, how is that possible because we don't have an explicit grid-filter. The top-hat filter that we have is an explicit (test) filter of twice the width of the grid size.
For clarity, a term like \widehat{\overline{u}_i \overline{u}_j} can be implemented as
Code:
filter_( U() * U() )
.
Now, if we have a term like \overline{\overline{u}_i \overline{u}_j} (which is one of the terms present in the scale-similar part of your mixed model at the grid level), how do we go about implementing it in FOAM?
1.
Nothing stops you to use/implement a filter with a kernel size equal to the grid size. Depending on the filter, this size may need to be defined explicitely. The simpleFilter, as an example, is only valid as a grid filter, not as test filter, because the kernel (the ball) is direct function of the size of the filter; that means, the bigger the filter size more "points" have to be used for averaging. The germano type of filters may offer a better approach to filtering in hexahedral grids.

2. Exactly the same as you present in your CODE, but in each case you have to use a different filter:
Code:
gridFilter_( U() * U() )
or
Code:
testFilter_( U() * U() )
.

Is up to the user to define the correct filter using dictionaries.

About the code: I share the code on a P2P basis, I don't fully release it to the general public. PM me, and we may discuss it further.
Santiago is offline   Reply With Quote

Old   September 3, 2020, 19:56
Default
  #10
Member
 
Anonymous
Join Date: Aug 2016
Posts: 75
Rep Power: 10
backscatter is on a distinguished road
Quote:
Originally Posted by Santiago View Post
1.
Nothing stops you to use/implement a filter with a kernel size equal to the grid size. Depending on the filter, this size may need to be defined explicitely. The simpleFilter, as an example, is only valid as a grid filter, not as test filter, because the kernel (the ball) is direct function of the size of the filter; that means, the bigger the filter size more "points" have to be used for averaging. The germano type of filters may offer a better approach to filtering in hexahedral grids.

2. Exactly the same as you present in your CODE, but in each case you have to use a different filter:
Code:
gridFilter_( U() * U() )
or
Code:
testFilter_( U() * U() )
.

Is up to the user to define the correct filter using dictionaries.

About the code: I share the code on a P2P basis, I don't fully release it to the general public. PM me, and we may discuss it further.
Dear Santiago,

Thank you for your responses. I have messaged you.
Thanks
backscatter 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
Mixed models in LES Pradeep Main CFD Forum 4 March 28, 2003 05:56


All times are GMT -4. The time now is 10:25.