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

Compressible Dynamic Smagorinsky

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 7 Post By godfatherBond
  • 1 Post By Paul_AERO
  • 1 Post By godfatherBond
  • 1 Post By Paul_AERO
  • 1 Post By godfatherBond

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2020, 00:24
Arrow Compressible Dynamic Smagorinsky SGS Model
  #1
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Hi FOAMers,
If anybody missed the compressible dynamic Smagorinsky model in the newer versions of OF (v4, v5,...), I am attaching a working version known to work with v4 and v5 (and above). The code is very well commented, hence it is easier to understand.
Also, some definitions (like filtered strain rate,..etc) are Favre Filtered to be consistent with the literature.
It seems that OpenFOAM's dynamic models are not compressible per se. This may be not be useful for compressible flows as well as low Mach reacting flows with a variable density.
You may use the attached version it if you want.

Please let me know you comments.




Attached Files
File Type: h dynSmagorinskyComp.H (6.3 KB, 71 views)
File Type: c dynSmagorinskyComp.C (8.9 KB, 85 views)
__________________
--
🃏Maximus🃏

Last edited by godfatherBond; January 28, 2020 at 06:24.
godfatherBond is offline   Reply With Quote

Old   September 7, 2021, 18:27
Default
  #2
New Member
 
Donghun Kang
Join Date: Jan 2021
Posts: 4
Rep Power: 5
Paul_AERO is on a distinguished road
Hi Maximus,

I sent you a personal message to ask the compilation of your source codes.
Could you check the inbox?

Thank you.

Paul
kcm2102 likes this.
Paul_AERO is offline   Reply With Quote

Old   September 9, 2021, 00:39
Default
  #3
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Quote:
Originally Posted by Paul_AERO View Post
Hi Maximus,

I sent you a personal message to ask the compilation of your source codes.
Could you check the inbox?

Thank you.

Paul
For your questions on the personal message.
1. Check the .H file. The reference is mentioned there.
2. For the turbulent properties, you just need to specify the "secondary" filter type. The constants are evaluated dynamically.

Cheers..
kcm2102 likes this.
__________________
--
🃏Maximus🃏
godfatherBond is offline   Reply With Quote

Old   September 9, 2021, 01:47
Default
  #4
New Member
 
Donghun Kang
Join Date: Jan 2021
Posts: 4
Rep Power: 5
Paul_AERO is on a distinguished road
Quote:
Originally Posted by godfatherBond View Post
For your questions on the personal message.
1. Check the .H file. The reference is mentioned there.
2. For the turbulent properties, you just need to specify the "secondary" filter type. The constants are evaluated dynamically.

Cheers..
Thanks Maximus.

1. For your reply for (2), secondary filter means:
dynSmagorinskyCompCoeffs
{
filter simple;
}
like above? Thanks for your help.

2. In the source code, dynSmagorinsky.C, line 132-172,
The coefficient, CI ( equ(17) in the M. Pino Martin's article) seems to be calculated. I was wondering why both CI and Ck are used. What does Ck mean? The same applies to Cd/Cs, line 74-128.
+[2021.9.10]: I figured out Cs and Ck to be used for the output of Cd and CI, respectively. Cs and Ck are calculated with strain rate and filter.

3. Even though the compilation is made without critical errors, the run fails saying, rhoPimpleFoam:
symbol lookup error: /opt/OpenFOAM/OpenFOAM-v2106/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so: undefined symbol: _ZN4Foam9LESModels18dynSmagorinskyCompINS_15EddyDi ffusivityINS_18ThermalDiffusivityINS_27Compressibl eTurbulenceModelINS_11fluidThermoEEEEEEEE6calcCfEv

I included turbulenceModels/transportModels in folders of 'compressible' and 'turbulenceModels.' Could you give me a hint for what library should be included in the sources?
+[2021.9.10]: I successfully compiled codes with changing one line in the source code. The line, "virtual void calcCf(); //MA 19.JAN.2020", in dynSmagorinskyComp.H is not used in the computing process, which gives arise the problem in compilation.

Thank you.

Paul
kcm2102 likes this.

Last edited by Paul_AERO; September 10, 2021 at 22:01.
Paul_AERO is offline   Reply With Quote

Old   September 13, 2021, 00:38
Default
  #5
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Quote:
Originally Posted by Paul_AERO View Post
Thanks Maximus.

1. For your reply for (2), secondary filter means:
dynSmagorinskyCompCoeffs
{
filter simple;
}
like above? Thanks for your help.

2. In the source code, dynSmagorinsky.C, line 132-172,
The coefficient, CI ( equ(17) in the M. Pino Martin's article) seems to be calculated. I was wondering why both CI and Ck are used. What does Ck mean? The same applies to Cd/Cs, line 74-128.
+[2021.9.10]: I figured out Cs and Ck to be used for the output of Cd and CI, respectively. Cs and Ck are calculated with strain rate and filter.

3. Even though the compilation is made without critical errors, the run fails saying, rhoPimpleFoam:
symbol lookup error: /opt/OpenFOAM/OpenFOAM-v2106/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so: undefined symbol: _ZN4Foam9LESModels18dynSmagorinskyCompINS_15EddyDi ffusivityINS_18ThermalDiffusivityINS_27Compressibl eTurbulenceModelINS_11fluidThermoEEEEEEEE6calcCfEv

I included turbulenceModels/transportModels in folders of 'compressible' and 'turbulenceModels.' Could you give me a hint for what library should be included in the sources?
+[2021.9.10]: I successfully compiled codes with changing one line in the source code. The line, "virtual void calcCf(); //MA 19.JAN.2020", in dynSmagorinskyComp.H is not used in the computing process, which gives arise the problem in compilation.

Thank you.

Paul
Hi Paul,
I am a bit occupied at the moment. Pardon me if my replies are a bit late.

2. You may find the answers in the Ref. mentioned in the code or in any standard article on dynamic modelling. Hence, I will skip this.

3. I think the error is related to the Makefiles. If you do not add appropriate dependent files in "options". This does not have anything to do with the source code of the turbulence model. It is a minor error and I am sure you will be able to find the solution in a jiffy.

Cheers..
kcm2102 likes this.
__________________
--
🃏Maximus🃏
godfatherBond is offline   Reply With Quote

Old   September 16, 2021, 02:45
Exclamation Compilation Issues
  #6
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Hi,
If you have compilation issues, try adding the following headers explicitly:
Code:
#include "CompressibleTurbulenceModel.H"
#include "compressibleTransportModel.H"
#include "fluidThermo.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"

#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"

#include "LESModel.H"
__________________
--
🃏Maximus🃏

Last edited by godfatherBond; September 18, 2021 at 00:49.
godfatherBond is offline   Reply With Quote

Old   December 2, 2021, 07:37
Smile Thank You
  #7
New Member
 
Krishna
Join Date: Jul 2020
Posts: 1
Rep Power: 0
kcm2102 is on a distinguished road
Thanks godfatherBond
The turbulent model is working fine.

Regards
kcm2102
kcm2102 is offline   Reply With Quote

Old   December 5, 2023, 23:12
Default compressible dyn turbulence
  #8
New Member
 
you
Join Date: Jul 2023
Posts: 4
Rep Power: 3
youdongyao is on a distinguished road
Quote:
Originally Posted by kcm2102 View Post
Thanks godfatherBond
The turbulent model is working fine.

Regards
kcm2102
Hello, could you please show me your file for reference? Can you provide a calculation example file if it is convenient? I successfully compiled the file, but it did not work properly. Thank you.
youdongyao is offline   Reply With Quote

Old   December 5, 2023, 23:58
Default thanks
  #9
New Member
 
you
Join Date: Jul 2023
Posts: 4
Rep Power: 3
youdongyao is on a distinguished road
Quote:
Originally Posted by godfatherBond View Post
Hi FOAMers,
If anybody missed the compressible dynamic Smagorinsky model in the newer versions of OF (v4, v5,...), I am attaching a working version known to work with v4 and v5 (and above). The code is very well commented, hence it is easier to understand.
Also, some definitions (like filtered strain rate,..etc) are Favre Filtered to be consistent with the literature.
It seems that OpenFOAM's dynamic models are not compressible per se. This may be not be useful for compressible flows as well as low Mach reacting flows with a variable density.
You may use the attached version it if you want.

Please let me know you comments.




Hello, I see that you have mentioned on the forum that dyndynSmagorinskyComp has been successfully tested. I tried to compile dynSmagorinskyComp, it was successful, but when using it it showed an unknown turbulence model, I don't know why, I have added libso to ControlDict. Could you please share your model and test examples with me? Thank you very much!! By the way, I'm using openfoam7.
youdongyao is offline   Reply With Quote

Old   December 6, 2023, 00:08
Default thanks
  #10
New Member
 
you
Join Date: Jul 2023
Posts: 4
Rep Power: 3
youdongyao is on a distinguished road
Quote:
Originally Posted by godfatherBond View Post
Hi FOAMers,
If anybody missed the compressible dynamic Smagorinsky model in the newer versions of OF (v4, v5,...), I am attaching a working version known to work with v4 and v5 (and above). The code is very well commented, hence it is easier to understand.
Also, some definitions (like filtered strain rate,..etc) are Favre Filtered to be consistent with the literature.
It seems that OpenFOAM's dynamic models are not compressible per se. This may be not be useful for compressible flows as well as low Mach reacting flows with a variable density.
You may use the attached version it if you want.

Please let me know you comments.




Quote:
Originally Posted by godfatherBond View Post
Hi Paul,
I am a bit occupied at the moment. Pardon me if my replies are a bit late.

2. You may find the answers in the Ref. mentioned in the code or in any standard article on dynamic modelling. Hence, I will skip this.

3. I think the error is related to the Makefiles. If you do not add appropriate dependent files in "options". This does not have anything to do with the source code of the turbulence model. It is a minor error and I am sure you will be able to find the solution in a jiffy.

Cheers..
Could you please provide the makeTurbulence document? Thank you very much
youdongyao 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
Updating the turbulent schmidt number in dynamic smagorinsky model pvpnrao OpenFOAM Running, Solving & CFD 3 November 6, 2020 04:52
dynamic smagorinsky model in OpenFOAM 4.1 zhangxc0223 OpenFOAM Running, Solving & CFD 2 October 29, 2018 04:53
Compressible vs incompressible SGS model! zhangyan Main CFD Forum 10 June 4, 2016 05:39
Difference between Constant smagorinsky and Dynamic model Smagorinsky model cfdmms Main CFD Forum 8 January 21, 2016 05:44
dynamic Smagorinsky model for compressible LES in OF openfoammaofnepo OpenFOAM 1 September 7, 2013 12:22


All times are GMT -4. The time now is 06:27.