cape.pycart.options.Config: pyCart Configuration Options

This module provides options for defining some aspects of the surface configuration for a Cart3D run. In addition to specifying a template Config.xml file for naming individual components or groups of components, the "Config" section also contains user-defined points and a set of parameters that are written to the Cart3D input file input.cntl.

This is the section in which the user specifies which components to track forces and/or moments on, and in addition it defines a moment reference point for each component.

The reference area ("RefArea") and reference length ("RefLength") parameters are also defined in this section. Cart3D does not have two separate reference lengths, so there is no "RefSpan" parameter.

Most parameters are inherited from the cape.config.Config class, so readers are referred to that module for defining points by name along with several other methods.

The "Xslices", "Yslices", and "Zslices" parameters are used by Cart3D to define the coordinates at which Tecplot slices are extracted. These are written to the output file cutPlanes.plt or cutPlanes.dat. Furthermore, these coordinates can be tied to user-defined points that may vary for each case in a run matrix.

The following example has a user-defined coordinate for a point that is on a component called "Fin2". Assuming there is a trajectory key that rotates "Fin2", the y-slice and z-slice coordinates will automatically be updated according to the fin position.

"Config": {
    // Define a point at the tip of a fin
    "Points": {
        "Fin2": [7.25, -0.53, 0.00]
    },
    // Write a *y* and *z* slice through the tip of the fin
    "Yslices": ["Fin2"],
    "Zslices": ["Fin2"]
}

Cart3D also contains the capability for point sensors, which record the state variables at a point, and line sensors, which provide the state at several points along a line. The line sensors are particularly useful for extracting a sonic boom signature. Both point sensors and line sensors can also be used as part of the definition of an objective function for mesh refinement. In addition, the sensors can be used to extract not only the conditions at the final iteration but also the history of relevant conditions at each iteration.

See Also:
class cape.pycart.options.Config.Config(fname=None, **kw)

Component configuration options for Cart3D

add_ClicForce(comp)

Add a component to track using clic

Call:
>>> opts.add_ClicForce(comp)
Inputs:
opts: pyCart.options.Options

Options interface

comp: str | int

Component or list of components

Versions:
  • 2014-12-08 @ddalle: First version

add_LineSensor(name, X)

Add an additional line sensor

Call:
>>> opts.add_LineSensor(name, X)
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to extract

X: list (double, len=6)

List of start x,y,z and end x,y,z

Versions:
  • 2015-05-06 @ddalle: First version

add_PointSensor(name, X)

Add an additional point sensor

Call:
>>> opts.add_PointSensor(name, X)
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to extract

X: list (double, len=3)

List of point x,y,z sensors

Versions:
  • 2015-05-07 @ddalle: First version

add_Xslice(x)

Add a cutting plane to the current list

Call:
>>> opts.add_Xslice(x)
Inputs:
opts: pyCart.options.Options

Options interface

x: float

Cut plane coordinate

Versions:
  • 2014-10-08 @ddalle: First version

add_Yslice(y)

Add a cutting plane to the current list

Call:
>>> opts.add_Yslice(x)
Inputs:
opts: pyCart.options.Options

Options interface

y: float

Cut plane coordinate

Versions:
  • 2014-10-08 @ddalle: First version

add_Zslice(z)

Add a cutting plane to the current list

Call:
>>> opts.add_Zslice(z)
Inputs:
opts: pyCart.options.Options

Options interface

z: float

Cut plane coordinate

Versions:
  • 2014-10-08 @ddalle: First version

get_ClicForces(i=None)

Get force or list of forces requested to track using clic

Call:
>>> comp = opts.get_ClicForces(i=None)
Inputs:
opts: pyCart.options.Options

Options interface

i: None | int | list`(:class:`int)

Index of component in list to return

Outputs:
comp: str | int | list

Component or list of components to track with clic

Versions:
  • 2014-12-08 @ddalle: First version

get_LineSensors(name=None)

Get dictionary of line sensors

Call:
>>> LS = opts.get_LineSensors(name=None):
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to extract

Outputs:
LS: dict (dict)

Line sensor or dictionary of line sensors

Versions:
  • 2015-05-06 @ddalle: First version

get_PointSensors(name=None)

Get dictionary of point sensors

Call:
>>> PS = opts.get_PointSensors(name=None):
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to extract

Outputs:
PS: dict (dict)

Point sensor or dictionary of point sensors

Versions:
  • 2015-05-07 @ddalle: First version

get_Xslices(i=None)

Return the list of Xslices for extracting solution cut planes

Call:
>>> x = opts.get_Xslices()
>>> x = opts.get_Xslices(i)
Inputs:
opts: pyCart.options.Options

Options interface

i: int

Index of cut plane coordinate to extract

Outputs:
x: float or list`(:class:`float)

Cut plane coordinate(s)

Versions:
  • 2014-10-08 @ddalle: First version

get_Yslices(i=None)

Return the list of Yslices for extracting solution cut planes

Call:
>>> y = opts.get_Yslices()
>>> y = opts.get_Yslices(i)
Inputs:
opts: pyCart.options.Options

Options interface

i: int

Index of cut plane coordinate to extract

Outputs:
y: float or list`(:class:`float)

Cut plane coordinate(s)

Versions:
  • 2014-10-08 @ddalle: First version

get_Zslices(i=None)

Return the list of Zslices for extracting solution cut planes

Call:
>>> z = opts.get_Zslices()
>>> z = opts.get_Zslices(i)
Inputs:
opts: pyCart.options.Options

Options interface

i: int

Index of cut plane coordinate to extract

Outputs:
z: float or list`(:class:`float)

Cut plane coordinate(s)

Versions:
  • 2014-10-08 @ddalle: First version

set_ClicForces(comp='entire', i=None)

Set force or list of forces by index to track using clic

Call:
>>> opts.set_ClicForces(comp, i=None)
Inputs:
opts: pyCart.options.Options

Options interface

comp: str | int | list

Component or list of components to track with clic

i: None | int | list`(:class:`int)

Index of component in list to return

Versions:
  • 2014-12-08 @ddalle: First version

set_LineSensors(LS={}, name=None, X=[])

Set dictionary of line sensors or individual line sensor

Call:
>>> opts.set_LineSensors(LS={})
>>> opts.set_LineSensors(name=None, X=[])
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to set

X: list (double, len=6)

List of start x,y,z and end x,y,z

LS: dict (dict)

Line sensor or dictionary of line sensors

Versions:
  • 2015-05-06 @ddalle: First version

set_PointSensors(PS={}, name=None, X=[])

Set dictionary of point sensors or individual point sensor

Call:
>>> opts.set_PointSensors(LS={})
>>> opts.set_PointSensors(name=None, X=[])
Inputs:
opts: pyCart.options.Options

Options interface

name: str

Name of individual line sensor to set

X: list (double, len=3)

List of point x,y,z coordinates

PS: dict (dict)

Point sensor or dictionary of point sensors

Versions:
  • 2015-05-07 @ddalle: First version

set_Xslices(x, i=None)

Return the list of Xslices for extracting solution cut planes

Call:
>>> x = opts.set_Xslices(x)
>>> x = opts.set_Xslices(x, i)
Inputs:
opts: pyCart.options.Options

Options interface

x: float or list`(:class:`float)

Cut plane coordinate(s)

i: int

Index of cut plane coordinate to extract

Versions:
  • 2014-10-08 @ddalle: First version

set_Yslices(y, i=None)

Return the list of Yslices for extracting solution cut planes

Call:
>>> y = opts.set_Yslices(x)
>>> y = opts.set_Yslices(x, i)
Inputs:
opts: pyCart.options.Options

Options interface

y: float or list`(:class:`float)

Cut plane coordinate(s)

i: int

Index of cut plane coordinate to extract

Versions:
  • 2014-10-08 @ddalle: First version

set_Zslices(z, i=None)

Return the list of Zslices for extracting solution cut planes

Call:
>>> x = opts.set_Zslices(z)
>>> x = opts.set_Zslices(z, i)
Inputs:
opts: pyCart.options.Options

Options interface

z: float or list`(:class:`float)

Cut plane coordinate(s)

i: int

Index of cut plane coordinate to extract

Versions:
  • 2014-10-08 @ddalle: First version