Skip to content

Commit

Permalink
DOC: update development documentation 0b0eeba
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Sep 18, 2024
1 parent 08248a6 commit e112684
Show file tree
Hide file tree
Showing 87 changed files with 230 additions and 225 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
Thermal analysis
----------------
PyDPF Composites can also be used to post-process thermal analyses.
In this case, the simulation is a two-step analysis where the results of
a thermal analysis are an input of the structural analysis. So, the RST
contains temperature and structural results.
The example mimics a PCB which was modeled with Ansys Composites PrePost (ACP).
where the solid model feature of ACP is used to generate the volume mesh.
This example shows how to evaluate a thermal analysis.
The simulation's thermal analysis results are also
the input of a structural analysis.
Therefore, the RST file contains temperature and structural results.
In detail, the example shows how to extract the temperatures for a specific ply,
and a specific material.
The example imitates a printed circuit board (PCB) that was
modeled with Ansys Composites PrepPost (ACP), using the solid model feature to
generate the volume mesh.
Descriptions of how to extract temperatures for a specific ply
and material are provided.
.. note::
Expand Down Expand Up @@ -67,22 +69,22 @@
# %%
# Initialize the model
# ~~~~~~~~~~~~~~~~~~~~
# The composite model is initialized with the composite files and the server.
# It provides access to the mesh, results, lay-up and materials
# Initialize the composite model with the composite files and server.
# The model provides access to the mesh, results, lay-up, and materials.
composite_model = CompositeModel(composite_files, server)

# %%
# Get Results - Temperatures
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
# The temperatures are stored under structural_temperature
# Get temperature results
# ~~~~~~~~~~~~~~~~~~~~~~~
# The temperatures are stored under ``structural_temperature``.
temp_op = composite_model.core_model.results.structural_temperature()
temperatures_fc = temp_op.outputs.fields_container()

# %%
# Ply-wise results
# ~~~~~~~~~~~~~~~~
# Ply-wise results can be easily extracted using the function
# :func:`.get_ply_wise_data` and by passing the ply name.
# Get ply results
# ~~~~~~~~~~~~~~~
# Extract the ply-wise results by passing the ply name
# to the function :func:`.get_ply_wise_data`.

all_ply_names = get_all_analysis_ply_names(composite_model.get_mesh())
print(all_ply_names)
Expand All @@ -99,10 +101,10 @@
composite_model.get_mesh().plot(nodal_values)

# %%
# Material-wise results
# ~~~~~~~~~~~~~~~~~~~~~
# It is also possible to filter the results by material.
# In this example the element-wise maximum temperature
# Get material results
# ~~~~~~~~~~~~~~~~~~~~
# You can filter the results by material.
# In this example, the element-wise maximum temperature
# is extracted for the material `Honeycomb Aluminum Alloy`.
print(composite_model.material_names)
material_id = composite_model.material_names["Honeycomb Aluminum Alloy"]
Expand Down
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Thermal analysis {#thermal_example}\n================\n\nPyDPF Composites can also be used to post-process thermal analyses. In\nthis case, the simulation is a two-step analysis where the results of a\nthermal analysis are an input of the structural analysis. So, the RST\ncontains temperature and structural results. The example mimics a PCB\nwhich was modeled with Ansys Composites PrePost (ACP). where the solid\nmodel feature of ACP is used to generate the volume mesh.\n\nIn detail, the example shows how to extract the temperatures for a\nspecific ply, and a specific material.\n\n::: {.note}\n::: {.title}\nNote\n:::\n\nWhen using a Workbench project, use the\n`.get_composite_files_from_workbench_result_folder`{.interpreted-text\nrole=\"func\"} method to obtain the input files.\n:::\n"
"Thermal analysis {#thermal_example}\n================\n\nThis example shows how to evaluate a thermal analysis. The simulation\\'s\nthermal analysis results are also the input of a structural analysis.\nTherefore, the RST file contains temperature and structural results.\n\nThe example imitates a printed circuit board (PCB) that was modeled with\nAnsys Composites PrepPost (ACP), using the solid model feature to\ngenerate the volume mesh.\n\nDescriptions of how to extract temperatures for a specific ply and\nmaterial are provided.\n\n::: {.note}\n::: {.title}\nNote\n:::\n\nWhen using a Workbench project, use the\n`.get_composite_files_from_workbench_result_folder`{.interpreted-text\nrole=\"func\"} method to obtain the input files.\n:::\n"
]
},
{
Expand All @@ -29,7 +29,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Initialize the model\n====================\n\nThe composite model is initialized with the composite files and the\nserver. It provides access to the mesh, results, lay-up and materials\n"
"Initialize the model\n====================\n\nInitialize the composite model with the composite files and server. The\nmodel provides access to the mesh, results, lay-up, and materials.\n"
]
},
{
Expand All @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Get Results - Temperatures\n==========================\n\nThe temperatures are stored under structural\\_temperature\n"
"Get temperature results\n=======================\n\nThe temperatures are stored under `structural_temperature`.\n"
]
},
{
Expand All @@ -65,7 +65,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Ply-wise results\n================\n\nPly-wise results can be easily extracted using the function\n`.get_ply_wise_data`{.interpreted-text role=\"func\"} and by passing the\nply name.\n"
"Get ply results\n===============\n\nExtract the ply-wise results by passing the ply name to the function\n`.get_ply_wise_data`{.interpreted-text role=\"func\"}.\n"
]
},
{
Expand All @@ -83,7 +83,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Material-wise results\n=====================\n\nIt is also possible to filter the results by material. In this example\nthe element-wise maximum temperature is extracted for the material\n[Honeycomb Aluminum Alloy]{.title-ref}.\n"
"Get material results\n====================\n\nYou can filter the results by material. In this example, the\nelement-wise maximum temperature is extracted for the material\n[Honeycomb Aluminum Alloy]{.title-ref}.\n"
]
},
{
Expand Down
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 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 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 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 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_012_fatigue_example_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified version/dev/_images/sphx_glr_012_fatigue_example_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified version/dev/_images/sphx_glr_012_fatigue_example_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Scope failure evaluation by plies.

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

**Total running time of the script:** (0 minutes 23.448 seconds)
**Total running time of the script:** (0 minutes 18.148 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 8.244 seconds)
**Total running time of the script:** (0 minutes 5.130 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 @@ -306,7 +306,7 @@ Compute and plot the maximum failure value per element.

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

**Total running time of the script:** (0 minutes 3.440 seconds)
**Total running time of the script:** (0 minutes 3.286 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 @@ -205,7 +205,7 @@ Implement a custom failure criterion: basic max strain

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

**Total running time of the script:** (0 minutes 5.122 seconds)
**Total running time of the script:** (0 minutes 3.158 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 1.986 seconds)
**Total running time of the script:** (0 minutes 1.377 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 @@ -517,7 +517,7 @@ in the material direction in this ply.

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

**Total running time of the script:** (0 minutes 4.552 seconds)
**Total running time of the script:** (0 minutes 4.626 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 @@ -307,7 +307,7 @@ Plot s3 at the mid-plane of a certain ply.

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

**Total running time of the script:** (0 minutes 7.800 seconds)
**Total running time of the script:** (0 minutes 7.423 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 @@ -256,7 +256,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 6.826 seconds)
**Total running time of the script:** (0 minutes 5.290 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 @@ -432,7 +432,7 @@ Plot some components of the fiber orientation tensor.

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

**Total running time of the script:** (0 minutes 6.133 seconds)
**Total running time of the script:** (0 minutes 5.968 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 @@ -434,7 +434,7 @@ at each frequency, because we look only at the element that has the highest IRF
.. code-block:: none
[<matplotlib.lines.Line2D object at 0x7f66643d69c0>]
[<matplotlib.lines.Line2D object at 0x7f4f0494ac60>]
Expand Down Expand Up @@ -509,7 +509,7 @@ Compute critical layer and critical failure mode.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 14.760 seconds)
**Total running time of the script:** (0 minutes 10.780 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 @@ -113,7 +113,7 @@ Get input files (RST and material.engd but skip the ACP layup file).

.. code-block:: none
ContinuousFiberCompositesFiles(rst=['/tmp/dataProcessingTemp140457493391104/5536aea4-b419-4b42-81f6-fdb1ba6ec229/shell.rst'], composite={}, engineering_data='/tmp/dataProcessingTemp140457493391104/83eec56c-9794-45b5-bd1c-4d05672cb6c7/material.engd', files_are_local=False)
ContinuousFiberCompositesFiles(rst=['/tmp/dataProcessingTemp140272793016064/1506e84f-261e-4d9e-83f2-3dda7ab8f18d/shell.rst'], composite={}, engineering_data='/tmp/dataProcessingTemp140272793016064/a362a1ae-c638-4002-b6a6-a1a79a02af4c/material.engd', files_are_local=False)
Expand Down Expand Up @@ -265,7 +265,7 @@ With ACP Standalone (for constant material properties only):

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

**Total running time of the script:** (0 minutes 8.953 seconds)
**Total running time of the script:** (0 minutes 6.579 seconds)


.. _sphx_glr_download_examples_gallery_examples_011_rst_workflow.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ No mean stress correction is applied.
.. code-block:: none
[<matplotlib.lines.Line2D object at 0x7f6671d36360>]
[<matplotlib.lines.Line2D object at 0x7f4f1109e450>]
Expand Down Expand Up @@ -378,15 +378,15 @@ Identify the element with the maximum damage
.. code-block:: none
The element with highest damage is 27.
The highest damage value is 2.69992868184419e-08.
The highest damage value is 3.109846219983665e-06.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 3.429 seconds)
**Total running time of the script:** (0 minutes 3.706 seconds)


.. _sphx_glr_download_examples_gallery_examples_012_fatigue_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,33 @@
Thermal analysis
----------------

PyDPF Composites can also be used to post-process thermal analyses.
In this case, the simulation is a two-step analysis where the results of
a thermal analysis are an input of the structural analysis. So, the RST
contains temperature and structural results.
The example mimics a PCB which was modeled with Ansys Composites PrePost (ACP).
where the solid model feature of ACP is used to generate the volume mesh.
This example shows how to evaluate a thermal analysis.
The simulation's thermal analysis results are also
the input of a structural analysis.
Therefore, the RST file contains temperature and structural results.

In detail, the example shows how to extract the temperatures for a specific ply,
and a specific material.
The example imitates a printed circuit board (PCB) that was
modeled with Ansys Composites PrepPost (ACP), using the solid model feature to
generate the volume mesh.

Descriptions of how to extract temperatures for a specific ply
and material are provided.

.. note::

When using a Workbench project,
use the :func:`.get_composite_files_from_workbench_result_folder`
method to obtain the input files.

.. GENERATED FROM PYTHON SOURCE LINES 48-53
.. GENERATED FROM PYTHON SOURCE LINES 50-55
Set up analysis
~~~~~~~~~~~~~~~
Setting up the analysis consists of loading the required modules, connecting to the
DPF server, and retrieving the example files.


.. GENERATED FROM PYTHON SOURCE LINES 53-67
.. GENERATED FROM PYTHON SOURCE LINES 55-69
.. code-block:: Python
Expand All @@ -72,14 +74,14 @@ DPF server, and retrieving the example files.
.. GENERATED FROM PYTHON SOURCE LINES 68-72
.. GENERATED FROM PYTHON SOURCE LINES 70-74
Initialize the model
~~~~~~~~~~~~~~~~~~~~
The composite model is initialized with the composite files and the server.
It provides access to the mesh, results, lay-up and materials
Initialize the composite model with the composite files and server.
The model provides access to the mesh, results, lay-up, and materials.

.. GENERATED FROM PYTHON SOURCE LINES 72-74
.. GENERATED FROM PYTHON SOURCE LINES 74-76
.. code-block:: Python
Expand All @@ -92,13 +94,13 @@ It provides access to the mesh, results, lay-up and materials
.. GENERATED FROM PYTHON SOURCE LINES 75-78
.. GENERATED FROM PYTHON SOURCE LINES 77-80
Get Results - Temperatures
~~~~~~~~~~~~~~~~~~~~~~~~~~
The temperatures are stored under structural_temperature
Get temperature results
~~~~~~~~~~~~~~~~~~~~~~~
The temperatures are stored under ``structural_temperature``.

.. GENERATED FROM PYTHON SOURCE LINES 78-81
.. GENERATED FROM PYTHON SOURCE LINES 80-83
.. code-block:: Python
Expand All @@ -112,14 +114,14 @@ The temperatures are stored under structural_temperature
.. GENERATED FROM PYTHON SOURCE LINES 82-86
.. GENERATED FROM PYTHON SOURCE LINES 84-88
Ply-wise results
~~~~~~~~~~~~~~~~
Ply-wise results can be easily extracted using the function
:func:`.get_ply_wise_data` and by passing the ply name.
Get ply results
~~~~~~~~~~~~~~~
Extract the ply-wise results by passing the ply name
to the function :func:`.get_ply_wise_data`.

.. GENERATED FROM PYTHON SOURCE LINES 86-101
.. GENERATED FROM PYTHON SOURCE LINES 88-103
.. code-block:: Python
Expand Down Expand Up @@ -178,15 +180,15 @@ Ply-wise results can be easily extracted using the function
.. GENERATED FROM PYTHON SOURCE LINES 102-107
.. GENERATED FROM PYTHON SOURCE LINES 104-109
Material-wise results
~~~~~~~~~~~~~~~~~~~~~
It is also possible to filter the results by material.
In this example the element-wise maximum temperature
Get material results
~~~~~~~~~~~~~~~~~~~~
You can filter the results by material.
In this example, the element-wise maximum temperature
is extracted for the material `Honeycomb Aluminum Alloy`.

.. GENERATED FROM PYTHON SOURCE LINES 107-129
.. GENERATED FROM PYTHON SOURCE LINES 109-131
.. code-block:: Python
Expand Down Expand Up @@ -255,7 +257,7 @@ is extracted for the material `Honeycomb Aluminum Alloy`.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 5.589 seconds)
**Total running time of the script:** (0 minutes 4.333 seconds)


.. _sphx_glr_download_examples_gallery_examples_013_thermal_example.py:
Expand Down
Loading

0 comments on commit e112684

Please sign in to comment.