The cape.pycart moduleΒΆ

The cape.pycart module contains the top-level interface for Cart3D setup and execution.

import cape.pycart

For example the following will read in a global settings instance assuming that the present working directory contains the correct files. (If not, various defaults will be used, but it is unlikely that the resulting setup will be what you intended.)

import cape.pycart
cntl = cape.pycart.Cntl()

A simpler example is to simply read a .tri file, rotate it about the x-axis by 20 degrees, and write it to a new file.

# Import the module.
import cape.pycart
# Read the .tri file.
tri = pyCart.Tri('bJet.i.tri')
# Rotate it.
tri.Rotate([0.,0.,0.], [1.,0.,0.], 20)
# Write it to a new file.
tri.Write('bJet_rotated.i.tri')

Most of the pyCart submodules essentially contain a one or more class definitions, and some of these classes are accessible directly from cape.pycart.

The module also contains the cape.pycart.bin module, which contains functions that run the main Cart3D binaries: autoInputs, cubes, mgPrep, and flowCart.

Modules included within this one are outlined below.