-
Notifications
You must be signed in to change notification settings - Fork 0
Description
function objects in OpenFoam can read fields also from directories with alphabetical characters.
Lets imagine that we have 3 cases organized in the following way
caseA/
├── 0/
├── constant/
├── system/
├── 10/
│ └── T
├── 15/
│ └── T
├── 20/
│ └── T
└── ...
caseB/
├── 0/
├── constant/
├── system/
├── 100/
│ └── T
├── 150/
│ └── T
├── 200/
│ └── T
└── ...
caseC/
├── 0/
├── constant/
├── system/
├── 100/
│ └── T
├── 150/
│ └── T
├── 200/
│ └── T
└── ...
The results then be gathered in a single directory as follows, where * indicates a symlink. Folders A, B, C have to be created (not symlinked), but the results in them can be symlinks. Directories without case IDs are needed to temporarily store newly generated fields, which are immediately moved to their appropriate case directory.
common_dir/
├── 0*/
├── constant*/
├── system*/
├── 10/
├── 10A/
│ ├── T*
│ └── operation(T,T_200B)
├── 200/
└── 200B/
└── T*
The operation including fields from different case can be performed like: operation field1 (stored in 10A), and field 2 (stored in 200B). The resulting field will be printed into 10, and moved to 10A already by the function object.
Not to generate too many links and folders, in a common directory only the needed and new fields could be kept.