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

Error compiling DES in OpenFoam v1612+

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By hk318i

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2017, 03:49
Question Error compiling DES in OpenFoam v1612+
  #1
New Member
 
Join Date: Feb 2014
Posts: 12
Rep Power: 12
VisMart is on a distinguished road
Hi everyone,

I'm finding some problems when compiling DES model (even with any modifications) in OpenFoam v1612+. I've tried to recompile, for example, Smagorinsky (LES) and a RAS model, and everything went perfectly, the problem is DES. In this new OF version DES models source are in different path than usual. Does somebody know the problem with DES recompilation? I created the "maketurmodel.C" described for Hassan Kassem in http://hassankassem.me/posts/newturbulencemodel/, and it works for RAS and LES, but it does not for DES models...

Thank you guys.
VisMart is offline   Reply With Quote

Old   June 1, 2017, 10:19
Default
  #2
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18
hk318i is on a distinguished road
Hi,

I think the problem is related to this commit [LINK] which has been merged from OpenFOAM-dev into OpenFOAM-plus. The propose of this commit is to simplify the process of adding a new model by changing the few macros. I'm surprised that you managed to compile a LES model but not managed to compile a DES model, because DES is of type LESmodel. Moreover, both are compiled using the same macros. It would be helpful, to share the exact error and the test code.

Best wishes,
Hassan
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Old   June 1, 2017, 11:24
Default
  #3
New Member
 
Join Date: Feb 2014
Posts: 12
Rep Power: 12
VisMart is on a distinguished road
Quote:
Originally Posted by hk318i View Post
Hi,

I think the problem is related to this commit [LINK] which has been merged from OpenFOAM-dev into OpenFOAM-plus. The propose of this commit is to simplify the process of adding a new model by changing the few macros. I'm surprised that you managed to compile a LES model but not managed to compile a DES model, because DES is of type LESmodel. Moreover, both are compiled using the same macros. It would be helpful, to share the exact error and the test code.

Best wishes,
Hassan


Hi Hassan,

I don't know what is exactly happening, but in OF v1612+ DES models are located in different path than OF 4 and headers are different. Moreover, in OF v1612+ DES models are based in "DESModel.H" (this doesn't exist in v4), and in the v4 they are still based in "LESeddyViscosity.H". I think this is the main difference and the reason of the problem. I solved this issue adding to the headers of "makeTurModel.C" the following:

#include "LESeddyViscosity.H"
#include "bound.H"
#include "wallDist.H"

I can now compile DES Models, but I did not probe them yet. I will run a case shortly.

I attach an image with the first errors (with the previous headers not included), and the "maketurModel" files.

If you know what is the real problem and you think my solution is not good and it will not work, I really appreciate your advices.

Thank you Hassan!
Attached Images
File Type: jpg DES compilation - error.jpg (194.4 KB, 24 views)
Attached Files
File Type: c makeTurModel.C (3.6 KB, 23 views)
File Type: h turTransportModels.H (3.0 KB, 15 views)
VisMart is offline   Reply With Quote

Old   June 2, 2017, 09:20
Default
  #4
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18
hk318i is on a distinguished road
Hi,

Indeed there is something not clear here but the following points could be confirmed:
  • DESModel<> class is inherited from DESModelBase and LESeddyViscosity<>, so DESModel is of type DESModelBase + LESeddyViscosity<>.
  • Despite the fact that in OpenFOAM-plus DES models are in a separate folder, they still within the same namespace Foam::LESModels::
  • Some of these models are in OpenFOAM-4 with as a small modification in the structure.
  • The new macros are included in OpenFOAM-dev and OpenFOAM-plus only not OpenFOAM-4
To compile a new model based on the new macros, you don't have to define a new macro as per my blog post. Simply have "maketurModel" file like this
Code:
#include "turbulentTransportModels.H"
#include "mykEpsilon.H"
makeRASModel(mykEpsilon);
Where "turbulentTransportModels.H" is the original header from OpenFOAM, you don't have to copy or modify it, just link it in "files". That is because the new macros separate the typedefs and the addition to the runTime table.


Having said that, it seems that for LESmodels in general, there is a missing step. I tested quickly using "dynamicKEqn" but the compiler complied about missing headers. With kOmegaSSTIDDES, I got the same error as in your case plus "fvOptions.H" was missing. I hadn't enough time to investigate more but it seems that there are missing headers.


Best Regards,
Hassan
wind_ likes this.
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Old   July 18, 2017, 10:11
Question Acoustic Library implementation in OF v1612
  #5
New Member
 
Join Date: Feb 2014
Posts: 12
Rep Power: 12
VisMart is on a distinguished road
Hello Hassan,

I want to told you that I am running a "Modified SA IDDES" simulation with the model I finally compile, as I told you in this post the past month. It seems to work fine, but simulations are still running.

Now I am trying to compile this Acoustic Library (https://github.com/unicfdlab/libAcou...r/OpenFOAM-4.1), specifically the Curle's Analogy, in OpenFOAM v1612+. But unfortunately I get some errors like:

"analogies/AcousticAnalogy/AcousticAnalogy.C:72:18: error: ‘files’ was not declared in this scope"

and others similars, due to the named "files" variable. I think problems comes from differences in functionObjects implementation for these two versions. Acoustic Analogy is based in functionObjects like "forces", and I noticed that OF v4 source has the files "wrtieFiles" (plural) and "writeFile" (singular), where the mentioned "files" variable is defined. However, source code in OF v1612 only has the "writeFile" files. writeFiles seems to be a template for writeFile.

I don't know how can I solve this issue because it's probably a major incompatibility in the structure of OpenFOAM versions. Maybe some information about functionObject implementation in v1612 could help, and I can try to adapt "AcousticAnalogy.C" to v1612... Do yo know any tutorial or information about that?.

Thanks a lot.

Best regards.

VisMart
VisMart is offline   Reply With Quote

Reply

Tags
compile, des, error, openfoam1612


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
Getting Started with OpenFOAM wyldckat OpenFOAM 26 June 21, 2024 07:54
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 12:50
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
How to use DES well? Daniel Main CFD Forum 0 October 26, 2008 06:59


All times are GMT -4. The time now is 12:53.