Skip to content

OpenFOAM multiple cases handling #6

@rokkrpan

Description

@rokkrpan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions