cape.pycart
: Interfaces to Cart3D¶
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.
- Cart3D and Cape files
- Supporting modules
cape.pycart.cntl
: Cart3D control modulecape.pycart.options
: Cart3D and pyCart Settingscape.pycart.aeroCsh
: Cart3Daero.csh
interfacecape.pycart.case
: Case Control Modulecape.pycart.cmdgen
: Create commands for Cart3D executablescape.pycart.cmdrun
: Cart3D executable interface modulecape.pycart.dataBook
: pyCart data book modulecape.pycart.inputCntl
: Cart3Dinput.cntl
interfacecape.pycart.lineLoad
: Sectional loads modulecape.pycart.manage
: Manage pyCart case folderscape.pycart.pointSensor
: Cart3D point sensors modulecape.pycart.preSpecCntl
: Cart3D preSpec.c3d.cntl Interfacecape.pycart.report
: Automated report interfacecape.pycart.tri
: Cart3D.tri
file interfacecape.pycart.util