stress
#
- class ansys.dpf.core.operators.result.stress.stress(time_scoping=None, mesh_scoping=None, fields_container=None, streams_container=None, data_sources=None, bool_rotate_to_global=None, mesh=None, requested_location=None, read_cyclic=None, read_beams=None, split_shells=None, shell_layer=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Read/compute element nodal component stresses by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.
- Parameters:
time_scoping (Scoping or int or float or Field, optional) – Time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with timefreq_steps location) required in output. to specify time/freq values at specific load steps, put a field (and not a list) in input with a scoping located on “timefreq_steps”. linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files.
mesh_scoping (ScopingsContainer or Scoping, optional) – Nodes or elements scoping required in output. the output fields will be scoped on these node or element ids. to figure out the ordering of the fields data, look at their scoping ids as they might not be ordered as the input scoping was. the scoping’s location indicates whether nodes or elements are asked for. using scopings container allows you to split the result fields container into domains
fields_container (FieldsContainer, optional) – Fields container already allocated modified inplace
streams_container (StreamsContainer, optional) – Result file container allowed to be kept open to cache data
data_sources (DataSources) – Result file path container, used if no streams are set
bool_rotate_to_global (bool, optional) – If true the field is rotated to global coordinate system (default true)
mesh (MeshedRegion or MeshesContainer, optional) – Prevents from reading the mesh in the result files
requested_location (str, optional) – Requested location nodal, elemental or elementalnodal
read_cyclic (int, optional) – If 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)
read_beams (bool, optional) – Elemental nodal beam results are read if this pin is set to true (default is false)
split_shells (bool, optional) – This pin forces elemental nodal shell and solid results to be split if this pin is set to true. if set to false (default), a specific shell layer is still needed to merge the fields. merge is possible only if a shell layer is provided.
shell_layer (int, optional) – If the requested_location pin is not connected, and if split_shells pin is set to true, we choose one of the shell layer for shell element. if split_shells pin is set to false (default value) and a specific shell layer is provided, results will be merged on this specific shell layer.
- Returns:
fields_container
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.result.stress()
>>> # Make input connections >>> my_time_scoping = dpf.Scoping() >>> op.inputs.time_scoping.connect(my_time_scoping) >>> my_mesh_scoping = dpf.ScopingsContainer() >>> op.inputs.mesh_scoping.connect(my_mesh_scoping) >>> my_fields_container = dpf.FieldsContainer() >>> op.inputs.fields_container.connect(my_fields_container) >>> my_streams_container = dpf.StreamsContainer() >>> op.inputs.streams_container.connect(my_streams_container) >>> my_data_sources = dpf.DataSources() >>> op.inputs.data_sources.connect(my_data_sources) >>> my_bool_rotate_to_global = bool() >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global) >>> my_mesh = dpf.MeshedRegion() >>> op.inputs.mesh.connect(my_mesh) >>> my_requested_location = str() >>> op.inputs.requested_location.connect(my_requested_location) >>> my_read_cyclic = int() >>> op.inputs.read_cyclic.connect(my_read_cyclic) >>> my_read_beams = bool() >>> op.inputs.read_beams.connect(my_read_beams) >>> my_split_shells = bool() >>> op.inputs.split_shells.connect(my_split_shells) >>> my_shell_layer = int() >>> op.inputs.shell_layer.connect(my_shell_layer)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.result.stress( ... time_scoping=my_time_scoping, ... mesh_scoping=my_mesh_scoping, ... fields_container=my_fields_container, ... streams_container=my_streams_container, ... data_sources=my_data_sources, ... bool_rotate_to_global=my_bool_rotate_to_global, ... mesh=my_mesh, ... requested_location=my_requested_location, ... read_cyclic=my_read_cyclic, ... read_beams=my_read_beams, ... split_shells=my_split_shells, ... shell_layer=my_shell_layer, ... )
>>> # Get output data >>> result_fields_container = op.outputs.fields_container()
Overview#
Returns the default config of the operator. |
Import detail#
from ansys.dpf.core.operators.result.stress import stress
Property detail#
- property stress.inputs#
Enables to connect inputs to the operator
- Returns:
inputs
- Return type:
- property stress.outputs#
Enables to get outputs of the operator by evaluating it
- Returns:
outputs
- Return type:
Method detail#
- static stress.default_config(server=None)#
Returns the default config of the operator.
This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.
- Parameters:
server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When
None
, attempts to use the global server.