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   January 23, 2011, 05:42
Default Warning
  #21
Member
 
Yashar Afarin
Join Date: May 2010
Location: Toronto- Canada
Posts: 40
Rep Power: 16
yashar.afarin is on a distinguished road
Send a message via Skype™ to yashar.afarin
Hi Alberto,

thanks for sharing your corrected dynamicSmagorinsky. I have complied it without any problem. but when I want to decompose my mesh, the below warning wolud be appear( I am using OF-1.6.x and Fedora-12):
--> FOAM Warning :
From function dlLibraryTable:pen(const fileName& functionLibName)
in file db/dlLibraryTable/dlLibraryTable.C at line 79
could not load /home/Yashar/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libdynamicSmagorinskyModel.so: undefined symbol: _ZNK4Foam14incompressible9LESModels


I would appreciate if you could help me to solve it.
yashar.afarin is offline   Reply With Quote

Old   January 23, 2011, 14:11
Default
  #22
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
Hi Yashfar,

nothing to worry about. You can safely ignore the warning. It happens sometime when using libraries through controlDict.

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   January 29, 2011, 13:11
Default
  #23
Member
 
Yashar Afarin
Join Date: May 2010
Location: Toronto- Canada
Posts: 40
Rep Power: 16
yashar.afarin is on a distinguished road
Send a message via Skype™ to yashar.afarin
Quote:
Originally Posted by alberto View Post
Hi Yashfar,

nothing to worry about. You can safely ignore the warning. It happens sometime when using libraries through controlDict.

Best,
Hi Alberto,

thanks for your reply and your sharing.

sincerely yours.
yashar.afarin is offline   Reply With Quote

Old   February 9, 2011, 05:17
Default
  #24
Member
 
Yashar Afarin
Join Date: May 2010
Location: Toronto- Canada
Posts: 40
Rep Power: 16
yashar.afarin is on a distinguished road
Send a message via Skype™ to yashar.afarin
Hi Alberto,

I would appreciate if you could answer me that " how could this model be used in compressible solver?"

Best regard,
yashar.afarin is offline   Reply With Quote

Old   February 9, 2011, 05:22
Default
  #25
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
Hi Yashar,

it cannot. The implementation I released works for incompressible solvers. For the compressible version you need to implement a compressible dynamic Smagorinsky model (see for example Piomelli's papers to have an idea).

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   February 17, 2011, 09:16
Default non-root compilation of dynamicSmagorinsky
  #26
Member
 
Bernhard Grieser
Join Date: Mar 2010
Location: Zurich, Switzerland
Posts: 30
Rep Power: 16
BernhardGrieser is on a distinguished road
Alberto,

thank you very much for your efforts on implementing a truly dynamic Smagorinsky model! I realized the flaw of the old implementation a few weeks ago and I am more than happy that someone already took care of the issue.

I'm running my simulations as a non-root user on my university's HP XC3000, where OpenFOAM 1.7 is pre-installed.
Logically it produces an error when compiling with wmake libso:

Code:
...
/usr/bin/ld: cannot open output file /software/all/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libdynamicSmagorinskyModel.so: Permission denied
collect2: ld returned 1 exit status
make: *** [/software/all/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libdynamicSmagorinskyModel.so] Error 1
Do you know a work-around, so I can compile it as non-root?

Best regards,
Bernhard
BernhardGrieser is offline   Reply With Quote

Old   February 17, 2011, 09:37
Default non-root compilation of dynamicSmagorinsky
  #27
Member
 
Bernhard Grieser
Join Date: Mar 2010
Location: Zurich, Switzerland
Posts: 30
Rep Power: 16
BernhardGrieser is on a distinguished road
ok, problem solved. One only has to change the content of ./Make/files:
I replaced FOAM_LIBBIN with FOAM_USER_LIBBIN
BernhardGrieser is offline   Reply With Quote

Old   February 17, 2011, 15:51
Default
  #28
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
Good the code is useful to someone :-)
__________________
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, 2011, 01:47
Default Thanks!
  #29
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 16
JamesJCFD is on a distinguished road
Dear Alberto,

Many thanks for your contribution! This is just what I have been looking for...

kind regards,

James
JamesJCFD is offline   Reply With Quote

Old   April 1, 2011, 03:41
Default
  #30
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
Happy to share!
__________________
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   June 11, 2011, 23:06
Default
  #31
New Member
 
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 15
PerryLJohnson is on a distinguished road
Alberto,

Just trying to understand your code (and OpenFOAM coding in general), not being picky.

If I have understood your code correctly, by changing the average(LLMM/MMMM) to fvc::average(LLMM/MMMM), you have averaged over the faces belonging to the cells, which are interpolated from their respective cells.

So essentially, you have applied the box filter (or simple filter as OpenFOAM calls it) and could accomplish the same thing using filter_(LLMM/MMMM) assuming the user chooses the simple filter. This would also allow use of the other filters to perform this averaging at the choice of the user. Please correct me if I have misunderstood anything.

FYI, the fluent manual states that it averages locally using the test filter, which appears to be what you have done as well (fluent also uses box filter).

Regards,
Perry
PerryLJohnson is offline   Reply With Quote

Old   June 11, 2011, 23:32
Default
  #32
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 PerryLJohnson View Post
Alberto,

Just trying to understand your code (and OpenFOAM coding in general), not being picky.

If I have understood your code correctly, by changing the average(LLMM/MMMM) to fvc::average(LLMM/MMMM), you have averaged over the faces belonging to the cells, which are interpolated from their respective cells.

So essentially, you have applied the box filter (or simple filter as OpenFOAM calls it) and could accomplish the same thing using filter_(LLMM/MMMM) assuming the user chooses the simple filter. This would also allow use of the other filters to perform this averaging at the choice of the user. Please correct me if I have misunderstood anything.
Yes, correct.

Quote:
FYI, the fluent manual states that it averages locally using the test filter, which appears to be what you have done as well (fluent also uses box filter).
Yes. Notice however that FLUENT forces nu_sgs > 0, which is not the case, and I do not do.

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   June 11, 2011, 23:41
Default
  #33
New Member
 
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 15
PerryLJohnson is on a distinguished road
Quote:
Originally Posted by alberto View Post
Yes, correct.



Yes. Notice however that FLUENT forces nu_sgs > 0, which is not the case, and I do not do.

Best,
I did notice that. I know you want to allow for back-scattering, but is there a numerical danger in letting nuEff get *close* to zero? I guess not since the numerical diffusion would take over at this point (provided you were using a dissipative scheme). They also clip nuSgs at 0.23 which seems kinda arbitrary.

Perry
PerryLJohnson is offline   Reply With Quote

Old   June 12, 2011, 00:07
Default
  #34
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 PerryLJohnson View Post
I did notice that. I know you want to allow for back-scattering, but is there a numerical danger in letting nuEff get *close* to zero? I guess not since the numerical diffusion would take over at this point (provided you were using a dissipative scheme).
Numerically I do not see any problem. It would just be like solving for an inviscid flow. Physically it could not be meaningful however.

Quote:
They also clip nuSgs at 0.23 which seems kinda arbitrary.
Yes, I agree.

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   July 5, 2011, 10:57
Default
  #35
New Member
 
Kris
Join Date: Nov 2010
Posts: 21
Rep Power: 15
kpsl is on a distinguished road
Hi,

I am having some trouble compiling this on OpenFOAM 2.0.x.

I get the following error:

Code:
dynLocalAverageSmagorinsky.C:40:   instantiated from here
/home/kris/OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/LES/lnInclude/LESModel.H:115: error: no matching function for call to ‘Foam::incompressible::LESModels::dynLocalAverageSmagorinsky::dynLocalAverageSmagorinsky(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::transportModel&, const Foam::word&)’
dynLocalAverageSmagorinsky.H:130: note: candidates are: Foam::incompressible::LESModels::dynLocalAverageSmagorinsky::dynLocalAverageSmagorinsky(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&)
dynLocalAverageSmagorinsky.H:118: note:                 Foam::incompressible::LESModels::dynLocalAverageSmagorinsky::dynLocalAverageSmagorinsky(const Foam::incompressible::LESModels::dynLocalAverageSmagorinsky&)
make: *** [Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o] Error 1
Is there an updated version for 2.0? Any help would be much appreciated

Kris
kpsl is offline   Reply With Quote

Old   July 5, 2011, 11:04
Default
  #36
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
This was released by Alberto this morning:
https://github.com/AlbertoPa/dynamicSmagorinsky
shuige likes this.
Bernhard is offline   Reply With Quote

Old   July 5, 2011, 12:48
Default
  #37
Member
 
Join Date: Oct 2010
Location: Stuttgart
Posts: 35
Rep Power: 16
grandgo is on a distinguished road
hi alberto,

i'm using dynamicSmagorinsky for a LES in parallel processing.
i have this message. the calculation is running but i'm concerned because of this warning.

Code:
FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 78
    could not load /home/stss8/OpenFOAM/stss8-1.7.x/lib/linux64GccDPOpt/libdynamicSmagorinskyModel.so: undefined symbol: _ZNK4Foam14incompressible9LESModels11GenEddyVisc1BEv
do you know anything about this?

best regards
grandgo
grandgo is offline   Reply With Quote

Old   July 5, 2011, 13:04
Default
  #38
New Member
 
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 15
PerryLJohnson is on a distinguished road
grandgo,

I think your question is posed and answered in posts 21 and 22 respectively.

Perry
PerryLJohnson is offline   Reply With Quote

Old   July 5, 2011, 13:34
Default
  #39
Member
 
Join Date: Oct 2010
Location: Stuttgart
Posts: 35
Rep Power: 16
grandgo is on a distinguished road
Quote:
Originally Posted by PerryLJohnson View Post
grandgo,

I think your question is posed and answered in posts 21 and 22 respectively.

Perry
right. sorry.

(couldn't find the keywords via search function ...)
grandgo is offline   Reply With Quote

Old   July 5, 2011, 15:22
Default
  #40
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 kpsl View Post

Is there an updated version for 2.0? Any help would be much appreciated
I released it this morning. Note that the version for OpenFOAM 2.0.x *breaks* the compatibility with 1.7.x.
If you need both, take a look at the README. However I am not going to update the version for 1.7.x in case bugs are found.

P.S. Notice that OF 2.0.x comes with the dynLagrangian model, which uses Lagrangian averaging to find the dynamic coefficient. It is a more refined model than the traditional dynamic Smagorinsky, so it might be worth considering it too (the reference is in the header file).

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

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


All times are GMT -4. The time now is 23:03.