cape.pykes.dataBook
: Kestrel data book module¶
This module provides Kestrel-specific interfaces to the various CFD
outputs tracked by the cape
package.
- class cape.pykes.dataBook.CaseFM(comp=None)¶
Iterative force & moment history for one component, one case
- Call:
>>> fm = CaseFM(comp=None)
- Inputs:
- comp:
str
Name of component
- comp:
- Outputs:
- fm:
CaseFM
One-case iterative history
- fm:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- create_fname_coeff_dat(comp=None)¶
Generate full file name for
coeff.dat
- genr8_fname_coeff_dat(comp=None)¶
Generate full file name for
coeff.dat
- class cape.pykes.dataBook.CaseProp(fname, **kw)¶
Iterative property history
- Call:
>>> prop = CaseProp(fname)
- Inputs:
- fname:
str
Name of file relative to
outputs/
folder
- fname:
- Outputs:
- prop:
CaseProp
Iterative history of properties in fname
- prop:
- Versions:
2022-01-28
@ddalle
: Version 1.0
- read_colnames(fname)¶
Determine column names
- Call:
>>> nhdr, cols, coeffs, inds = fm.read_colnames(fname)
- Inputs:
- Outputs:
- Versions:
- 2021-11-08
@ddalle
: Version 1.0 forked from
cape.pykes.dataBook.CaseFM
- 2021-11-08
- class cape.pykes.dataBook.CaseResid(comp=None)¶
Iterative residual history for one component, one case
- Call:
>>> hist = CaseResid(comp=None)
- Inputs:
- comp: {
None
} |str
Name of component
- comp: {
- Outputs:
- hist:
CaseResid
One-case iterative history
- hist:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- create_fnames(comp=None)¶
Generate file names for
cfd.{core,turb}.dat
- genr8_fnames(comp=None)¶
Generate file names for
cfd.{core,turb}.dat
- init_data()¶
Initialize standard force/moment attributes
- Call:
>>> fm.init_data()
- Inputs:
- fm:
CaseFM
Case force/moment history
- fm:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- make_comp(comp=None)¶
Figure out a “component” name to use
- read_colnames(fname)¶
Determine column names
- Call:
>>> nhdr, cols, coeffs, inds = hist.read_colnames(fname)
- Inputs:
- Outputs:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- read_core_dat(fdat=None)¶
Read
cfd.core.dat
from expected data file
- read_turb_dat(fdat=None)¶
Read
cfd.turb.dat
from expected data file
- save_coeff(col, v)¶
Save data to coefficient attribute called col
- Call:
>>> hist.save_coeff(col, v)
- Inputs:
- hist:
CaseResid
Case residual history
- col:
str
Name of column
- v:
np.ndarray
Values to save/append
- hist:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- save_col(col, v)¶
Save data to attribute called col
- Call:
>>> hist.save_col(col, v)
- Inputs:
- hist:
CaseResid
Case residual history
- col:
str
Name of column
- v:
np.ndarray
Values to save/append
- hist:
- Versions:
2021-11-08
@ddalle
: Version 1.0
- class cape.pykes.dataBook.DBComp(comp, cntl, targ=None, check=False, lock=False, **kw)¶
- class cape.pykes.dataBook.DBTarget(targ, x, opts, RootDir=None)¶
- class cape.pykes.dataBook.DataBook(cntl, RootDir=None, targ=None, **kw)¶
Primary databook class for Kestrel
- Call:
>>> db = DataBook(x, opts)
- Inputs:
- x:
RunMatrix
Current run matrix
- opts:
Options
Global CAPE options instance
- x:
- Outputs:
- db:
DataBook
Databook instance
- db:
- Versions:
21-11-08
@ddalle
: Version 1.0
- GetCurrentIter()¶
Determine iteration number of current folder
- ReadDBComp(comp, check=False, lock=False)¶
Initialize data book for one component