CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

controlDict in foam-extend-3.0

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By mbeaudoin
  • 3 Post By mbeaudoin
  • 1 Post By mbeaudoin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2014, 11:29
Default controlDict in foam-extend-3.0
  #1
Member
 
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16
timo_IHS is on a distinguished road
Has anybody an idea where to put the controlDict for personal settings for foam-extend-3.0?

In 1.6-ext it was:
~/.OpenFOAM/1.6-ext
timo_IHS is offline   Reply With Quote

Old   May 9, 2014, 12:47
Default
  #2
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello Timo,

The search path for the global controlDict is defined in Foam::fileName Foam::findEtcFile(), located in src/OSspecific/POSIX/POSIX.C

As you can see from the source code, the usage of a "personal" global controlDict was deprecated. So one is stuck choosing between a "site" global controlDict or the one that comes pre-installed with foam-extend-3.0.

I have written a piece of code that could be useful to correct this "feature" of foam-extend-3.0. I am in the process of cleaning it up and porting it to 3.0. It will basically allow you to override any global controlDict switches on a case by case basis at runtime.

Best,

Martin


Quote:
Originally Posted by timo_IHS View Post
Has anybody an idea where to put the controlDict for personal settings for foam-extend-3.0?

In 1.6-ext it was:
~/.OpenFOAM/1.6-ext
amuzeshi likes this.
mbeaudoin is offline   Reply With Quote

Old   May 12, 2014, 04:14
Default
  #3
Member
 
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16
timo_IHS is on a distinguished road
Hi Martin,

that's a good idea.

Why is it "deprecated"? I can't see a reason!
Especially if you are using an installation where you do not want to change anything...
And if understand correctly, I can not set e.g.
debug:OptimisationSwitch("GGIOctreeSearchMinNLevel ", 3)

Best Timo
timo_IHS is offline   Reply With Quote

Old   May 12, 2014, 14:03
Default
  #4
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello Timo

I don't know why this was deprecated. I think using a personal controlDict for tweaking the global switches was useful too.

As for setting "GGIOctreeSearchMinNLevel" to another value, with the current version of foam-extend-3.0, you can only change this in the "main" etc/controlDict file, or under site/controlDict or site/3.0/controlDict.

Best,

Martin

Quote:
Originally Posted by timo_IHS View Post
Hi Martin,

that's a good idea.

Why is it "deprecated"? I can't see a reason!
Especially if you are using an installation where you do not want to change anything...
And if understand correctly, I can not set e.g.
debug:OptimisationSwitch("GGIOctreeSearchMinNLevel ", 3)

Best Timo
mbeaudoin is offline   Reply With Quote

Old   May 12, 2014, 15:54
Default
  #5
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello again,

Now I know why this was deprecated....

You can override the location of your global controlDict file using an environment variable called FOAM_GLOBAL_CONTROLDICT.

See Foam::debug::controlDict() in the file debug.C

So if you set this environment variable to a valid file path+filename, then this file will be used as the global controlDict file for your simulation. So using this trick, you can override your global switch values on a case by case basis.

Sorry about that one, I should have remembered this...

Martin

Quote:
Originally Posted by mbeaudoin View Post
Hello Timo

I don't know why this was deprecated. I think using a personal controlDict for tweaking the global switches was useful too.

As for setting "GGIOctreeSearchMinNLevel" to another value, with the current version of foam-extend-3.0, you can only change this in the "main" etc/controlDict file, or under site/controlDict or site/3.0/controlDict.

Best,

Martin
ngj, wyldckat and amuzeshi like this.
mbeaudoin is offline   Reply With Quote

Old   May 12, 2014, 16:52
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Martin: Many thanks for checking up on this!
I've added this information to the wiki here: http://openfoamwiki.net/index.php/Ho...in_debug_flags

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 13, 2014, 09:55
Default
  #7
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
I think you are missing the point with the example you are giving on the Wiki.

There is no reason to deprecate the usage of an hard-coded path for the personal global controlDict if it is to be replaced by an environment variable that does the exact same thing, which is what your example is basically showing.

The real power from this improvement will come by initializing this environment variable to something like this:

export FOAM_GLOBAL_CONTROLDICT=./thisCaseGlobalControlDict

By doing this, you give yourself access to a case by case specific global controlDict values, something the old code could not do.

If this file exists when you start your application, then it will override the default global controlDict values, otherwise, the default global controlDict file will take precedence.

Hope this helps,

Martin

Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Martin: Many thanks for checking up on this!
I've added this information to the wiki here: http://openfoamwiki.net/index.php/Ho...in_debug_flags

Best regards,
Bruno
gschaider likes this.
mbeaudoin is offline   Reply With Quote

Old   May 13, 2014, 16:26
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Martin,

Thanks again. In my defense, I was sleepy yesterday and I went for the "document this before I forget about it" . And since it's wiki, anyone can improve the wiki pages

I've updated the respective section and did a little formatting tweak to space the list items a bit apart.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 20, 2015, 05:34
Default
  #9
Member
 
Join Date: May 2014
Posts: 40
Rep Power: 12
Phil_ is on a distinguished road
Hi,

I'm having issues using debug switches in foam-extend-3.1-testing.

When executing blockMesh and a solver via an Allrun-script, foam complains about:

Code:
--> FOAM FATAL ERROR:
Usage of non-existent DebugSwitches name: CircumferentialAveragingInterpolation

Valid entries for this application are:
410
(
...
Is this the normal behaviour? So it is allowed only to use debug switches in the controlDict-file that are actually listed in the executed solver or application?

If so, I would have to initialize FOAM_GLOBAL_CONTROLDICT with the respective controlDict etries only before starting the specific application? Don't know if this is the way it was intended to work...

Best regards

Philip
Phil_ 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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


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