5. pyFun Documentation¶
This is the documentation for pyFun/pyfun, which provides a Python module and scripts for interacting with FUN3D.
The basic usage for this module is to create a file called pyFun.json
and use the script pyfun. In addition to this control file for pyFun,
several other FUN3D input files (or, more accurately, input template files)
must be provided.
FUN3D namelist,
fun3d.nml
Mesh file(s), for example
pyfun.b8.ugrid
Boundary condition map, for example
pyfun.mapbc
There must also be a run matrix, which can either be specified within
pyFun.json
or within a separate file
All of these files can have different names for cases when that helps in the organization of runs, but these are the default file names. If all these files exist in the same folder, the following is the basic command that will start up to 10 cases.
$ pyfun
The following will start up to N cases.
$ pyfun -n $N
This will start no cases but show you the status of all the runs.
$ pyfun -c
Changing the flag to -cj
will also show PBS job numbers for cases where a
current job is either running or in the queue. Supposing that the file is not
called pyFun.json
but run.json
, the -f
flag can be used.
If at least some cases have partially run, the command to update or create the
data book (i.e. analyze force and moment coefficients and statistics as
specified in the control file), the --aero
flag will lead to that action.
$ pyfun -f run.json --aero
The last option to be highlighted on the front page is the automated report
generation capability. This command generates a multipage PDF based on settings
in the “Report” section of run.json
that usually gives a summary of each
case in the run directory on its own page.
$ pyfun -f run.json --report
There are many more flags to pyfun, including options to compress or archive folders, plot iterative histories, and constrain to only a subset of the run matrix.
Controlling runs with pyFun really focuses on the pyFun.json
file.
This file is divided into sections, some of which are mandatory.
- 5.1. Examples Using pyFun
- 5.2. Control Files for pyFun (
pyFun.json
)- 5.2.1. Uncategorized pyFun Options
- 5.2.2. PBS Script Options
- 5.2.3. SLURM Script Options
- 5.2.4. Run Sequence and FUN3D Mode Control
- 5.2.5. FUN3D Archive Settings
- 5.2.6. FUN3D Component Configuration
- 5.2.7. Data Book Definitions
- 5.2.8. Automated Report Generation with LaTeX
- 5.2.9. RunMatrix or Run Matrix