This module provides interfaces to the various CFD outputs tracked by
the cape
package. These versions are specific to Loci/CHEM.
-
class cape.pylch.databook.CaseFM(comp: str, **kw)
Iterative force & moment history for one component, one case
- Call:
>>> fm = CaseFM(comp=None)
- Inputs:
- comp:
str
Name of component
- Outputs:
- fm:
CaseFM
One-case iterative history
-
get_filelist() → list
Get list of files to read
- Call:
>>> filelist = fm.get_filelist()
- Inputs:
- fm:
CaseFM
Component iterative history instance
- Outputs:
- filelist:
list
[str
] List of files to read to construct iterative history
- Versions:
-
-
normalize_by_cntl(cntl: Cntl, i: int)
Normalize a force & moment history using run matrix
- Call:
>>> fm.normalize_by_cntl(cntl, i)
- Inputs:
- fm:
CaseFM
Component iterative history instance
- cntl:
Cntl
Run matrix control instance for this case
- i:
int
Index of this case in run matrix
- Versions:
-
-
normalize_by_value(q: float, aref: float, lref: float)
Normalize a force & moment history using reference values
- Call:
>>> fm.normalize_by_value(a, aref, lref)
- Inputs:
- fm:
CaseFM
Component iterative history instance
- q:
float
Freestream dynamic pressure [Pa]
- aref:
float
Reference area [m^2]
- lref:
float
Reference length [m]
- Versions:
-
-
read_moments(db: TSVFile)
Read dimensional force & moment history
- Call:
-
- Inputs:
- fm:
CaseFM
Component iterative history instance
- db:
tsvfile.TSVFile
Force-only iterative history
- Versions:
-
-
readfile(fname: str) → TSVFile
Read dimensional force & moment history
- Call:
-
- Inputs:
- fm:
CaseFM
Component iterative history instance
- fname:
str
Name of force history file to read
- Versions:
-
-
class cape.pylch.databook.CaseResid(meta: bool = False, **kw)
Iterative residual history for one case
- Call:
-
- Inputs:
- comp:
str
Name of component
- Outputs:
- h:
CaseResid
One-case iterative history
-
get_filelist() → list
Get list of files to read
- Call:
>>> filelist = h.get_filelist()
- Inputs:
- h:
CaseResid
Iterative residual history instance
- Outputs:
- filelist:
list
[str
] List of files to read for residual history
- Versions:
-
-
readfile(fname: str) → TSVFile
Read a Loci/CHEM iterative history file
- Call:
>>> db = h.readfile(fname)
- Inputs:
- fm:
CaseFM
Single-component iterative history instance
- fname:
str
Name of file to read
- Outputs:
- db:
tsvfile.TSVFile
Data read from fname
- Versions:
-