diff --git a/docs/source/conf.py b/docs/source/conf.py index ad6d2cf31..f3c8ee7a2 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -65,7 +65,7 @@ "scipy": ("https://docs.scipy.org/doc/scipy/", None), "numpy": ("https://numpy.org/devdocs", None), "matplotlib": ("https://matplotlib.org/stable", None), - "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), + # "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), "pyvista": ("https://docs.pyvista.org/", None), "ansys-dpf-core": ("https://dpfdocs.pyansys.com", None), } diff --git a/examples/00-Different-analysis-types/01-static-simulation.py b/examples/00-Different-analysis-types/01-static-simulation.py index 6af3c0dcd..ae1d604fe 100644 --- a/examples/00-Different-analysis-types/01-static-simulation.py +++ b/examples/00-Different-analysis-types/01-static-simulation.py @@ -88,7 +88,7 @@ elemental_stress = simulation.stress_elemental() print(elemental_stress) -# extract elemental stresses on specific elements +# Extract elemental stresses on specific elements elemental_stress = elemental_stress.select(element_ids=[5, 6, 7]) elemental_stress.plot() diff --git a/examples/01-Detailed-Examples/02-modal-extract-sub-results.py b/examples/01-Detailed-Examples/02-modal-extract-sub-results.py index d51f59784..3e94b7713 100644 --- a/examples/01-Detailed-Examples/02-modal-extract-sub-results.py +++ b/examples/01-Detailed-Examples/02-modal-extract-sub-results.py @@ -3,14 +3,14 @@ Extract components of results - Modal Simulation ================================================ -In this script modal simulation is processed to extract sub components of results like elastic -stain, displacement. +In this script, a modal simulation is processed to extract sub-components +of results like elastic strain and displacement. """ ############################################################################### # Perform required imports # ------------------------ -# Perform required imports. # This example uses a supplied file that you can +# This example uses a supplied file that you can # get by importing the DPF ``examples`` package. from ansys.dpf import post @@ -29,9 +29,6 @@ # for no autocompletion, this line is equivalent to: simulation = post.ModalMechanicalSimulation(example_path) - -displacement = simulation.displacement(modes=[1, 2]) -str(displacement) # print the simulation to get an overview of what's available print(simulation) diff --git a/examples/01-Detailed-Examples/04-invariants.py b/examples/01-Detailed-Examples/04-invariants.py index 622a24e9b..d50885340 100644 --- a/examples/01-Detailed-Examples/04-invariants.py +++ b/examples/01-Detailed-Examples/04-invariants.py @@ -60,7 +60,7 @@ ############################################################################### -# Compute Von Mises eqv averaged and unaveraged on stress and strain +# Compute von Mises eqv averaged and unaveraged on stress and strain # ------------------------------------------------------------------------ stress_eqv = simulation.stress_eqv_von_mises(set_ids=[1]) diff --git a/examples/01-Detailed-Examples/06-cyclic-results.py b/examples/01-Detailed-Examples/06-cyclic-results.py new file mode 100644 index 000000000..98955ef95 --- /dev/null +++ b/examples/01-Detailed-Examples/06-cyclic-results.py @@ -0,0 +1,62 @@ +""" +.. _ref_cyclic_results_example: + +Extract cyclic results +====================== +In this script, a modal analysis with cyclic symmetry is processed to show +how to expand the mesh and results. +""" + +############################################################################### +# Perform required imports +# ------------------------ +# This example uses a supplied file that you can +# get by importing the DPF ``examples`` package. + +from ansys.dpf import post +from ansys.dpf.post import examples + +############################################################################### +# Get ``Simulation`` object +# ------------------------- +# Get the ``Simulation`` object that allows access to the result. The ``Simulation`` +# object must be instantiated with the path for the result file. For example, +# ``"C:/Users/user/my_result.rst"`` on Windows or ``"/home/user/my_result.rst"`` +# on Linux. + +example_path = examples.find_simple_cyclic() +simulation = post.ModalMechanicalSimulation(example_path) + +# print the simulation to get an overview of what's available +print(simulation) + +############################################################################# +# Extract expanded displacement norm +# ---------------------------------- + +displacement_norm = simulation.displacement( + norm=True, + expand_cyclic=True, +) +print(displacement_norm) +displacement_norm.plot() + +############################################################################# +# Extract equivalent von Mises nodal stress expanded on the first four sectors +# ---------------------------------------------------------------------------- + +stress_vm_sectors_1_2_3_4 = simulation.stress_eqv_von_mises_nodal( + expand_cyclic=[1, 2, 3, 4], +) +print(stress_vm_sectors_1_2_3_4) +stress_vm_sectors_1_2_3_4.plot() + +############################################################################# +# Extract equivalent von Mises nodal stress without expansion +# ----------------------------------------------------------- + +stress_vm_sector_1 = simulation.stress_eqv_von_mises_nodal( + expand_cyclic=False, +) +print(stress_vm_sector_1) +stress_vm_sector_1.plot() diff --git a/examples/01-Detailed-Examples/07-multi-stage-cyclic-results.py b/examples/01-Detailed-Examples/07-multi-stage-cyclic-results.py new file mode 100644 index 000000000..c152628ff --- /dev/null +++ b/examples/01-Detailed-Examples/07-multi-stage-cyclic-results.py @@ -0,0 +1,72 @@ +""" +.. _ref_multi-stage_cyclic_results_example: + +Extract multi-stage cyclic results +================================== +In this script, a multi-stage modal analysis with cyclic symmetry is processed to show +how to expand the mesh and results. +""" + +############################################################################### +# Perform required imports +# ------------------------ +# This example uses a supplied file that you can +# get by importing the DPF ``examples`` package. + +from ansys.dpf import post +from ansys.dpf.post import examples + +############################################################################### +# Get ``Simulation`` object +# ------------------------- +# Get the ``Simulation`` object that allows access to the result. The ``Simulation`` +# object must be instantiated with the path for the result file. For example, +# ``"C:/Users/user/my_result.rst"`` on Windows or ``"/home/user/my_result.rst"`` +# on Linux. + +example_path = examples.download_multi_stage_cyclic_result() +simulation = post.ModalMechanicalSimulation(example_path) + +# print the simulation to get an overview of what's available +print(simulation) + +############################################################################# +# Extract expanded displacement norm +# ---------------------------------- + +displacement_norm = simulation.displacement( + norm=True, + expand_cyclic=True, +) +print(displacement_norm) +displacement_norm.plot() + +############################################################################# +# Extract equivalent von Mises nodal stress without expansion +# ----------------------------------------------------------- + +stress_vm_sector_1_both_stages = simulation.stress_eqv_von_mises_nodal( + expand_cyclic=False, +) +print(stress_vm_sector_1_both_stages) +stress_vm_sector_1_both_stages.plot() + +############################################################################# +# Extract equivalent von Mises nodal stress expanded on the first four sectors of the first stage +# ----------------------------------------------------------------------------------------------- + +stress_vm_sectors_1_2_3_4_first_stage = simulation.stress_eqv_von_mises_nodal( + expand_cyclic=[1, 2, 3, 4], +) +print(stress_vm_sectors_1_2_3_4_first_stage) +stress_vm_sectors_1_2_3_4_first_stage.plot() + +############################################################################# +# Extract equivalent von Mises nodal stress expanded on the first two sectors of both stages +# ------------------------------------------------------------------------------------------ + +stress_vm_sectors_1_2_both_stages = simulation.stress_eqv_von_mises_nodal( + expand_cyclic=[[1, 2], [1, 2]], +) +print(stress_vm_sectors_1_2_both_stages) +stress_vm_sectors_1_2_both_stages.plot() diff --git a/requirements/requirements_test.txt b/requirements/requirements_test.txt index 250936df7..0100341db 100644 --- a/requirements/requirements_test.txt +++ b/requirements/requirements_test.txt @@ -1,6 +1,4 @@ coverage==7.2.2 -pandas==1.3.5; python_version < "3.8" -pandas==1.5.3; python_version >= "3.8" pytest-cov==4.0.0 pytest-rerunfailures==11.0 pytest==7.2.1 diff --git a/src/ansys/dpf/post/dataframe.py b/src/ansys/dpf/post/dataframe.py index d71ca905b..a64de173e 100644 --- a/src/ansys/dpf/post/dataframe.py +++ b/src/ansys/dpf/post/dataframe.py @@ -420,7 +420,10 @@ def _update_str(self, width: int, max_colwidth: int): lines.append(row_headers) entity_ids = [] truncated = False - num_mesh_entities_to_ask = self._fc[0].size + if len(self._fc) > 0: + num_mesh_entities_to_ask = self._fc[0].size + else: + num_mesh_entities_to_ask = 0 if num_mesh_entities_to_ask > max_n_rows: num_mesh_entities_to_ask = max_n_rows truncated = True @@ -516,6 +519,10 @@ def treat_elemental_nodal(treat_lines, pos, n_comp, n_ent, n_lines): for i in range(len(combination)) ] to_append.append(empty) # row where row index headers are + if len(self._fc) == 0: + for i, _ in enumerate(to_append): + lines[i] = lines[i] + to_append[i] + break # Get data in the FieldsContainer for those positions # Create label_space from combination label_space = {} @@ -637,9 +644,12 @@ def treat_elemental_nodal(treat_lines, pos, n_comp, n_ent, n_lines): txt = "\n" + "".join([line + "\n" for line in lines]) self._str = txt - def _first_n_ids_first_field(self, n: int): + def _first_n_ids_first_field(self, n: int) -> List[int]: """Return the n first entity IDs of the first field in the underlying FieldsContainer.""" - return self._fc[0].scoping.ids[:n] + if len(self._fc) > 0: + return self._fc[0].scoping.ids[:n] + else: + return [] def __repr__(self): """Representation of the DataFrame.""" @@ -669,6 +679,7 @@ def plot(self, shell_layer=shell_layers.top, **kwargs) -> Union[DpfPlotter, None The interactive plotter object used for plotting. """ + label_space = {} if kwargs != {}: axis_kwargs, kwargs = self._filter_arguments(arguments=kwargs) # Construct the associated label_space @@ -682,22 +693,27 @@ def plot(self, shell_layer=shell_layers.top, **kwargs) -> Union[DpfPlotter, None ) ) return + labels = fc.labels + # TODO: treat complex label by taking amplitude + for label in labels: + if label == "time": + value = fc.get_available_ids_for_label(label)[-1] + elif label == "frequencies": + value = fc.get_available_ids_for_label(label)[0] + elif label in axis_kwargs.keys(): + value = axis_kwargs[label] + if isinstance(value, list): + raise ValueError( + f"Plot argument '{label}' must be a single value." + ) + else: + value = fc.get_available_ids_for_label(label)[0] + label_space[label] = value else: axis_kwargs = {} # If no kwarg was given, construct a default label_space fc = self._fc - labels = fc.labels - if "time" in labels: - label = "time" - value = fc.get_available_ids_for_label(label)[-1] - label_space = {label: value} - elif "frequencies" in labels: - label = "frequencies" - value = fc.get_available_ids_for_label(label)[0] - label_space = {label: value} - else: label_space = fc.get_label_space(0) - label_space = label_space for field in fc: # Treat multi-layer field @@ -719,24 +735,42 @@ def plot(self, shell_layer=shell_layers.top, **kwargs) -> Union[DpfPlotter, None fc = changeOp.get_output(0, dpf.types.fields_container) break + # Merge fields for all 'elshape' label values if none selected if "elshape" in self._fc.labels and "elshape" not in axis_kwargs.keys(): merge_solids_shell_op = dpf.operators.logic.solid_shell_fields(fc) fc = merge_solids_shell_op.eval() + # Merge fields for all 'stage' label values if none selected + if "stage" in self._fc.labels and "stage" not in axis_kwargs.keys(): + merge_stages_op = dpf.operators.utility.merge_fields_by_label( + fields_container=fc, label="stage" + ) + fc = merge_stages_op.outputs.fields_container() + label_space.pop("stage") + fields = fc.get_fields(label_space=label_space) plotter = DpfPlotter(**kwargs) + plotter.add_field(field=fields[0], **kwargs) # for field in fields: if len(fields) > 1: - warnings.warn( - UserWarning( - "Plotting criteria resulted in incompatible data. " - "Try narrowing down to specific values for each column." - ) + # try: + # for field in fields[1:]: + # plotter.add_field(field=field, **kwargs) + # except Exception as e: + raise ValueError( + f"Plotting failed with filter {axis_kwargs} due to incompatible data." ) - return None - plotter.add_field(field=fields[0], **kwargs) + # warnings.warn( + # UserWarning( + # "Plotting criteria resulted in incompatible data. " + # "Try narrowing down to specific values for each column." + # ) + # ) + # return None # field.plot(text="debug") - return plotter.show_figure(text=str(label_space), **kwargs) + return plotter.show_figure( + title=kwargs.pop("title", str(label_space)), **kwargs + ) def animate( self, diff --git a/src/ansys/dpf/post/harmonic_mechanical_simulation.py b/src/ansys/dpf/post/harmonic_mechanical_simulation.py index 7c05baf76..a034a9fc2 100644 --- a/src/ansys/dpf/post/harmonic_mechanical_simulation.py +++ b/src/ansys/dpf/post/harmonic_mechanical_simulation.py @@ -7,7 +7,7 @@ from typing import List, Tuple, Union import warnings -from ansys.dpf import core +from ansys.dpf import core as dpf from ansys.dpf.post import locations from ansys.dpf.post.dataframe import DataFrame from ansys.dpf.post.index import ( @@ -44,6 +44,8 @@ def _get_result( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract results from the simulation. @@ -97,6 +99,14 @@ def _get_result( List of IDs of elements to get results for. named_selections: Named selection or list of named selections to get results for. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -146,7 +156,7 @@ def _get_result( ) # Initialize a workflow - wf = core.Workflow(server=self._model._server) + wf = dpf.Workflow(server=self._model._server) wf.progress_bar = False if category == ResultCategory.equivalent and base_name[0] == "E": @@ -162,6 +172,10 @@ def _get_result( location=location, force_elemental_nodal=force_elemental_nodal, ) + + # Treat cyclic cases + result_op = self._treat_cyclic(expand_cyclic, phase_angle_cyclic, result_op) + # Its output is selected as future workflow output for now out = result_op.outputs.fields_container # Its inputs are selected as workflow inputs for merging with selection workflows @@ -216,6 +230,7 @@ def _get_result( wf.add_operator(operator=average_op) # Set as future output of the workflow out = average_op.outputs.fields_container + base_name += "_VM" # Add an optional component selection step if result is vector, or matrix if ( @@ -234,6 +249,9 @@ def _get_result( wf.add_operator(operator=extract_op) # Set as future output of the workflow out = extract_op.outputs.fields_container + if len(to_extract) == 1: + base_name += f"_{comp[0]}" + comp = None # Add an optional sweeping phase or amplitude operation if requested # (must be after comp_selector for U) @@ -263,11 +281,13 @@ def _get_result( norm_op.connect(0, out) wf.add_operator(operator=norm_op) out = norm_op.outputs.fields_container + comp = None + base_name += "_N" # Set the workflow output wf.set_output_name("out", out) # Evaluate the workflow - fc = wf.get_output("out", core.types.fields_container) + fc = wf.get_output("out", dpf.types.fields_container) disp_wf = self._generate_disp_workflow(fc, selection) @@ -326,6 +346,8 @@ def displacement( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract displacement results from the simulation. @@ -363,6 +385,14 @@ def displacement( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -385,6 +415,8 @@ def displacement( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def velocity( @@ -403,6 +435,8 @@ def velocity( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract velocity results from the simulation. @@ -440,6 +474,14 @@ def velocity( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -462,6 +504,8 @@ def velocity( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def acceleration( @@ -480,6 +524,8 @@ def acceleration( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract acceleration results from the simulation. @@ -517,6 +563,14 @@ def acceleration( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -539,6 +593,8 @@ def acceleration( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress( @@ -555,8 +611,10 @@ def stress( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal stress results from the simulation. + """Extract stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -598,6 +656,14 @@ def stress( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -619,6 +685,8 @@ def stress( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_elemental( @@ -633,6 +701,8 @@ def stress_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental stress results from the simulation. @@ -666,6 +736,14 @@ def stress_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -687,6 +765,8 @@ def stress_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_nodal( @@ -702,6 +782,8 @@ def stress_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal stress results from the simulation. @@ -737,6 +819,14 @@ def stress_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -758,6 +848,8 @@ def stress_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal( @@ -774,8 +866,10 @@ def stress_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal stress results from the simulation. + """Extract principal stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -816,6 +910,14 @@ def stress_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -837,6 +939,8 @@ def stress_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_elemental( @@ -851,6 +955,8 @@ def stress_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal stress results from the simulation. @@ -883,6 +989,14 @@ def stress_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -904,6 +1018,8 @@ def stress_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_nodal( @@ -919,6 +1035,8 @@ def stress_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal stress results from the simulation. @@ -953,6 +1071,14 @@ def stress_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -974,6 +1100,8 @@ def stress_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises( @@ -989,8 +1117,10 @@ def stress_eqv_von_mises( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises stress results from the simulation. + """Extract equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1029,6 +1159,14 @@ def stress_eqv_von_mises( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1050,6 +1188,8 @@ def stress_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_elemental( @@ -1063,8 +1203,10 @@ def stress_eqv_von_mises_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises stress results from the simulation. + """Extract elemental equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1093,6 +1235,14 @@ def stress_eqv_von_mises_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1114,6 +1264,8 @@ def stress_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_nodal( @@ -1128,8 +1280,10 @@ def stress_eqv_von_mises_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises stress results from the simulation. + """Extract nodal equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1160,6 +1314,14 @@ def stress_eqv_von_mises_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1181,6 +1343,8 @@ def stress_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain( @@ -1197,6 +1361,8 @@ def elastic_strain( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -1240,6 +1406,14 @@ def elastic_strain( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1261,6 +1435,8 @@ def elastic_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_nodal( @@ -1276,6 +1452,8 @@ def elastic_strain_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -1311,6 +1489,14 @@ def elastic_strain_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1332,6 +1518,8 @@ def elastic_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_elemental( @@ -1346,6 +1534,8 @@ def elastic_strain_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -1379,6 +1569,14 @@ def elastic_strain_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1400,6 +1598,8 @@ def elastic_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal( @@ -1416,8 +1616,10 @@ def elastic_strain_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal elastic strain results from the simulation. + """Extract principal elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1458,6 +1660,14 @@ def elastic_strain_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1479,6 +1689,8 @@ def elastic_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_nodal( @@ -1494,6 +1706,8 @@ def elastic_strain_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal elastic strain results from the simulation. @@ -1528,6 +1742,14 @@ def elastic_strain_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1549,6 +1771,8 @@ def elastic_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_elemental( @@ -1563,6 +1787,8 @@ def elastic_strain_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal elastic strain results from the simulation. @@ -1595,6 +1821,14 @@ def elastic_strain_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1616,6 +1850,8 @@ def elastic_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises( @@ -1631,8 +1867,10 @@ def elastic_strain_eqv_von_mises( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises elastic strain results from the simulation. + """Extract equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1671,6 +1909,14 @@ def elastic_strain_eqv_von_mises( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1692,6 +1938,8 @@ def elastic_strain_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_elemental( @@ -1705,8 +1953,10 @@ def elastic_strain_eqv_von_mises_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises elastic strain results from the simulation. + """Extract elemental equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1735,6 +1985,14 @@ def elastic_strain_eqv_von_mises_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1756,6 +2014,8 @@ def elastic_strain_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_nodal( @@ -1770,8 +2030,10 @@ def elastic_strain_eqv_von_mises_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises elastic strain results from the simulation. + """Extract nodal equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -1802,6 +2064,14 @@ def elastic_strain_eqv_von_mises_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1823,6 +2093,8 @@ def elastic_strain_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def reaction_force( @@ -1839,6 +2111,8 @@ def reaction_force( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract reaction force results from the simulation. @@ -1876,6 +2150,14 @@ def reaction_force( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1898,6 +2180,8 @@ def reaction_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_volume( @@ -1911,6 +2195,8 @@ def elemental_volume( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental volume results from the simulation. @@ -1941,6 +2227,14 @@ def elemental_volume( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1962,6 +2256,8 @@ def elemental_volume( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_mass( @@ -1975,6 +2271,8 @@ def elemental_mass( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental mass results from the simulation. @@ -2005,6 +2303,14 @@ def elemental_mass( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2026,6 +2332,8 @@ def elemental_mass( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces( @@ -2043,6 +2351,8 @@ def element_nodal_forces( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces results from the simulation. @@ -2088,6 +2398,14 @@ def element_nodal_forces( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2110,6 +2428,8 @@ def element_nodal_forces( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_nodal( @@ -2126,6 +2446,8 @@ def element_nodal_forces_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces nodal results from the simulation. @@ -2163,6 +2485,14 @@ def element_nodal_forces_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2185,6 +2515,8 @@ def element_nodal_forces_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_elemental( @@ -2200,6 +2532,8 @@ def element_nodal_forces_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces elemental results from the simulation. @@ -2235,6 +2569,14 @@ def element_nodal_forces_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2257,6 +2599,8 @@ def element_nodal_forces_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_force( @@ -2273,6 +2617,8 @@ def nodal_force( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal force results from the simulation. @@ -2310,6 +2656,14 @@ def nodal_force( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2332,6 +2686,8 @@ def nodal_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_moment( @@ -2348,6 +2704,8 @@ def nodal_moment( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal moment results from the simulation. @@ -2385,6 +2743,14 @@ def nodal_moment( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2407,6 +2773,8 @@ def nodal_moment( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_centroids( @@ -2420,6 +2788,8 @@ def element_centroids( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element centroids results from the simulation. @@ -2450,6 +2820,14 @@ def element_centroids( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2471,6 +2849,8 @@ def element_centroids( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def thickness( @@ -2484,6 +2864,8 @@ def thickness( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element thickness results from the simulation. @@ -2514,6 +2896,14 @@ def thickness( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2535,6 +2925,8 @@ def thickness( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations( @@ -2550,8 +2942,10 @@ def element_orientations( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal element orientations results from the simulation. + """Extract element orientations results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `load_steps` are mutually exclusive. @@ -2590,6 +2984,14 @@ def element_orientations( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2611,6 +3013,8 @@ def element_orientations( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_elemental( @@ -2624,6 +3028,8 @@ def element_orientations_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental element orientations results from the simulation. @@ -2654,6 +3060,14 @@ def element_orientations_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2675,6 +3089,8 @@ def element_orientations_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_nodal( @@ -2689,6 +3105,8 @@ def element_orientations_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal element orientations results from the simulation. @@ -2721,6 +3139,14 @@ def element_orientations_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2742,4 +3168,6 @@ def element_orientations_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) diff --git a/src/ansys/dpf/post/modal_mechanical_simulation.py b/src/ansys/dpf/post/modal_mechanical_simulation.py index 92d58f365..5e821423f 100644 --- a/src/ansys/dpf/post/modal_mechanical_simulation.py +++ b/src/ansys/dpf/post/modal_mechanical_simulation.py @@ -6,7 +6,7 @@ """ from typing import List, Union -from ansys.dpf import core +from ansys.dpf import core as dpf from ansys.dpf.post import locations from ansys.dpf.post.dataframe import DataFrame from ansys.dpf.post.selection import Selection @@ -31,6 +31,8 @@ def _get_result( modes: Union[int, List[int], None] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract results from the simulation. @@ -77,6 +79,14 @@ def _get_result( List of IDs of elements to get results for. named_selections: Named selection or list of named selections to get results for. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -116,7 +126,7 @@ def _get_result( ) # Initialize a workflow - wf = core.Workflow(server=self._model._server) + wf = dpf.Workflow(server=self._model._server) wf.progress_bar = False if category == ResultCategory.equivalent and base_name[0] == "E": @@ -130,6 +140,10 @@ def _get_result( location=location, force_elemental_nodal=force_elemental_nodal, ) + + # Treat cyclic cases + result_op = self._treat_cyclic(expand_cyclic, phase_angle_cyclic, result_op) + # Its output is selected as future workflow output for now out = result_op.outputs.fields_container # Its inputs are selected as workflow inputs for merging with selection workflows @@ -184,6 +198,7 @@ def _get_result( wf.add_operator(operator=average_op) # Set as future output of the workflow out = average_op.outputs.fields_container + base_name += "_VM" # Add an optional component selection step if result is vector, matrix, or principal if (category in [ResultCategory.vector, ResultCategory.matrix]) and ( @@ -198,6 +213,9 @@ def _get_result( wf.add_operator(operator=extract_op) # Set as future output of the workflow out = extract_op.outputs.fields_container + if len(to_extract) == 1: + base_name += f"_{comp[0]}" + comp = None # Add an optional norm operation if requested if norm: @@ -205,11 +223,13 @@ def _get_result( norm_op.connect(0, out) wf.add_operator(operator=norm_op) out = norm_op.outputs.fields_container + comp = None + base_name += "_N" # Set the workflow output wf.set_output_name("out", out) # Evaluate the workflow - fc = wf.get_output("out", core.types.fields_container) + fc = wf.get_output("out", dpf.types.fields_container) disp_wf = self._generate_disp_workflow(fc, selection) @@ -227,6 +247,8 @@ def displacement( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract displacement results from the simulation. @@ -238,7 +260,7 @@ def displacement( exclusive. If none of the above is given, results will be extracted for the whole mesh. - Args: + Args: node_ids: List of IDs of nodes to get results for. element_ids: @@ -262,11 +284,188 @@ def displacement( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- Returns a :class:`ansys.dpf.post.data_object.DataFrame` instance. + Examples + -------- + >>> from ansys.dpf import post + >>> from ansys.dpf.post import examples + >>> simulation = post.ModalMechanicalSimulation(examples.download_modal_frame()) + >>> # Extract the displacement field for the first mode + >>> displacement = simulation.displacement() + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (mm) + set_ids 1 + node_ids components + 367 X -2.9441e-01 + Y 1.2397e+00 + Z 5.1160e-01 + 509 X -3.4043e-01 + Y 1.8414e+00 + Z 3.4187e-01 + ... + >>> # Extract the displacement field for the first two modes + >>> displacement = simulation.displacement(modes=[1, 2]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (mm) + set_ids 1 2 + node_ids components + 367 X -2.9441e-01 1.7382e+00 + Y 1.2397e+00 5.4243e-01 + Z 5.1160e-01 -4.2969e-01 + 509 X -3.4043e-01 2.4632e+00 + Y 1.8414e+00 7.5043e-01 + Z 3.4187e-01 -2.7130e-01 + ... + >>> # Extract the displacement field for all modes + >>> displacement = simulation.displacement(all_sets=True) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (mm) + set_ids 1 2 3 4 5 6 + node_ids components + 367 X -2.9441e-01 1.7382e+00 -1.0401e-01 -3.6455e-01 2.8577e+00 -6.7501e-01 + Y 1.2397e+00 5.4243e-01 1.9069e+00 2.1373e+00 -5.0887e-02 -1.0978e+00 + Z 5.1160e-01 -4.2969e-01 6.5813e-01 6.7056e-01 -8.8191e-01 -1.4610e-01 + 509 X -3.4043e-01 2.4632e+00 -3.1666e-01 -3.1348e-01 3.9674e+00 -5.1783e-01 + Y 1.8414e+00 7.5043e-01 2.5367e+00 3.0538e+00 -6.2025e-02 -1.1483e+00 + Z 3.4187e-01 -2.7130e-01 4.4146e-01 3.9606e-01 -5.0972e-01 -1.1397e-01 + ... + >>> # Extract the norm of the displacement field for the first mode + >>> displacement = simulation.displacement(norm=True) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U_N (mm) + set_ids 1 + node_ids + 367 1.3730e+00 + 509 1.9036e+00 + 428 1.0166e+00 + 510 1.0461e+00 + 3442 1.6226e+00 + 3755 1.4089e+00 + ... + >>> # Extract the displacement field along X for the first mode + >>> displacement = simulation.displacement(components=["X"]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U_X (mm) + set_ids 1 + node_ids + 367 -2.9441e-01 + 509 -3.4043e-01 + 428 -1.1434e-01 + 510 -2.0561e-01 + 3442 -3.1765e-01 + 3755 -2.2155e-01 + ... + >>> # Extract the displacement field at nodes 23 and 24 for the first mode + >>> displacement = simulation.displacement(node_ids=[23, 24]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (mm) + set_ids 1 + node_ids components + 23 X -0.0000e+00 + Y -0.0000e+00 + Z -0.0000e+00 + 24 X 2.8739e-02 + Y 1.3243e-01 + Z 1.4795e-01 + >>> # Extract the displacement field at nodes of element 40 for the first mode + >>> displacement = simulation.displacement(element_ids=[40]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (mm) + set_ids 1 + node_ids components + 344 X -2.0812e-01 + Y 1.1289e+00 + Z 3.5111e-01 + 510 X -2.0561e-01 + Y 9.8847e-01 + Z 2.7365e-01 + ... + >>> # For cyclic results + >>> simulation = post.ModalMechanicalSimulation(examples.find_simple_cyclic()) + >>> # Extract the displacement field with cyclic expansion on all sectors at first mode + >>> displacement = simulation.displacement(expand_cyclic=True) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (m) + set_ids 1 + node_ids components + 1 X 1.7611e-13 + Y 8.5207e+01 + Z 3.1717e-12 + 52 X 2.3620e-12 + Y 8.5207e+01 + Z 2.1160e-12 + ... + >>> # Extract the displacement field without cyclic expansion at first mode + >>> displacement = simulation.displacement(expand_cyclic=False) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (m) + set_ids 1 + base_sector 1 + node_ids components + 1 X 4.9812e-13 + Y 2.4100e+02 + Z 8.9709e-12 + 14 X -1.9511e-12 + Y 1.9261e+02 + Z 5.0359e-12 + ... + >>> # Extract the displacement field with cyclic expansion on selected sectors at first mode + >>> displacement = simulation.displacement(expand_cyclic=[1, 2, 3]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (m) + set_ids 1 + node_ids components + 1 X 1.7611e-13 + Y 8.5207e+01 + Z 3.1717e-12 + 52 X 2.3620e-12 + Y 8.5207e+01 + Z 2.1160e-12 + ... + >>> # For multi-stage cyclic results + >>> simulation = post.ModalMechanicalSimulation( + ... examples.download_multi_stage_cyclic_result() + ... ) + >>> # Extract the displacement field with cyclic expansion on the first four sectors of the + >>> # first stage at first mode + >>> displacement = simulation.displacement(expand_cyclic=[1, 2, 3, 4]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (m) + set_ids 1 + node_ids components + 1376 X 4.3586e-02 + Y -3.0071e-02 + Z -9.4850e-05 + 4971 X 4.7836e-02 + Y 2.2711e-02 + Z -9.4850e-05 + ... + >>> # Extract the displacement field with cyclic expansion on the first two sectors of both + >>> # stages at first mode + >>> displacement = simulation.displacement(expand_cyclic=[[1, 2], [1, 2]]) + >>> print(displacement) # doctest: +NORMALIZE_WHITESPACE + results U (m) + set_ids 1 + node_ids components + 1376 X 4.3586e-02 + Y -3.0071e-02 + Z -9.4850e-05 + 4971 X 4.7836e-02 + Y 2.2711e-02 + Z -9.4850e-05 + ... """ return self._get_result( base_name="U", @@ -282,6 +481,8 @@ def displacement( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress( @@ -296,8 +497,10 @@ def stress( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal stress results from the simulation. + """Extract stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -337,6 +540,14 @@ def stress( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -356,6 +567,8 @@ def stress( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_elemental( @@ -368,6 +581,8 @@ def stress_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental stress results from the simulation. @@ -399,6 +614,14 @@ def stress_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -418,6 +641,8 @@ def stress_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_nodal( @@ -431,6 +656,8 @@ def stress_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal stress results from the simulation. @@ -464,6 +691,14 @@ def stress_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -483,6 +718,8 @@ def stress_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal( @@ -497,8 +734,10 @@ def stress_principal( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal stress results from the simulation. + """Extract principal stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -537,6 +776,14 @@ def stress_principal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -556,6 +803,8 @@ def stress_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_elemental( @@ -568,6 +817,8 @@ def stress_principal_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal stress results from the simulation. @@ -598,6 +849,14 @@ def stress_principal_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -617,6 +876,8 @@ def stress_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_nodal( @@ -630,6 +891,8 @@ def stress_principal_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal stress results from the simulation. @@ -662,6 +925,14 @@ def stress_principal_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -681,6 +952,8 @@ def stress_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises( @@ -694,8 +967,10 @@ def stress_eqv_von_mises( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises stress results from the simulation. + """Extract equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -732,6 +1007,14 @@ def stress_eqv_von_mises( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -751,6 +1034,8 @@ def stress_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_elemental( @@ -762,8 +1047,10 @@ def stress_eqv_von_mises_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises stress results from the simulation. + """Extract elemental equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -790,6 +1077,14 @@ def stress_eqv_von_mises_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -809,6 +1104,8 @@ def stress_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_nodal( @@ -821,8 +1118,10 @@ def stress_eqv_von_mises_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises stress results from the simulation. + """Extract nodal equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -851,6 +1150,14 @@ def stress_eqv_von_mises_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -870,6 +1177,8 @@ def stress_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain( @@ -884,8 +1193,10 @@ def elastic_strain( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract stress results from the simulation. + """Extract elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -925,6 +1236,14 @@ def elastic_strain( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -944,6 +1263,8 @@ def elastic_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_nodal( @@ -957,8 +1278,10 @@ def elastic_strain_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract stress results from the simulation. + """Extract nodal elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -990,6 +1313,14 @@ def elastic_strain_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1009,6 +1340,8 @@ def elastic_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_elemental( @@ -1021,8 +1354,10 @@ def elastic_strain_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract stress results from the simulation. + """Extract elemental elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1052,6 +1387,14 @@ def elastic_strain_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1071,6 +1414,8 @@ def elastic_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal( @@ -1085,8 +1430,10 @@ def elastic_strain_principal( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal elastic strain results from the simulation. + """Extract principal elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1125,6 +1472,14 @@ def elastic_strain_principal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1144,6 +1499,8 @@ def elastic_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_nodal( @@ -1157,6 +1514,8 @@ def elastic_strain_principal_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal elastic strain results from the simulation. @@ -1189,6 +1548,14 @@ def elastic_strain_principal_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1208,6 +1575,8 @@ def elastic_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_elemental( @@ -1220,6 +1589,8 @@ def elastic_strain_principal_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal elastic strain results from the simulation. @@ -1250,6 +1621,14 @@ def elastic_strain_principal_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1269,6 +1648,8 @@ def elastic_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises( @@ -1282,8 +1663,10 @@ def elastic_strain_eqv_von_mises( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises elastic strain results from the simulation. + """Extract equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1320,6 +1703,14 @@ def elastic_strain_eqv_von_mises( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1339,6 +1730,8 @@ def elastic_strain_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_elemental( @@ -1350,8 +1743,10 @@ def elastic_strain_eqv_von_mises_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises elastic strain results from the simulation. + """Extract elemental equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1378,6 +1773,14 @@ def elastic_strain_eqv_von_mises_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1397,6 +1800,8 @@ def elastic_strain_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_nodal( @@ -1409,8 +1814,10 @@ def elastic_strain_eqv_von_mises_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises elastic strain results from the simulation. + """Extract nodal equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1439,6 +1846,14 @@ def elastic_strain_eqv_von_mises_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1458,6 +1873,8 @@ def elastic_strain_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable( @@ -1471,8 +1888,10 @@ def plastic_state_variable( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal plastic state variable results from the simulation. + """Extract plastic state variable results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1509,6 +1928,14 @@ def plastic_state_variable( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1528,6 +1955,8 @@ def plastic_state_variable( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable_elemental( @@ -1539,6 +1968,8 @@ def plastic_state_variable_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental plastic state variable results from the simulation. @@ -1567,6 +1998,14 @@ def plastic_state_variable_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1586,6 +2025,8 @@ def plastic_state_variable_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable_nodal( @@ -1598,6 +2039,8 @@ def plastic_state_variable_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal plastic state variable results from the simulation. @@ -1628,6 +2071,14 @@ def plastic_state_variable_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1647,6 +2098,8 @@ def plastic_state_variable_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain( @@ -1661,8 +2114,10 @@ def plastic_strain( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal plastic strain results from the simulation. + """Extract plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1702,6 +2157,14 @@ def plastic_strain( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1721,6 +2184,8 @@ def plastic_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_nodal( @@ -1734,6 +2199,8 @@ def plastic_strain_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal plastic strain results from the simulation. @@ -1767,6 +2234,14 @@ def plastic_strain_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1786,6 +2261,8 @@ def plastic_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_elemental( @@ -1798,6 +2275,8 @@ def plastic_strain_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental plastic strain results from the simulation. @@ -1829,6 +2308,14 @@ def plastic_strain_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1848,6 +2335,8 @@ def plastic_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal( @@ -1862,8 +2351,10 @@ def plastic_strain_principal( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal plastic strain results from the simulation. + """Extract principal plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -1902,6 +2393,14 @@ def plastic_strain_principal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1921,6 +2420,8 @@ def plastic_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal_nodal( @@ -1934,6 +2435,8 @@ def plastic_strain_principal_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal plastic strain results from the simulation. @@ -1966,6 +2469,14 @@ def plastic_strain_principal_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1985,6 +2496,8 @@ def plastic_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal_elemental( @@ -1997,6 +2510,8 @@ def plastic_strain_principal_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal plastic strain results from the simulation. @@ -2027,6 +2542,14 @@ def plastic_strain_principal_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2046,6 +2569,8 @@ def plastic_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv( @@ -2059,8 +2584,10 @@ def plastic_strain_eqv( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent plastic strain results from the simulation. + """Extract equivalent plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `frequencies`, and `modes` are mutually exclusive. @@ -2097,6 +2624,14 @@ def plastic_strain_eqv( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2116,6 +2651,8 @@ def plastic_strain_eqv( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv_nodal( @@ -2128,6 +2665,8 @@ def plastic_strain_eqv_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal equivalent plastic strain results from the simulation. @@ -2158,6 +2697,14 @@ def plastic_strain_eqv_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2177,6 +2724,8 @@ def plastic_strain_eqv_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv_elemental( @@ -2188,6 +2737,8 @@ def plastic_strain_eqv_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental equivalent plastic strain results from the simulation. @@ -2216,6 +2767,14 @@ def plastic_strain_eqv_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2235,6 +2794,8 @@ def plastic_strain_eqv_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def reaction_force( @@ -2249,6 +2810,8 @@ def reaction_force( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract reaction force results from the simulation. @@ -2284,6 +2847,14 @@ def reaction_force( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2304,6 +2875,8 @@ def reaction_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_volume( @@ -2315,6 +2888,8 @@ def elemental_volume( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental volume results from the simulation. @@ -2343,6 +2918,14 @@ def elemental_volume( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2362,6 +2945,8 @@ def elemental_volume( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_mass( @@ -2373,6 +2958,8 @@ def elemental_mass( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental mass results from the simulation. @@ -2401,6 +2988,14 @@ def elemental_mass( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2420,6 +3015,8 @@ def elemental_mass( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_centroids( @@ -2431,6 +3028,8 @@ def element_centroids( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element centroids results from the simulation. @@ -2459,6 +3058,14 @@ def element_centroids( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2478,6 +3085,8 @@ def element_centroids( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def thickness( @@ -2489,6 +3098,8 @@ def thickness( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element thickness results from the simulation. @@ -2517,6 +3128,14 @@ def thickness( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2536,6 +3155,8 @@ def thickness( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations( @@ -2549,6 +3170,8 @@ def element_orientations( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental nodal element orientations results from the simulation. @@ -2587,6 +3210,14 @@ def element_orientations( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2606,6 +3237,8 @@ def element_orientations( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_elemental( @@ -2617,6 +3250,8 @@ def element_orientations_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental element orientations results from the simulation. @@ -2645,6 +3280,14 @@ def element_orientations_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2664,6 +3307,8 @@ def element_orientations_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_nodal( @@ -2676,6 +3321,8 @@ def element_orientations_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal element orientations results from the simulation. @@ -2706,6 +3353,14 @@ def element_orientations_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2725,6 +3380,8 @@ def element_orientations_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure( @@ -2738,6 +3395,8 @@ def hydrostatic_pressure( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure element nodal results from the simulation. @@ -2776,6 +3435,14 @@ def hydrostatic_pressure( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2795,6 +3462,8 @@ def hydrostatic_pressure( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure_nodal( @@ -2807,6 +3476,8 @@ def hydrostatic_pressure_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure nodal results from the simulation. @@ -2837,6 +3508,14 @@ def hydrostatic_pressure_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2856,6 +3535,8 @@ def hydrostatic_pressure_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure_elemental( @@ -2867,6 +3548,8 @@ def hydrostatic_pressure_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure elemental results from the simulation. @@ -2895,6 +3578,14 @@ def hydrostatic_pressure_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2914,6 +3605,8 @@ def hydrostatic_pressure_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces( @@ -2929,6 +3622,8 @@ def element_nodal_forces( location: Union[locations, str] = locations.elemental_nodal, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces results from the simulation. @@ -2972,6 +3667,14 @@ def element_nodal_forces( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2992,6 +3695,8 @@ def element_nodal_forces( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_nodal( @@ -3006,6 +3711,8 @@ def element_nodal_forces_nodal( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces nodal results from the simulation. @@ -3041,6 +3748,14 @@ def element_nodal_forces_nodal( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3061,6 +3776,8 @@ def element_nodal_forces_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_elemental( @@ -3074,6 +3791,8 @@ def element_nodal_forces_elemental( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces elemental results from the simulation. @@ -3107,6 +3826,14 @@ def element_nodal_forces_elemental( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3127,6 +3854,8 @@ def element_nodal_forces_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_force( @@ -3141,6 +3870,8 @@ def nodal_force( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal force results from the simulation. @@ -3176,6 +3907,14 @@ def nodal_force( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3196,6 +3935,8 @@ def nodal_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_moment( @@ -3210,6 +3951,8 @@ def nodal_moment( selection: Union[Selection, None] = None, set_ids: Union[int, List[int], None] = None, all_sets: bool = False, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal moment results from the simulation. @@ -3245,6 +3988,14 @@ def nodal_moment( Common to all simulation types for easier scripting. all_sets: Whether to get results for all sets/modes. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3265,4 +4016,6 @@ def nodal_moment( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) diff --git a/src/ansys/dpf/post/simulation.py b/src/ansys/dpf/post/simulation.py index e0f855f5c..2de3453c5 100644 --- a/src/ansys/dpf/post/simulation.py +++ b/src/ansys/dpf/post/simulation.py @@ -523,7 +523,13 @@ def _create_dataframe(self, fc, location, columns, comp, base_name, disp_wf=None message=f"Returned Dataframe with columns {columns} is empty.", category=UserWarning, ) - unit = fc[0].unit + unit = None + times = [""] + if len(fc) > 0: + unit = fc[0].unit + times = fc.get_available_ids_for_label("time") + if unit == "": + unit = None comp_index = None if comp is not None: comp_index = CompIndex(values=comp) @@ -532,14 +538,16 @@ def _create_dataframe(self, fc, location, columns, comp, base_name, disp_wf=None row_indexes.append(comp_index) column_indexes = [ ResultsIndex(values=[base_name], units=[unit]), - SetIndex(values=fc.get_available_ids_for_label("time")), + SetIndex(values=times), ] label_indexes = [] for label in fc.labels: if label not in ["time"]: - label_indexes.append( - LabelIndex(name=label, values=fc.get_available_ids_for_label(label)) - ) + if len(fc) > 0: + values = fc.get_available_ids_for_label(label) + else: + values = [""] + label_indexes.append(LabelIndex(name=label, values=values)) column_indexes.extend(label_indexes) column_index = MultiIndex(indexes=column_indexes) @@ -558,6 +566,73 @@ def _create_dataframe(self, fc, location, columns, comp, base_name, disp_wf=None # Return the result wrapped in a DPF_Dataframe return df + @staticmethod + def _treat_cyclic(expand_cyclic, phase_angle_cyclic, result_op): + if expand_cyclic is not False: + # If expand_cyclic is a list + if isinstance(expand_cyclic, list) and len(expand_cyclic) > 0: + # If a list of sector numbers, directly connect it to the num_sectors pin + if all( + [ + isinstance(expand_cyclic_i, int) + for expand_cyclic_i in expand_cyclic + ] + ): + if any([i < 1 for i in expand_cyclic]): + raise ValueError( + "Sector selection with 'expand_cyclic' starts at 1." + ) + result_op.connect(pin=18, inpt=[i - 1 for i in expand_cyclic]) + # If any is a list, treat it as per stage num_sectors + elif any( + [ + isinstance(expand_cyclic_i, list) + for expand_cyclic_i in expand_cyclic + ] + ): + # Create a ScopingsContainer to fill + sectors_scopings = dpf.ScopingsContainer() + sectors_scopings.labels = ["stage"] + # For each potential num_sectors, check either an int or a list of ints + for i, num_sectors_stage_i in enumerate(expand_cyclic): + # Prepare num_sectors data + if isinstance(num_sectors_stage_i, int): + num_sectors_stage_i = [num_sectors_stage_i] + elif isinstance(num_sectors_stage_i, list): + if not all( + [isinstance(n, int) for n in num_sectors_stage_i] + ): + raise ValueError( + "'expand_cyclic' only accepts lists of int values >= 1." + ) + # num_sectors_stage_i is now a list of int, + # add an equivalent Scoping with the correct 'stage' label value + if any([i < 1 for i in num_sectors_stage_i]): + raise ValueError( + "Sector selection with 'expand_cyclic' starts at 1." + ) + sectors_scopings.add_scoping( + {"stage": i}, + dpf.Scoping(ids=[i - 1 for i in num_sectors_stage_i]), + ) + result_op.connect(pin=18, inpt=sectors_scopings) + elif not isinstance(expand_cyclic, bool): + raise ValueError( + "'expand_cyclic' argument can only be a boolean or a list." + ) + result_op.connect(pin=14, inpt=3) # Connect the read_cyclic pin + else: + result_op.connect(pin=14, inpt=1) # Connect the read_cyclic pin + if phase_angle_cyclic is not None: + if isinstance(phase_angle_cyclic, int): + phase_angle_cyclic = float(phase_angle_cyclic) + if not isinstance(phase_angle_cyclic, float): + raise ValueError( + "'phase_angle_cyclic' argument only accepts a single float value." + ) + result_op.connect(pin=19, inpt=phase_angle_cyclic) + return result_op + class MechanicalSimulation(Simulation, ABC): """Base class for mechanical type simulations. diff --git a/src/ansys/dpf/post/static_mechanical_simulation.py b/src/ansys/dpf/post/static_mechanical_simulation.py index 3d4b62d3f..86f5bbd00 100644 --- a/src/ansys/dpf/post/static_mechanical_simulation.py +++ b/src/ansys/dpf/post/static_mechanical_simulation.py @@ -33,6 +33,8 @@ def _get_result( node_ids: Union[List[int], None] = None, element_ids: Union[List[int], None] = None, named_selections: Union[List[str], str, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract results from the simulation. @@ -81,6 +83,14 @@ def _get_result( List of IDs of elements to get results for. named_selections: Named selection or list of named selections to get results for. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -132,6 +142,10 @@ def _get_result( location=location, force_elemental_nodal=force_elemental_nodal, ) + + # Treat cyclic cases + result_op = self._treat_cyclic(expand_cyclic, phase_angle_cyclic, result_op) + # Its output is selected as future workflow output for now out = result_op.outputs.fields_container # Its inputs are selected as workflow inputs for merging with selection workflows @@ -186,6 +200,7 @@ def _get_result( wf.add_operator(operator=average_op) # Set as future output of the workflow out = average_op.outputs.fields_container + base_name += "_VM" # Add an optional component selection step if result is vector, matrix, or principal if (category in [ResultCategory.vector, ResultCategory.matrix]) and ( @@ -200,6 +215,9 @@ def _get_result( wf.add_operator(operator=extract_op) # Set as future output of the workflow out = extract_op.outputs.fields_container + if len(to_extract) == 1: + base_name += f"_{comp[0]}" + comp = None # Add an optional norm operation if requested if norm: @@ -207,6 +225,8 @@ def _get_result( norm_op.connect(0, out) wf.add_operator(operator=norm_op) out = norm_op.outputs.fields_container + comp = None + base_name += "_N" # Set the workflow output wf.set_output_name("out", out) @@ -231,6 +251,8 @@ def displacement( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract displacement results from the simulation. @@ -268,6 +290,14 @@ def displacement( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -288,6 +318,8 @@ def displacement( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress( @@ -304,8 +336,10 @@ def stress( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal stress results from the simulation. + """Extract stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -347,6 +381,14 @@ def stress( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -366,6 +408,8 @@ def stress( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_elemental( @@ -380,6 +424,8 @@ def stress_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental stress results from the simulation. @@ -413,6 +459,14 @@ def stress_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -432,6 +486,8 @@ def stress_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_nodal( @@ -447,6 +503,8 @@ def stress_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal stress results from the simulation. @@ -482,6 +540,14 @@ def stress_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -501,6 +567,8 @@ def stress_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal( @@ -517,8 +585,10 @@ def stress_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal stress results from the simulation. + """Extract principal stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -560,6 +630,14 @@ def stress_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -579,6 +657,8 @@ def stress_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_elemental( @@ -593,6 +673,8 @@ def stress_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal stress results from the simulation. @@ -625,6 +707,14 @@ def stress_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -644,6 +734,8 @@ def stress_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_principal_nodal( @@ -659,6 +751,8 @@ def stress_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal stress results from the simulation. @@ -693,6 +787,14 @@ def stress_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -712,6 +814,8 @@ def stress_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises( @@ -727,8 +831,10 @@ def stress_eqv_von_mises( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises stress results from the simulation. + """Extract equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -767,6 +873,14 @@ def stress_eqv_von_mises( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -786,6 +900,8 @@ def stress_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_elemental( @@ -799,8 +915,10 @@ def stress_eqv_von_mises_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises stress results from the simulation. + """Extract elemental equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -829,6 +947,14 @@ def stress_eqv_von_mises_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -848,6 +974,8 @@ def stress_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stress_eqv_von_mises_nodal( @@ -862,8 +990,10 @@ def stress_eqv_von_mises_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises stress results from the simulation. + """Extract nodal equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -894,6 +1024,14 @@ def stress_eqv_von_mises_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -913,6 +1051,8 @@ def stress_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain( @@ -929,6 +1069,8 @@ def elastic_strain( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -972,6 +1114,14 @@ def elastic_strain( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -991,6 +1141,8 @@ def elastic_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_nodal( @@ -1006,6 +1158,8 @@ def elastic_strain_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -1041,6 +1195,14 @@ def elastic_strain_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1060,6 +1222,8 @@ def elastic_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_elemental( @@ -1074,6 +1238,8 @@ def elastic_strain_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stress results from the simulation. @@ -1107,6 +1273,14 @@ def elastic_strain_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1126,6 +1300,8 @@ def elastic_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal( @@ -1142,8 +1318,10 @@ def elastic_strain_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal elastic strain results from the simulation. + """Extract principal elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1184,6 +1362,14 @@ def elastic_strain_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1203,6 +1389,8 @@ def elastic_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_nodal( @@ -1218,6 +1406,8 @@ def elastic_strain_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal elastic strain results from the simulation. @@ -1252,6 +1442,14 @@ def elastic_strain_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1271,6 +1469,8 @@ def elastic_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_principal_elemental( @@ -1285,6 +1485,8 @@ def elastic_strain_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal elastic strain results from the simulation. @@ -1317,6 +1519,14 @@ def elastic_strain_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1336,6 +1546,8 @@ def elastic_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises( @@ -1351,8 +1563,10 @@ def elastic_strain_eqv_von_mises( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises elastic strain results from the simulation. + """Extract equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1391,6 +1605,14 @@ def elastic_strain_eqv_von_mises( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1410,6 +1632,8 @@ def elastic_strain_eqv_von_mises( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_elemental( @@ -1423,8 +1647,10 @@ def elastic_strain_eqv_von_mises_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises elastic strain results from the simulation. + """Extract elemental equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1453,6 +1679,14 @@ def elastic_strain_eqv_von_mises_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1472,6 +1706,8 @@ def elastic_strain_eqv_von_mises_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elastic_strain_eqv_von_mises_nodal( @@ -1486,8 +1722,10 @@ def elastic_strain_eqv_von_mises_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises elastic strain results from the simulation. + """Extract nodal equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1518,6 +1756,14 @@ def elastic_strain_eqv_von_mises_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1537,6 +1783,8 @@ def elastic_strain_eqv_von_mises_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable( @@ -1552,8 +1800,10 @@ def plastic_state_variable( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal plastic state variable results from the simulation. + """Extract plastic state variable results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1592,6 +1842,14 @@ def plastic_state_variable( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1611,6 +1869,8 @@ def plastic_state_variable( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable_elemental( @@ -1624,6 +1884,8 @@ def plastic_state_variable_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental plastic state variable results from the simulation. @@ -1654,6 +1916,14 @@ def plastic_state_variable_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1673,6 +1943,8 @@ def plastic_state_variable_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_state_variable_nodal( @@ -1687,6 +1959,8 @@ def plastic_state_variable_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal plastic state variable results from the simulation. @@ -1719,6 +1993,14 @@ def plastic_state_variable_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1738,6 +2020,8 @@ def plastic_state_variable_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain( @@ -1754,8 +2038,10 @@ def plastic_strain( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal plastic strain results from the simulation. + """Extract plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1797,6 +2083,14 @@ def plastic_strain( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1816,6 +2110,8 @@ def plastic_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_nodal( @@ -1831,6 +2127,8 @@ def plastic_strain_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal plastic strain results from the simulation. @@ -1866,6 +2164,14 @@ def plastic_strain_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1885,6 +2191,8 @@ def plastic_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_elemental( @@ -1899,6 +2207,8 @@ def plastic_strain_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental plastic strain results from the simulation. @@ -1932,6 +2242,14 @@ def plastic_strain_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -1951,6 +2269,8 @@ def plastic_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal( @@ -1967,8 +2287,10 @@ def plastic_strain_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal plastic strain results from the simulation. + """Extract principal plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2009,6 +2331,14 @@ def plastic_strain_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2028,6 +2358,8 @@ def plastic_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal_nodal( @@ -2043,6 +2375,8 @@ def plastic_strain_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal plastic strain results from the simulation. @@ -2077,6 +2411,14 @@ def plastic_strain_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2096,6 +2438,8 @@ def plastic_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_principal_elemental( @@ -2110,6 +2454,8 @@ def plastic_strain_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal plastic strain results from the simulation. @@ -2142,6 +2488,14 @@ def plastic_strain_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2161,6 +2515,8 @@ def plastic_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv( @@ -2176,8 +2532,10 @@ def plastic_strain_eqv( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent plastic strain results from the simulation. + """Extract equivalent plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2216,6 +2574,14 @@ def plastic_strain_eqv( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2235,6 +2601,8 @@ def plastic_strain_eqv( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv_nodal( @@ -2249,6 +2617,8 @@ def plastic_strain_eqv_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal equivalent plastic strain results from the simulation. @@ -2281,6 +2651,14 @@ def plastic_strain_eqv_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2300,6 +2678,8 @@ def plastic_strain_eqv_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def plastic_strain_eqv_elemental( @@ -2313,6 +2693,8 @@ def plastic_strain_eqv_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental equivalent plastic strain results from the simulation. @@ -2343,6 +2725,14 @@ def plastic_strain_eqv_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2362,6 +2752,8 @@ def plastic_strain_eqv_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain( @@ -2378,8 +2770,10 @@ def creep_strain( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal creep strain results from the simulation. + """Extract creep strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2421,6 +2815,14 @@ def creep_strain( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2440,6 +2842,8 @@ def creep_strain( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_nodal( @@ -2455,6 +2859,8 @@ def creep_strain_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal creep strain results from the simulation. @@ -2490,6 +2896,14 @@ def creep_strain_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2509,6 +2923,8 @@ def creep_strain_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_elemental( @@ -2523,6 +2939,8 @@ def creep_strain_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental creep strain results from the simulation. @@ -2556,6 +2974,14 @@ def creep_strain_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2575,6 +3001,8 @@ def creep_strain_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_principal( @@ -2591,8 +3019,10 @@ def creep_strain_principal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal principal creep strain results from the simulation. + """Extract principal creep strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2633,6 +3063,14 @@ def creep_strain_principal( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2652,6 +3090,8 @@ def creep_strain_principal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_principal_nodal( @@ -2667,6 +3107,8 @@ def creep_strain_principal_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal principal creep strain results from the simulation. @@ -2701,6 +3143,14 @@ def creep_strain_principal_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2720,6 +3170,8 @@ def creep_strain_principal_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_principal_elemental( @@ -2734,6 +3186,8 @@ def creep_strain_principal_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental principal creep strain results from the simulation. @@ -2766,6 +3220,14 @@ def creep_strain_principal_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2785,6 +3247,8 @@ def creep_strain_principal_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_eqv( @@ -2800,8 +3264,10 @@ def creep_strain_eqv( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal equivalent creep strain results from the simulation. + """Extract equivalent creep strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2840,6 +3306,14 @@ def creep_strain_eqv( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2859,6 +3333,8 @@ def creep_strain_eqv( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_equivalent_nodal( @@ -2873,6 +3349,8 @@ def creep_strain_equivalent_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal equivalent creep strain results from the simulation. @@ -2905,6 +3383,14 @@ def creep_strain_equivalent_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2924,6 +3410,8 @@ def creep_strain_equivalent_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def creep_strain_equivalent_elemental( @@ -2937,6 +3425,8 @@ def creep_strain_equivalent_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental equivalent creep strain results from the simulation. @@ -2967,6 +3457,14 @@ def creep_strain_equivalent_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -2986,6 +3484,8 @@ def creep_strain_equivalent_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def reaction_force( @@ -3002,6 +3502,8 @@ def reaction_force( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract reaction force results from the simulation. @@ -3039,6 +3541,14 @@ def reaction_force( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3059,6 +3569,8 @@ def reaction_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_volume( @@ -3073,6 +3585,8 @@ def elemental_volume( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental volume results from the simulation. @@ -3105,6 +3619,14 @@ def elemental_volume( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3124,6 +3646,8 @@ def elemental_volume( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_mass( @@ -3137,6 +3661,8 @@ def elemental_mass( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental mass results from the simulation. @@ -3167,6 +3693,14 @@ def elemental_mass( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3186,6 +3720,8 @@ def elemental_mass( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def elemental_heat_generation( @@ -3199,6 +3735,8 @@ def elemental_heat_generation( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental heat generation results from the simulation. @@ -3229,6 +3767,14 @@ def elemental_heat_generation( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3248,6 +3794,8 @@ def elemental_heat_generation( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_centroids( @@ -3261,6 +3809,8 @@ def element_centroids( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element centroids results from the simulation. @@ -3291,6 +3841,14 @@ def element_centroids( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3310,6 +3868,8 @@ def element_centroids( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def thickness( @@ -3323,6 +3883,8 @@ def thickness( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element thickness results from the simulation. @@ -3353,6 +3915,14 @@ def thickness( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3372,6 +3942,8 @@ def thickness( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations( @@ -3387,8 +3959,10 @@ def element_orientations( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: - """Extract elemental nodal element orientations results from the simulation. + """Extract element orientations results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -3427,6 +4001,14 @@ def element_orientations( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3446,6 +4028,8 @@ def element_orientations( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_elemental( @@ -3459,6 +4043,8 @@ def element_orientations_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract elemental element orientations results from the simulation. @@ -3489,6 +4075,14 @@ def element_orientations_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3508,6 +4102,8 @@ def element_orientations_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_orientations_nodal( @@ -3522,6 +4118,8 @@ def element_orientations_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal element orientations results from the simulation. @@ -3554,6 +4152,14 @@ def element_orientations_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3573,6 +4179,8 @@ def element_orientations_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def stiffness_matrix_energy( @@ -3586,6 +4194,8 @@ def stiffness_matrix_energy( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract stiffness matrix energy results from the simulation. @@ -3616,6 +4226,14 @@ def stiffness_matrix_energy( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3635,6 +4253,8 @@ def stiffness_matrix_energy( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def artificial_hourglass_energy( @@ -3648,6 +4268,8 @@ def artificial_hourglass_energy( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract artificial hourglass energy results from the simulation. @@ -3678,6 +4300,14 @@ def artificial_hourglass_energy( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3697,6 +4327,8 @@ def artificial_hourglass_energy( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def thermal_dissipation_energy( @@ -3710,6 +4342,8 @@ def thermal_dissipation_energy( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract thermal dissipation energy results from the simulation. @@ -3740,6 +4374,14 @@ def thermal_dissipation_energy( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3759,6 +4401,8 @@ def thermal_dissipation_energy( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def kinetic_energy( @@ -3772,6 +4416,8 @@ def kinetic_energy( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract kinetic energy results from the simulation. @@ -3802,6 +4448,14 @@ def kinetic_energy( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3821,6 +4475,8 @@ def kinetic_energy( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure( @@ -3836,6 +4492,8 @@ def hydrostatic_pressure( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure element nodal results from the simulation. @@ -3868,6 +4526,14 @@ def hydrostatic_pressure( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3887,6 +4553,8 @@ def hydrostatic_pressure( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure_nodal( @@ -3901,6 +4569,8 @@ def hydrostatic_pressure_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure nodal results from the simulation. @@ -3933,6 +4603,14 @@ def hydrostatic_pressure_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -3952,6 +4630,8 @@ def hydrostatic_pressure_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def hydrostatic_pressure_elemental( @@ -3965,6 +4645,8 @@ def hydrostatic_pressure_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract hydrostatic pressure elemental results from the simulation. @@ -3995,6 +4677,14 @@ def hydrostatic_pressure_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4014,6 +4704,8 @@ def hydrostatic_pressure_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def structural_temperature( @@ -4029,6 +4721,8 @@ def structural_temperature( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract structural temperature element nodal results from the simulation. @@ -4069,6 +4763,14 @@ def structural_temperature( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4088,6 +4790,8 @@ def structural_temperature( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def structural_temperature_nodal( @@ -4102,6 +4806,8 @@ def structural_temperature_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract structural temperature nodal results from the simulation. @@ -4134,6 +4840,14 @@ def structural_temperature_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4153,6 +4867,8 @@ def structural_temperature_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def structural_temperature_elemental( @@ -4166,6 +4882,8 @@ def structural_temperature_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract structural temperature elemental results from the simulation. @@ -4196,6 +4914,14 @@ def structural_temperature_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4215,6 +4941,8 @@ def structural_temperature_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces( @@ -4232,6 +4960,8 @@ def element_nodal_forces( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces results from the simulation. @@ -4277,6 +5007,14 @@ def element_nodal_forces( for every node at each element. Similarly, using `post.locations.elemental` gives results with one value for each element, while using `post.locations.nodal` gives results with one value for each node. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4297,6 +5035,8 @@ def element_nodal_forces( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_nodal( @@ -4313,6 +5053,8 @@ def element_nodal_forces_nodal( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces nodal results from the simulation. @@ -4350,6 +5092,14 @@ def element_nodal_forces_nodal( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4370,6 +5120,8 @@ def element_nodal_forces_nodal( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def element_nodal_forces_elemental( @@ -4385,6 +5137,8 @@ def element_nodal_forces_elemental( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract element nodal forces elemental results from the simulation. @@ -4420,6 +5174,14 @@ def element_nodal_forces_elemental( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4440,6 +5202,8 @@ def element_nodal_forces_elemental( node_ids=None, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_force( @@ -4456,6 +5220,8 @@ def nodal_force( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal force results from the simulation. @@ -4493,6 +5259,14 @@ def nodal_force( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4513,6 +5287,8 @@ def nodal_force( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) def nodal_moment( @@ -4529,6 +5305,8 @@ def nodal_moment( ] = None, named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, + expand_cyclic: Union[bool, List[Union[int, List[int]]]] = True, + phase_angle_cyclic: Union[float, None] = None, ) -> DataFrame: """Extract nodal moment results from the simulation. @@ -4566,6 +5344,14 @@ def nodal_moment( selection: Selection to get results for. A Selection defines both spatial and time-like criteria for filtering. + expand_cyclic: + For cyclic problems, whether to expand the sectors. + Can take a list of sector numbers to select specific sectors to expand + (one-based indexing). + If the problem is multi-stage, can take a list of lists of sector numbers, ordered + by stage. + phase_angle_cyclic: + For cyclic problems, phase angle to apply (in degrees). Returns ------- @@ -4586,4 +5372,6 @@ def nodal_moment( node_ids=node_ids, element_ids=element_ids, named_selections=named_selections, + expand_cyclic=expand_cyclic, + phase_angle_cyclic=phase_angle_cyclic, ) diff --git a/src/ansys/dpf/post/transient_mechanical_simulation.py b/src/ansys/dpf/post/transient_mechanical_simulation.py index f8cd0020a..8f979a96d 100644 --- a/src/ansys/dpf/post/transient_mechanical_simulation.py +++ b/src/ansys/dpf/post/transient_mechanical_simulation.py @@ -187,6 +187,7 @@ def _get_result( wf.add_operator(operator=average_op) # Set as future output of the workflow out = average_op.outputs.fields_container + base_name += "_VM" # Add an optional component selection step if result is vector, matrix, or principal if ( @@ -205,6 +206,9 @@ def _get_result( wf.add_operator(operator=extract_op) # Set as future output of the workflow out = extract_op.outputs.fields_container + if len(to_extract) == 1: + base_name += f"_{comp[0]}" + comp = None # Add an optional norm operation if requested if norm: @@ -213,6 +217,7 @@ def _get_result( wf.add_operator(operator=norm_op) out = norm_op.outputs.fields_container comp = None + base_name += "_N" # Set the workflow output wf.set_output_name("out", out) @@ -457,7 +462,7 @@ def stress( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal stress results from the simulation. + """Extract stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -670,7 +675,7 @@ def stress_principal( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal principal stress results from the simulation. + """Extract principal stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -879,7 +884,7 @@ def stress_eqv_von_mises( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises stress results from the simulation. + """Extract equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -951,7 +956,7 @@ def stress_eqv_von_mises_elemental( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises stress results from the simulation. + """Extract elemental equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1014,7 +1019,7 @@ def stress_eqv_von_mises_nodal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises stress results from the simulation. + """Extract nodal equivalent von Mises stress results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1294,7 +1299,7 @@ def elastic_strain_principal( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal principal elastic strain results from the simulation. + """Extract principal elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1503,7 +1508,7 @@ def elastic_strain_eqv_von_mises( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal equivalent Von Mises elastic strain results from the simulation. + """Extract equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1575,7 +1580,7 @@ def elastic_strain_eqv_von_mises_elemental( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, ) -> DataFrame: - """Extract elemental equivalent Von Mises elastic strain results from the simulation. + """Extract elemental equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1638,7 +1643,7 @@ def elastic_strain_eqv_von_mises_nodal( named_selections: Union[List[str], str, None] = None, selection: Union[Selection, None] = None, ) -> DataFrame: - """Extract nodal equivalent Von Mises elastic strain results from the simulation. + """Extract nodal equivalent von Mises elastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1704,7 +1709,7 @@ def plastic_state_variable( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal plastic state variable results from the simulation. + """Extract plastic state variable results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -1906,7 +1911,7 @@ def plastic_strain( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal plastic strain results from the simulation. + """Extract plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2119,7 +2124,7 @@ def plastic_strain_principal( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal principal plastic strain results from the simulation. + """Extract principal plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2328,7 +2333,7 @@ def plastic_strain_eqv( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal equivalent plastic strain results from the simulation. + """Extract equivalent plastic strain results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. @@ -2912,7 +2917,7 @@ def element_orientations( selection: Union[Selection, None] = None, location: Union[locations, str] = locations.elemental_nodal, ) -> DataFrame: - """Extract elemental nodal element orientations results from the simulation. + """Extract element orientations results from the simulation. Arguments `selection`, `set_ids`, `all_sets`, `times`, and `load_steps` are mutually exclusive. diff --git a/tests/conftest.py b/tests/conftest.py index b7e087256..62668cc59 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -71,6 +71,18 @@ def allkindofcomplexity(): return examples.download_all_kinds_of_complexity() +@pytest.fixture() +def simple_cyclic(): + """Resolve the path of the "simple_cyclic.rst" result file.""" + return examples.simple_cyclic + + +@pytest.fixture() +def multi_stage_cyclic(): + """Resolve the path of the "multi_stage.rst" result file.""" + return examples.download_multi_stage_cyclic_result() + + @pytest.fixture() def modalallkindofcomplexity(): """Resolve the path of the "allKindOfComplexity.rst" result file.""" diff --git a/tests/test_dataframe.py b/tests/test_dataframe.py index 17603193b..4e953b04e 100644 --- a/tests/test_dataframe.py +++ b/tests/test_dataframe.py @@ -118,9 +118,18 @@ def test_dataframe_iselect(df): print(df2) -def test_dataframe_plot(df): +def test_dataframe_plot(df, multi_stage_cyclic): df.plot(set_ids=1, node_ids=[1, 2, 3, 4, 5, 6, 7, 8, 9]) + simulation = post.ModalMechanicalSimulation(multi_stage_cyclic) + # df2 = simulation.displacement(expand_cyclic=False) # TODO fix plot bug + df2 = simulation.stress_nodal(expand_cyclic=False) + print(df2) + df2.plot() + df2.plot(stage=0) + with pytest.raises(ValueError, match="must be a single value"): + df2.plot(stage=[0, 1]) + def test_dataframe_plot_warn(df): with pytest.warns(UserWarning, match="did not return data"): diff --git a/tests/test_simulation.py b/tests/test_simulation.py index 131ddecc2..9aa9ad494 100644 --- a/tests/test_simulation.py +++ b/tests/test_simulation.py @@ -1,6 +1,6 @@ import os.path -import ansys.dpf.core as core +import ansys.dpf.core as dpf from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 import numpy as np import pytest @@ -76,6 +76,26 @@ def test_simulation_plot(static_simulation): class TestStaticMechanicalSimulation: + def test_cyclic(self, simple_cyclic): + simulation = post.StaticMechanicalSimulation(simple_cyclic) + result = simulation.stress(expand_cyclic=False) + print(result) + assert "base_sector" in result.columns.names + result = simulation.stress(expand_cyclic=True) + print(result) + assert "base_sector" not in result.columns.names + + def test_multi_stage(self, multi_stage_cyclic): + simulation = post.StaticMechanicalSimulation(multi_stage_cyclic) + result = simulation.stress(expand_cyclic=False) + print(result) + assert "base_sector" in result.columns.names + assert "stage" in result.columns.names + result = simulation.stress(expand_cyclic=True) + print(result) + assert "base_sector" not in result.columns.names + assert "stage" not in result.columns.names + def test_times_argument(self, static_simulation): _ = static_simulation.displacement(times=1) _ = static_simulation.displacement(times=1.0) @@ -118,7 +138,7 @@ def test_displacement(self, static_simulation): assert displacement_x._fc.get_time_scoping().ids == [1] field = displacement_x._fc[0] op = static_simulation._model.operator("UX") - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [42, 43, 44], server=static_simulation._model._server ) op.connect(1, mesh_scoping) @@ -145,7 +165,7 @@ def test_displacement(self, static_simulation): assert displacement_y._fc.get_time_scoping().ids == [1] field = displacement_y._fc[0] op = static_simulation._model.operator("UY") - mesh_scoping = core.mesh_scoping_factory.named_selection_scoping( + mesh_scoping = dpf.mesh_scoping_factory.named_selection_scoping( static_simulation.named_selections[0], server=static_simulation._model._server, model=static_simulation._model, @@ -165,7 +185,7 @@ def test_displacement(self, static_simulation): assert displacement_z._fc.get_time_scoping().ids == [1] field = displacement_z._fc[0] op = static_simulation._model.operator("UZ") - mesh_scoping = core.mesh_scoping_factory.named_selection_scoping( + mesh_scoping = dpf.mesh_scoping_factory.named_selection_scoping( static_simulation.named_selections[0], server=static_simulation._model._server, model=static_simulation._model, @@ -185,11 +205,11 @@ def test_displacement(self, static_simulation): assert displacement_z._fc.get_time_scoping().ids == [1] field = displacement_z._fc[0] op = static_simulation._model.operator("UZ") - mesh_scoping = core.mesh_scoping_factory.elemental_scoping( + mesh_scoping = dpf.mesh_scoping_factory.elemental_scoping( element_ids=[1, 2, 3], server=static_simulation._model._server, ) - mesh_scoping = core.operators.scoping.transpose( + mesh_scoping = dpf.operators.scoping.transpose( mesh_scoping=mesh_scoping, meshed_region=static_simulation.mesh._meshed_region, inclusive=1, @@ -208,7 +228,7 @@ def test_displacement(self, static_simulation): assert displacement_norm._fc.get_time_scoping().ids == [1] field = displacement_norm._fc[0] op = static_simulation._model.operator("U") - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [42, 43, 44], server=static_simulation._model._server ) op.connect(1, mesh_scoping) @@ -487,7 +507,7 @@ def test_elastic_strain_eqv_von_mises(self, static_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = static_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=static_simulation._model._server ) op.connect(0, time_scoping) @@ -504,7 +524,7 @@ def test_elastic_strain_eqv_von_mises_nodal(self, static_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = static_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=static_simulation._model._server ) op.connect(0, time_scoping) @@ -523,7 +543,7 @@ def test_elastic_strain_eqv_von_mises_elemental(self, static_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = static_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=static_simulation._model._server ) op.connect(0, time_scoping) @@ -561,7 +581,7 @@ def test_times_argument(self, transient_simulation, static_simulation): # Get reference field at t=0.15s op = transient_simulation._model.operator("UX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 15, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -593,11 +613,11 @@ def test_displacement(self, transient_simulation): assert result._fc.get_time_scoping().ids == [20] field = result._fc[0] op = transient_simulation._model.operator("UX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 20, server=transient_simulation._model._server ) op.connect(0, time_scoping) - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [2, 3, 4], server=transient_simulation._model._server ) op.connect(1, mesh_scoping) @@ -625,11 +645,11 @@ def test_velocity(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("VX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [2, 3, 4], server=transient_simulation._model._server ) op.connect(1, mesh_scoping) @@ -646,11 +666,11 @@ def test_acceleration(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("AX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [2, 3, 4], server=transient_simulation._model._server ) op.connect(1, mesh_scoping) @@ -665,7 +685,7 @@ def test_stress(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -680,7 +700,7 @@ def test_stress_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -695,7 +715,7 @@ def test_stress_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -710,7 +730,7 @@ def test_stress_principal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S1") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -725,7 +745,7 @@ def test_stress_principal_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S2") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -742,7 +762,7 @@ def test_stress_principal_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S3") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -757,7 +777,7 @@ def test_stress_eqv_von_mises(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -772,7 +792,7 @@ def test_stress_eqv_von_mises_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -787,7 +807,7 @@ def test_stress_eqv_von_mises_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -802,7 +822,7 @@ def test_elastic_strain(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -819,7 +839,7 @@ def test_elastic_strain_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -834,7 +854,7 @@ def test_elastic_strain_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -851,7 +871,7 @@ def test_elastic_strain_principal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -870,7 +890,7 @@ def test_elastic_strain_principal_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -889,7 +909,7 @@ def test_elastic_strain_principal_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -1049,7 +1069,7 @@ def test_elastic_strain_eqv_von_mises(self, transient_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -1066,7 +1086,7 @@ def test_elastic_strain_eqv_von_mises_nodal(self, transient_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -1087,7 +1107,7 @@ def test_elastic_strain_eqv_von_mises_elemental(self, transient_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = transient_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=transient_simulation._model._server ) op.connect(0, time_scoping) @@ -1109,6 +1129,79 @@ def modal_simulation(self, modalallkindofcomplexity): simulation_type=AvailableSimulationTypes.modal_mechanical, ) + def test_cyclic(self, simple_cyclic): + simulation = post.ModalMechanicalSimulation(simple_cyclic) + displacement = simulation.displacement(expand_cyclic=False) + assert "base_sector" in displacement.columns.names + assert len(displacement.mesh_index) == 51 + + displacement = simulation.displacement(expand_cyclic=True) + assert "base_sector" not in displacement.columns.names + assert len(displacement.mesh_index) == 408 + + with pytest.raises( + ValueError, + match="'phase_angle_cyclic' argument only accepts a single float value.", + ): + _ = simulation.displacement(phase_angle_cyclic=[0.1]) + + with pytest.raises( + ValueError, + match="Sector selection with 'expand_cyclic' starts at 1.", + ): + _ = simulation.displacement(expand_cyclic=[0]) + + displacement = simulation.displacement(phase_angle_cyclic=90) + assert displacement + displacement = simulation.displacement(phase_angle_cyclic=90.0) + assert displacement + + def test_multi_stage(self, multi_stage_cyclic): + simulation = post.ModalMechanicalSimulation(multi_stage_cyclic) + + displacement = simulation.displacement(expand_cyclic=False) + assert "base_sector" in displacement.columns.names + assert "stage" in displacement.columns.names + assert len(displacement.mesh_index) == 3595 + + displacement = simulation.displacement(expand_cyclic=True) + assert "base_sector" not in displacement.columns.names + assert "stage" not in displacement.columns.names + assert len(displacement.mesh_index) == 26742 + + with pytest.raises( + ValueError, + match="Sector selection with 'expand_cyclic' starts at 1.", + ): + _ = simulation.displacement(expand_cyclic=[[0, 1], 1]) + + displacement = simulation.displacement(expand_cyclic=[1, 2]) + assert "base_sector" not in displacement.columns.names + assert "stage" not in displacement.columns.names + assert len(displacement.mesh_index) == 18717 + + displacement = simulation.displacement(expand_cyclic=[[1, 2], 1]) + assert "base_sector" not in displacement.columns.names + assert "stage" not in displacement.columns.names + assert len(displacement.mesh_index) == 5644 + + displacement = simulation.displacement(expand_cyclic=[[1, 2], [1, 2]]) + print(displacement) + assert "base_sector" not in displacement.columns.names + assert "stage" not in displacement.columns.names + assert len(displacement.mesh_index) == 6848 + + with pytest.raises( + ValueError, match="'expand_cyclic' only accepts lists of int values >= 1." + ): + _ = simulation.displacement(expand_cyclic=[[1, 2], [0.2, 2]]) + + with pytest.raises( + ValueError, + match="'expand_cyclic' argument can only be a boolean or a list.", + ): + _ = simulation.displacement(expand_cyclic=1) + def test_displacement(self, modal_simulation): print(modal_simulation) result = modal_simulation.displacement( @@ -1124,11 +1217,11 @@ def test_displacement(self, modal_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = modal_simulation._model.operator("UX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=modal_simulation._model._server ) op.connect(0, time_scoping) - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [2, 3, 4], server=modal_simulation._model._server ) op.connect(1, mesh_scoping) @@ -1213,7 +1306,7 @@ def test_stress(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1228,7 +1321,7 @@ def test_stress_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1243,7 +1336,7 @@ def test_stress_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1258,7 +1351,7 @@ def test_stress_principal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S1") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1273,7 +1366,7 @@ def test_stress_principal_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S2") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1288,7 +1381,7 @@ def test_stress_principal_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S3") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1303,7 +1396,7 @@ def test_stress_eqv_von_mises(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1318,7 +1411,7 @@ def test_stress_eqv_von_mises_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1333,7 +1426,7 @@ def test_stress_eqv_von_mises_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1359,7 +1452,7 @@ def test_elastic_strain(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1374,7 +1467,7 @@ def test_elastic_strain_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1389,7 +1482,7 @@ def test_elastic_strain_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1404,7 +1497,7 @@ def test_elastic_strain_principal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1423,7 +1516,7 @@ def test_elastic_strain_principal_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1442,7 +1535,7 @@ def test_elastic_strain_principal_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [2] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 2, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1459,7 +1552,7 @@ def test_elastic_strain_eqv_von_mises(self, modal_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1476,7 +1569,7 @@ def test_elastic_strain_eqv_von_mises_nodal(self, modal_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1495,7 +1588,7 @@ def test_elastic_strain_eqv_von_mises_elemental(self, modal_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = modal_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=modal_simulation._model._server ) op.connect(0, time_scoping) @@ -1517,6 +1610,26 @@ def harmonic_simulation(self, complex_model): simulation_type=AvailableSimulationTypes.harmonic_mechanical, ) + def test_cyclic(self, simple_cyclic): + simulation = post.HarmonicMechanicalSimulation(simple_cyclic) + result = simulation.displacement(expand_cyclic=False) + print(result) + assert "base_sector" in result.columns.names + result = simulation.displacement(expand_cyclic=True) + print(result) + assert "base_sector" not in result.columns.names + + def test_multi_stage(self, multi_stage_cyclic): + simulation = post.HarmonicMechanicalSimulation(multi_stage_cyclic) + result = simulation.displacement(expand_cyclic=False) + print(result) + assert "base_sector" in result.columns.names + assert "stage" in result.columns.names + result = simulation.displacement(expand_cyclic=True) + print(result) + assert "base_sector" not in result.columns.names + assert "stage" not in result.columns.names + def test_displacement(self, harmonic_simulation): print(harmonic_simulation) @@ -1525,11 +1638,11 @@ def test_displacement(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("UX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) - mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( [2, 3, 4], server=harmonic_simulation._model._server ) op.connect(1, mesh_scoping) @@ -1547,11 +1660,11 @@ def test_displacement(self, harmonic_simulation): # field = result._fc[0] # # op = harmonic_simulation._model.operator("UX") - # time_scoping = core.time_freq_scoping_factory.scoping_by_set( + # time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( # 1, server=harmonic_simulation._model._server # ) # op.connect(0, time_scoping) - # mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + # mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( # [2, 3, 4], server=harmonic_simulation._model._server # ) # op.connect(1, mesh_scoping) @@ -1571,11 +1684,11 @@ def test_displacement(self, harmonic_simulation): # assert result._fc.get_time_scoping().ids == [1] # field = result._fc[0] # op = harmonic_simulation._model.operator("VX") - # time_scoping = core.time_freq_scoping_factory.scoping_by_set( + # time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( # 1, server=harmonic_simulation._model._server # ) # op.connect(0, time_scoping) - # mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + # mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( # [2, 3, 4], server=harmonic_simulation._model._server # ) # op.connect(1, mesh_scoping) @@ -1592,11 +1705,11 @@ def test_displacement(self, harmonic_simulation): # assert result._fc.get_time_scoping().ids == [1] # field = result._fc[0] # op = harmonic_simulation._model.operator("AX") - # time_scoping = core.time_freq_scoping_factory.scoping_by_set( + # time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( # 1, server=harmonic_simulation._model._server # ) # op.connect(0, time_scoping) - # mesh_scoping = core.mesh_scoping_factory.nodal_scoping( + # mesh_scoping = dpf.mesh_scoping_factory.nodal_scoping( # [2, 3, 4], server=harmonic_simulation._model._server # ) # op.connect(1, mesh_scoping) @@ -1682,7 +1795,7 @@ def test_stress(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1697,7 +1810,7 @@ def test_stress_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1712,7 +1825,7 @@ def test_stress_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("SX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1727,7 +1840,7 @@ def test_stress_principal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S1") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1742,7 +1855,7 @@ def test_stress_principal_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S2") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1759,7 +1872,7 @@ def test_stress_principal_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S3") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1774,7 +1887,7 @@ def test_stress_eqv_von_mises(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1789,7 +1902,7 @@ def test_stress_eqv_von_mises_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1804,7 +1917,7 @@ def test_stress_eqv_von_mises_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("S_eqv") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1830,7 +1943,7 @@ def test_elastic_strain(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1845,7 +1958,7 @@ def test_elastic_strain_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1860,7 +1973,7 @@ def test_elastic_strain_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPELX") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1875,7 +1988,7 @@ def test_elastic_strain_principal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1894,7 +2007,7 @@ def test_elastic_strain_principal_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1913,7 +2026,7 @@ def test_elastic_strain_principal_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1930,7 +2043,7 @@ def test_elastic_strain_eqv_von_mises(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1947,7 +2060,7 @@ def test_elastic_strain_eqv_von_mises_nodal(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping) @@ -1966,7 +2079,7 @@ def test_elastic_strain_eqv_von_mises_elemental(self, harmonic_simulation): assert result._fc.get_time_scoping().ids == [1] field = result._fc[0] op = harmonic_simulation._model.operator("EPEL") - time_scoping = core.time_freq_scoping_factory.scoping_by_set( + time_scoping = dpf.time_freq_scoping_factory.scoping_by_set( 1, server=harmonic_simulation._model._server ) op.connect(0, time_scoping)