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:
namestr

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_listlist

List of parts to use as the source for the query.

variable1

Variable to sample as the “y” value.

variable2optional

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_timefloat, 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_timefloat, 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_samplesint, 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_idint, optional

For a TEMPORAL_NODE query, the ID of the node to query. The default is None.

element_idint, optional

For a TEMPORAL_ELEMENT query, the ID of the element to query. The default is None.

xyzlist[float], optional

For a TEMPORRAL_XYZ query, the [x,y,z] location in data space to query. The default is None.

ijklist[int], optional

For a TEMPORAL_IJK query, the [i,j,k] value for the structured mesh node to query. The default is None.

new_plotterbool, optional

Whether to add the query to a newly created plotter. The default is False.

Returns:
ENS_QUERY

``ENS_QUERY instance 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)