Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1809
Closed
Open
Issue created Aug 13, 2020 by David Gisen@David1

postProcess utility does not accept subfolders, contrary to run-time function object

Summary

When using function objects during runtime, their dicts can be stored in arbitrary subfolders, e.g. "system/postProcessing", with the path given in controlDict. This is useful if many function objects are used. The postProcess utility, however, does not accept such subfolder paths and requires the dicts to be present in the "system" folder to work.

Steps to reproduce

cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .
cd cavity
blockMesh

copy attached file probes to a new subfolder "system/postProcessing/"

insert into controlDict:

functions
{
    #include "postProcessing/probes"
}

run

icoFoam

--> works as expected (output U to case/postProcessing/, see example log below)

Attempt 1

(delete results in folder case/postProcessing)

postProcess

--> not working at all (no output in case/postProcessing/) - but also no error warning.

Attempt 2

postProcess -func probes

--> wrong output, executes default dict from "caseDicts/postProcessing/probes/probes.cfg" at (0 0 0), not the custom one - no warning.

Attempt 3

postProcess -func probes -dict "system/postProcessing/probes"

--> wrong output, executes default dict from "caseDicts/postProcessing/probes/probes.cfg" at (0 0 0), not the custom one - no warning.

Example case

See above

What is the current bug behaviour?

  • No output in attempt 1.
  • Wrong output in attempts 2 and 3, without warning.

What is the expected correct behavior?

  • Show a warning if a default dict is used
  • Use of the dictionary defined in controlDict in attempts 1 and 2, as described in postProcess.C:

Execute the set of functionObjects specified in the selected dictionary (which defaults to system/controlDict) ...

  • Use of the dictionary at the path stated in attempt 3, as described in postProcess.H:

If the "dict" argument is specified the functionObjectList is constructed from that dictionary otherwise the functionObjectList is constructed from the "functions" sub-dictionary of "system/controlDict"

Relevant logs and/or images

Desired output in case/postProcessing/probes/0/U:

# Probe 0 (0.05 0.05 0.005)
#       Probe             0
#        Time
            0             (0 0 0)
          0.1             (-0.195685 0.0261655 0)
          0.2             (-0.19606 0.0263849 0)
          0.3             (-0.196066 0.0263885 0)
          0.4             (-0.196068 0.0263895 0)
          0.5             (-0.196068 0.0263898 0)

Environment information

  • OpenFOAM version : v1812, v1912, v2006
  • Operating system : CentOS Linux release 7.4.1708
  • Hardware info : HPC
  • Compiler : g++ (Spack GCC) 9.3.0

Possible fixes

Assignee
Assign to
Time tracking