4. pyCart Documentation¶
Welcome to the documentation for pyCart, which provides a Python module for interacting with Cart3D cases.
The basic usage for this module is to create a file called pyCart.json
and use the executable pycart
. In addition to this control file for pyCart,
several other Cart3D input files (or, more accurately, input template files)
must be provided.
Cart3D input control file,
input.cntl
Surface triangulation file,
Components.i.tri
Optionally,
Config.xml
to name and group surface componentsIf an adaptive run, an adaptive run script,
aero.csh
There must also be a run matrix, which can either be specified within
pyCart.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.
$ pycart
The following will start up to N cases.
$ pycart -n $N
This will start no cases but show you the status of all the runs.
$ pycart -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 pyCart.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.
$ pycart -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.
$ pycart -f run.json --report
There are many more flags to pycart, including options to compress or archive folders, plot iterative histories, and constrain to only a subset of the run matrix.
Controlling runs with pyCart really focuses on the pyCart.json
file.
This file is divided into sections, some of which are mandatory. The three
most important sections describe the inputs to flowCart, the meshing options,
and the nature of the run matrix including variable definitions.
- 4.1. Examples Using pyCart
- 4.1.1. Demo 1: Basic Usage on a Bullet Shape
- 4.1.2. Demo 2: Closer Analysis of Simple Arrow Shape
- 4.1.3. Demo 3: Moving Fins
- 4.1.4. Demo 4: Business Jet, Data Book, and Automated Reports
- 4.1.5. Demo 5: Mesh Adaptation on a Business Jet
- 4.1.6. Demo 6: Line Loads on the Arrow Example
- 4.1.7. Demo 7: Data Book Plots and Reports
- 4.1.8. Demo 8: Powered Rocket and Thrust Vectoring
- 4.2. Control Files for pyCart (
pyCart.json
)- 4.2.1. Uncategorized pyCart Options
- 4.2.2. PBS Script Options
- 4.2.3. SLURM Script Options
- 4.2.4. Run Sequence and Cart3D Mode Control
- 4.2.5. Run Options for flowCart
- 4.2.6. Run Options for adjointCart
- 4.2.7. Adaptation Options
- 4.2.8. Cart3D Archive Settings
- 4.2.9. Mesh Options
- 4.2.10. Surface Configuration and Naming
- 4.2.11. Output Functional Definition
- 4.2.12. Data Book Definitions
- 4.2.13. Automated Report Generation with LaTeX
- 4.2.14. RunMatrix or Run Matrix
- 4.3. Cart3D Documentation for pyCart