pytuflow.TPC.data_types#
- TPC.data_types(filter_by=None)#
Returns all the available data types (result types) for the output given the filter.
The
filter_by
is an optional input that can be used to filter the return further. Available filters for theTPC
are:Domain filters:
1d
2d
(orpo
)rl
(or0d
)
Geometry filters:
node
channel
point
- (for 2d and rl domains only - usenode
for 1d domain)line
- (for 2d and rl domains only - usechannel
for 1d domain)polygon
(orregion
)
Location filters:
[location]
: The location to filter the data_types by.
Combine filters:
[filter1]/[filter2]/...
: (use/
to delim).
- Parameters:
filter_by (str, optional) – The string to filter the data types by.
- Returns:
The available data types.
- Return type:
list[str]
Examples
Get the available data types for 1D
channel
results:>>> res = TPC('/path/to/result.tpc') >>> res.data_types('channel') ['flow', 'velocity', 'channel entry losses', 'channel additional losses', 'channel exit losses', 'channel flow regime']
Get the available data types for 2D
po
and specicially forpo line
.>>> res.data_types('po/line') ['depth', 'flow area', 'flow integral', 'flow']
Get the available data types for 2D
po
and RL (rl
)region
results.>>> res.data_types('po/rl/region') ['flow into region', 'flow out of region', 'volume', 'average water level', 'max water level']
The above could also be accomplished with just
region
(orpolygon
) since it’s only applicable forpo
andrl
domains.