CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Merging OF config files (

Horus August 28, 2012 18:09

Merging OF config files

If I recall correctly there was an OF utility that merges a config snippet like:

divSchemes {
div(phi,k) Gauss upwind;
into a given existing file (meaning it updates or creates the div(phi,k) entry).

But I can't find that utility... I remembered it was included with the OF distribution, not third party.

Or am I wrong?


wyldckat August 31, 2012 06:03

Greetings Florian,

It really depends on the type of merging you want to do. There are 2 possibilities:
  • If you want to merge, in the sense of editing the dictionary, then you can use changeDictionary along with the option "-instance":

    changeDictionary -instance system
    This way it will look for the files in the "system" folder.
    For more ideas:

    changeDictionary -help
    find $FOAM_TUTORIALS $FOAM_UTILITIES -name changeDictionaryDict

  • If you want to merge "#include" entries in a file into a single file... I think that the option "-enableFunctionEntries" in changeDictionary should do the trick...
Best regards,

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