cape.plot3d: Python interface to Plot3D files

This module provides a generic Plot3D file interface for reading Plot3D grid files using the class cape.plot3d.X. This class automatically detects endianness of the grid and can handle IBLANKS in addition to single-grid or multiple-grid formats.

The cape.plot3d.Q interface to solution files also exists, but it is not reliable since Plot3D solution files are dependent on the solver used to create the solution file.

cape.plot3d.MapTriMatchBCs(C)

Create a .ovfi file using family names from a triangulation

Call:
>>> BCs = MapTriMatchBCs(C)
Inputs:
x: cape.plot3d.X

Plot3D grid interface

tri: cape.tri.Tri

Triangulation; likely with named components

n: {1} | positive int

Grid number to process (1-based index)

Versions:
  • 2017-02-08 @ddalle: Version 1.0

class cape.plot3d.Q(fname=None)

Interface to OVERFLOW-like q solution files

Call:
>>> q = Q(fname=None)
Inputs:
fname: {None} | str

Name of OVERFLOW solution file to read

Outputs:
q: cape.plot3d.Q

Solution file interface

Versions:
  • 2016-10-11 @ddalle: Version 1.0

GetFileType(fname)

Get full file type of a Plot3D grid file

Call:
>>> ext = q.GetFileType(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Outputs:
ext: {"ascii"} | "l?[br][48]"

File type in the form of a file extension code

  • "lr4": little-endian single-precision records

  • "lr8": little-endian double-precision records

  • "r8": big-endian double-precision records

  • "lb8": little-endian double-precision stream

  • "b8": big-endian double-precision records

Attributes:
q.byteorder: "little" | "big" | {None}

Endianness of binary file

q.filetype: "record" | "stream" | {"ascii"}

Basic file type

q.p3dtype: "multiple" | {"single"}

Plot3D zone type

Versions:
  • 2016-10-14 @ddalle: Version 1.0

Read_ASCII(fname)

Read an ASCII solution file

Call:
>>> q.Read_ASCII(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_b4(fname)

Read a big-endian single-precision (stream) solution file

Call:
>>> q.Read_b4(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_b8(fname)

Read a big-endian double-precision (stream) solution file

Call:
>>> q.Read_b8(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_lb4(fname)

Read a little-endian single-precision (stream) solution file

Call:
>>> q.Read_lb4(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_lb8(fname)

Read a little-endian double-precision (stream) solution file

Call:
>>> q.Read_lb8(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_lr4(fname)

Read a little-endian single-precision (stream) solution file

Call:
>>> q.Read_lr4(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_lr8(fname)

Read a little-endian double-precision (stream) solution file

Call:
>>> q.Read_lr8(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_r4(fname)

Read a big-endian single-precision solution file

Call:
>>> q.Read_r4(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0

Read_r8(fname)

Read a big-endian double-precision solution file

Call:
>>> q.Read_r8(fname)
Inputs:
q: cape.plot3d.Q

Solution file interface

fname: str

Name of Plot3D file

Versions:
  • 2016-10-15 @ddalle: Version 1.0