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

New solver with turbulent scalar transport+LES model

Register Blogs Community New Posts Updated Threads Search

Like Tree19Likes
  • 10 Post By syavash
  • 1 Post By HPE
  • 1 Post By HPE
  • 1 Post By HPE
  • 1 Post By Santiago
  • 1 Post By syavash
  • 1 Post By Santiago
  • 3 Post By syavash

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2021, 15:25
Default New solver with turbulent scalar transport+LES model
  #1
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Dear All,

I have developed a customized solver, STDPimpleFoam (Scalar Turbulent Diffusion pimpleFoam). It can solve an additional equation for a passive scalar. This is not something new by itself.
However, I also developed an accompanying LES model, based on the dynamic Smagorinsky model, but with the ability to calculate the turbulent Schmidt number relying on the approach proposed by Lilly (1992). It is where things get interesting, the calculation of turbulent Schmidt number happens through a dynamic procedure, similar to what was employed in the dynamic Smagorinsky model for turbulent viscosity.

I hope people will find it useful, as a proper implementation of scalar turbulent diffusion in OpenFOAM was lacking.

The advantage of the developed LES model is that it does not demand modifying the turbulence models base classes (turbulenceModel, LESModel, etc...). So it should be easy to extrapolate the idea for developing other similar approaches.

I have included a test case.


Cheers.
Attached Files
File Type: zip STDPimpleFoam.zip (4.7 KB, 80 views)
File Type: zip SDSM.zip (5.0 KB, 60 views)
File Type: zip scalarPitzDaily.zip (8.8 KB, 60 views)
arjun, Uyan, clapointe and 7 others like this.

Last edited by syavash; March 7, 2021 at 09:55.
syavash is offline   Reply With Quote

Old   February 20, 2021, 12:01
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Thanks a lot for this contribution!

Could you please, if possible, further explain your remarks regarding the lack of `a proper implementation of scalar turbulent diffusion in OpenFOAM`, and/or could you please indicate/share some links involving already existing discussions/explanations?
lpz456 likes this.
HPE is offline   Reply With Quote

Old   February 20, 2021, 12:12
Default
  #3
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by HPE View Post
Thanks a lot for this contribution!

Could you please, if possible, further explain your remarks regarding the lack of `a proper implementation of scalar turbulent diffusion in OpenFOAM`, and/or could you please indicate/share some links involving already existing discussions/explanations?
You can find a quite recent discussion here:

Improved implementation of dynamic Smagorinsky

If you follow it carefully, you will know about the SGS diffusivity that should be included in LES of passive/active scalar transport equations.

Regards,
syavash
syavash is offline   Reply With Quote

Old   February 20, 2021, 13:30
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Thank you very much - just bear in mind that if we carefully examine the fundamentals and implementations, there are considerable number of other discrepancies, e.g. wrong filter size implementation - yet luckily, somewhat they don't manifest themselves badly in practice.
lpz456 likes this.
HPE is offline   Reply With Quote

Old   February 20, 2021, 15:34
Default
  #5
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
In that case, we should not go for any development such as the dynamic Smagorinsky itself, or other recent contributions! In fact your argument would mean to stick to what is offered by developers.

If you don't find the models/libraries shared by other people fitting your needs, simply pass by!
syavash is offline   Reply With Quote

Old   February 20, 2021, 15:47
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
No, I just meant we - as the community- need to work more to get rid of these discrepancies by hinting there are many of them and very fundamental ones indeed - but we got lucky so far I mentioned. Not even remotely related to what was suggested by yourself, I'm afraid.

I don't accept and reject your interpretation of my remark. I was grateful and chilled out.

Thanks for your contribution - highly appreciated. Keep up good work.
lpz456 likes this.
HPE is offline   Reply With Quote

Old   March 5, 2021, 04:23
Default Problem is already discussed in Length...
  #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 HPE View Post
No, I just meant we - as the community- need to work more to get rid of these discrepancies by hinting there are many of them and very fundamental ones indeed - but we got lucky so far I mentioned. Not even remotely related to what was suggested by yourself, I'm afraid.

I don't accept and reject your interpretation of my remark. I was grateful and chilled out.

Thanks for your contribution - highly appreciated. Keep up good work.
HPE, I've done some work myself on that topic. I have described some of such discrepancies and proposed a mathematically consistent Lagrangian mixed smagorinsky model (for momentum and scalar turbulence fluxes) some years ago:

https://www.mdpi.com/2311-5521/4/3/171

The biggest problem with LES and OpenFOAMers is this misconception of "Implicit Filtering". For some reason OpenFOAMers are led to believe that OpenFOAM somehow "filters" implicitely your solutions, instead of acknowledging is a property of integrating fields in FVM. By putting your fields on the centroid you admit the mean value theorem (MVT) as valid which, when written on paper, is just an average. Schumman (1973?) made thi statement explicitely for FVM. Jordan (1990?) extended this idea for curvilinear FDM. And the guys doing ILES just take it for granted...

There are other authors working on evaluating the potential of OpenFOAM for industrial LES: E. M. Komen has worked a lot on that recently, is worth a look. He's one of the few who actually studies LES in OpenFOAM.

The dynamic (and Lagrangian) Smagorinsky models implemented in OF so far are mathematically INCONSISTENT. Plus, the only valid test filter for dynamic models is the anisotropic (I demonstrate that in my article) with appropriate coefficients.

If someone is interested (genuinely, in the sense of doing further research) please contact me directly and I can share the code. I don't want someone else claiming authorship of my work in "Scientia Iranica" or any other funky Journal in the tropics/china (yes, it has happened to me already).

@Ehsan: your citation is not entirely correct (Moin et al 1991). Although the equations look "the same" conceptually they are very different, due to Favre. Cite more recent work: Piomelli et al., Sarkar et al., Armenio & Sarkar, Armenio & Piomelli, or Lopez et al.
lpz456 likes this.

Last edited by Santiago; March 5, 2021 at 08:19.
Santiago is offline   Reply With Quote

Old   March 7, 2021, 09:29
Default
  #8
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Santiago View Post
HPE, I've done some work myself on that topic. I have described some of such discrepancies and proposed a mathematically consistent Lagrangian mixed smagorinsky model (for momentum and scalar turbulence fluxes) some years ago:

https://www.mdpi.com/2311-5521/4/3/171

The biggest problem with LES and OpenFOAMers is this misconception of "Implicit Filtering". For some reason OpenFOAMers are led to believe that OpenFOAM somehow "filters" implicitely your solutions, instead of acknowledging is a property of integrating fields in FVM. By putting your fields on the centroid you admit the mean value theorem (MVT) as valid which, when written on paper, is just an average. Schumman (1973?) made thi statement explicitely for FVM. Jordan (1990?) extended this idea for curvilinear FDM. And the guys doing ILES just take it for granted...

There are other authors working on evaluating the potential of OpenFOAM for industrial LES: E. M. Komen has worked a lot on that recently, is worth a look. He's one of the few who actually studies LES in OpenFOAM.

The dynamic (and Lagrangian) Smagorinsky models implemented in OF so far are mathematically INCONSISTENT. Plus, the only valid test filter for dynamic models is the anisotropic (I demonstrate that in my article) with appropriate coefficients.

If someone is interested (genuinely, in the sense of doing further research) please contact me directly and I can share the code. I don't want someone else claiming authorship of my work in "Scientia Iranica" or any other funky Journal in the tropics/china (yes, it has happened to me already).

@Ehsan: your citation is not entirely correct (Moin et al 1991). Although the equations look "the same" conceptually they are very different, due to Favre. Cite more recent work: Piomelli et al., Sarkar et al., Armenio & Sarkar, Armenio & Piomelli, or Lopez et al.
True. The formulation is in accordance with the work of Lilly (1992). Thanks for the correction.

P.S. I understand you suffered plagiarism, but I think it is not appropriate to include the journal names that point out the associated nation. It would create some unwanted attitudes towards the general scientific community, which I believe was not your true intention.
lpz456 likes this.

Last edited by syavash; March 7, 2021 at 12:10.
syavash is offline   Reply With Quote

Old   March 7, 2021, 14:41
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 syavash View Post

P.S. I understand you suffered plagiarism, but I think it is not appropriate to include the journal names that point out the associated nation. It would create some unwanted attitudes towards the general scientific community, which I believe was not your true intention.
Lilly (1992) makes a suggestion on Moin's (1991) model which, for compressible turbulence looks "the same" as for incompressible flows. I guess is "close enough". Anyways, your model differs from Lilly's in any case, since you are face-averaging the MM and LM terms locally, which he doesn't propose. He mentions that :"To avoid this problem they (sic. Other Authors) averaged the numerator and denominator over planes parallel to the lower boundary, thereby perhaps losing some of the conceptual advantages of their formulation." Its not clear whether the local-averaging approach is consistent, and perhaps it is not, as I was not able to retrieve basic turbulence invariants for such model in OpenFOAM.

P.S.: Don't be condescending, I know which my intentions are when I speak, I say what I mean and I mean what I say! I don't have any hidden agendas against Iran, India, or China, I could care less either way. But that most predatory Editorials are located there, and that a good percentage of "less-than-rigorous" research is produced in those journals, there, well, is beyond reasonable doubt, Is it not? And if by "unwanted attitutes" you mean to be honest about something THAT DOES HAPPEN, then I stand by what I said, regardless of whether it may offend someone.
HPE likes this.
Santiago is offline   Reply With Quote

Old   March 7, 2021, 16:05
Default
  #10
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Santiago View Post
Lilly (1992) makes a suggestion on Moin's (1991) model which, for compressible turbulence looks "the same" as for incompressible flows. I guess is "close enough". Anyways, your model differs from Lilly's in any case, since you are face-averaging the MM and LM terms locally, which he doesn't propose. He mentions that :"To avoid this problem they (sic. Other Authors) averaged the numerator and denominator over planes parallel to the lower boundary, thereby perhaps losing some of the conceptual advantages of their formulation." Its not clear whether the local-averaging approach is consistent, and perhaps it is not, as I was not able to retrieve basic turbulence invariants for such model in OpenFOAM.

P.S.: Don't be condescending, I know which my intentions are when I speak, I say what I mean and I mean what I say! I don't have any hidden agendas against Iran, India, or China, I could care less either way. But that most predatory Editorials are located there, and that a good percentage of "less-than-rigorous" research is produced in those journals, there, well, is beyond reasonable doubt, Is it not? And if by "unwanted attitutes" you mean to be honest about something THAT DOES HAPPEN, then I stand by what I said, regardless of whether it may offend someone.
Well, I followed Lilly's paper for the implementation. By no means I'd claim this is "my model".
Averaging is not something new IMO. Many turbulence models in OpenFOAM differs from the original form, undergoing minor or major modifications. Yet, they are named similarly the same as the original model.

I think that your claim regarding the reviewers/editors cannot be generalized. I had papers rejected by some reviewers from different places for no good reason, but I wouldn't go as far to publicly judge their ethics.
syavash is offline   Reply With Quote

Old   May 12, 2022, 12:33
Default
  #11
New Member
 
Tian Jin
Join Date: Aug 2020
Posts: 10
Rep Power: 6
Tian Jin is on a distinguished road
Dear syavash,

Thanks for sharing your code.
I want to use the LES dynamic Smagorinsky model for eddy viscosity calculation and eddy diffusion calculation. I think your SDSM file is to do that, right? In which you added the turbulent Schmidt number calculation based on the basic LES dynamic Smagorinsky model (which is only for the eddy viscosity model). There is no problem when compiling the SDSM model. The problem is that when I test that model with your attached folder named scalarPitzDaily:

--> FOAM FATAL ERROR:

request for volScalarField S from objectRegistry region0 failed
available objects of type volScalarField are

10
(
invScSgs
nut
average(interpolate(magSqr((sqr(delta)*((surfaceSu m((magSf*interpolate((mag(dev(symm(grad(U))))*dev( symm(grad(U)))))))|surfaceSum(magSf))-((4*mag((surfaceSum((magSf*interpolate(dev(symm(gr ad(U))))))|surfaceSum(magSf))))*(surfaceSum((magSf *interpolate(dev(symm(grad(U))))))|surfaceSum(magS f))))))))
Cs
mag(dev(symm(grad(U))))
k
mag((surfaceSum((magSf*interpolate(dev(symm(grad(U ))))))|surfaceSum(magSf)))
nu
delta
p
)

Do you have any idea about why do I make mistake? Look forward to your reply. Thanks in advance!

Quote:
Originally Posted by syavash View Post
Dear All,

I have developed a customized solver, STDPimpleFoam (Scalar Turbulent Diffusion pimpleFoam). It can solve an additional equation for a passive scalar. This is not something new by itself.
However, I also developed an accompanying LES model, based on the dynamic Smagorinsky model, but with the ability to calculate the turbulent Schmidt number relying on the approach proposed by Lilly (1992). It is where things get interesting, the calculation of turbulent Schmidt number happens through a dynamic procedure, similar to what was employed in the dynamic Smagorinsky model for turbulent viscosity.

I hope people will find it useful, as a proper implementation of scalar turbulent diffusion in OpenFOAM was lacking.

The advantage of the developed LES model is that it does not demand modifying the turbulence models base classes (turbulenceModel, LESModel, etc...). So it should be easy to extrapolate the idea for developing other similar approaches.

I have included a test case.


Cheers.
Tian Jin 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
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 06:02
Creating a transient .case file scro1022 EnSight 0 November 27, 2020 11:11
[General] Problem with reading in multiple grouped Ensight .case files into paraview scro1022 ParaView 0 November 27, 2020 09:00
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 08:54
Why can i use a laminar solver for a turbulent flow? [Heat transfer problem] blackbow CFX 1 November 22, 2016 05:42


All times are GMT -4. The time now is 04:35.