Skip to content

Commit

Permalink
DOC: update development documentation d38293f
Browse files Browse the repository at this point in the history
  • Loading branch information
janvonrickenbach committed Nov 23, 2023
1 parent bebe6be commit be10e85
Show file tree
Hide file tree
Showing 68 changed files with 3,388 additions and 80 deletions.
2 changes: 1 addition & 1 deletion version/dev/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3cc5f170868c89c4d61b1e882bbd77eb
config: 1a9e6c671daea6e106d9e682fc2dbc1e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"outputs": [],
"source": [
"from ansys.dpf.composites.composite_model import CompositeModel\nfrom ansys.dpf.composites.constants import FailureOutput\nfrom ansys.dpf.composites.example_helper import get_continuous_fiber_example_files\nfrom ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion\nfrom ansys.dpf.composites.server_helpers import connect_to_or_start_server, version_older_than"
"from ansys.dpf.composites.composite_model import CompositeModel\nfrom ansys.dpf.composites.constants import FailureOutput\nfrom ansys.dpf.composites.example_helper import get_continuous_fiber_example_files\nfrom ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion\nfrom ansys.dpf.composites.server_helpers import (\n connect_to_or_start_server,\n version_equal_or_later,\n version_older_than,\n)"
]
},
{
Expand Down Expand Up @@ -94,7 +94,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot IRF\n========\n\nPlot the maximum IRF per element.\n"
"Plot IRF\n========\n\nPlot the maximum IRF per (solid) element.\n"
]
},
{
Expand All @@ -108,6 +108,24 @@
"output_all_elements = composite_model.evaluate_failure_criteria(combined_criterion=combined_fc)\nirf_field = output_all_elements.get_field({\"failure_label\": FailureOutput.FAILURE_VALUE})\nirf_field.plot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot IRF\n========\n\nPlot the maximum IRF on the reference surface\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"if version_equal_or_later(server, \"8.0\"):\n irf_field = output_all_elements.get_field(\n {\"failure_label\": FailureOutput.FAILURE_VALUE_REF_SURFACE}\n )\n irf_field.plot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
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, MaxStressCriterion
from ansys.dpf.composites.server_helpers import connect_to_or_start_server, version_older_than
from ansys.dpf.composites.server_helpers import (
connect_to_or_start_server,
version_equal_or_later,
version_older_than,
)

# %%
# Start a DPF server and copy the example files into the current working directory.
Expand All @@ -47,11 +51,22 @@
# %%
# Plot IRF
# ~~~~~~~~
# Plot the maximum IRF per element.
# Plot the maximum IRF per (solid) element.
output_all_elements = composite_model.evaluate_failure_criteria(combined_criterion=combined_fc)
irf_field = output_all_elements.get_field({"failure_label": FailureOutput.FAILURE_VALUE})
irf_field.plot()

# %%
# Plot IRF
# ~~~~~~~~
# Plot the maximum IRF on the reference surface
if version_equal_or_later(server, "8.0"):
irf_field = output_all_elements.get_field(
{"failure_label": FailureOutput.FAILURE_VALUE_REF_SURFACE}
)
irf_field.plot()


# %%
# Get element information
# ~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified version/dev/_images/sphx_glr_003_short_fiber_example_001.vtksz
Binary file not shown.
Binary file modified version/dev/_images/sphx_glr_003_short_fiber_example_002.vtksz
Binary file not shown.
Binary file modified version/dev/_images/sphx_glr_003_short_fiber_example_003.vtksz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified version/dev/_images/sphx_glr_008_assembly_example_001.vtksz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified version/dev/_images/sphx_glr_010_harmonic_example_001.vtksz
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FAILURE\_MODE\_REF\_SURFACE
===========================

.. currentmodule:: ansys.dpf.composites.constants

.. autoattribute:: FailureOutput.FAILURE_MODE_REF_SURFACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FAILURE\_VALUE\_REF\_SURFACE
============================

.. currentmodule:: ansys.dpf.composites.constants

.. autoattribute:: FailureOutput.FAILURE_VALUE_REF_SURFACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MAX\_GLOBAL\_LAYER\_IN\_STACK
=============================

.. currentmodule:: ansys.dpf.composites.constants

.. autoattribute:: FailureOutput.MAX_GLOBAL_LAYER_IN_STACK
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MAX\_LOCAL\_LAYER\_IN\_ELEMENT
==============================

.. currentmodule:: ansys.dpf.composites.constants

.. autoattribute:: FailureOutput.MAX_LOCAL_LAYER_IN_ELEMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MAX\_SOLID\_ELEMENT\_ID
=======================

.. currentmodule:: ansys.dpf.composites.constants

.. autoattribute:: FailureOutput.MAX_SOLID_ELEMENT_ID
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ FailureOutput
FailureOutput.FAILURE_MODE
FailureOutput.FAILURE_VALUE
FailureOutput.MAX_LAYER_INDEX
FailureOutput.FAILURE_MODE_REF_SURFACE
FailureOutput.FAILURE_VALUE_REF_SURFACE
FailureOutput.MAX_GLOBAL_LAYER_IN_STACK
FailureOutput.MAX_LOCAL_LAYER_IN_ELEMENT
FailureOutput.MAX_SOLID_ELEMENT_ID



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Scope failure evaluation by plies.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 25.101 seconds)
**Total running time of the script:** ( 0 minutes 31.631 seconds)


.. _sphx_glr_download_examples_gallery_examples_001_failure_operator_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ You can change the element ID of the sampling point to generate another plot.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 13.502 seconds)
**Total running time of the script:** ( 0 minutes 15.956 seconds)


.. _sphx_glr_download_examples_gallery_examples_002_sampling_point_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Compute and plot the maximum failure value per element.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 5.718 seconds)
**Total running time of the script:** ( 0 minutes 4.970 seconds)


.. _sphx_glr_download_examples_gallery_examples_003_short_fiber_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Implement a custom failure criterion: basic max strain

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 7.745 seconds)
**Total running time of the script:** ( 0 minutes 8.661 seconds)


.. _sphx_glr_download_examples_gallery_examples_004_get_material_properties_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Plot basic layer properties (layer thicknesses, angles, and analysis ply names).

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 2.382 seconds)
**Total running time of the script:** ( 0 minutes 4.226 seconds)


.. _sphx_glr_download_examples_gallery_examples_005_get_layup_properties_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ ID from an analysis ply.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 3.629 seconds)
**Total running time of the script:** ( 0 minutes 5.485 seconds)


.. _sphx_glr_download_examples_gallery_examples_006_filter_composite_data_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Plot s3 at the mid-plane of a certain ply.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 9.495 seconds)
**Total running time of the script:** ( 0 minutes 12.073 seconds)


.. _sphx_glr_download_examples_gallery_examples_007_interlaminar_normal_stress_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DPF server, and retrieving the example files.

Load Ansys libraries.

.. GENERATED FROM PYTHON SOURCE LINES 20-27
.. GENERATED FROM PYTHON SOURCE LINES 20-31
.. code-block:: default
Expand All @@ -46,7 +46,11 @@ Load Ansys libraries.
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, MaxStressCriterion
from ansys.dpf.composites.server_helpers import connect_to_or_start_server, version_older_than
from ansys.dpf.composites.server_helpers import (
connect_to_or_start_server,
version_equal_or_later,
version_older_than,
)
Expand All @@ -55,11 +59,11 @@ Load Ansys libraries.
.. GENERATED FROM PYTHON SOURCE LINES 28-29
.. GENERATED FROM PYTHON SOURCE LINES 32-33
Start a DPF server and copy the example files into the current working directory.

.. GENERATED FROM PYTHON SOURCE LINES 29-32
.. GENERATED FROM PYTHON SOURCE LINES 33-36
.. code-block:: default
Expand All @@ -73,13 +77,13 @@ Start a DPF server and copy the example files into the current working directory
.. GENERATED FROM PYTHON SOURCE LINES 33-36
.. GENERATED FROM PYTHON SOURCE LINES 37-40
Configure combined failure criterion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Configure the combined failure crition.

.. GENERATED FROM PYTHON SOURCE LINES 36-41
.. GENERATED FROM PYTHON SOURCE LINES 40-45
.. code-block:: default
Expand All @@ -95,13 +99,13 @@ Configure the combined failure crition.
.. GENERATED FROM PYTHON SOURCE LINES 42-45
.. GENERATED FROM PYTHON SOURCE LINES 46-49
Set up model
~~~~~~~~~~~~
Set up the composite model.

.. GENERATED FROM PYTHON SOURCE LINES 45-47
.. GENERATED FROM PYTHON SOURCE LINES 49-51
.. code-block:: default
Expand All @@ -114,13 +118,13 @@ Set up the composite model.
.. GENERATED FROM PYTHON SOURCE LINES 48-51
.. GENERATED FROM PYTHON SOURCE LINES 52-55
Plot IRF
~~~~~~~~
Plot the maximum IRF per element.
Plot the maximum IRF per (solid) element.

.. GENERATED FROM PYTHON SOURCE LINES 51-55
.. GENERATED FROM PYTHON SOURCE LINES 55-59
.. code-block:: default
Expand All @@ -138,7 +142,34 @@ Plot the maximum IRF per element.



.. GENERATED FROM PYTHON SOURCE LINES 56-63
.. GENERATED FROM PYTHON SOURCE LINES 60-63
Plot IRF
~~~~~~~~
Plot the maximum IRF on the reference surface

.. GENERATED FROM PYTHON SOURCE LINES 63-70
.. code-block:: default
if version_equal_or_later(server, "8.0"):
irf_field = output_all_elements.get_field(
{"failure_label": FailureOutput.FAILURE_VALUE_REF_SURFACE}
)
irf_field.plot()
.. offlineviewer:: examples/gallery_examples/images/sphx_glr_008_assembly_example_002.vtksz






.. GENERATED FROM PYTHON SOURCE LINES 71-78
Get element information
~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -148,7 +179,7 @@ the layup properties must be queried with the correct composite definition label
following gets element information for all layered elements.
For DPF Server versions 7.0 and later, element information can be retrieved directly.

.. GENERATED FROM PYTHON SOURCE LINES 63-78
.. GENERATED FROM PYTHON SOURCE LINES 78-93
.. code-block:: default
Expand Down Expand Up @@ -177,7 +208,7 @@ For DPF Server versions 7.0 and later, element information can be retrieved dire
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 8.314 seconds)
**Total running time of the script:** ( 0 minutes 11.258 seconds)


.. _sphx_glr_download_examples_gallery_examples_008_assembly_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Plot some components of the fiber orientation tensor.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 6.120 seconds)
**Total running time of the script:** ( 0 minutes 6.038 seconds)


.. _sphx_glr_download_examples_gallery_examples_009_short_fiber_orientation_tensor.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ at each frequency, because we look only at the element that has the highest IRF
.. code-block:: none
[<matplotlib.lines.Line2D object at 0x7ff345536df0>]
[<matplotlib.lines.Line2D object at 0x7f4fc8efc640>]
Expand Down Expand Up @@ -486,7 +486,7 @@ Compute critical layer and critical failure mode.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 21.426 seconds)
**Total running time of the script:** ( 0 minutes 25.806 seconds)


.. _sphx_glr_download_examples_gallery_examples_010_harmonic_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Plot the maximum and minimum values.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 12.963 seconds)
**Total running time of the script:** ( 0 minutes 14.416 seconds)


.. _sphx_glr_download_examples_gallery_examples_011_dpf_composite_failure_workflow.py:
Expand Down
Loading

0 comments on commit be10e85

Please sign in to comment.