cape.pycart.options.DataBook
: pyCart DataBook Options¶
This module provides database options specific to pyCart/Cart3D. The
vast majority of database options are common to all solvers and are thus
inherited from cape.cfdx.options.DataBook.DataBook
.
For force and/or moment components ("Type": "FM"
or
"Type": "Force"
), each component requested in the databook must also
be listed appropriately as a force and/or moment in the input.cntl
file. These can be written manually to the template input.cntl
file
or controlled via the cape.pycart.options.Config.Config
class.
The pyCart version of this module alters the default list of columns for inclusion in the data book. For point sensors this includes a column called RefLev that specifies the number of refinements of the mesh at the location of that point sensor (which my vary from case to case depending on mesh adaptation options). Point sensors also save the values of state variables at that point, which for Cart3D are the following columns.
Column
Description
X
x-coordinate of the point
Y
y-coordinate of the point
Z
z-coordinate of the point
Cp
Pressure coefficient
dp
\((p-p_\\infty)/(\\gamma p_\\infty)\)
rho
Density over freestream density
u
x-velocity over freestream sound speed
v
y-velocity over freestream sound speed
w
z-velocity over freestream sound speed
P
Pressure over gamma times freestream pressure
The full description of the JSON options can be found in a CAPE section and a pyCart section.
- class cape.pycart.options.DataBook.DBTarget¶
Dictionary-based interface for databook targets
- class cape.pycart.options.DataBook.DataBook(fname=None, **kw)¶
Dictionary-based interface for DataBook specifications
- Call:
>>> opts = DataBook(**kw)
- Outputs:
- opts:
pyCart.options.DataBook.DataBook
pyCart DataBook options interface
- opts:
- Versions:
2015-09-28
@ddalle
: Subclassed from CAPE
- get_ComponentGamma(comp)¶
Get the Mach number option for a data book group
Mostly used for line loads; coefficients require Mach number
- Call:
>>> o_mach = opts.get_ComponentMach(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of line load group
- opts:
- Outputs:
- o_mach:
str
|float
RunMatrix key to use as Mach number or fixed value
- o_mach:
- Versions:
2015-09-15
@ddalle
: First version
- get_ComponentMach(comp)¶
Get the Mach number option for a data book group
Mostly used for line loads; coefficients require Mach number
- Call:
>>> o_mach = opts.get_ComponentMach(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of line load group
- opts:
- Outputs:
- o_mach:
str
|float
RunMatrix key to use as Mach number or fixed value
- o_mach:
- Versions:
2015-09-15
@ddalle
: First version
- get_ComponentReynoldsNumber(comp)¶
Get the Reynolds number option for a data book group
Mostly used for line loads; coefficients require Mach number
- Call:
>>> o_re = opts.get_ComponentReynoldsNumber(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of line load group
- opts:
- Outputs:
- o_mach:
str
|float
RunMatrix key to use as Reynolds number or fixed value
- o_mach:
- Versions:
2015-09-15
@ddalle
: First version
- get_DataBookCoeffs(comp)¶
Get the list of data book coefficients for a specific component
For Cart3D point sensors, this also provides the state variables X, Y, Z, Cp, dp, rho, U, V, W, P.
- Call:
>>> coeffs = opts.get_DataBookCoeffs(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of component
- opts:
- Outputs:
- coeffs:
list
[str
] List of coefficients for that component
- coeffs:
- Versions:
2014-12-21
@ddalle
: First version
- get_DataBookFloatCols(comp)¶
Get additional numeric columns for component (other than coeffs)
This function differs from the standard
cape.cfdx.options.DataBook.DataBook.get_DataBookFloatCols()
only in that it provides an extra column (RefLev) for point and line sensors.- Call:
>>> fcols = opts.get_DataBookFloatCols(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of data book component
- opts:
- Outputs:
- fcols:
list
[str
] List of additional float columns
- fcols:
- Versions:
2016-03-15
@ddalle
: First version
- get_DataBookType(comp)¶
Get the type of data book entry for one component
- Call:
>>> ctype = opts.get_DataBookType(comp)
- Inputs:
- opts:
pyCart.options.Options
Options interface
- comp:
str
Name of component
- opts:
- Outputs:
- ctype: {Force} | Moment | FM | PointSensor | LineLoad
Data book entry type
- Versions:
2015-12-14
@ddalle
: First version