|
[Sponsors] |
May 9, 2014, 11:29 |
controlDict in foam-extend-3.0
|
#1 |
Member
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16 |
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 |
|
May 9, 2014, 12:47 |
|
#2 |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
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 |
|
May 12, 2014, 04:14 |
|
#3 |
Member
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 16 |
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 |
|
May 12, 2014, 14:03 |
|
#4 | |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
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:
|
||
May 12, 2014, 15:54 |
|
#5 | |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
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:
|
||
May 12, 2014, 16:52 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 |
|
May 13, 2014, 09:55 |
|
#7 | |
Senior Member
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22 |
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:
|
||
May 13, 2014, 16:26 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 |
|
August 20, 2015, 05:34 |
|
#9 |
Member
Join Date: May 2014
Posts: 40
Rep Power: 12 |
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 ( ... 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 |
|
|
|
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 |