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

Improved implementation of dynamic Smagorinsky

Register Blogs Community New Posts Updated Threads Search

Like Tree37Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2013, 12:03
Default
  #61
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
A quick checklist:

- Did the code compile successfully?
- Can you run the test case provided with the code?

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.
alberto is offline   Reply With Quote

Old   May 4, 2013, 14:07
Default
  #62
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Dear Alberto
Hi
- the code compiled successfully.
- I executed the test case, it works successfully

My openFoam is 2.1.x . Is it from my openFoam version?

I have still the problem in reactingFoam case::

Code:
Selecting turbulence model type LESModel
Selecting LES turbulence model dynamicSmagorinsky


--> 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


Regards
Bobi
babakflame is offline   Reply With Quote

Old   May 5, 2013, 00:52
Default
  #63
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by babakflame View Post
My openFoam is 2.1.x . Is it from my openFoam version?

I have still the problem in reactingFoam case
The code I wrote is for incompressible flow solvers, and it is added to the library of incompressible LES models. The reactingFoam solver is compressible, and uses the compressible LES models.

Best,
songwukong and wenxu like this.
__________________
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.
alberto is offline   Reply With Quote

Old   May 5, 2013, 08:41
Default
  #64
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Hi Alberto

I think that reactingFoam is incompressibe, cause we have another solver called rhoReactingFoam which is compressible.

Don't you think am I right?

Regards
Bobi
babakflame is offline   Reply With Quote

Old   May 5, 2013, 12:43
Default
  #65
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by babakflame View Post
Hi Alberto

I think that reactingFoam is incompressibe, cause we have another solver called rhoReactingFoam which is compressible.

Don't you think am I right?

Regards
Bobi
Looking at the code of the two solvers, they are both compressible, but they use different packages for the thermodynamic properties (see comments in the code).
babakflame likes this.
__________________
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.
alberto is offline   Reply With Quote

Old   July 25, 2013, 09:50
Default Problem with Time Writing of Directories when running in Parallel
  #66
Member
 
Krishna
Join Date: Jun 2012
Posts: 33
Blog Entries: 1
Rep Power: 13
rkc.cfd is on a distinguished road
Hi Alberto,

I was able to compile dynamicSmagorinsky model from your GIT repository and ran a test case on 2D flow over cylinder problem and had no problems.

I have a current 3D case running fine with regular Smagorinsky model running in parallel with pisoFoam. I just changed Smagorinsky model to dynamicSmagorinsky and it is running good but not writing the data out or even making time directories in processor folders. Could you suggest me path to debug this problem. My current version of OpenFOAM is 2.2.x compiled from source.

Cheers
rkc.cfd is offline   Reply With Quote

Old   November 13, 2013, 11:32
Default Turbulent Prandtl number?
  #67
New Member
 
David Van Cauwenberge
Join Date: Feb 2012
Location: Ghent, Belgium
Posts: 19
Rep Power: 14
dvcauwe is on a distinguished road
Hi Alberto,

First of all I'd like to thank you for making your code accessible. Compilation ran without problems and our results so far are significantly better than using traditional Smagorinsky or the homogenous version.

I was just wondering if you had ever tried to implement Eq. 17 for the Eddy Prandtl number in the Lilly (1992) modification? I used the method described here, applying cell-face averaging like in your method but unfortunately the values for the Prandtl number are very unstable.

Could you recommend other averaging/limiting methods that might allow more stable computation? Or does anyone else know of articles that may refer me to a practical implementation of a variable subgrid Prandtl/Schmidt number?

Thank you very much in advance.

Best regards,
David
dvcauwe is offline   Reply With Quote

Old   December 24, 2013, 02:08
Default
  #68
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 14
palmerlee is on a distinguished road
Quote:
Originally Posted by feldy77 View Post
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
Dear Yuri
I am trying to use buoyantBoussinesqPimleFoam with LES too. I noticed that this solver only works with RANS. I want to know whether or not your simulation succeed to give good results so that I can use this solver with LES confidently.
Thank you!
palmerlee
palmerlee is offline   Reply With Quote

Old   February 24, 2014, 16:33
Default dynamicSmagorinskyModel.so
  #69
Senior Member
 
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13
aylalisa is on a distinguished road
Dear Alberto,

I am happy that u've published dynamicSmagorinskyModel including its actual advantage!

I've run computation with your model.
Though after I've start blockMesh I've received following FOAM Warning :

Code:
--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : /home/lisa/OpenFOAM/lisa-2.2.2/platforms/linux64GccDPOpt/lib/libdynamicSmagorinskyModel.so: undefined symbol: _ZTIN4Foam14incompressible9LESModels11GenEddyViscE
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libdynamicSmagorinskyModel.so"
Could you comment that warning?





Thank you!


regards,
Aylalisa

Last edited by aylalisa; February 25, 2014 at 06:31.
aylalisa is offline   Reply With Quote

Old   February 25, 2014, 06:31
Default
  #70
Senior Member
 
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13
aylalisa is on a distinguished road
Sorry, found the answer....very long thread!
aylalisa is offline   Reply With Quote

Old   April 1, 2014, 08:17
Default
  #71
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 12
vut is on a distinguished road
Dear Alberto,

I would like to implement your model for my study case.

I downloaded the folder "dynLocalAverageSmagorinsky" from your website and I do "wmake libso".

Then I added

in controlDict
libs ( "libOpenFOAM.so" "libdynLocalAverageSmagorinskyModel.so" ) ;
and in LESProperties:
LESModel dynLocalAverageSmagorinsky; delta cubeRootVol;
dynLocalAverageSmagorinskyCoeffs { filter simple; ce 1.048; }
But it didn't work. I had some warnings as shown below:

Create time

--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libdynLocalAverageSmagorinskyModel.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libdynLocalAverageSmagorinskyModel.so"
Create mesh for time = 0

Additionally, when I compile your model typing wmake libso, I obtained:

SOURCE=dynLocalAverageSmagorinsky.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/turbulenceModels -I/opt/openfoam230/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam230/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam230/src/turbulenceModels/incompressible/LES/lnInclude -I/opt/openfoam230/src/transportModels -I/opt/openfoam230/src/finiteVolume/lnInclude -I/opt/openfoam230/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o



I am waiting to hear from you...

Thanks in advance,

vut
vut is offline   Reply With Quote

Old   April 1, 2014, 13:51
Default
  #72
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
The problem is that the library containing the model cannot be found, as the solver tells you:

Quote:
Originally Posted by vut View Post
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1179
dlopen error : libdynLocalAverageSmagorinskyModel.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
could not load "libdynLocalAverageSmagorinskyModel.so"
Create mesh for time = 0
You should check where the library is written, and verify that location is accessible.

Note that the code only works with OF 2.0.x. It wasn't tested with recent versions.
__________________
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.
alberto is offline   Reply With Quote

Old   April 1, 2014, 16:14
Default
  #73
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I have updated the tutorial to work with 2.3.x (based on the pimpleFoam/channel395 tutorial). The code did not require any change. You find the updated code 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.
alberto is offline   Reply With Quote

Old   April 2, 2014, 08:12
Default
  #74
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 12
vut is on a distinguished road
Dear Alberto,

Thanks for your generous share.

Actually, I recently tried your sub-grid scale model (last version) and it worked despite of mentioned warnings.

You mentioned that the code was not changed and the test case was modified solely, right? Please confirm because it seems interesting to implemented in my case study:

- your sub-grid scale model
- and homogeneousDynSmagorinsky model available now in OF 2.3.0

and compare them.

Best regards,

vut
vut is offline   Reply With Quote

Old   April 2, 2014, 08:44
Default
  #75
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 12
vut is on a distinguished road
An other question:

Does your model correspond to an article?

Ghosal et al. 1995 ("A dynamic localization model for LES of turbulent flows" in J. Fluid Mech. vol. 286, pp. 229-255)

or

Lilly et al. 1992 ("A proposed modification of the Germano subgrid-scale closure method")

Thanks in advance,

vut
aylalisa likes this.
vut is offline   Reply With Quote

Old   April 5, 2014, 06:01
Default
  #76
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 12
vut is on a distinguished road
It sound like the dynamic Smagorinsky developed by Alberto might have been followed the article of Lilly 1992.

He repeated many times that a local average over faces of cell is implemented instead of an average over the entire computational domain.

Have a nice weekend,

vut
vut is offline   Reply With Quote

Old   April 17, 2014, 22:55
Default
  #77
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 13
Sunxing is on a distinguished road
Quote:
Originally Posted by alberto View Post
I have updated the tutorial to work with 2.3.x (based on the pimpleFoam/channel395 tutorial). The code did not require any change. You find the updated code here:

https://bitbucket.org/albertop/dynamicsmagorinsky
Dear Alberto,

Can I use this model in OF 2.1.1?

Best regards.
xing
Sunxing is offline   Reply With Quote

Old   June 9, 2014, 03:49
Default
  #78
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
Hi,alberto:
I have a question about the MM definition in volScalarField dynamicSmagorinsky::cD
As Lily stated, MM=filter(delta)^2*filter(S_bar)*filter(D)-(delta)^2*filter(S_bar*D)
D=symm(grad(U))=Sij
in the dynamicSmagorinsky.C
MM=sqr(delta())*(filter_(mag(D)*(D)) - 4*mag(filter_(D))*filter_(D))
So filter(delta)/delta=2 is used
However, mag(D) returns (SijSij)^1/2 instead of (2SijSij)^1/2=S_bar
as a result,
MM=MM_exact/(2^1/2)
Thus
cD=cD_exact*2^1/2
Above, _exact represents the exact value in Lily's method
If it's my misunderstanding, please correct me.
Best reguards
Xianbei
huangxianbei is offline   Reply With Quote

Old   August 22, 2014, 09:16
Default
  #79
New Member
 
alp albayrak
Join Date: Apr 2014
Posts: 3
Rep Power: 12
alpalbayrak is on a distinguished road
Hi Alberto,

Maybe a recurring question, but;

I would like to know why you defined the k field. You could easily avoid the field declaration (B.C conditions etc.) and define it like the objects (cI,cD). Does it really have a hidden reason to declare it as field?

Regards
Alp
alpalbayrak is offline   Reply With Quote

Old   January 12, 2015, 09:40
Default
  #80
New Member
 
Laurent Schindfessel
Join Date: May 2014
Posts: 1
Rep Power: 0
LSchind is on a distinguished road
Dear all,

I’ve used the dynamic Smagorinsky model in a large-eddy simulation of a confluence, but I am facing rather negative nuSgs near the walls. I know that there is a physical explanation for negative nuSgs, but in my simulations there is a very large region where nuSgs equals -1E-6 (i.e. minus the fluid viscosity) persistently. Therefore, I don’t think my results are correct.

Because I notice these negative values mainly in the first two cells near the wall, I think the problem is related to how I treat the walls. I should mention that due to computational resources, the wall is not resolved, but rather modeled by means of a wall function (namely nutURoughWallFunction). If I refine near the wall, the region of nuSgs persistently equaling -1E-6 decreases. However, I have only tried limited refinement, as I want to limit the computational costs.

Therefore, the question I want to ask is: do you think this dynamic model is compatible with using wall functions? Is it possible that the calculation of nuSgs by the dynamic Smagorinsky model conflicts with the calculation of nuSgs by the wall function?

Or more in general: does anyone have experience with the combined use of this model and wall functions?

Thanks in advance,
Laurent
LSchind 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
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 00: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


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