CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   controlDict in foam-extend-3.0 (https://www.cfd-online.com/Forums/openfoam-pre-processing/135140-controldict-foam-extend-3-0-a.html)

timo_IHS May 9, 2014 10:29

controlDict in foam-extend-3.0
 
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

mbeaudoin May 9, 2014 11:47

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 (Post 490862)
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 May 12, 2014 03:14

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 May 12, 2014 13:03

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 (Post 491180)
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 May 12, 2014 14:54

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 (Post 491307)
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


wyldckat May 12, 2014 15:52

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

mbeaudoin May 13, 2014 08:55

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 (Post 491331)
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 May 13, 2014 15:26

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

Phil_ August 20, 2015 04:34

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


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