|
[Sponsors] | |||||
Improved implementation of dynamic Smagorinsky |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#41 | |||
|
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 16 ![]() |
Alberto,
Sorry to bug you some more on this code. I was revisiting your code, and it seems to me you have left out two coefficients in your MM equation (Germano et al. Eq 15, right hand side): the 2 out in front and the sqrt(2) in the | Sij | = sqrt (2 * Sij * Sij). Quote:
Quote:
Quote:
MM *= 2; directly after your definition of the MM tensor. Please correct me if I am missing something here. Regards, Perry |
||||
|
|
|
||||
|
|
|
#42 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
Hi, my code is entirely based on what OF calls "homogeneousDynSmagorinsky" model. I think the reference is not Germano et al. but Lilly (1992) "A proposed modification of the Germano subgrid-scale closure method".
If there is a bug in the original code, then there is a bug in mine too :-D. I will check into that as soon as I can.
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#43 |
|
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 23 ![]() |
I also have the impression there is something wrong with the definition of MM, see this post: http://www.cfd-online.com/Forums/ope...details-2.html But if you can point me at my mistake there you're very welcome
@alberto: In the Lilly formulation c(D) is devided by two (Cs=LM/(2*M*M)), which is not incorporated here, so if you apply his suggestion, MM *= 2, then you would end up with exactly that right? |
|
|
|
|
|
|
|
|
#44 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
I am sorry, I pointed to the wrong reference in my last post. The implementation of LES models in OpenFOAM is based on:
C. Fureby, G. Tabor, H. G. Weller, and A. D. Gosman, A comparative study of subgrid scale models in homogeneous isotropic turbulence, Phys. Fluids 9, 1416 (1997); doi:10.1063/1.869254 According to this work: k_sgs = c_I*(delta*|D|)^2 nu_sgs = c_D*(delta^2)*|D| In the dynamic approach, they define: c_I = <0.5 tr(L) m>/<mm> c_D = <L_D M>/<M M> with L_D, m and M defined as a function of D, in a way that seems consistent to me (please, check, I went through it quickly) with the OF implementation.
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#45 |
|
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 16 ![]() |
I am in agreement with Bernhard. In Lilly's paper, the coefficient '2' in equation 8 (Fureby equation 6) becomes manifest in the coefficient '1/2' in equation 11. It seems to mysteriously vanish in Fureby's derivation, however, in his equation 7.
|
|
|
|
|
|
|
|
|
#46 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
Hi, I agree. However, since the problem also affects homogeneousDynSmagorinsky, I think you should report it on OpenCFD bug tracker. This might provide an explanation too.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#47 |
|
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 16 ![]() |
I put in a bug report, we'll see if an explanation is forthcoming.
|
|
|
|
|
|
|
|
|
#48 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
Bug corrected upstream, and fix merged in my modified version. You can download it from the usual git repository ( https://github.com/AlbertoPa/dynamicSmagorinsky ).
Thanks for pointing this out. Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
Last edited by alberto; July 23, 2011 at 15:14. Reason: Added link |
|
|
|
|
|
|
|
|
#49 |
|
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 17 ![]() |
Hi,
Alberto, thanks for providing the code. I compiled it in OF 2.0 and changed input-files as described in readme. My case works but it stays laminar, while in the standard Smagorinsky with constant coefficients turbulence is developed. I use pisoFoam and pimpleFoam. Did I forget something to change or is the model not applicable to piso/pimpleFoam? Thanks for your help! Nico |
|
|
|
|
|
|
|
|
#50 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
Hi, depending on your case you need to initialise the simulation with a perturbed field to favour the development of the turbulent structures. There are is a tool in the forum for channel flows (perturbU) and probably some user adapted it to pipe flows too.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#51 |
|
New Member
M.H.Arabnezhad
Join Date: Jun 2011
Location: Sharif University of Technology, Tehran,Iran
Posts: 3
Rep Power: 16 ![]() |
Hi alberto,
Thanks for providing the code. I use your code for simulation of a swirl jet. The problem is in calculation of kinetic energy , It gives me negative values. Thanks, engma3 |
|
|
|
|
|
|
|
|
#52 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
The value should be bounded to kMin_.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#53 |
|
Member
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 16 ![]() |
Dear Alberto,
Thank you very much for your contribution. I tried to use your model with buoyantBoussinesqPimleFoam. The compilation process was completed successfully. Then I modified LESProperties and controlDictionary files according to your instructions. Unfortunately something screws up when I try to run the simulation. I am getting the following warning: --> FOAM Warning : From function dlLibraryTable: pen(const fileName& functionLibName)in file db/dlLibraryTable/dlLibraryTable.C at line 78 could not load /home/yurifeld/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libdynLocalAverageSmagorinskyModel.so: undefined symbol: _ZNK4Foam14incompressible9LESModels11GenEddyVisc1B Ev Do you have any idea what can be the problem? Thank you very much, Yuri |
|
|
|
|
|
|
|
|
#54 | |
|
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 16 ![]() |
Quote:
You should be able to safely ignore this warning, see post #21. Perry |
||
|
|
|
||
|
|
|
#55 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
Yes, Perry is right :-)
Btw, you could also consider the langrangianDynSmagorinsky model in OpenFOAM 2.x, which is based on a more rigorous treatment of the dynamic coefficient. Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#56 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 37 ![]() ![]() |
For your information, I moved my repository to bitbucket, so future versions will be here:
https://bitbucket.org/albertop/dynamicsmagorinsky
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.
|
|
|
|
|
|
|
|
|
#57 |
|
Member
ehk
Join Date: Sep 2012
Posts: 30
Rep Power: 15 ![]() |
Dear Alberto,
I would like to know if this new dynamic smagorinsky model could be changed to do averaging in homogenous direction ( not whole domain) in case of channel flow . Thanks in advance |
|
|
|
|
|
|
|
|
#58 |
|
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 17 ![]() |
Dear Alberto
I am trying to include dynamicSmagorinsky SGS model for reactingFoam solver, I did exactly as u have said in https://bitbucket.org/albertop/dynamicsmagorinsky However, When I executed the file; I got this error: ![]() ![]() ![]() Selecting LES turbulence model dynamicSmagorinsky Code:
--> FOAM FATAL ERROR:
Unknown LESModel type dynamicSmagorinsky
Valid LESModel types:
6
(
DeardorffDiffStress
Smagorinsky
SpalartAllmaras
homogeneousDynOneEqEddy
lowReOneEqEddy
oneEqEddy
)
From function LESModel::New(const volScalarField&, const volVectorField&, const surfaceScalarField&, const basicThermo&, const word&)
in file LESModel/LESModel.C at line 140.
FOAM exiting
![]() ![]() It seems that the code has not recognized dynamicSmagorinsky.H & .C files. I should note that I have put the dynamicSmagorinsky folder in My home directory and not in OpenFOAM sources, My openFOAM version is 2.1.x Would You PLZ help me? Any hint is appreciated ![]() ![]() Best Regards Bobi |
|
|
|
|
|
|
|
|
#59 |
|
Member
ehk
Join Date: Sep 2012
Posts: 30
Rep Power: 15 ![]() |
you should include the new model in controlDict.
|
|
|
|
|
|
|
|
|
#60 |
|
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 17 ![]() |
Dear Ehsan
Hi I have included this line at the end of controldict file: Code:
libs ( "libOpenFOAM.so" "libdynamicSmagorinskyModel.so" ) ; ![]() ![]() Bobi |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Smagorinsky Dynamic Cosant in UDF | Paolo Lampitella | FLUENT | 1 | June 17, 2009 04:40 |
| Dynamic Smagorinsky LES | Lourival | FLUENT | 0 | April 14, 2006 14:48 |
| Dynamic Smagorinsky Model | Andrew | Main CFD Forum | 1 | November 30, 2004 01:52 |
| Reply to Tim Re Dynamic Smagorinsky model | Ajay S. Parihar | Main CFD Forum | 9 | June 2, 2002 17:24 |
| Dynamic Smagorinsky model | Tim | Main CFD Forum | 7 | May 29, 2002 08:37 |