cape.pyover.dataBook
: pyOver data book module¶
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
The available components mirror those described on the template data
book modules, cape.cfdx.dataBook
, cape.cfdx.lineLoad
, and
cape.cfdx.pointSensor
. However, some data book types may not be
implemented for all CFD solvers.
- See Also:
cape.options.DataBook
cape.pyover.options.DataBook
Global pyOver data book: pyOver.dataBook.DataBook
¶
- class cape.pyover.dataBook.DataBook(cntl, RootDir=None, targ=None, **kw)¶
This class provides an interface to the data book for a given CFD run matrix.
- Call:
>>> DB = pyFun.dataBook.DataBook(x, opts)- Inputs:
- x:
pyFun.runmatrix.RunMatrix
The current pyFun trajectory (i.e. run matrix)
- opts:
pyFun.options.Options
Global pyFun options instance
- Outputs:
- DB:
pyFun.dataBook.DataBook
Instance of the pyFun data book class
- Versions:
2015-10-20
@ddalle
: Started
Individual data books¶
- class cape.pyover.dataBook.DBComp(comp, cntl, targ=None, check=False, lock=False, **kw)¶
Individual component data book
This class is derived from
cape.cfdx.dataBook.DBBase
.
- Call:
>>> DBc = DBComp(comp, x, opts)- Inputs:
- Outputs:
- DBc:
pyOver.dataBook.DBComp
An individual component data book
- Versions:
2016-09-15
@ddalle
: First version
- class cape.pyover.dataBook.DBTarget(targ, x, opts, RootDir=None)¶
Class to handle data from data book target files. There are more constraints on target files than the files that data book creates, and raw data books created by pyCart are not valid target files.
- Call:
>>> DBT = DBTarget(targ, x, opts)- Inputs:
- targ:
pyOver.options.DataBook.DBTarget
Instance of a target source options interface
- x:
pyOver.runmatrix.RunMatrix
Run matrix interface
- opts:
pyOver.options.Options
Global pyCart options instance to determine which fields are useful
- Outputs:
- DBT:
pyOver.dataBook.DBTarget
Instance of the pyCart data book target data carrier
- Versions:
2014-12-20
@ddalle
: Started
Data book classes for individual cases¶
- class cape.pyover.dataBook.CaseFM(proj, comp)¶
This class contains methods for reading data about an the history of an individual component for a single case. 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 = pyOver.dataBook.CaseFM(proj, comp)- Inputs:
- Outputs:
- FM:
pyOver.dataBook.FM
Instance of the force and moment class
- FM.C:
list
[str
]List of coefficients
- FM.i:
numpy.ndarray
shape=(0,)List of iteration numbers
- FM.CA:
numpy.ndarray
shape=(0,)Axial force coefficient at each iteration
- FM.CY:
numpy.ndarray
shape=(0,)Lateral force coefficient at each iteration
- FM.CN:
numpy.ndarray
shape=(0,)Normal force coefficient at each iteration
- FM.CLL:
numpy.ndarray
shape=(0,)Rolling moment coefficient at each iteration
- FM.CLM:
numpy.ndarray
shape=(0,)Pitching moment coefficient at each iteration
- FM.CLN:
numpy.ndarray
shape=(0,)Yaw moment coefficient at each iteration
- Versions:
2016-02-02
@ddalle
: First version
- class cape.pyover.dataBook.CaseResid(proj)¶
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:
>>> H = pyOver.dataBook.CaseResid(proj)- Inputs:
- proj:
str
Project root name
- Outputs:
- H:
pyOver.databook.CaseResid
Instance of the residual histroy class
- Versions:
2016-02-03
@ddalle
: Started