Skip to content

Commit

Permalink
Merge branch 'feat/section_data_from_rst' of https://github.com/ansys…
Browse files Browse the repository at this point in the history
…/pydpf-composites into feat/section_data_from_rst

# Conflicts:
#	examples/011_rst_workflow.py
  • Loading branch information
roosre committed Nov 28, 2023
2 parents 1a7c033 + 1b5aa94 commit 498fee8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 29 deletions.
10 changes: 5 additions & 5 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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 <sphx_glr_examples_gallery_examples_001_failure_operator_example.py>`.
* A :class:`.SamplingPoint` class for extracting and visualizing a result over the entire thickness of a laminate as shown in
:ref:`Sampling point <sphx_glr_examples_gallery_examples_002_sampling_point_example.py>`.
Expand All @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/008_assembly_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
37 changes: 20 additions & 17 deletions examples/011_rst_workflow.py
Original file line number Diff line number Diff line change
@@ -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,<material index>,<value>``.
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,<material index>,<value>`` 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
Expand All @@ -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

Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/composites/_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/dpf/composites/data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ 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
support for distributed RST is added.
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/composites/layup_info/_layup_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down

0 comments on commit 498fee8

Please sign in to comment.