diff --git a/doc/source/index.rst b/doc/source/index.rst index 4d42c27cc..a868f1b1b 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -46,7 +46,7 @@ to implement custom failure criteria and computation. Provides developer installation and usage information. -The minimum set of inputs to run a post-processing for composites is the result file(s) of an +The minimum set of inputs to run a postprocessing for composites is the result files of an MAPDL solution and a material file (matml) which was generated by Engineering Data. Lay-up files from ACP are optional and only required for some advanced operations. Refer to :ref:`Limitations`. @@ -56,7 +56,7 @@ Key features Here are some key features of PyDPF Composites: -* Post-processing of layered shell and solid elements, whether they were preprocessed by ACP or not. +* Postprocessing of layered shell and solid elements, whether they were preprocessed by ACP or not. * Failure criteria evaluation as shown in :ref:`Composite failure analysis `. * A :class:`.SamplingPoint` class for extracting and visualizing a result over the entire thickness of a laminate as shown in :ref:`Sampling point `. @@ -75,8 +75,8 @@ Limitations ''''''''''' - Only the Mechanical APDL solver is supported. - 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`: - - The evaluation of the failure criteria for sandwich (:class:`FaceSheetWrinklingCriterion`, :class:`ShearCrimpingCriterion`) + and if the corresponding lay-up definition file is passed to the :class:`.CompositeModel` class. + - The evaluation of the failure criteria for sandwich (:class:`FaceSheetWrinklingCriterion`, :class:`ShearCrimpingCriterion`) classes for solid elements. Layered shell elements are always supported. - The computation of interlaminar normal stresses (s3) for layered shell elements. Otherwise, s3 is zero. This also affects 3D failure criteria which use s3, such as Puck 3D. @@ -87,7 +87,7 @@ Limitations always supported thanks to the scripting - Plotting results on the reference surface of a laminate. - Note: MAPDL models which have not been preprocessed with ACP can be converted. For more + Note: MAPDL models that have not been preprocessed with ACP can be converted. For more information, see `Import of Legacy Mechanical APDL Composite Models`_ in the Ansys Help. .. _Ansys Workbench: https://download.ansys.com/Current%20Release diff --git a/examples/008_assembly_example.py b/examples/008_assembly_example.py index fb6136ec1..a32bca793 100644 --- a/examples/008_assembly_example.py +++ b/examples/008_assembly_example.py @@ -57,7 +57,7 @@ irf_field.plot() # %% -# Plot IRF on The Reference Surface +# Plot IRF on the reference surface # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Plot the maximum IRF on the reference surface if version_equal_or_later(server, "8.0"): diff --git a/examples/011_rst_workflow.py b/examples/011_rst_workflow.py index 7ec362ef5..abb74b837 100644 --- a/examples/011_rst_workflow.py +++ b/examples/011_rst_workflow.py @@ -1,25 +1,27 @@ """ .. _rst_workflow_example: -Failure Analysis of an MAPDL (RST) Model +Failure analysis of an MAPDL (RST) model ---------------------------------------- -The post-processing of a MAPDL (RST) model with layered elements which was not -preprocessed by ACP is shown by this example. The difference between the RST -only and ACP based workflow is that `composite` of :class:`.ContinuousFiberCompositesFiles` -is empty and so the section data are automatically loaded from the RST file. +This example shows the postprocessing of an MAPDL (RST) model with layered elements that was not +preprocessed by ACP. The difference between the RST- +only and ACP-based workflow is that `composite` of the :class:`.ContinuousFiberCompositesFiles` class +is empty, and so the section data are automatically loaded from the RST file. The engineering data file (XML or ENGD) with the material properties is needed anyway. -Otherwise, the material properties cannot be mapped. It is recommended -to create it before solving the model. The engineering data file can be either generated with -Ansys Workbench or ACP (Ansys Composite PrePost) standalone. Important: The material UUIDs -in the engineering data file must be identical to the UUIDs in the Mechanical APDL (RST file). -The material UUID can be set in Mechanical APDL with -the command ``MP,UVID,,``. +Otherwise, the material properties cannot be mapped. You should create it before +solving the model. You can generate the engineering data file with either Ansys Workbench +or ACP (Ansys Composite PrePost) standalone. -This workflow is supported since version 2024 R2 (DPF Server version 8.0). -A few advanced features are not supported with the RST only workflow. -Refer to Section :ref:`limitations` for details. + .. important + The material UUIDs in the engineering data file must be identical + to the UUIDs in the Mechanical APDL (RST file). + +You can set the material UUID in Mechanical APDL with the ``MP,UVID,,`` command. + +This workflow is supported in 2024 R2 (DPF Server version 8.0) and later. A few advanced features are +not supported with the RST onl workflow. For more information, see :ref:`limitations`. """ # %% # Set up analysis @@ -29,16 +31,17 @@ # # Load Ansys libraries. -from ansys.dpf.composites.composite_model import CompositeModel +from ansys.dpf.composites.composite_model import CompositeModel, CompositeScope from ansys.dpf.composites.constants import FailureOutput from ansys.dpf.composites.example_helper import get_continuous_fiber_example_files from ansys.dpf.composites.failure_criteria import ( CombinedFailureCriterion, CoreFailureCriterion, - FaceSheetWrinklingCriterion, MaxStrainCriterion, MaxStressCriterion, VonMisesCriterion, + FaceSheetWrinklingCriterion, + ShearCrimpingCriterion, ) from ansys.dpf.composites.server_helpers import connect_to_or_start_server @@ -47,7 +50,7 @@ server = connect_to_or_start_server() # %% -# Get input files (RST and material.engd but skip the ACP layup file) +# Get input files (RST and material.engd but skip the ACP layup file). composite_files_on_server = get_continuous_fiber_example_files(server, "shell", True) print(composite_files_on_server) diff --git a/src/ansys/dpf/composites/_indexer.py b/src/ansys/dpf/composites/_indexer.py index 57983248b..d8fe056d7 100644 --- a/src/ansys/dpf/composites/_indexer.py +++ b/src/ansys/dpf/composites/_indexer.py @@ -252,7 +252,7 @@ def __init__(self, field: PropertyField): self._data_pointer = np.array([], dtype=np.int64) def by_id(self, entity_id: int) -> Optional[NDArray[np.int64]]: - """Get index by id. + """Get index by ID. Parameters ---------- diff --git a/src/ansys/dpf/composites/data_sources.py b/src/ansys/dpf/composites/data_sources.py index 1719f467c..012d6ec66 100644 --- a/src/ansys/dpf/composites/data_sources.py +++ b/src/ansys/dpf/composites/data_sources.py @@ -159,7 +159,7 @@ class CompositeDataSources: Result file. Currently only RST (MAPDL) is supported. material_support: - NOTE: The 'material_support' is explicitly listed since it is currently not + NOTE: The ``material_support`` parameter is explicitly listed because it is currently not supported (by the DPF Core) to use a distributed RST file as source for the material support. Instead, we create a separate DataSources object for the material support from the first RST file. This is a workaround until the @@ -167,8 +167,8 @@ class CompositeDataSources: engineering_data: File with the material properties. - old_composite_sources: - This member is used to support assemblies in combination with the old + old_composite_sources : + Member used to support assemblies in combination with the old DPF server (<7.0). It should be removed once the support of this server version is dropped. diff --git a/src/ansys/dpf/composites/layup_info/_add_layup_info_to_mesh.py b/src/ansys/dpf/composites/layup_info/_add_layup_info_to_mesh.py index b41041711..dcc51504f 100644 --- a/src/ansys/dpf/composites/layup_info/_add_layup_info_to_mesh.py +++ b/src/ansys/dpf/composites/layup_info/_add_layup_info_to_mesh.py @@ -15,7 +15,7 @@ def _get_composite_data_sources_for_layup_provider( """ Extract the DataSources object depending on the server version. - Ensure that DataSources object is compatible with the version of the layup provider. + Ensure that the ``DataSources`` object is compatible with the version of the lay-up provider. """ if data_sources.composite is None: return None diff --git a/src/ansys/dpf/composites/layup_info/_layup_info.py b/src/ansys/dpf/composites/layup_info/_layup_info.py index 51eeced7d..8b985193e 100644 --- a/src/ansys/dpf/composites/layup_info/_layup_info.py +++ b/src/ansys/dpf/composites/layup_info/_layup_info.py @@ -66,7 +66,7 @@ def _get_layup_model_context(layup_provider: dpf.Operator) -> int: return cast(int, layup_provider.get_output(218, int)) -# Note: must be in sync with the LayupModelContextTypeEnum in the C++ code +# Note: Must be in sync with the ``LayupModelContextTypeEnum`` object in the C++ code. class LayupModelModelContextType(Enum): """Type of the lay-up information."""