CAPE 2.1.0
New Features
-
CAPE now includes an unstructured mesh module called
cape.gruvoc. It
contains a mesh conversion capability, for example to convert a UGRID
volume mesh to a Tecplot volume PLT file, you could run.. code-block:: console
$ python3 -m cape.gruvoc pyfun.lb8.ugrid pyfun.plt --mapbc pyfun.mapbcIt also creates a
gruvocexecutable so that you could just run.. code-block:: console
$ gruvoc pyfun.lb8.ugrid pyfun.plt --mapbc pyfun.mapbcAnother useful tool is
gruvoc report, which summarizes the number of
nodes, surface tris, tets, etc. in a grid... code-block:: console
$ gruvoc report pyfun.lb8.ugrid -hYou can call
gruvoc reportwithout the-hto see the raw numbers.
The-hflag means "human-readable", so for example it will abbreviate
1234567 to "1.2M". -
The
pyfunmodule now contains the ability to directly read FUN3D
solutions directly, both instantaneous restart files (.flow) and
time-averaged solutions (_TAVG.1). An example usage is to convert a
time-averaged solution to a volume Tecplot PLT file:.. code-block:: console
$ gruvoc convert pyfun.lb8.ugrid pyfun_volume_tavg_timestep1000.plt \ --tavg pyfun_TAVG.1 --add-mach --add-cp --mapbc pyfun.mapbcThe
cape.pyfun.casecntlmodule conveniently provides some built-in
"workers" (See the notes on the CAPE 2.0.3 release) to make these
conversions while FUN3D is running. A common use case is to add the
following to the"RunControl"section for apyfunJSON file:.. code-block:: javascript
"WorkerPythonFuncs": [ { "name": "flow2plt", "type": "runner" }, { "name": "tavg2plt", "type": "runner" }, { "name": "clean", "type": "runner" } ], "PostPythonFuncs": [ { "name": "flow2plt", "type": "runner" }, { "name": "tavg2plt", "type": "runner" } ]This code will automatically convert each new
pyfun.flowfile to
pyfun_volume_timestep{n}.pltand each newpyfun_TAVG.1file to
pyfun_volume_tavg_timestep{n}.pltwithout requiring FUN3D to do any of
the output except for writing its usual restart files. -
The
cape.gruvocmodule also contains tools for creating cut planes and
performing other data sampling routines by using PyVista
(https://pyvista.org/). Thetavg2xrunner forpyfuncan be used for
more data sampling routines; see the documentation of that function for
more information. -
Checking PBS status is now more efficient and effective. CAPE can now
automatically detect which user's queue to check based on the owner of a
job (useful if you care callingcape -cfrom another user's folder) and
call to multiple PBS servers if appropriate. (This last example has become
quite usefule on NASA HPC systems, for example, where the CPU and GPU jobs
are controlled by distinct and separate PBS servers.) -
Several upgrades have been made to the MPI interface in
cape.cfdx.cmdgen. These changes allow support for mixed GPU/CPU
workflows (for example when runningrefine/threeon a GPU job with
FUN3D) and support additional environments that require more command-line
arguments (for example the new Grace Hopper systems on the NASA Advanced
Supercomputing facility). -
Fun3D namelist control in the
pyfunJSON file now supports setting
multiple indices of the same option in an efficient manner. Here's an
example setting the boundary conditions for a variety of surfaces:"Fun3D": { "boundary_conditions": { "wall_temp_flag": { "1-38": true }, "wall_temperature": { "1-38": -1 }, "static_pressure_ratio": { "8": 0.5, "15": 0.75, "18": 0.52 } }
It will lead to a namelist such as this:
&boundary_conditions wall_temp_flag(1:38) = .true. wall_temperature(1:38) = -1 static_pressure_ratio(8) = 0.5 static_pressure_ratio(15) = 0.75 static_pressure_ratio(18) = 0.52 /This is generally much more practical than making a list of 38
true
values for wall_temp_flag and is especially convenient for the
static_pressure_ratio in this example.
Behavior Changes
-
Many of the "DataBook" classes in
cape.cfdx.databookhave been renamed.
These may cause issues for advanced users who have custom "hooks" or other
Python modules. -
The default data type in
cape.dkit.textdatahas been changed to
int32. This minor change makes it much easier to read CAPE run matrix
files as DataKits without the need for extra keyword arguments. -
Job status (e.g. when running
pyover -c) is now computed by
CaseRunnerinstead ofCntl. This is generally more efficient (users
may notice the difference) and allows stand-alone cases to be aware of
their status without being part of a run matrix.
Bug Fixes
- The CAPE 2.0.3
pycartmodules contained several bugs that prevented
adaptive runs (even the published CAPE examples) from running properly. All
CAPE test cases run properly now.