cape.pyfun.pointSensor
: FUN3D point sensors module¶
This module contains several classes for extracting point sensor data
from FUN3D solutions. The database classes, DBTriqPointGroup
and DBTriqPoint
, 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:
- class cape.pyfun.pointSensor.DBTriqPoint(x, opts, pt, name=None, check=False, lock=False, **kw)¶
TriQ point sensor data book
Plotting methods are inherited from
cape.cfdx.dataBook.DBBase
, includingcape.cfdx.dataBook.DBBase.PlotHist()
for plotting historgrams of point sensor results in particular.- Call:
>>> DBP = DBTriqPoint(x, opts, pt, name=None)
- Inputs:
- x:
cape.runmatrix.RunMatrix
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
- x:
- Outputs:
- DBP:
pyFun.pointSensor.DBPointSensor
An individual point sensor data book
- DBP:
- Versions:
2015-12-04
@ddalle
: Started
- class cape.pyfun.pointSensor.DBTriqPointGroup(x, opts, name, **kw)¶
Post-processed point sensor group data book
- Call:
>>> DBPG = DBTriqPointGroup(x, opts, name, pts=None, RootDir=None)
- Inputs:
- x:
cape.runmatrix.RunMatrix
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
- x:
- Outputs:
- DBPG:
pyFun.pointSensor.DBPointSensorGroup
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.DBTriqPointGroup
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.DBTriqPointGroup
Point sensor group data book
- DBPG:
- Outputs:
- triq:
cape.tri.Triq
Annotated triangulation interface
- VarList:
list
[str
] List of variable names
- triq:
- Versions:
2017-10-10
@ddalle
: First version
- 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.DBTriqPointGroup
A point sensor group data book
- pt:
str
Name of the point to read
- DBPG:
- Versions:
2017-10-11
@ddalle
: First version
- cape.pyfun.pointSensor.ImportPyPlot()¶
Import
matplotlib.pyplot
if not loaded- Call:
>>> pyCart.dataBook.ImportPyPlot()
- Versions:
2014-12-27
@ddalle
: First version