cape.pyover.databook
: DataBook module for OVERFLOW¶
This module contains functions for reading and processing forces,
moments, and other statistics from cases in a trajectory. Data books are
usually created by using the cape.pyover.cntl.Cntl.ReadDataBook()
function.
# Read OVERFLOW control instance cntl = pyOver.Cntl("pyOver.json") # Read the data book cntl.ReadDataBook() # Get a handle DB = cntl.DataBook # Read a line load component DB.ReadLineLoad("CORE_LL") DBL = DB.LineLoads["CORE_LL"] # Read a target DB.ReadTarget("t97") DBT = DB.Targets["t97"]
Data books can be created without an overall control structure, but it
requires creating a run matrix object using
cape.pyover.runmatrix.RunMatrix
, so it is a more involved
process.
Data book modules are also invoked during update and reporting command-line calls.
$ pyfun --aero $ pyfun --ll $ pyfun --triqfm $ pyfun --report
- class cape.pyover.databook.CaseFM(proj: str, comp: str, **kw)¶
Force and moment iterative histories
This class contains methods for reading data about an the history of an individual component for a single casecntl. It reads the Tecplot file
$proj_fm_$comp.dat
where proj is the lower-case root project name and comp is the name of the component. From this file it determines which coefficients are recorded automatically.- Call:
>>> fm = CaseFM(proj, comp)
- Inputs:
- Outputs:
- fm:
CaseFM
Force and moment iterative history instance
- fm:
- class cape.pyover.databook.CaseResid(proj: str, **kw)¶
OVERFLOW iterative residual history class
This class provides an interface to residuals for a given case by reading the files
resid.out
,resid.tmp
,run.resid
,turb.out
,species.out
, etc.- Call:
>>> hist = CaseResid(proj)
- Inputs:
- proj:
str
Project root name
- proj:
- Outputs:
- hist:
CaseResid
Instance of the residual histroy class
- hist:
- PlotL2(n=None, nFirst=None, nLast=None, **kw)¶
Plot the L2 residual
- Call:
>>> h = hist.PlotL2(n=None, nFirst=None, nLast=None, **kw)
- Inputs:
- Outputs:
- h:
dict
Dictionary of figure/plot handles
- h:
- Versions:
2014-11-12
@ddalle
: v1.02014-12-09
@ddalle
: v1.1; move toAeroPlot
2015-02-15
@ddalle
: v1.2; move todatabook.Aero
2015-03-04
@ddalle
: v1.3; add nStart and nLast2015-10-21
@ddalle
: v1.4; usePlotResid()
- cape.pyover.databook.ReadResidFirstIter(fname)¶
Read the first iteration number in an OVERFLOW residual file
- Call:
>>> iIter = ReadResidFirstIter(fname) >>> iIter = ReadResidFirstIter(f)
- Inputs:
- fname:
str
Name of file to query
- f:
file
Already opened file handle to query
- fname:
- Outputs:
- iIter:
int
Iteration number from first line
- iIter:
- Versions:
2016-02-04
@ddalle
: v1.02023-01-14
@ddalle
: v1.1; fix file type check for py3
- cape.pyover.databook.ReadResidGrids(fname)¶
Get list of grids in an OVERFLOW residual file
- cape.pyover.databook.ReadResidNGrids(fname)¶
Get number of grids from an OVERFLOW residual file
- cape.pyover.databook.ReadResidNIter(fname)¶
Get number of iterations in an OVERFLOW residual file
- cape.pyover.databook.read_fomoco_comps(fname: str)¶
Get list of components in an OVERFLOW fomoco file
- cape.pyover.databook.read_fomoco_niter(fname, ncomp: int)¶
Get number of iterations in an OVERFLOW fomoco file
- Call:
>>> nIter = read_fomoco_niter(fname) >>> nIter = read_fomoco_niter(fname, nComp)
- Inputs:
- Outputs:
- nIter:
int
Number of iterations in the file
- nIter:
- Versions:
2016-02-03
@ddalle
: v1.02024-01-24
@ddalle
: v1.1; require ncomp