Skip to content

Commit

Permalink
DOC: update development documentation f7a7b17
Browse files Browse the repository at this point in the history
  • Loading branch information
greschd committed Jan 13, 2025
1 parent d638fd5 commit f0de387
Show file tree
Hide file tree
Showing 162 changed files with 20,079 additions and 20,079 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Materials {#materials_example}\n=========\n\nThis example demonstrates how to create the different type of materials,\nimport, or export them. It only shows the PyACP part of the setup. For a\ncomplete composite analysis, see\n`pymapdl_workflow_example`{.interpreted-text role=\"ref\"}.\n\nACP distinguishes between four types of material:\n\n- Raw **Material** that defines the mechanical properties of the\n material.\n- **Fabric** is where a material can be associated with a set\n thickness.\n- **Stackup** is used to combine fabrics into a non-crimp fabric, such\n as a \\[0 45 90\\] combination.\n- **Sublaminate** is used to group fabrics and stackups for frequently\n used lay-ups.\n\nFabrics, Stackups and Sublaminates can be used to create plies. It is\nrecommended to look a the Ansys help for more information on the\ndifferent types of materials.\n"
"# Materials {#materials_example}\n\nThis example demonstrates how to create the different type of materials,\nimport, or export them. It only shows the PyACP part of the setup. For a\ncomplete composite analysis, see\n`pymapdl_workflow_example`{.interpreted-text role=\"ref\"}.\n\nACP distinguishes between four types of material:\n\n- Raw **Material** that defines the mechanical properties of the\n material.\n- **Fabric** is where a material can be associated with a set\n thickness.\n- **Stackup** is used to combine fabrics into a non-crimp fabric, such\n as a \\[0 45 90\\] combination.\n- **Sublaminate** is used to group fabrics and stackups for frequently\n used lay-ups.\n\nFabrics, Stackups and Sublaminates can be used to create plies. It is\nrecommended to look a the Ansys help for more information on the\ndifferent types of materials.\n"
]
},
{
Expand Down Expand Up @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Start ACP and load the model\n============================\n\n%% Get the example file from the server.\n"
"# Start ACP and load the model\n\n%% Get the example file from the server.\n"
]
},
{
Expand Down Expand Up @@ -101,7 +101,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a Material\n=================\n\n%% Create property sets elastic constants, strain and stress limits.\n"
"# Create a Material\n\n%% Create property sets elastic constants, strain and stress limits.\n"
]
},
{
Expand Down Expand Up @@ -137,7 +137,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a Fabric\n===============\n\nCreate a fabric with a thickness of 0.2 mmm. A material can be used for\nmultiple fabrics.\n"
"# Create a Fabric\n\nCreate a fabric with a thickness of 0.2 mmm. A material can be used for\nmultiple fabrics.\n"
]
},
{
Expand All @@ -155,7 +155,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a Stackup\n================\n\nCreate a non-crimped fabric. In that case a biax.\n"
"# Create a Stackup\n\nCreate a non-crimped fabric. In that case a biax.\n"
]
},
{
Expand All @@ -173,7 +173,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a Sub-Laminate\n=====================\n\nA Sublaminate is a group of fabrics and stackups which eases the\nmodeling if the same sequence of materials is used multiple times. The\nfinal material sequence of this Sublaminate is \\[E-Glass -45\u00b0, E-Glass\n45\u00b0, E-Glass 90\u00b0, E-Glass 45\u00b0, E-Glass -45\u00b0\\].\n"
"# Create a Sub-Laminate\n\nA Sublaminate is a group of fabrics and stackups which eases the\nmodeling if the same sequence of materials is used multiple times. The\nfinal material sequence of this Sublaminate is \\[E-Glass -45\u00b0, E-Glass\n45\u00b0, E-Glass 90\u00b0, E-Glass 45\u00b0, E-Glass -45\u00b0\\].\n"
]
},
{
Expand All @@ -191,7 +191,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Import and Export Materials\n===========================\n\nMaterials can be imported and exported from and to external sources. By\ndefault, materials are loaded from the CDB file when the model is\nloaded. An alternative is to load materials from an Engineering Data\nfile via `.Model.import_materials`{.interpreted-text role=\"meth\"}.\n"
"# Import and Export Materials\n\nMaterials can be imported and exported from and to external sources. By\ndefault, materials are loaded from the CDB file when the model is\nloaded. An alternative is to load materials from an Engineering Data\nfile via `.Model.import_materials`{.interpreted-text role=\"meth\"}.\n"
]
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Optimizing ply angles {#optimization_example}\n=====================\n\nThis example demonstrates how to use the ACP, MAPDL, and DPF servers to\noptimize the ply angles in a composite lay-up. The optimization aims to\nminimize the maximum inverse reserve factor (IRF) of the composite\nstructure under two load cases.\n\nThe example uses the :py`scipy.optimize.minimize`{.interpreted-text\nrole=\"func\"} function to perform the optimization. While the procedure\nitself is not the focus of this example and could be improved, it\ndemonstrates the process of optimizing a composite lay-up with PyACP.\n"
"# Optimizing ply angles {#optimization_example}\n\nThis example demonstrates how to use the ACP, MAPDL, and DPF servers to\noptimize the ply angles in a composite lay-up. The optimization aims to\nminimize the maximum inverse reserve factor (IRF) of the composite\nstructure under two load cases.\n\nThe example uses the `scipy.optimize.minimize`{.interpreted-text\nrole=\"py:func\"} function to perform the optimization. While the\nprocedure itself is not the focus of this example and could be improved,\nit demonstrates the process of optimizing a composite lay-up with PyACP.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import modules and setup\n========================\n\nTo setup the environment for this optimization example, you must perform\nthese steps which are covered in the subsequent example code:\n\n- Import the required libraries.\n- Launch the ACP, MAPDL, and DPF servers.\n- Create a temporary directory to store the input and output files.\n"
"# Import modules and setup\n\nTo setup the environment for this optimization example, you must perform\nthese steps which are covered in the subsequent example code:\n\n- Import the required libraries.\n- Launch the ACP, MAPDL, and DPF servers.\n- Create a temporary directory to store the input and output files.\n"
]
},
{
Expand Down Expand Up @@ -126,7 +126,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Prepare the ACP model\n=====================\n\nThis example uses the `optimization_model.dat` file, which contains a\nsimple ACP model of a rounded square tube.\n\nThe `prepare_acp_model` function imports the `optimization_model.dat`\nfile into a new ACP model and creates a lay-up with six plies. It\nreturns the `.Model`{.interpreted-text role=\"class\"} instance.\n"
"# Prepare the ACP model\n\nThis example uses the `optimization_model.dat` file, which contains a\nsimple ACP model of a rounded square tube.\n\nThe `prepare_acp_model` function imports the `optimization_model.dat`\nfile into a new ACP model and creates a lay-up with six plies. It\nreturns the `.Model`{.interpreted-text role=\"class\"} instance.\n"
]
},
{
Expand Down Expand Up @@ -162,7 +162,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create functions for the optimization\n=====================================\n\nTo optimize the ply angles, you must define functions to update, solve,\nand postprocess the ACP model for a given set of ply angles.\n\nThe `update_ply_angles()` function changes the ply angles in the model\nto the given values and updates the model.\n"
"# Create functions for the optimization\n\nTo optimize the ply angles, you must define functions to update, solve,\nand postprocess the ACP model for a given set of ply angles.\n\nThe `update_ply_angles()` function changes the ply angles in the model\nto the given values and updates the model.\n"
]
},
{
Expand Down Expand Up @@ -216,7 +216,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Optimize the ply angles\n=======================\n\nFor the optimization, you must define a single function that takes the\nply angles as its input and returns the maximum IRF. The\n`get_max_irf_for_parameters()` function combines the previously defined\nfunctions to perform all the necessary steps for a given set of ply\nangles.\n"
"# Optimize the ply angles\n\nFor the optimization, you must define a single function that takes the\nply angles as its input and returns the maximum IRF. The\n`get_max_irf_for_parameters()` function combines the previously defined\nfunctions to perform all the necessary steps for a given set of ply\nangles.\n"
]
},
{
Expand Down Expand Up @@ -270,7 +270,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To build this example, the number of function evaluations is limited to\n1. In practice, you should increase or remove this limit.\n"
"To build this example, the number of function evaluations is limited\nto 1. In practice, you should increase or remove this limit.\n"
]
},
{
Expand All @@ -288,7 +288,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Results\n=======\n\nWithout the `maxfev` limit, the optimization would take roughly 30\nminutes to complete and converge to the following result:\n"
"# Results\n\nWithout the `maxfev` limit, the optimization would take roughly 30\nminutes to complete and converge to the following result:\n\n> \\>\\>\\> print(res)\n>\n> : message: Optimization terminated successfully. success: True\n> status: 0 fun: 0.9129640864440078 x: \\[ 7.826e+01 1.777e+00\n> 1.042e+02 8.848e+01 1.083e+01 -1.288e+01\\] nit: 88 nfev: 156\n> final_simplex: (array(\\[\\[ 7.826e+01, 1.777e+00, \\..., 1.083e+01,\n> -1.288e+01\\], \\[ 7.820e+01, 1.691e+00, \\..., 1.046e+01,\n> -1.292e+01\\], \\..., \\[ 7.821e+01, 1.067e+00, \\..., 1.113e+01,\n> -1.299e+01\\], \\[ 7.832e+01, 1.725e+00, \\..., 1.090e+01,\n> -1.303e+01\\]\\]), array(\\[ 9.130e-01, 9.130e-01, 9.132e-01,\n> 9.133e-01, 9.133e-01, 9.133e-01, 9.134e-01\\]))\n"
]
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Advanced PyMAPDL workflow {#advanced_pymapdl_workflow_example}\n=========================\n\nThis example shows how to define a composite lay-up with PyACP, solve\nthe resulting model with PyMAPDL, and run a failure analysis with PyDPF\n- Composites.\n\nBegin with an MAPDL CDB file that contains the mesh, material data, and\nboundary conditions. Import the file to PyACP to define the lay-up, and\nthen export the resulting model to PyMAPDL. Once the results are\navailable, the RST file is loaded in PyDPF - Composites for\npostprocessing. The additional input files (`material.xml` and\n`ACPCompositeDefinitions.h5`) can also be stored with PyACP and passed\nto PyDPF - Composites.\n"
"# Advanced PyMAPDL workflow {#advanced_pymapdl_workflow_example}\n\nThis example shows how to define a composite lay-up with PyACP, solve\nthe resulting model with PyMAPDL, and run a failure analysis with\nPyDPF - Composites.\n\nBegin with an MAPDL CDB file that contains the mesh, material data, and\nboundary conditions. Import the file to PyACP to define the lay-up, and\nthen export the resulting model to PyMAPDL. Once the results are\navailable, the RST file is loaded in PyDPF - Composites for\npostprocessing. The additional input files (`material.xml` and\n`ACPCompositeDefinitions.h5`) can also be stored with PyACP and passed\nto PyDPF - Composites.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import modules and start ACP\n============================\n"
"# Import modules and start ACP\n"
]
},
{
Expand Down Expand Up @@ -72,7 +72,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Get example input files\n=======================\n\nCreate a temporary working directory, and download the example input\nfiles to this directory.\n"
"# Get example input files\n\nCreate a temporary working directory, and download the example input\nfiles to this directory.\n"
]
},
{
Expand All @@ -90,7 +90,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Load mesh and materials from CDB file\n=====================================\n"
"# Load mesh and materials from CDB file\n"
]
},
{
Expand Down Expand Up @@ -133,14 +133,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Build Composite Lay-up\n======================\n\nCreate the model (MPA unit system).\n"
"# Build Composite Lay-up\n\nCreate the model (MPA unit system).\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Materials\n=========\n"
"# Materials\n"
]
},
{
Expand All @@ -158,7 +158,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Fabrics\n=======\n"
"# Fabrics\n"
]
},
{
Expand All @@ -176,7 +176,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Rosettes\n========\n"
"# Rosettes\n"
]
},
{
Expand All @@ -194,7 +194,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Oriented Selection Sets\n=======================\n\nNote that the element sets are imported from the initial mesh (CBD\nfile).\n"
"# Oriented Selection Sets\n\nNote that the element sets are imported from the initial mesh (CBD\nfile).\n"
]
},
{
Expand Down Expand Up @@ -230,7 +230,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Modeling Plies\n==============\n"
"# Modeling Plies\n"
]
},
{
Expand Down Expand Up @@ -356,7 +356,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Write out ACP Model\n===================\n"
"# Write out ACP Model\n"
]
},
{
Expand Down Expand Up @@ -410,7 +410,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Solve with PyMAPDL\n==================\n"
"# Solve with PyMAPDL\n"
]
},
{
Expand Down Expand Up @@ -489,7 +489,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Postprocessing with PyDPF - Composites\n======================================\n\nTo postprocess the results, you must configure the imports, connect to\nthe PyDPF - Composites server, and load its plugin.\n"
"# Postprocessing with PyDPF - Composites\n\nTo postprocess the results, you must configure the imports, connect to\nthe PyDPF - Composites server, and load its plugin.\n"
]
},
{
Expand Down
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": [
"Sandwich panel {#sandwich_panel_example}\n==============\n\nThis example defines a composite lay-up for a sandwich panel using\nPyACP. It only shows the PyACP part of the setup. For a complete\ncomposite analysis, see `pymapdl_workflow_example`{.interpreted-text\nrole=\"ref\"}.\n"
"# Sandwich panel {#sandwich_panel_example}\n\nThis example defines a composite lay-up for a sandwich panel using\nPyACP. It only shows the PyACP part of the setup. For a complete\ncomposite analysis, see `pymapdl_workflow_example`{.interpreted-text\nrole=\"ref\"}.\n"
]
},
{
Expand Down Expand Up @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Start ACP and load the model\n============================\n"
"# Start ACP and load the model\n"
]
},
{
Expand Down Expand Up @@ -126,7 +126,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create the sandwich materials\n=============================\n"
"# Create the sandwich materials\n"
]
},
{
Expand Down Expand Up @@ -187,7 +187,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Create the Lay-up\n=================\n"
"# Create the Lay-up\n"
]
},
{
Expand Down
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,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Direction definition {#direction_definition_example}\n====================\n\nThis example shows how to define directions from lookup tables. They can\nbe either reference directions for oriented selection sets or draping\nangles for modeling plies. The example only shows the PyACP part of the\nsetup. For a complete composite analysis, see\n`pymapdl_workflow_example`{.interpreted-text role=\"ref\"}.\n"
"# Direction definition {#direction_definition_example}\n\nThis example shows how to define directions from lookup tables. They can\nbe either reference directions for oriented selection sets or draping\nangles for modeling plies. The example only shows the PyACP part of the\nsetup. For a complete composite analysis, see\n`pymapdl_workflow_example`{.interpreted-text role=\"ref\"}.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import modules\n==============\n\nImport the standard library and third-party dependencies.\n"
"# Import modules\n\nImport the standard library and third-party dependencies.\n"
]
},
{
Expand Down Expand Up @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Start ACP and load the model\n============================\n"
"# Start ACP and load the model\n"
]
},
{
Expand Down Expand Up @@ -108,7 +108,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Setup materials and oriented selection set\n==========================================\n"
"# Setup materials and oriented selection set\n"
]
},
{
Expand Down Expand Up @@ -198,7 +198,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Define reference direction from lookup table\n============================================\n"
"# Define reference direction from lookup table\n"
]
},
{
Expand Down Expand Up @@ -331,7 +331,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Define draping angles from lookup table\n=======================================\n\n%% Compute a correction angle to define circular fiber paths.\n"
"# Define draping angles from lookup table\n\n%% Compute a correction angle to define circular fiber paths.\n"
]
},
{
Expand Down
Loading

0 comments on commit f0de387

Please sign in to comment.