Skip to content

CAPE 2.0.3

Choose a tag to compare

@nasa-ddalle nasa-ddalle released this 04 Apr 21:06
· 891 commits to main since this release

New Features

  • CAPE now includes PreShellCmds to go alongise PostShellCmds. This is an
    option in the "RunControl" section that allows the user to run one or
    more BASH (or whatever your shell of choice is) commands prior to running
    the primary CFD solver executables.

  • There is an exciting new feature called WorkerShellCmds in the
    "RunControl" section. It allows you to specify 0 or more BASH commands
    that you run every WorkerSleepTime seconds (default=10.0) while your
    case is running. It has working clean-up after the main executable is
    finished, allowing up to "WorkerTimeout" (default=600.0) seconds
    for the last instance of the worker to complete.

  • These run hooks also have Python function versions, in the form of options
    PrePythonFuncs, PostPythonFuncs, and WorkerPythonFuncs. If these are
    defined as a simple string, CAPE will import any modules implied by the
    function name and then call that function with no arguments. However, users
    may also specify more details for Python functions by defining the function
    in a dict.

    "RunControl": {
        "WorkerPythonFuncs": [
            "mymod.mufunc",
            {
                "name": "clean",
                "type": "runner"
            },
            {
                "name": "mymod.otherfunc",
                "args": [
                    "$runner",
                    "$mach"
                ]
            }
        ]
    }
  • Users of FUN3D and Kestrel can now link the mesh file into folders instead
    of copying it. Set "LinkMesh" to true in the "Mesh" section.

  • cape.pyfun in particular changes how it uses XML or JSON configuration
    files (which is specified in the "Config" > "File" setting). In
    previous versions of CAPE, the face labels or component ID numbers in that
    file had to match your actual grid, which had to match your .mapbc
    file. Now CAPE only uses the text names in the ConfigFile, and it's ok to
    include components that aren't actually present in your grid. If your case
    worked as expected before, it will still work now, but for new cases it
    might be much easier to set up. The (new) recommended process is to use a
    ConfigJSON file and only specify a "Tree" section.

Behavior Changes

  • Binary files storing iterative histories are no longer saved automatically
  • Calculation of job status, especially for FUN3D, is much faster. This
    change should not cause any functional changes for users.
  • Python modules used to define hooks are no longer universally imported
    during Cntl instantiation. Modules are imported dynamically if needed
    to execute a hook. The "Modules" setting is still present in the JSON
    file but has no effect.

Bugs Fixed

  • Fix bug in area-weighted node normal calculation,
    cape.trifile.TriBase.GetNodeNormals().
  • The refine/three capability with FUN3D now works more reliably.