cape.pyfun.pointsensor: FUN3D point sensors module¶
This module contains several classes for extracting point sensor data
from FUN3D solutions. The database classes, TriqPointGroupDataBook
and TriqPointDataBook, are based on versions from the generic point
sensor module cape.cfdx.pointsensor. These classes extract
surface solution data from a FUN3D boundary output file (usually with a
name of pyfun_tec_boundary_timestep1000.plt or similar)
using cape.pyfun.plt and cape.tri by interpolating the
surface solution to the point on the discretized surface nearest the
requested point.
At present, there is no support for reading point sensor values directly
from FUN3D output that can be requested from fun3d.nml.
- See also:
cape.pyfun.dataBookcape.pyfun.pltcape.cfdx.dataBookcape.tri
- cape.pyfun.pointsensor.ImportPyPlot()¶
Import
matplotlib.pyplotif not loaded- Call:
>>> pyCart.databook.ImportPyPlot()
- Versions:
2014-12-27
@ddalle: First version
- class cape.pyfun.pointsensor.TriqPointDataBook(cntl, opts, pt, name=None, check=False, lock=False, **kw)¶
TriQ point sensor data book
Plotting methods are inherited from
cape.cfdx.databook.DataBookComp, includingcape.cfdx.databook.DataBookComp.PlotHist()for plotting historgrams of point sensor results in particular.- Call:
>>> DBP = TriqPointDataBook(cntl, opts, pt, name=None)
- Inputs:
- cntl:
cape.cfdx.cntl.Cntl RunMatrix/run matrix interface
- opts:
cape.options.Options Options interface
- pt:
str Name of point
- name:
str|None Name of data book item (defaults to pt)
- RootDir:
str|None Project root directory absolute path, default is PWD
- cntl:
- Outputs:
- DBP:
pyFun.pointsensor.PointSensorDataBook An individual point sensor data book
- DBP:
- Versions:
2015-12-04
@ddalle: Started
- class cape.pyfun.pointsensor.TriqPointGroupDataBook(cntl, opts, name, **kw)¶
Post-processed point sensor group data book
- Call:
>>> DBPG = TriqPointGroupDataBook(cntl, opts, name, **kw)
- Inputs:
- cntl:
cape.cfdx.cntl.Cntl RunMatrix/run matrix interface
- opts:
cape.options.Options Options interface
- name:
str|None Name of data book group
- pts: {
None} |list[str] List of points to read; defaults to all points in the group
- RootDir: {
None} |str Project root directory absolute path, default is PWD
- cntl:
- Outputs:
- DBPG:
pyFun.pointsensor.PointSensorGroupDataBook A point sensor group data book
- DBPG:
- Versions:
2017-10-10
@ddalle: First version
- GetCurrentIter()¶
Determine iteration number of current folder
- Call:
>>> n = DB.GetCurrentIter()
- Inputs:
- DB:
pyFun.databook.DataBook Instance of data book class
- DB:
- Outputs:
- n:
int|None Iteration number
- n:
- Versions:
2017-04-13
@ddalle: First separate version
- ReadCasePoint(pt, i, **kw)¶
Read point data from current run folder
- Call:
>>> P = DBPG.ReadCasePoint(pt, i)
- Inputs:
- DBPG:
cape.cfdx.pointsensor.TriqPointGroupDataBook Point sensor group data book
- pt:
str Name of point to read
- i:
int Case index
- DBPG:
- Outputs:
- P:
dict Dictionary of state variables as requested from the point
- P:
- Versions:
2017-10-10
@ddalle: First version
- ReadCaseTriq(**kw)¶
Read the the most recent Triq file from this folder
- Call:
>>> triq, VarList = DBPG.ReadCaseTriq()
- Inputs:
- DBPG:
cape.cfdx.pointsensor.TriqPointGroupDataBook Point sensor group data book
- DBPG:
- Outputs:
- triq:
cape.trifile.Triq Annotated triangulation interface
- VarList:
list[str] List of variable names
- triq:
- Versions:
2017-10-10
@ddalle: v1.02024-12-03
@ddalle: v2.0; new TRIQ file method
- ReadPointSensor(pt)¶
Read a point sensor
This function needs to be customized for each derived class so that the correct class is used for each of the member data books
- Call:
>>> DBPG.ReadPointSensor(pt)
- Inputs:
- DBPG:
pyFun.pointsensor.TriqPointGroupDataBook A point sensor group data book
- pt:
str Name of the point to read
- DBPG:
- Versions:
2017-10-11
@ddalle: First version