cape.pyfun.lineload: Sectional loads module¶
This module contains functions for reading and processing sectional
loads. It is a version of cape.cfdx.lineload that is closely
tied to cape.pyfun.dataBook.
It provides the primary class DBLineLoad, which
is a subclass of cape.cfdx.databook.DBBase. This class is an
interface to all line load data for a specific surface component.
For reading the sectional load for a single solution on one component
(which includes multiple coefficients), there is another class
CaseLL.
Finally, reading seam curves from individual cases utilizes the class
CaseSeam.
- See also:
cape.cfdx.dataBookcape.pyfun.dataBook
- class cape.pyfun.lineload.CaseLL(comp, proj='LineLoad', sec='dlds', **kw)¶
Individual class line load class
- Call:
>>> LL = CaseLL(cart3d, i, comp)
- Inputs:
- cart3d:
cape.pycart.cntl.Cntl Master pyCart interface
- i:
int Case index
- comp:
str Name of line load group
- cart3d:
- Outputs:
- LL:
pyCart.lineload.CaseLL Instance of individual case line load interface
- LL.nCut:
int Number of x-cuts to make, based on options in cart3d
- LL.nIter:
int Last iteration in line load file
- LL.nStats:
int Number of iterations in line load file
- LL.RefL:
float Reference length
- LL.MRP:
numpy.ndarrayshape=(3,) Moment reference center
- LL.x:
numpy.ndarrayshape=(nCut,) Locations of x-cuts
- LL.CA:
numpy.ndarrayshape=(nCut,) Axial force sectional load, d(CA)/d(x/RefL))
- LL:
- Versions:
2015-09-16
@ddalle: First version2016-06-07
@ddalle: Subclassed
- class cape.pyfun.lineload.CaseSeam(fname, comp='entire', proj='LineLoad')¶
Seam curve interface
- Call:
>>> S = CaseSeam(fname, comp='entire', proj='LineLoad')
- Inputs:
- Outputs:
- S
CaseSeam Seam curve interface
- S.ax:
"x"|"y"|"z" Name of coordinate being held constant
- S.x:
float| {list(np.ndarray)} x-coordinate or list of seam x-coordinate vectors
- S.y:
float| {list(np.ndarray)} y-coordinate or list of seam y-coordinate vectors
- S.z: {
float} |list(np.ndarray) z-coordinate or list of seam z-coordinate vectors
- S
- Versions:
2016-06-09
@ddalle: First version
- class cape.pyfun.lineload.DBLineLoad(comp, cntl, conf=None, RootDir=None, **kw)¶
Line load (sectional load) data book for one group
- Call:
>>> DBL = DBLineLoad(cntl, comp, conf=None, RootDir=None)
- Inputs:
- Outputs:
- DBL:
pyCart.lineload.DBLineLoad Instance of line load data book
- DBL.nCut:
int Number of x-cuts to make, based on options in cart3d
- DBL.RefL:
float Reference length
- DBL.MRP:
numpy.ndarrayshape=(3,) Moment reference center
- DBL.x:
numpy.ndarrayshape=(nCut,) Locations of x-cuts
- DBL.CA:
numpy.ndarrayshape=(nCut,) Axial force sectional load, d(CA)/d(x/RefL))
- DBL:
- Versions:
2015-09-16
@ddalle: First version
- GetCompID()¶
Create list of component IDs
- Call:
>>> DBL.GetCompID()
- Inputs:
- DBL:
lineload.DBLineLoad Instance of line load data book
- DBL:
- Versions:
2016-12-22
@ddalle: v1.0, extracted from __init__()
- GetMRP()¶
Get moment reference point, reading from namelist if needed
- Call:
>>> MRP = db.GetMRP()
- Inputs:
- db:
DBLineLoad Line load component databook instance
- db:
- Outputs:
- MRP:
np.ndarray[float] |None Reference length
- MRP:
- Versions:
2023-02-03
@ddalle: v1.0
- GetNamelist()¶
Read FUN3D namelist from parent folder, if possible
- Call:
>>> nml = db.GetNamelist()
- Inputs:
- db:
DBLineLoad Line load component databook instance
- db:
- Outputs:
- nml:
cape.pyfun.namelist.Namelist|None Active FUN3D namelist interface
- nml:
- Versions:
2023-02-03
@ddalle: v1.0
- GetRefArea()¶
Get reference area, reading from namelist if needed
- Call:
>>> Aref = db.GetRefArea()
- Inputs:
- db:
DBLineLoad Line load component databook instance
- db:
- Outputs:
- Aref:
float|None Reference area
- Aref:
- Versions:
2023-02-03
@ddalle: v1.0
- GetRefLength()¶
Get reference length, reading from namelist if needed
- Call:
>>> Lref = db.GetRefLength()
- Inputs:
- db:
DBLineLoad Line load component databook instance
- db:
- Outputs:
- Lref:
float|None Reference length
- Lref:
- Versions:
2023-02-03
@ddalle: v1.0
- GetTriqFile()¶
Get most recent
triqfile and its associated iterations- Call:
>>> qtriq, ftriq, n, i0, i1 = DBL.GetTriqFile()
- Inputs:
- DBL:
pyfun.lineload.DBLineLoad Instance of line load data book
- DBL:
- Outputs:
- Versions:
2016-12-19
@ddalle: Added to the module
- PreprocessTriq(ftriq, **kw)¶
Perform any necessary preprocessing to create
triqfile- Call:
>>> ftriq = DBL.PreprocessTriq(ftriq, qpbs=False, f=None)
- Inputs:
- DBL:
pyfun.lineload.DBLineLoad Line load data book
- ftriq:
str Name of triq file
- qpbs:
True| {False} Whether or not to create a script and submit it
- f: {
None} |file File handle if writing PBS script
- DBL:
- Versions:
2016-12-20
@ddalle: First version2016-12-21
@ddalle: Added PBS
- cape.pyfun.lineload.GetPltFile()¶
Get most recent boundary
pltfile and associated iterations