diff --git a/doc/source/index.rst b/doc/source/index.rst index d03d39ba66..5df0189a8d 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -73,8 +73,13 @@ Here are some key features of PyDPF - Composites: Limitations ''''''''''' -- Only the Mechanical APDL solver is supported. -- The post-processing of expanded cyclic symmetry models is not implemented. +- Only the Mechanical APDL solver is fully supported. LSDYNA is partially supported + as shown in :ref:`LSDYNA post-processing `. + The combined failure criterion (:meth:`.CompositeModel.evaluate_failure_criteria`), + sampling point (:meth:`.CompositeModel.get_sampling_point`) and + computation of interlaminar normal stresses (:meth:`.CompositeModel.add_interlaminar_normal_stresses`) + features are not supported for LSDYNA. +- The post-processing of expanded cyclic symmetry models is not implemented. Only the first sector is considered. - The following operators and features are only supported if the model was preprocessed with ACP and if the corresponding lay-up definition file is passed to the :class:`.CompositeModel` class. diff --git a/src/ansys/dpf/composites/_composite_model_impl.py b/src/ansys/dpf/composites/_composite_model_impl.py index 2e1999f926..29c1de3473 100644 --- a/src/ansys/dpf/composites/_composite_model_impl.py +++ b/src/ansys/dpf/composites/_composite_model_impl.py @@ -303,6 +303,9 @@ def evaluate_failure_criteria( ``write_data_for_full_element_scope=True`` is not supported. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError("evaluate_failure_criteria is implemented for MAPDL results only.") + if composite_scope is None: composite_scope = CompositeScope() @@ -514,6 +517,9 @@ def get_sampling_point( attribute. This parameter is only required for assemblies. See the note about assemblies in the description for the :class:`CompositeModel` class. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError("get_sampling_point is implemented for MAPDL results only.") + element_info = self.get_element_info(element_id) if element_info.is_shell: return SamplingPointNew( @@ -707,6 +713,11 @@ def add_interlaminar_normal_stresses( Interlaminar normal stresses are only added to the layered elements defined in the specified composite definition. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError( + "add_interlaminar_normal_stresses is implemented for MAPDL results only." + ) + ins_operator = dpf.Operator("composite::interlaminar_normal_stress_operator") ins_operator.inputs.materials_container(self._material_operators.material_provider) ins_operator.inputs.mesh(self.get_mesh()) diff --git a/src/ansys/dpf/composites/_composite_model_impl_2023r2.py b/src/ansys/dpf/composites/_composite_model_impl_2023r2.py index 9dc4270b1c..610f6a17aa 100644 --- a/src/ansys/dpf/composites/_composite_model_impl_2023r2.py +++ b/src/ansys/dpf/composites/_composite_model_impl_2023r2.py @@ -32,7 +32,7 @@ from numpy.typing import NDArray from .composite_scope import CompositeScope -from .constants import SolverType +from .constants import D3PLOT_KEY_AND_FILENAME, SolverType from .data_sources import ( CompositeDataSources, ContinuousFiberCompositesFiles, @@ -268,11 +268,10 @@ def layup_model_type(self) -> LayupModelContextType: @property def solver_type(self) -> SolverType: """Get the type of solver used to generate the result file.""" - raise NotImplementedError( - "solver_type is not implemented" - " for this version of DPF. DPF server 10.0 (2025 R2)" - " or later should be used instead." - ) + if self._core_model.metadata.data_sources.result_key == D3PLOT_KEY_AND_FILENAME: + return SolverType.LSDYNA + + return SolverType.MAPDL def evaluate_failure_criteria( self, @@ -314,6 +313,9 @@ def evaluate_failure_criteria( ``write_data_for_full_element_scope=True`` is not supported. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError("evaluate_failure_criteria is implemented for MAPDL results only.") + if composite_scope is None: composite_scope = CompositeScope() @@ -385,6 +387,9 @@ def get_sampling_point( attribute. This parameter is only required for assemblies. See the note about assemblies in the description for the :class:`CompositeModel` class. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError("get_sampling_point is implemented for MAPDL results only.") + time_in = time if composite_definition_label is None: @@ -594,6 +599,11 @@ def add_interlaminar_normal_stresses( Interlaminar normal stresses are only added to the layered elements defined in the specified composite definition. """ + if self.solver_type != SolverType.MAPDL: + raise RuntimeError( + "add_interlaminar_normal_stresses is implemented for MAPDL results only." + ) + if composite_definition_label is None: composite_definition_label = self._first_composite_definition_label_if_only_one()