CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Merging OF config files (http://www.cfd-online.com/Forums/openfoam/106428-merging-config-files.html)

Horus August 28, 2012 19:09

Merging OF config files
 
Hello,

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

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?

Thanks!

wyldckat August 31, 2012 07: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":
    Code:

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

    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,
Bruno


All times are GMT -4. The time now is 17:42.