
[Sponsors] 
July 15, 2011, 09:51 

#41  
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 7 
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 

July 15, 2011, 12:07 

#42 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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 subgridscale 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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

July 18, 2011, 02:39 

#43 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13 
I also have the impression there is something wrong with the definition of MM, see this post: Smagorinsky model details 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? 

July 18, 2011, 03:39 

#44 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

July 18, 2011, 10:56 

#45 
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 7 
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.


July 18, 2011, 11:08 

#46 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

July 18, 2011, 14:00 

#47 
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 7 
I put in a bug report, we'll see if an explanation is forthcoming.


July 23, 2011, 14:13 

#48 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. Last edited by alberto; July 23, 2011 at 14:14. Reason: Added link 

August 9, 2011, 03:42 

#49 
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 8 
Hi,
Alberto, thanks for providing the code. I compiled it in OF 2.0 and changed inputfiles 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 

August 9, 2011, 10:04 

#50 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

January 5, 2012, 03:58 

#51 
New Member
M.H.Arabnezhad
Join Date: Jun 2011
Location: Sharif University of Technology, Tehran,Iran
Posts: 3
Rep Power: 7 
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 

January 5, 2012, 11:25 

#52 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

February 7, 2012, 15:28 
Problems with trying the model

#53 
Member
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 7 
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/OpenFOAM1.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 

February 7, 2012, 20:05 

#54  
New Member
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 7 
Quote:
You should be able to safely ignore this warning, see post #21. Perry 

February 7, 2012, 21:49 

#55 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

April 8, 2012, 17:29 

#56 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,907
Rep Power: 27 
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. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

March 27, 2013, 17:29 

#57 
New Member
ehk
Join Date: Sep 2012
Posts: 21
Rep Power: 5 
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 

May 3, 2013, 11:43 

#58 
Senior Member
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 324
Rep Power: 6 
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 

May 3, 2013, 11:50 

#59 
New Member
ehk
Join Date: Sep 2012
Posts: 21
Rep Power: 5 
you should include the new model in controlDict.


May 3, 2013, 12:09 

#60 
Senior Member
Bobi
Join Date: Oct 2012
Location: Chicago, Illinois
Posts: 324
Rep Power: 6 
Dear Ehsan
Hi I have included this line at the end of controldict file: Code:
libs ( "libOpenFOAM.so" "libdynamicSmagorinskyModel.so" ) ; Bobi 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Smagorinsky Dynamic Cosant in UDF  Paolo Lampitella  FLUENT  1  June 17, 2009 03:40 
Dynamic Smagorinsky LES  Lourival  FLUENT  0  April 14, 2006 13: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 16:24 
Dynamic Smagorinsky model  Tim  Main CFD Forum  7  May 29, 2002 07:37 