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_byis an optional input that can be used to filter the return further. Available filters for theTPCare:Domain filters:
1d2d(orpo)rl(or0d)
Geometry filters:
nodechannelpoint- (for 2d and rl domains only - usenodefor 1d domain)line- (for 2d and rl domains only - usechannelfor 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
channelresults:>>> 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
poand specicially forpo line.>>> res.data_types('po/line') ['depth', 'flow area', 'flow integral', 'flow']
Get the available data types for 2D
poand RL (rl)regionresults.>>> 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 forpoandrldomains.