Skip to content

Commit 50d44f9

Browse files
authored
Update limitations due to the support of LS Dyna (#561)
* Update the documentation of the limitations
1 parent b729f4a commit 50d44f9

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

doc/source/index.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@ Here are some key features of PyDPF - Composites:
7373

7474
Limitations
7575
'''''''''''
76-
- Only the Mechanical APDL solver is supported.
77-
- The post-processing of expanded cyclic symmetry models is not implemented.
76+
- Only the Mechanical APDL solver is fully supported. LSDYNA is partially supported
77+
as shown in :ref:`LSDYNA post-processing <sphx_glr_examples_gallery_examples_016_lsdyna_bird_strike.py>`.
78+
The combined failure criterion (:meth:`.CompositeModel.evaluate_failure_criteria`),
79+
sampling point (:meth:`.CompositeModel.get_sampling_point`) and
80+
computation of interlaminar normal stresses (:meth:`.CompositeModel.add_interlaminar_normal_stresses`)
81+
features are not supported for LSDYNA.
82+
- The post-processing of expanded cyclic symmetry models is not implemented. Only the first sector is considered.
7883
- The following operators and features are only supported if the model was
7984
preprocessed with ACP and if the corresponding lay-up definition file is passed to the :class:`.CompositeModel` class.
8085

src/ansys/dpf/composites/_composite_model_impl.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ def evaluate_failure_criteria(
303303
``write_data_for_full_element_scope=True`` is not supported.
304304
305305
"""
306+
if self.solver_type != SolverType.MAPDL:
307+
raise RuntimeError("evaluate_failure_criteria is implemented for MAPDL results only.")
308+
306309
if composite_scope is None:
307310
composite_scope = CompositeScope()
308311

@@ -514,6 +517,9 @@ def get_sampling_point(
514517
attribute. This parameter is only required for assemblies.
515518
See the note about assemblies in the description for the :class:`CompositeModel` class.
516519
"""
520+
if self.solver_type != SolverType.MAPDL:
521+
raise RuntimeError("get_sampling_point is implemented for MAPDL results only.")
522+
517523
element_info = self.get_element_info(element_id)
518524
if element_info.is_shell:
519525
return SamplingPointNew(
@@ -707,6 +713,11 @@ def add_interlaminar_normal_stresses(
707713
Interlaminar normal stresses are only added to the layered elements defined
708714
in the specified composite definition.
709715
"""
716+
if self.solver_type != SolverType.MAPDL:
717+
raise RuntimeError(
718+
"add_interlaminar_normal_stresses is implemented for MAPDL results only."
719+
)
720+
710721
ins_operator = dpf.Operator("composite::interlaminar_normal_stress_operator")
711722
ins_operator.inputs.materials_container(self._material_operators.material_provider)
712723
ins_operator.inputs.mesh(self.get_mesh())

src/ansys/dpf/composites/_composite_model_impl_2023r2.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from numpy.typing import NDArray
3333

3434
from .composite_scope import CompositeScope
35-
from .constants import SolverType
35+
from .constants import D3PLOT_KEY_AND_FILENAME, SolverType
3636
from .data_sources import (
3737
CompositeDataSources,
3838
ContinuousFiberCompositesFiles,
@@ -268,11 +268,10 @@ def layup_model_type(self) -> LayupModelContextType:
268268
@property
269269
def solver_type(self) -> SolverType:
270270
"""Get the type of solver used to generate the result file."""
271-
raise NotImplementedError(
272-
"solver_type is not implemented"
273-
" for this version of DPF. DPF server 10.0 (2025 R2)"
274-
" or later should be used instead."
275-
)
271+
if self._core_model.metadata.data_sources.result_key == D3PLOT_KEY_AND_FILENAME:
272+
return SolverType.LSDYNA
273+
274+
return SolverType.MAPDL
276275

277276
def evaluate_failure_criteria(
278277
self,
@@ -314,6 +313,9 @@ def evaluate_failure_criteria(
314313
``write_data_for_full_element_scope=True`` is not supported.
315314
316315
"""
316+
if self.solver_type != SolverType.MAPDL:
317+
raise RuntimeError("evaluate_failure_criteria is implemented for MAPDL results only.")
318+
317319
if composite_scope is None:
318320
composite_scope = CompositeScope()
319321

@@ -385,6 +387,9 @@ def get_sampling_point(
385387
attribute. This parameter is only required for assemblies.
386388
See the note about assemblies in the description for the :class:`CompositeModel` class.
387389
"""
390+
if self.solver_type != SolverType.MAPDL:
391+
raise RuntimeError("get_sampling_point is implemented for MAPDL results only.")
392+
388393
time_in = time
389394

390395
if composite_definition_label is None:
@@ -594,6 +599,11 @@ def add_interlaminar_normal_stresses(
594599
Interlaminar normal stresses are only added to the layered elements defined
595600
in the specified composite definition.
596601
"""
602+
if self.solver_type != SolverType.MAPDL:
603+
raise RuntimeError(
604+
"add_interlaminar_normal_stresses is implemented for MAPDL results only."
605+
)
606+
597607
if composite_definition_label is None:
598608
composite_definition_label = self._first_composite_definition_label_if_only_one()
599609

0 commit comments

Comments
 (0)