create_temporal#
- Query.create_temporal(name: str, query_type: str, part_list: List[Any], variable1: Any, variable2: Any | None = None, start_time: float | None = None, end_time: float | None = None, num_samples: int | None = None, node_id: int | None = None, element_id: int | None = None, xyz: List[float] | None = None, ijk: List[int] | None = None, new_plotter: bool = False) ENS_QUERY#
Create an EnSight query over time.
- Parameters:
- name
str Name for the query.
- query_type:
Type of the query. Descriptions of options follow.
Name
Query type
TEMPORAL_NODE
At a node number over time
TEMPORAL_ELEMENT
At an element number over time
TEMPORAL_IJK
At an ijk element over time
TEMPORAL_XYZ
At some x,y,z location over time
TEMPORAL_MINIMUM
Minimum value on the selected parts at each point in time
TEMPORAL_MAXIMUM
Maximum value on the selected parts at each point in time
- part_list
list List of parts to use as the source for the query.
- variable1
Variable to sample as the “y” value.
- variable2
optional Variable to sample as the “x” value. The default is
None, in which case the “x” value is the distance along the sampling domain.- start_time
float,optional Simulation time to start sampling at. The default is
None, in which case the first timestep,ENS_GLOBALS.SOLUTIONTIME_LIMITS[0], is used.- end_time
float,optional The simulation time to end sampling at. The default is
None, in which case the last timestep,ENS_GLOBALS.SOLUTIONTIME_LIMITS[1], is used.- num_samples
int,optional Number of samples to take along the selected timestep range. The default is
None, in which case the number of defined timesteps,ENS_GLOBALS.TIMESTEP_LIMITS[1] - ENS_GLOBALS.TIMESTEP_LIMITS[0] + 1, is used.- node_id
int,optional For a
TEMPORAL_NODEquery, the ID of the node to query. The default isNone.- element_id
int,optional For a
TEMPORAL_ELEMENTquery, the ID of the element to query. The default isNone.- xyz
list[float],optional For a
TEMPORRAL_XYZquery, the[x,y,z]location in data space to query. The default isNone.- ijk
list[int],optional For a
TEMPORAL_IJKquery, the[i,j,k]value for the structured mesh node to query. The default isNone.- new_plotterbool,
optional Whether to add the query to a newly created plotter. The default is
False.
- name
- Returns:
ENS_QUERY``ENS_QUERYinstance on success or raises an exception on error.
Examples
>>> s = LocalLauncher().start() >>> s.load_data(f"{s.cei_home}/ensight{s.cei_suffix}/data/guard_rail/crash.case") >>> parts = s.ensight.objs.core.PARTS >>> s.ensight.utils.query.create_temporal("Maximum plastic", >>> s.ensight.utils.query.TEMPORAL_MAXIMUM, parts, "plastic", new_plotter=True)