From 0fcf8779626b27043204dc98811ad064125b8b45 Mon Sep 17 00:00:00 2001 From: Dominik Gresch Date: Wed, 8 Jan 2025 13:26:37 +0100 Subject: [PATCH 1/2] Update spelling of PyDPF - Composites --- doc/styles/config/vocabularies/ANSYS/accept.txt | 1 + examples/pymechanical_with_shim/embedded_workflow.py | 4 ++-- examples/use_cases/01-optimizing-ply-angles.py | 2 +- examples/workflows/01-pymapdl-workflow.py | 10 +++++----- examples/workflows/02-advanced-pymapdl-workflow.py | 12 ++++++------ examples/workflows/03-pymechanical-shell-workflow.py | 6 +++--- examples/workflows/04-pymechanical-solid-workflow.py | 6 +++--- .../workflows/05-pymechanical-to-cdb-workflow.py | 6 +++--- .../workflows/06-cdb-to-pymechanical-workflow.py | 6 +++--- src/ansys/acp/core/dpf_integration_helpers.py | 2 +- 10 files changed, 28 insertions(+), 27 deletions(-) diff --git a/doc/styles/config/vocabularies/ANSYS/accept.txt b/doc/styles/config/vocabularies/ANSYS/accept.txt index 291d7aeeed..04e995b2cc 100644 --- a/doc/styles/config/vocabularies/ANSYS/accept.txt +++ b/doc/styles/config/vocabularies/ANSYS/accept.txt @@ -11,3 +11,4 @@ API untrusted DPF 2025R1 +PyDPF - Composites diff --git a/examples/pymechanical_with_shim/embedded_workflow.py b/examples/pymechanical_with_shim/embedded_workflow.py index 8436b36bb8..a64f05f028 100644 --- a/examples/pymechanical_with_shim/embedded_workflow.py +++ b/examples/pymechanical_with_shim/embedded_workflow.py @@ -40,10 +40,10 @@ * Export composite definitions and material data from PyACP * Import lay-up and material in PyMechanical (imported plies) * Define boundary condition in PyMechanical - * Postprocess results with PyDPF Composites (using the materials file and the RST + * Postprocess results with PyDPF - Composites (using the materials file and the RST file generated by PyMechanical) - The workflow currently uses a Docker container for PyACP and PyDPF Composites. For PyMechanical, + The workflow currently uses a Docker container for PyACP and PyDPF - Composites. For PyMechanical, the local installer is used. There is no known issue preventing you from using the PyMechanical container. This was just not yet implemented due to time restrictions. """ diff --git a/examples/use_cases/01-optimizing-ply-angles.py b/examples/use_cases/01-optimizing-ply-angles.py index 061e7955ba..1a7b4bfd0a 100644 --- a/examples/use_cases/01-optimizing-ply-angles.py +++ b/examples/use_cases/01-optimizing-ply-angles.py @@ -233,7 +233,7 @@ def solve_cdb(*, mapdl, cdb_file, workdir): rst_file = solve_cdb(mapdl=mapdl, cdb_file=cdb_file_path, workdir=workdir) # %% -# The ``get_max_irf()`` function uses PyDPF Composites to calculate the maximum +# The ``get_max_irf()`` function uses PyDPF - Composites to calculate the maximum # inverse reserve factor (IRF) for a given RST, composite definitions, # or materials file. # diff --git a/examples/workflows/01-pymapdl-workflow.py b/examples/workflows/01-pymapdl-workflow.py index e6c4b2110f..747d5dd6d7 100644 --- a/examples/workflows/01-pymapdl-workflow.py +++ b/examples/workflows/01-pymapdl-workflow.py @@ -27,7 +27,7 @@ ================ This example shows how to define a composite lay-up with PyACP, solve the resulting model with PyMAPDL, and -run a failure analysis with PyDPF Composites. +run a failure analysis with PyDPF - Composites. """ # %% @@ -38,8 +38,8 @@ # boundary conditions. For more information on creating input files, see :ref:`input_file_for_pyacp`. # Then, you import the DAT file into PyACP to define the composite lay-up. Finally, you export the # resulting model from PyACP to PyMAPDL. Once the results are available, the RST file is loaded in -# PyDPF Composites for analysis. The additional input files (``material.xml`` and -# ``ACPCompositeDefinitions.h5``) can also be stored with PyACP and passed to PyDPF Composites. +# PyDPF - Composites for analysis. The additional input files (``material.xml`` and +# ``ACPCompositeDefinitions.h5``) can also be stored with PyACP and passed to PyDPF - Composites. # %% # Import modules @@ -216,11 +216,11 @@ mapdl.download(rstfile_name, str(WORKING_DIR)) # %% -# Postprocessing with PyDPF Composites +# Postprocessing with PyDPF - Composites # ------------------------------------ # # To postprocess the results, you must configure the imports, connect to the -# PyDPF Composites server, and load its plugin. +# PyDPF - Composites server, and load its plugin. from ansys.dpf.composites.composite_model import CompositeModel from ansys.dpf.composites.constants import FailureOutput diff --git a/examples/workflows/02-advanced-pymapdl-workflow.py b/examples/workflows/02-advanced-pymapdl-workflow.py index 036d381e26..ab294805c6 100644 --- a/examples/workflows/02-advanced-pymapdl-workflow.py +++ b/examples/workflows/02-advanced-pymapdl-workflow.py @@ -27,13 +27,13 @@ ========================= This example shows how to define a composite lay-up with PyACP, solve the resulting -model with PyMAPDL, and run a failure analysis with PyDPF Composites. +model with PyMAPDL, and run a failure analysis with PyDPF - Composites. Begin with an MAPDL CDB file that contains the mesh, material data, and boundary conditions. Import the file to PyACP to define the lay-up, and then export the resulting model to PyMAPDL. Once the results are available, the RST file is loaded in -PyDPF Composites for postprocessing. The additional input files (``material.xml`` -and ``ACPCompositeDefinitions.h5``) can also be stored with PyACP and passed to PyDPF Composites. +PyDPF - Composites for postprocessing. The additional input files (``material.xml`` +and ``ACPCompositeDefinitions.h5``) can also be stored with PyACP and passed to PyDPF - Composites. """ @@ -292,7 +292,7 @@ def add_ply(mg, name, ply_material, angle, oss): # %% # Save the model as a CDB file for solving with PyMAPDL. model.export_analysis_model(working_dir_path / cdb_filename_out) -# Export the shell lay-up and material file for PyDPF Composites. +# Export the shell lay-up and material file for PyDPF - Composites. model.export_shell_composite_definitions(working_dir_path / composite_definition_h5_filename) model.export_materials(working_dir_path / matml_filename) @@ -329,11 +329,11 @@ def add_ply(mg, name, ply_material, angle, oss): mapdl.download(rstfile_name, working_dir_path) # %% -# Postprocessing with PyDPF Composites +# Postprocessing with PyDPF - Composites # ------------------------------------ # # To postprocess the results, you must configure the imports, connect to the -# PyDPF Composites server, and load its plugin. +# PyDPF - Composites server, and load its plugin. from ansys.dpf.composites.composite_model import CompositeModel from ansys.dpf.composites.constants import FailureOutput diff --git a/examples/workflows/03-pymechanical-shell-workflow.py b/examples/workflows/03-pymechanical-shell-workflow.py index c7ed83b33c..c02c2721e0 100644 --- a/examples/workflows/03-pymechanical-shell-workflow.py +++ b/examples/workflows/03-pymechanical-shell-workflow.py @@ -37,7 +37,7 @@ - Plies and materials are exported from ACP, and imported into Mechanical. - Boundary conditions are set in Mechanical. - The model is solved. -- The results are post-processed in PyDPF Composites. +- The results are post-processed in PyDPF - Composites. .. warning:: @@ -60,7 +60,7 @@ import textwrap # %% -# Import PyACP, PyMechanical, and PyDPF Composites. +# Import PyACP, PyMechanical, and PyDPF - Composites. # isort: off import ansys.acp.core as pyacp @@ -278,7 +278,7 @@ # Postprocess results # ------------------- # -# Evaluate the failure criteria using the PyDPF Composites. +# Evaluate the failure criteria using the PyDPF - Composites. max_strain = pydpf_composites.failure_criteria.MaxStrainCriterion() diff --git a/examples/workflows/04-pymechanical-solid-workflow.py b/examples/workflows/04-pymechanical-solid-workflow.py index 002f9fea76..41ad88f11c 100644 --- a/examples/workflows/04-pymechanical-solid-workflow.py +++ b/examples/workflows/04-pymechanical-solid-workflow.py @@ -39,7 +39,7 @@ - Materials and plies are imported. - Boundary conditions are set. - The model is solved. -- The results are post-processed in PyDPF Composites. +- The results are post-processed in PyDPF - Composites. .. warning:: @@ -62,7 +62,7 @@ import textwrap # %% -# Import PyACP, PyMechanical, and PyDPF Composites. +# Import PyACP, PyMechanical, and PyDPF - Composites. # isort: off @@ -335,7 +335,7 @@ # Postprocess results # ------------------- # -# Evaluate the failure criteria using the PyDPF Composites. +# Evaluate the failure criteria using the PyDPF - Composites. max_strain = pydpf_composites.failure_criteria.MaxStrainCriterion() cfc = pydpf_composites.failure_criteria.CombinedFailureCriterion( diff --git a/examples/workflows/05-pymechanical-to-cdb-workflow.py b/examples/workflows/05-pymechanical-to-cdb-workflow.py index bb9b9147a9..53c3f7ccca 100644 --- a/examples/workflows/05-pymechanical-to-cdb-workflow.py +++ b/examples/workflows/05-pymechanical-to-cdb-workflow.py @@ -30,7 +30,7 @@ This example shows how to set up a workflow that uses PyMechanical to mesh the geometry and define the load case, PyACP to define a layup, PyMAPDL to solve the -model, and PyDPF Composites to post-process the results. +model, and PyDPF - Composites to post-process the results. This workflow does *not* suffer from the limitations of the PyACP to PyMechanical integration. @@ -52,7 +52,7 @@ import textwrap # %% -# Import PyACP, PyMechanical, and PyDPF Composites. +# Import PyACP, PyMechanical, and PyDPF - Composites. # isort: off import ansys.acp.core as pyacp @@ -272,7 +272,7 @@ mapdl.download(rstfile_name, working_dir_path) # %% -# Postprocessing with PyDPF Composites +# Postprocessing with PyDPF - Composites # ------------------------------------ # # Specify the combined failure criterion. diff --git a/examples/workflows/06-cdb-to-pymechanical-workflow.py b/examples/workflows/06-cdb-to-pymechanical-workflow.py index 1ee317910c..e2ec832921 100644 --- a/examples/workflows/06-cdb-to-pymechanical-workflow.py +++ b/examples/workflows/06-cdb-to-pymechanical-workflow.py @@ -30,7 +30,7 @@ This example shows how to define a composite lay-up in PyACP based on a mesh from a CDB file, import the model into PyMechanical for defining the load and -boundary conditions, and run a failure analysis with PyDPF Composites. +boundary conditions, and run a failure analysis with PyDPF - Composites. .. warning:: @@ -54,7 +54,7 @@ import textwrap # %% -# Import PyACP, PyMechanical, and PyDPF Composites. +# Import PyACP, PyMechanical, and PyDPF - Composites. # isort: off import ansys.acp.core as pyacp @@ -281,7 +281,7 @@ # Postprocess results # ------------------- # -# Evaluate the failure criteria using the PyDPF Composites. +# Evaluate the failure criteria using the PyDPF - Composites. max_strain = pydpf_composites.failure_criteria.MaxStrainCriterion() diff --git a/src/ansys/acp/core/dpf_integration_helpers.py b/src/ansys/acp/core/dpf_integration_helpers.py index 5472b7bd72..edc6e9ef90 100644 --- a/src/ansys/acp/core/dpf_integration_helpers.py +++ b/src/ansys/acp/core/dpf_integration_helpers.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""Helper functions for exchanging data between PyACP and PyDPF or PyDPF Composites.""" +"""Helper functions for exchanging data between PyACP and PyDPF or PyDPF - Composites.""" import typing From 2039710281f1c6739168af92fcf9466d837eff89 Mon Sep 17 00:00:00 2001 From: Dominik Gresch Date: Wed, 8 Jan 2025 13:29:34 +0100 Subject: [PATCH 2/2] Fix title underlines --- examples/workflows/01-pymapdl-workflow.py | 2 +- examples/workflows/02-advanced-pymapdl-workflow.py | 2 +- examples/workflows/05-pymechanical-to-cdb-workflow.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/workflows/01-pymapdl-workflow.py b/examples/workflows/01-pymapdl-workflow.py index 747d5dd6d7..9fb5d8e028 100644 --- a/examples/workflows/01-pymapdl-workflow.py +++ b/examples/workflows/01-pymapdl-workflow.py @@ -217,7 +217,7 @@ # %% # Postprocessing with PyDPF - Composites -# ------------------------------------ +# -------------------------------------- # # To postprocess the results, you must configure the imports, connect to the # PyDPF - Composites server, and load its plugin. diff --git a/examples/workflows/02-advanced-pymapdl-workflow.py b/examples/workflows/02-advanced-pymapdl-workflow.py index ab294805c6..507c08fbce 100644 --- a/examples/workflows/02-advanced-pymapdl-workflow.py +++ b/examples/workflows/02-advanced-pymapdl-workflow.py @@ -330,7 +330,7 @@ def add_ply(mg, name, ply_material, angle, oss): # %% # Postprocessing with PyDPF - Composites -# ------------------------------------ +# -------------------------------------- # # To postprocess the results, you must configure the imports, connect to the # PyDPF - Composites server, and load its plugin. diff --git a/examples/workflows/05-pymechanical-to-cdb-workflow.py b/examples/workflows/05-pymechanical-to-cdb-workflow.py index 53c3f7ccca..830926cc44 100644 --- a/examples/workflows/05-pymechanical-to-cdb-workflow.py +++ b/examples/workflows/05-pymechanical-to-cdb-workflow.py @@ -273,7 +273,7 @@ # %% # Postprocessing with PyDPF - Composites -# ------------------------------------ +# -------------------------------------- # # Specify the combined failure criterion. max_strain = pydpf_composites.failure_criteria.MaxStrainCriterion()