cape.pyfun.plt: Interface to FUN3D Tecplot PLT files

This module provides the class cape.pyfun.plt.Plt, which intends to read and write Tecplot binary or ASCII PLT files for surface grid solutions from FUN3D. It is based on the generic PLT interface, cape.bin.plt.Plt, which does not use the TecIO library to avoid causing unnecessary dependencies for the software.

This version of the module has several modifications that are particular to FUN3D solutions. It has a special method for calculating time-averaged Cp values from named FUN3D outputs, and it also includes an interface to FUN3D .mapbc files to interpret names for each boundary zone.

This class cannot read any generic .plt file; it focuses on surface grids with a mix of triangles and quads. In particular it is closely paired with the cape.tri triangulation module. The initial driving cause for creating this module was to read FUN3D boundary solution files and convert them to annotated Cart3D triq format for input to triload and other post-processing based on the cape.tri module.

See also:
class cape.pyfun.plt.Plt(fname=None, dat=None, triq=None, **kw)

Interface for Tecplot PLT files

Call:
>>> plt = plt.Plt(fname)
Inputs:
fname: str

Name of file to read

Outputs:
plt: cape.pyfun.plt.Plt

Tecplot PLT interface

plt.nVar: int

Number of variables

plt.Vars: list[str]

List of of variable names

plt.nZone: int

Number of zones

plt.Zone: int

Name of each zone

plt.nPt: np.ndarray (int, nZone)

Number of points in each zone

plt.nElem: np.ndarray (int, nZone)

Number of elements in each zone

plt.Tris: list (np.ndarray (N,4))

List of triangle node indices for each zone

Versions:
  • 2016-11-22 @ddalle: First version

  • 2017-03-30 @ddalle: Subclassed to cape.plt.Plt

GetCpTAvg(mach, gam=1.4)

Calculate cp_tavg if p_tavg exists

Call:
>>> plt.GetCpTAvg(mach, gam=1.4)
Inputs:
plt: cape.pyfun.plt.Plt

Tecplot PLT interface

mach: float

Freestream Mach number

gam: {1.4} | float

Ratio of specific heats

Versions:
  • 2017-05-16 @ddalle: First version

cape.pyfun.plt.Plt2Triq(fplt, ftriq=None, **kw)

Convert Tecplot PLT file to Cart3D annotated tri (TRIQ)

Call:
>>> Plt2Triq(fplt, ftriq=None, **kw)
Inputs:
fplt: str

Name of Tecplot PLT file

ftriq: {None} | str

Name of output file (default: replace extension with .triq)

mach: {1.0} | positive float

Freestream Mach number for skin friction coeff conversion

triload: {True} | False

Whether or not to write a triq tailored for triloadCmd

avg: {True} | False

Use time-averaged states if available

rms: True | {False}

Use root-mean-square variation instead of nominal value

Versions:
  • 2016-12-20 @ddalle: First version