cape.pyover.plot3d: Interface to OVERFLOW Plot3D files

This module provides a generic Plot3D file interface for reading OVERFLOW grid system and solution files using the classes pyOver.plot3d.X and pyOver.plot3d.Q.

These classes contain customizations of the generic Plot3D grid interface cape.plot3d.X for OVERFLOW. In addition to reading the custommized header from OVERFLOW q files, it also contains special calculators such as Q.get_Cp() that calculate derived quantities from the native OVERFLOW output state variables.

See also:
class cape.pyover.plot3d.Q(fname, endian=None)

General OVERFLOW q file interface

Call:
>>> q = pyOver.plot3d.Q(fname, endian=None)
Inputs:
fname: str

Name of file to read

endian: {None} | “big” | “little”

Manually-specified byte order

Outputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

Versions:
  • 2016-02-26 @ddalle: First version

GetGridDims()

Read the dimensions for each grid

Call:
>>> q.GetGridDims()
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

Data members:
q.JD: numpy.ndarray (int size=*q.nGrid*)

J dimensions of each grid

q.KD: numpy.ndarray (int size=*q.nGrid*)

K dimensions of each grid

q.LD: numpy.ndarray (int size=*q.nGrid*)

L dimensions of each grid

q.NQ: int

Number of conserved variables plus one for gamma

q.NQC: int

Number of species concentrations, 0 if not using

Versions:
  • 2016-02-26 @ddalle: First version

GetNGrid()

Read the number of grids and determine multiple grid status

Call:
>>> nGrid = q.GetNGrid()
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

Outputs:
nGrid: int

Number of grids

Versions:
  • 2016-02-26 @ddalle: First version

InitHeaders()

Initialize reference quantities for each grid

Call:
>>> q.InitHeaders()
Inputs:
q: pyOver.plot3d.Q

Generic OVERFLOW module

Versions:
  • 2016-02-26 @ddalle: First version

Read()

Read an OVERFLOW generic Q file

Call:
>>> q.Read()
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

Data members:
q.nGrid: int

Number of grids

q.mGrid: bool

Whether or not file is a multiple-grid file

q.Q: list (numpy.ndarray)

List of solution arrays

Versions:
  • 2016-02-26 @ddalle: First version

ReadQData(IG=None)

Read the data

Call:
>>> q.ReadQData(IG=None)
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

IG: int

Grid number to read, defaults to len(q.Q)+1

Data members:
q.Q[IG-1]: numpy.ndarray[float]

Solution array

Versions:
  • 2016-02-26 @ddalle: First version

ReadQHeader(IG=None)

Read header info assuming the file marker is in the correct place

Call:
>>> q.ReadQHeader(IG=None)
Inputs:
q: pyOver.plot3d.Q

Generic OVERFLOW module

IG: int

Grid number to read, defaults to len(q.Q)+1

Versions:
  • 2016-02-26 @ddalle: First version

get_Cp(IG, **kw)

Get pressure coefficients from a grid

Call:
>>> Cp = q.get_Cp(IG, **kw)
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

IG: int

Grid number (one-based index)

Keyword arguments:
J: int | list[int]

Single grid index, j direction

JS: int

Start index, j direction

JE: int

End index, j direction

K: int | list[int]

Single grid index, k direction

KS: int

Start index, k direction

KE: int

End index, k direction

L: int | list[int]

Single grid index, l direction

LS: int

Start index, l direction

LE: int

End index, l direction

Outputs:
Cp: float | numpy.ndarray[float]

Pressure coefficient or array of pressure coefficients

See also:

expand_grid_indices()

Versions:
  • 2016-02-26 @ddalle: First version

get_M(IG, **kw)

Get Mach numbers from a grid

Call:
>>> M = q.get_M(IG, **kw)
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

IG: int

Grid number (one-based index)

Keyword arguments:
J: int | list[int]

Single grid index, j direction

JS: int

Start index, j direction

JE: int

End index, j direction

K: int | list[int]

Single grid index, k direction

KS: int

Start index, k direction

KE: int

End index, k direction

L: int | list[int]

Single grid index, l direction

LS: int

Start index, l direction

LE: int

End index, l direction

Outputs:
M: float | numpy.ndarray[float]

Mach number or array of Mach numbers

See also:

expand_grid_indices()

Versions:
  • 2016-03-07 @ddalle: First version

get_T(IG, **kw)

Get dimensional point temperatures from a grid in degrees Rankine

Call:
>>> p = q.get_p(IG, **kw)
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

IG: int

Grid number (one-based index)

Keyword arguments:
J: int | list[int]

Single grid index, j direction

JS: int

Start index, j direction

JE: int

End index, j direction

K: int | list[int]

Single grid index, k direction

KS: int

Start index, k direction

KE: int

End index, k direction

L: int | list[int]

Single grid index, l direction

LS: int

Start index, l direction

LE: int

End index, l direction

Outputs:
T: float | numpy.ndarray[float]

Temperature or array of temperatures [R]

See also:

expand_grid_indices()

Versions:
  • 2016-03-07 @ddalle: First version

get_p(IG, **kw)

Get dimensional point pressures from a grid in lb/ft^2

Call:
>>> p = q.get_p(IG, **kw)
Inputs:
q: pyOver.plot3d.Q

General OVERFLOW q-file interface

IG: int

Grid number (one-based index)

Keyword arguments:
J: int | list[int]

Single grid index, j direction

JS: int

Start index, j direction

JE: int

End index, j direction

K: int | list[int]

Single grid index, k direction

KS: int

Start index, k direction

KE: int

End index, k direction

L: int | list[int]

Single grid index, l direction

LS: int

Start index, l direction

LE: int

End index, l direction

Outputs:
p: float | numpy.ndarray[float]

Pressure or array of pressures [psf]

See also:

expand_grid_indices()

Versions:
  • 2016-03-07 @ddalle: First version

class cape.pyover.plot3d.X(fname, endian=None)

General OVERFLOW x file interface

Call:
>>> x = pyOver.plot3d.X(fname, endian=None)
Inputs:
fname: str

Name of file to read

endian: {None} | “big” | “little”

Manually-specified byte order

Outputs:
x: pyOver.plot3d.X

General OVERFLOW x-file interface

Versions:
  • 2016-08-31 @ddalle: First version