Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/dependencies-e39987426b
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre authored Oct 16, 2024
2 parents 764ab51 + 04954a6 commit a00d243
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ jobs:
- uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
force-orphan: false
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

release:
name: "Release project"
Expand Down Expand Up @@ -272,5 +274,7 @@ jobs:
- uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
force-orphan: false
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
7 changes: 7 additions & 0 deletions examples/001_failure_operator_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
allows you to assess different type of materials and failure modes at once.
The scoping enables you to evaluate the minimum and maximum failures per element
or select a list of materials or plies.
.. note::
When using a Workbench project,
use the :func:`.get_composite_files_from_workbench_result_folder`
method to obtain the input files.
"""
# %%
# Set up analysis
Expand Down
6 changes: 6 additions & 0 deletions examples/002_sampling_point_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
This example uses the :class:`Composite Model <.CompositeModel>` to scope a
Sampling Point to a certain element and to visualize the laminate.
.. note::
When using a Workbench project,
use the :func:`.get_composite_files_from_workbench_result_folder`
method to obtain the input files.
"""

# %%
Expand Down
10 changes: 9 additions & 1 deletion examples/004_get_material_properties_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@
implement a custom failure criterion. The failure criterion is computed for
all layers and integration points. Finally, the elemental maximum is computed and shown.
Note: Only constant material properties are currently supported.
.. note::
Only constant material properties are currently supported.
.. note::
When using a Workbench project,
use the :func:`.get_composite_files_from_workbench_result_folder`
method to obtain the input files.
"""

# %%
Expand Down
7 changes: 7 additions & 0 deletions examples/005_get_layup_properties_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
To get the full layer information of an element, including results,
consider using the :class:`SamplingPoint <.SamplingPoint>` class.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""
# %%
# Set up analysis
Expand Down
7 changes: 7 additions & 0 deletions examples/006_filter_composite_data_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
The examples show filtering data by layer, spot, and node, as well as material
or analysis ply ID. To learn more about how layered result data is organized,
see :ref:`select_indices`.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""

# %%
Expand Down
6 changes: 6 additions & 0 deletions examples/007_interlaminar_normal_stress_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
:ref:`sphx_glr_examples_gallery_examples_006_filter_composite_data_example.py`
shows how helper functions can be used to obtain composite result data.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""

# %%
Expand Down
6 changes: 6 additions & 0 deletions examples/008_assembly_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
:class:`Composite Model <.CompositeModel>` class is used to access
the data of the different parts.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""
# %%
# Set up analysis
Expand Down
8 changes: 4 additions & 4 deletions examples/010_harmonic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
Postprocess a harmonic analysis
-------------------------------
This example shows how to evaluate failure criteria for a harmonic simulation.
It shows how to create a phase sweep to compute the maximum IRF in the frequency-phase
space and shows how to identify the critical failure mode and the critical layer.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
This example shows how to evaluate failure criteria for a harmonic simulation.
It shows how to create a phase sweep to compute the maximum IRF in the frequency-phase
space and shows how to identify the critical failure mode and the critical layer.
"""


Expand Down
7 changes: 7 additions & 0 deletions examples/011_rst_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
The postprocessing of MAPDL models is supported in 2024 R2 (DPF Server version 8.0)
and later. A few advanced features are not supported with the RST only workflow.
For more information, see :ref:`limitations`.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""
# %%
# Set up analysis
Expand Down
7 changes: 7 additions & 0 deletions examples/012_fatigue_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
of the user to verify that it works as expected. For more information, see the
`fatpack package <https://pypi.org/project/fatpack/>`_,
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""


Expand Down
3 changes: 1 addition & 2 deletions examples/013_thermal_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import numpy as np

from ansys.dpf.composites.composite_model import CompositeModel
from ansys.dpf.composites.constants import TEMPERATURE_COMPONENT
from ansys.dpf.composites.example_helper import get_continuous_fiber_example_files
from ansys.dpf.composites.layup_info import get_all_analysis_ply_names
from ansys.dpf.composites.ply_wise_data import SpotReductionStrategy, get_ply_wise_data
Expand Down Expand Up @@ -89,11 +88,11 @@
all_ply_names = get_all_analysis_ply_names(composite_model.get_mesh())
print(all_ply_names)

# The component of the temperature is 0 which is the default value.
nodal_values = get_ply_wise_data(
field=temperatures_fc,
ply_name="P1L1__ModelingPly.8",
mesh=composite_model.get_mesh(),
component=TEMPERATURE_COMPONENT,
spot_reduction_strategy=SpotReductionStrategy.MAX,
requested_location=dpf.locations.nodal,
)
Expand Down
7 changes: 7 additions & 0 deletions examples/014_cyclic_symmetry_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
a custom failure criterion.
The postprocessing of expanded sectors is not yet supported.
.. note::
When using a Workbench project,
use the :func:`.composite_files_from_workbench_harmonic_analysis`
method to obtain the input files.
"""

# %%
Expand Down
2 changes: 0 additions & 2 deletions src/ansys/dpf/composites/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
"REF_SURFACE_NAME",
"FAILURE_LABEL",
"TIME_LABEL",
"TEMPERATURE_COMPONENT",
)

FAILURE_LABEL = "failure_label"
TIME_LABEL = "time"
TEMPERATURE_COMPONENT = 0
REF_SURFACE_NAME = "Reference Surface"


Expand Down

0 comments on commit a00d243

Please sign in to comment.