diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 940b69200..22801b570 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -13,6 +13,8 @@ on: env: MAIN_PYTHON_VERSION: '3.9' + RESET_EXAMPLES_CACHE: 0 + RESET_DOC_BUILD_CACHE: 0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -40,27 +42,18 @@ jobs: - name: Test with tox run: tox -e style - # docs-style: - # name: Documentation Style Check - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: Running Vale - # uses: errata-ai/vale-action@reviewdog - # env: - # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - # with: - # files: doc - # reporter: github-pr-check - # level: error - # filter_mode: nofilter - # fail_on_error: true - # vale_flags: "--config=doc/.vale.ini" - - docs: - name: Documentation - needs: [style] #docs-style + doc-style: + name: Documentation Style Check + runs-on: ubuntu-latest + steps: + - name: PyAnsys documentation style checks + uses: pyansys/actions/doc-style@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + doc-build: + name: Documentation building + needs: [style, doc-style] runs-on: ubuntu-latest env: PYMAPDL_PORT: 21000 # default won't work on GitHub runners @@ -71,7 +64,8 @@ jobs: DPF_PORT: 21002 steps: - - uses: actions/checkout@v3 + - name: "Install Git and checkout project" + uses: actions/checkout@v3 - name: "Set up Python using cache" uses: actions/setup-python@v4 @@ -97,7 +91,7 @@ jobs: uses: docker/login-action@v2.1.0 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ secrets.GH_USERNAME }} password: ${{ secrets.GITHUB_TOKEN }} - name: Pull, launch, and validate MAPDL service @@ -108,18 +102,40 @@ jobs: - name: Retrieve PyMAPDL version run: | - echo "{PYMAPDL_VERSION}={$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')}" >> $GITHUB_OUTPUT + echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_ENV echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")" id: version - + - name: DPF Server Activation run: | docker pull ghcr.io/pyansys/dpf-core:22.2dev docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/pyansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}." - - name: Build Documentation - run: | - xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going" + - name: "Cache Verification Manual examples" + uses: actions/cache@v3 + with: + path: doc/source/verif-manual + key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.PYMAPDL_VERSION }}-${{ github.sha }} + restore-keys: | + Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ env.PYMAPDL_VERSION }} + + - name: "Cache docs build directory" + uses: actions/cache@v3 + with: + path: doc/_build + key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYMAPDL_VERSION }}-${{ github.sha }} + restore-keys: | + doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYMAPDL_VERSION }} + + - name: "Run Ansys documentation building action" + uses: pyansys/actions/doc-build@v3 + with: + requires-xvfb: true + python-version: ${{ env.MAIN_PYTHON_VERSION }} + checkout: false + skip-install: true + sphinxopts: -j auto + use-python-cache: False - name: Upload HTML Documentation uses: actions/upload-artifact@v3 @@ -200,7 +216,7 @@ jobs: release: if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [style, docs] #docs-style + needs: [style, doc-build] #docs-style runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 97a53435a..12b7f3fae 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,7 @@ instance/ # Sphinx documentation doc/_build/ +doc/source/verif-manual/* # PyBuilder .pybuilder/ diff --git a/README.rst b/README.rst index 13321c587..d37c57861 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ PyMAPDL Examples ================ -Repository holding examples for PyMAPDL. +This repository holds examples for PyMAPDL. How to install diff --git a/doc/.vale.ini b/doc/.vale.ini index 4f0b67098..7ce9bda0a 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -5,7 +5,7 @@ StylesPath = "styles" # The options are `suggestion`, `warning`, or `error` (defaults to “warning”). -MinAlertLevel = warning +MinAlertLevel = error # By default, `code` and `tt` are ignored. IgnoredScopes = code, tt diff --git a/doc/Makefile b/doc/Makefile index 608eb1f08..66787e43c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,7 +14,7 @@ help: .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/source/_static/README.md b/doc/source/_static/README.md deleted file mode 100644 index ff7796e46..000000000 --- a/doc/source/_static/README.md +++ /dev/null @@ -1 +0,0 @@ -Static files will be found here (like images and other assets). diff --git a/doc/source/verif-manual/vm-010/_static/vm10_setup.png b/doc/source/_static/vm10_setup.png similarity index 100% rename from doc/source/verif-manual/vm-010/_static/vm10_setup.png rename to doc/source/_static/vm10_setup.png diff --git a/doc/source/verif-manual/vm-010/_static/vm10_setup_1.png b/doc/source/_static/vm10_setup_1.png similarity index 100% rename from doc/source/verif-manual/vm-010/_static/vm10_setup_1.png rename to doc/source/_static/vm10_setup_1.png diff --git a/doc/source/_static/vm12_setup.png b/doc/source/_static/vm12_setup.png new file mode 100644 index 000000000..8126b319a Binary files /dev/null and b/doc/source/_static/vm12_setup.png differ diff --git a/doc/source/verif-manual/vm-001/_static/vm1_setup.png b/doc/source/_static/vm1_setup.png similarity index 100% rename from doc/source/verif-manual/vm-001/_static/vm1_setup.png rename to doc/source/_static/vm1_setup.png diff --git a/doc/source/verif-manual/vm-002/_static/vm2_setup.png b/doc/source/_static/vm2_setup.png similarity index 100% rename from doc/source/verif-manual/vm-002/_static/vm2_setup.png rename to doc/source/_static/vm2_setup.png diff --git a/doc/source/verif-manual/vm-003/_static/vm3_setup.png b/doc/source/_static/vm3_setup.png similarity index 100% rename from doc/source/verif-manual/vm-003/_static/vm3_setup.png rename to doc/source/_static/vm3_setup.png diff --git a/doc/source/verif-manual/vm-004/_static/vm4_setup.png b/doc/source/_static/vm4_setup.png similarity index 100% rename from doc/source/verif-manual/vm-004/_static/vm4_setup.png rename to doc/source/_static/vm4_setup.png diff --git a/doc/source/verif-manual/vm-005/_static/vm5_setup.png b/doc/source/_static/vm5_setup.png similarity index 100% rename from doc/source/verif-manual/vm-005/_static/vm5_setup.png rename to doc/source/_static/vm5_setup.png diff --git a/doc/source/verif-manual/vm-006/_static/vm6_setup.png b/doc/source/_static/vm6_setup.png similarity index 100% rename from doc/source/verif-manual/vm-006/_static/vm6_setup.png rename to doc/source/_static/vm6_setup.png diff --git a/doc/source/verif-manual/vm-007/_static/vm7_setup.png b/doc/source/_static/vm7_setup.png similarity index 100% rename from doc/source/verif-manual/vm-007/_static/vm7_setup.png rename to doc/source/_static/vm7_setup.png diff --git a/doc/source/verif-manual/vm-007/_static/vm7_setup_1.png b/doc/source/_static/vm7_setup_1.png similarity index 100% rename from doc/source/verif-manual/vm-007/_static/vm7_setup_1.png rename to doc/source/_static/vm7_setup_1.png diff --git a/doc/source/verif-manual/vm-007/_static/vm7_setup_2.png b/doc/source/_static/vm7_setup_2.png similarity index 100% rename from doc/source/verif-manual/vm-007/_static/vm7_setup_2.png rename to doc/source/_static/vm7_setup_2.png diff --git a/doc/source/verif-manual/vm-008/_static/vm8_setup.png b/doc/source/_static/vm8_setup.png similarity index 100% rename from doc/source/verif-manual/vm-008/_static/vm8_setup.png rename to doc/source/_static/vm8_setup.png diff --git a/doc/source/verif-manual/vm-009/_static/vm9_setup.png b/doc/source/_static/vm9_setup.png similarity index 100% rename from doc/source/verif-manual/vm-009/_static/vm9_setup.png rename to doc/source/_static/vm9_setup.png diff --git a/doc/source/verif-manual/vm-009/_static/vm9_setup_2.png b/doc/source/_static/vm9_setup_2.png similarity index 100% rename from doc/source/verif-manual/vm-009/_static/vm9_setup_2.png rename to doc/source/_static/vm9_setup_2.png diff --git a/doc/source/conf.py b/doc/source/conf.py index aebd73987..5df3d44f1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,7 +1,12 @@ """Sphinx documentation configuration file.""" from datetime import datetime +import os +from ansys.mapdl import core as pymapdl from ansys_sphinx_theme import pyansys_logo_black as logo +import numpy as np +import pyvista +from sphinx_gallery.sorting import FileNameSortKey # Project information project = "pymapdl-examples" @@ -22,7 +27,7 @@ "additional_breadcrumbs": [ ("PyAnsys", "https://docs.pyansys.com/"), ("PyMAPDL", "https://mapdl.docs.pyansys.com/"), - ("Examples", "https://mapdl.docs.pyansys.com/examples/"), + ("Examples", "https://mapdl.docs.pyansys.com/dev/examples/index.html"), ], "icon_links": [ { @@ -54,16 +59,18 @@ # convert rst to md for ipynb "pypandoc": True, # path to your examples scripts - "examples_dirs": [], + "examples_dirs": ["../../examples/verif-manual"], # path where to save gallery generated examples "gallery_dirs": ["verif-manual", "technology_showcase_examples"], # Pattern to search for example files "filename_pattern": r"\.py", # Remove the "Download all examples" button from the top level gallery "download_all_examples": False, + # Sort gallery example by file name instead of number of lines (default) + "within_subsection_order": FileNameSortKey, # directory where function granular galleries are stored "backreferences_dir": None, - # Modules for which function level galleries are created. In + # Modules for which function level galleries are created. In "doc_module": "ansys-mapdl-core", "image_scrapers": ("pyvista", "matplotlib"), "ignore_pattern": "flycheck*", @@ -83,7 +90,9 @@ } # numpydoc configuration +numpydoc_use_plots = True numpydoc_show_class_members = False +numpydoc_class_members_toctree = False numpydoc_xref_param_type = True # Image referencing @@ -107,6 +116,24 @@ # type, unless multiple values are being returned" } +# Manage errors +pyvista.set_error_output_file("errors.txt") + +# Ensure that offscreen rendering is used for docs generation +pyvista.OFF_SCREEN = True + +# must be less than or equal to the XVFB window size +pyvista.rcParams["window_size"] = np.array([1024, 768]) + +# Save figures in specified directory +pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/") +if not os.path.exists(pyvista.FIGURE_PATH): + os.makedirs(pyvista.FIGURE_PATH) + + +# necessary when building the sphinx gallery +pyvista.BUILDING_GALLERY = True +pymapdl.BUILDING_GALLERY = True # static path html_static_path = ["_static"] diff --git a/doc/source/images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png b/doc/source/images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png new file mode 100644 index 000000000..ac6262151 Binary files /dev/null and b/doc/source/images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png differ diff --git a/doc/source/technology_showcase_examples/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.gif b/doc/source/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png old mode 100755 new mode 100644 similarity index 100% rename from doc/source/technology_showcase_examples/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.gif rename to doc/source/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png diff --git a/doc/source/images/thumb/sphx_glr_tse-020-PCB_thumb.png b/doc/source/images/thumb/sphx_glr_tse-020-PCB_thumb.png new file mode 100644 index 000000000..a4bf15d78 Binary files /dev/null and b/doc/source/images/thumb/sphx_glr_tse-020-PCB_thumb.png differ diff --git a/doc/source/images/thumb/sphx_glr_tse-028-fricstir_thumb.png b/doc/source/images/thumb/sphx_glr_tse-028-fricstir_thumb.png new file mode 100644 index 000000000..134af1519 Binary files /dev/null and b/doc/source/images/thumb/sphx_glr_tse-028-fricstir_thumb.png differ diff --git a/doc/source/index.rst b/doc/source/index.rst index a270581fc..53be4f5f8 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -19,194 +19,9 @@ They ensure the PyMAPDL accuracy. Summary of the exposed Verification Manual Examples --------------------------------------------------- -This section demonstrates a range of Mechanical APDL elements and -capabilities in straightforward problems which have "classical" or -readily-obtainable theoretical solutions using PyMAPDL. - -These problems may then serve as the basis for additional validation -and qualification of Mechanical APDL capabilities for specific -applications that may be of interest. - - - -.. raw:: html - -
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png - :alt: Statically Indeterminate Reaction Force Analysis - - :ref:`sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis.py` - -.. raw:: html - -
Statically Indeterminate Reaction Force Analysis
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png - :alt: Beam Stresses and Deflections - - :ref:`sphx_glr_vm-002-beam_stresses_and_deflections.py` - -.. raw:: html - -
Beam Stresses and Deflections
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png - :alt: Thermally Loaded Support Structure - - :ref:`sphx_glr_vm-003-thermally_loaded_support_structure.py` - -.. raw:: html - -
Thermally Loaded Support Structure
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png - :alt: Deflection of a Hinged Support - - :ref:`sphx_glr_vm-004-deflection_of_a_hinged_support.py` - -.. raw:: html - -
Deflection of a Hinged Support
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png - :alt: Statically Indeterminate Reaction Force Analysis - - :ref:`sphx_glr_vm-005-laterally_loaded_tapered_support_structure.py` - -.. raw:: html - -
Statically Indeterminate Reaction Force Analysis
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png - :alt: Pinched Cylinder - - :ref:`sphx_glr_vm-006-pinched_cylinder.py` - -.. raw:: html - -
Pinched Cylinder
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png - :alt: Plastic Compression of a Pipe Assembly - - :ref:`sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly.py` - -.. raw:: html - -
Plastic Compression of a Pipe Assembly
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-008-parametric_calculation_thumb.png - :alt: Parametric Calculation - - :ref:`sphx_glr_vm-008-parametric_calculation.py` - -.. raw:: html - -
Parametric Calculation
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png - :alt: Large Lateral Deflection of Unequal Stiffness Springs - - :ref:`sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py` - -.. raw:: html - -
Large Lateral Deflection of Unequal Stiffness Springs
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: verif-manual/images/thumb/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png - :alt: Bending of a Tee-Shaped Beam - - :ref:`sphx_glr_vm-010-bending_of_a_t-shaped_beam.py` - -.. raw:: html - -
Bending of a Tee-Shaped Beam
-
- - -.. raw:: html - -
+.. include:: ./verif-manual/index.rst + :start-line: 5 + :end-line: 211 .. === TECHNOLOGY SHOWCASES === @@ -216,7 +31,8 @@ Technology Showcases This documentation demonstrates the broad simulation capabilities of Ansys Mechanical -APDL. The problems demonstrate how to use PyMAPDL to effectively and accurately +APDL. +The problems demonstrate how to use PyMAPDL to effectively and accurately solve interdisciplinary problems from a variety of industries and engineering fields. @@ -225,70 +41,17 @@ Summary of the exposed Technology Showcases The exposed files are more complex examples than the ones presented in the `APDL Verification Manual `_. They are complete and concrete case studies -which necesitate more resources. - -.. raw:: html - -
- -.. raw:: html - -
- -.. only:: html - - .. image:: technology_showcase_examples/images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png - :alt: Brake Squeal Analysis - - :ref:`sphx_glr_ex_0-tecbrakesqueal.py` - -.. raw:: html - -
Brake Squeal Analysis
-
- -.. raw:: html - -
- -.. only:: html - - .. image:: technology_showcase_examples/images/thumb/sphx_glr_tse-020-PCB_thumb.png - :alt: Dynamic simulation of a printed circuit board assembly - - :ref:`sphx_glr_ex_20-tecPCB.py` - -.. raw:: html - -
Dynamic simulation of a printed circuit board assembly
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: technology_showcase_examples/images/thumb/sphx_glr_tse-028-fricstir_thumb.png - :alt: Friction Stir Welding (FSW) Simulation - - :ref:`sphx_glr_ex_28-tecfricstir.py` - -.. raw:: html - -
Friction Stir Welding (FSW) Simulation
-
- -.. raw:: html +which necessitate more resources. -
+.. include:: ./technology_showcase_examples/index.rst + :start-line: 9 + :end-line: 95 .. === TECHNOLOGY SHOWCASES === .. toctree:: :hidden: - :maxdepth: 3 + :includehidden: verif-manual/index technology_showcase_examples/index diff --git a/doc/source/technology_showcase_examples/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png b/doc/source/technology_showcase_examples/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png new file mode 100644 index 000000000..440197a22 Binary files /dev/null and b/doc/source/technology_showcase_examples/images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png differ diff --git a/doc/source/technology_showcase_examples/index.rst b/doc/source/technology_showcase_examples/index.rst index 8aa12e177..8df00e416 100644 --- a/doc/source/technology_showcase_examples/index.rst +++ b/doc/source/technology_showcase_examples/index.rst @@ -7,100 +7,99 @@ The following examples initially come from the `APDL Technology Showcase Manual `_. They initially were MAPDL files. They have been reproduced in Python files using PyMAPDL with the ``ansys-mapdl-core`` library. -These examples are a work-in-progress and will be extended during the life of -this project. - .. raw:: html
+ + .. raw:: html
.. only:: html - .. image:: images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png + .. image:: ./images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png :alt: Brake Squeal Analysis - :ref:`sphx_glr_ex_0-tecbrakesqueal.py` + :ref:`sphx_glr_ex_01-tecbrakesqueal.py` .. raw:: html
Brake Squeal Analysis
+ + .. raw:: html -
+
.. only:: html - .. image:: images/thumb/sphx_glr_tse-020-PCB_thumb.png - :alt: Dynamic simulation of a printed circuit board assembly + .. image:: ./images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png + :alt: Calibrating and validating a hyperelastic constitutive model - :ref:`sphx_glr_ex_20-tecPCB.py` + :ref:`sphx_glr_ex_15-tecHyperConstlModel.py` .. raw:: html -
Dynamic simulation of a printed circuit board assembly
+
Calibrating and validating a hyperelastic constitutive Model
+ .. raw:: html -
+
.. only:: html - .. image:: images/thumb/sphx_glr_tse-028-fricstir_thumb.png - :alt: Friction Stir Welding (FSW) Simulation - - :ref:`sphx_glr_ex_28-tecfricstir.py` - -.. raw:: html + .. image:: ./images/thumb/sphx_glr_tse-020-PCB_thumb.png + :alt: Dynamic simulation of a printed circuit board assembly -
Friction Stir Welding (FSW) Simulation
-
+ :ref:`sphx_glr_ex_20-tecPCB.py` .. raw:: html +
Dynamic simulation of a printed circuit board assembly
-.. ########## - .. raw:: html -
+
.. only:: html - .. image:: images/thumb/sphx_glr_tse-015-calvalhyper_thumb.gif - :alt: Calibrating and Validating a Hyperelastic Constitutive Model + .. image:: ./images/thumb/sphx_glr_tse-028-fricstir_thumb.png + :alt: Friction Stir Welding (FSW) Simulation + + :ref:`sphx_glr_ex_28-tecfricstir.py` .. raw:: html -
Calibrating and Validating a Hyperelastic Constitutive Model
+
Friction Stir Welding (FSW) Simulation
+ + .. raw:: html
-.. ######### + .. toctree:: :hidden: - :includehidden: - techdemo-1/ex_0-tecbrakesqueal - techdemo-15/ex-15-teccalvalhyper - techdemo-20/ex_20-tecPCB - techdemo-28/ex_28-tecfricstir + techdemo-1/ex_01-tecbrakesqueal.rst + techdemo-15/ex_15-teccalvalhyper.rst + techdemo-20/ex_20-tecPCB.rst + techdemo-28/ex_28-tecfricstir.rst .. only:: html diff --git a/doc/source/technology_showcase_examples/techdemo-1/ex_0-tecbrakesqueal.rst b/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst similarity index 98% rename from doc/source/technology_showcase_examples/techdemo-1/ex_0-tecbrakesqueal.rst rename to doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst index dd2c92c28..67dc4484c 100644 --- a/doc/source/technology_showcase_examples/techdemo-1/ex_0-tecbrakesqueal.rst +++ b/doc/source/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst @@ -1,4 +1,4 @@ -.. _sphx_glr_ex_0-tecbrakesqueal.py: +.. _sphx_glr_ex_01-tecbrakesqueal.py: .. _tech_demo_01: @@ -8,7 +8,8 @@ Brake Squeal Analysis This example analysis shows how to solve a brake-squeal problem. `1.6. Analysis and Solution Controls`_ are highlighted: linear non-prestressed modal, partial nonlinear perturbed modal, and full nonlinear perturbed -modal. The problem demonstrates sliding frictional contact and uses complex +modal. +The problem demonstrates sliding frictional contact and uses complex eigensolvers to predict unstable modes. The following topics are available: @@ -201,8 +202,6 @@ Start this example by launching MAPDL and loading the model. mapdl = launch_mapdl(nproc=8) mapdl.clear() - - # mapdl = Mapdl() start(mapdl, 'linear_non_prestressed') mapdl.title("linear_non_prestressed, Solving brake squeal problem using linear non pre-stressed modal solve") @@ -257,7 +256,8 @@ system. ------------------------------------ The inner diameter of the cylinder hub and bolt holes is constrained in all -directions. Small pressure loading is applied on both ends of the pad to establish +directions. +Small pressure loading is applied on both ends of the pad to establish contact with the brake disc and to include prestress effects. The displacement on the brake pad surfaces where the pressure loading is applied is constrained in all directions except axial (along the Z-axis). @@ -286,8 +286,9 @@ methods: A linear non-prestressed modal analysis is effective when the stress-stiffening -effects are not critical. This method requires less run time than the other two -methods, as Newton-Raphson iterations are not required. The contact-stiffness matrix +effects are not critical. +This method requires less run time than the other two methods, as +Newton-Raphson iterations are not required. The contact-stiffness matrix is based on the initial contact status. Following is the process for solving a brake-squeal problem using this method: @@ -304,8 +305,7 @@ Following is the process for solving a brake-squeal problem using this method: sensitive/parametric analysis, as it saves time by not recalculating the real symmetric modes after the first solve operation. -5. Expand the modes and postprocess the results from - **Jobname.RST**. +5. Expand the modes and postprocess the results from `jobname.rST`. For this analysis, the UNSYM solver is selected to solve the problem. (Guidelines for selecting the eigensolver for brake-squeal problems appear @@ -410,8 +410,7 @@ Following is the process for solving a brake-squeal problem using this method: recalculating the real symmetric modes after the first solve operation. -4. Expand the modes and postprocess the results (from the - **Jobname.RSTP** file). +4. Expand the modes and postprocess the results (from the `jobname.rstp` file). The following inputs show the solution steps involved with this method: @@ -566,7 +565,7 @@ Following is the process for solving a brake-squeal problem using this method: 5. Obtain the linear perturbation modal solution using the QRDAMP or UNSYM eigensolver (:meth:`Mapdl.modopt() `). -6. Expand the modes and postprocess the results (from the **Jobname.RSTP** file). +6. Expand the modes and postprocess the results (from the `jobname.rstp` file). The following inputs show the solution steps involved with this method: **First Static Solution** @@ -930,7 +929,8 @@ The following works were consulted when creating this example problem: Mechanics*. 4, 35-47. 3. Schroth, R., Hoffmann, N., Swift, R. (2004, January). Mechanism of brake squeal from theory to experimentally measured mode coupling. In - *Proceedings of the 22nd International Modal Analysis Conference (IMAC XXII).* + *Proceedings of the twenty second International Modal Analysis + Conference (IMAC XXII).* 1.10. Input Files ----------------- diff --git a/doc/source/technology_showcase_examples/techdemo-15/ex-15-teccalvalhyper.rst b/doc/source/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst old mode 100755 new mode 100644 similarity index 91% rename from doc/source/technology_showcase_examples/techdemo-15/ex-15-teccalvalhyper.rst rename to doc/source/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst index 55ced5f9f..a8d400fa5 --- a/doc/source/technology_showcase_examples/techdemo-15/ex-15-teccalvalhyper.rst +++ b/doc/source/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst @@ -1,8 +1,11 @@ -Technology Showcase Example 15: Calibrating and Validating a Hyperelastic Constitutive Model ----------------------------------------------------------------------------------------------- +.. _sphx_glr_ex_15-tecHyperConstlModel.py: -This example problem demonstrates the hyperelastic curve-fitting capabilities used to select constitutive model -parameters to fit experimental data. Several issues that influence the accuracy of the curve fit are discussed. +Calibrating and validating a hyperelastic constitutive model +------------------------------------------------------------ + +This example problem demonstrates the hyperelastic curve-fitting capabilities used +to select constitutive model parameters to fit experimental data. Several issues +that influence the accuracy of the curve fit are discussed. Validation of the resulting constitutive model is demonstrated by comparison with a tension-torsion experiment. @@ -26,14 +29,14 @@ Mechanical Application. For more information, see Several hyperelastic constitutive models can be used to model the large deformation behavior of elastic materials; however, it is sometimes difficult to select parameters -to adequately match the behavior of the material. The curve-fitting process fits the hyperelastic -constitutive model parameters to a set of experimental data using a least-squares -minimization. +to adequately match the behavior of the material. +The curve-fitting process fits the hyperelastic constitutive model parameters to a set +of experimental data using a least-squares minimization. Curve-fitting is relatively simple, but certain conditions can affect the accuracy of -the resulting constitutive model. The constitutive model should therefore be compared -with experimental data to ensure that it adequately reproduces the material behavior -over the actual range of deformation. +the resulting constitutive model. +The constitutive model should therefore be compared with experimental data to ensure +that it adequately reproduces the material behavior over the actual range of deformation. 15.2. Problem Description ------------------------- @@ -51,7 +54,7 @@ After demonstrating the fitting procedure and selecting a suitable constitutive a tension-torsion experiment is simulated and compared to the experimental data to validate the predictions for the model. -15.3. Material Properties +15.3. Material properties ------------------------- Material properties for the calibration and validation experiments follow: @@ -59,29 +62,30 @@ Material properties for the calibration and validation experiments follow: * `15.3.1. Calibration Experiments`_ * `15.3.2. Validation Experiment`_ -15.3.1. Calibration Experiments +15.3.1. Calibration experiments ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Experimental data was obtained via a simulation of a hyperelastic test suite with -an Ogden hyperelastic material. The test suite specimens are shown here, with the -dark areas indicating locations of the clamps: +an Ogden hyperelastic material. +The test suite specimens are shown here, with the dark areas indicating locations +of the clamps: .. figure:: graphics/gtec_calvalhyper_fig1.gif :align: center - :alt: Hyperelastic Test Suite: Test Specimens + :alt: Hyperelastic test suite: test specimens :figclass: align-center - **Figure 15.1: Hyperelastic Test Suite: Test Specimens** + **Figure 15.1: Hyperelastic test suite: test specimens** The engineering-stress vs. engineering-strain results are as follows: .. figure:: graphics/gtec_calvalhyper_fig2.gif :align: center - :alt: Hyperelastic Test Suite: Experimental Data + :alt: Hyperelastic test suite: experimental data :figclass: align-center :name: figure_experimental_data - **Figure 15.2: Hyperelastic Test Suite: Experimental Data** + **Figure 15.2: Hyperelastic test suite: experimental data** The uniaxial specimen is similar to ASTM D412-C (ASTM Standard D412, 2006). @@ -97,7 +101,7 @@ For the planar specimen, the crosshead is displaced by 191.6 mm, giving a calculated engineering strain of 639 percent and a calculated engineering stress of 54.7 MPa. -15.3.2. Validation Experiment +15.3.2. Validation experiment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A simulated tension-torsion experiment was performed on a thin strip. The specimen @@ -106,10 +110,10 @@ here: .. figure:: graphics/gtec_calvalhyper_fig3.gif :align: center - :alt: Tension-Torsion Test Specimen + :alt: Tension-torsion test specimen :figclass: align-center - **Figure 15.3: Tension-Torsion Test Specimen** + **Figure 15.3: Tension-torsion test specimen** The experiment consists of clamping each end of the specimen into the test apparatus, then stretching the specimen by 50 percent of its original gage length @@ -118,27 +122,27 @@ resulting moment-vs.-rotation data: .. figure:: graphics/gtec_calvalhyper_fig4.gif :align: center - :alt: Tension-Torsion Experimental Data + :alt: Tension-torsion experimental data :figclass: align-center - **Figure 15.4: Tension-Torsion Experimental Data** + **Figure 15.4: Tension-torsion experimental data** -15.4. Analysis and Solution Controls +15.4. Analysis and solution controls ------------------------------------ Analysis and solution-control information for calibration and validation follow: -* `15.4.1. Calibrating Parameters`_ -* `15.4.2. Validating Parameters`_ +* `15.4.1. Calibrating parameters`_ +* `15.4.2. Validating parameters`_ -15.4.1. Calibrating Parameters +15.4.1. Calibrating parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Material parameter calibration occurs using the curve-fitting tool. -**Example 15.1: Fitting a Hyperelastic Constitutive Model to a Set of Uniaxial Stress-Strain +**Example 15.1: Fitting a hyperelastic constitutive model to a set of uniaxial stress-strain Data** The command input shown here is for illustration only. While curve-fitting is @@ -148,6 +152,9 @@ the results using the GUI to ensure a sound fit. .. code:: python3 + from ansys.mapdl.core import launch_mapdl + mapdl = launch_mapdl() + mapdl.prep7() mapdl.tbft("fadd",1,"hyper","mooney",3) mapdl.tbft("eadd",1,"unia","uniax".l)OG @@ -199,7 +206,7 @@ model are: +-----------------------------------+ -15.4.2. Validating Parameters +15.4.2. Validating parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Following is a mesh developed to simulate the torsion experiment to validate the diff --git a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.ipynb b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.ipynb index 10d887201..49eaabd2b 100644 --- a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.ipynb +++ b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.ipynb @@ -15,14 +15,34 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Dynamic simulation of a printed circuit board assembly {#ref_dynamic_simulation_printed_circuit_board}\r\n\r\nThis examples shows how to use PyMAPDL to import an existing FE model\r\nand to run a modal and PSD analysis. PyDPF modules are also used for\r\npost-processing.\r\n\r\nThis example is inspired from the model and analysis defined in Chapter\r\n20 of the Mechanical APDL Technology Showcase Manual.\r\n\r\n## Additional Packages Used\r\n\r\n- [Matplotlib](https://matplotlib.org) is used for plotting purposes.\r\n" + "# Dynamic simulation of a printed circuit board assembly {#ref_dynamic_simulation_printed_circuit_board}\n", + "\n", + "This examples shows how to use PyMAPDL to import an existing FE model\n", + "and to run a modal and PSD analysis. PyDPF modules are also used for\n", + "post-processing.\n", + "\n", + "This example is inspired from the model and analysis defined in Chapter\n", + "20 of the Mechanical APDL Technology Showcase Manual.\n", + "\n", + "## Additional Packages Used\n", + "\n", + "- [Matplotlib](https://matplotlib.org) is used for plotting purposes.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Setting up model\r\n\r\nThe original FE model is given in the Ansys Mechanical APDL Technology\r\nShowcase Manual. The .cdb contains a FE model of a single circuit board.\r\nThe model is meshed with SOLID186, SHELL181 and BEAM188 elements. All\r\ncomponents of the PCB model is assigned with linear elastic isotropic\r\nmaterials. Bonded and flexible surface-to-surface contact pairs are used\r\nto define the contact between the IC packages and the circuit board.\r\n\r\n## Starting MAPDL as a service and importing an external model\r\n" + "# Setting up model\n", + "\n", + "The original FE model is given in the Ansys Mechanical APDL Technology\n", + "Showcase Manual. The .cdb contains a FE model of a single circuit board.\n", + "The model is meshed with SOLID186, SHELL181 and BEAM188 elements. All\n", + "components of the PCB model is assigned with linear elastic isotropic\n", + "materials. Bonded and flexible surface-to-surface contact pairs are used\n", + "to define the contact between the IC packages and the circuit board.\n", + "\n", + "## Starting MAPDL as a service and importing an external model\n" ] }, { @@ -33,14 +53,36 @@ }, "outputs": [], "source": [ - "import matplotlib.pyplot as plt\n\nfrom ansys.mapdl.core import launch_mapdl\nfrom ansys.mapdl.core.examples import download_tech_demo_data\n\n# start MAPDL as a service\nmapdl = launch_mapdl()\nprint(mapdl)\n\n# read model of single circuit board\n# download the cdb file\npcb_mesh_file = download_tech_demo_data(\"td-20\", \"pcb_mesh_file.cdb\")\n\n# enter preprocessor and read in cdb\nmapdl.prep7()\nmapdl.cdread(\"COMB\", pcb_mesh_file)\nmapdl.allsel()\nmapdl.eplot(background=\"w\")\nmapdl.cmsel(\"all\")" + "import matplotlib.pyplot as plt\n", + "\n", + "from ansys.mapdl.core import launch_mapdl\n", + "from ansys.mapdl.core.examples import download_tech_demo_data\n", + "\n", + "# start MAPDL as a service\n", + "mapdl = launch_mapdl()\n", + "print(mapdl)\n", + "\n", + "# read model of single circuit board\n", + "# download the cdb file\n", + "pcb_mesh_file = download_tech_demo_data(\"td-20\", \"pcb_mesh_file.cdb\")\n", + "\n", + "# enter preprocessor and read in cdb\n", + "mapdl.prep7()\n", + "mapdl.cdread(\"COMB\", pcb_mesh_file)\n", + "mapdl.allsel()\n", + "mapdl.eplot(background=\"w\")\n", + "mapdl.cmsel(\"all\")" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ - "# Creating the complete layered model\r\n\r\nThe original model will be duplicated to create a layered PCB of three\r\nlayers that are binded together.\r\n" + "# Creating the complete layered model\n", + "\n", + "The original model will be duplicated to create a layered PCB of three\n", + "layers that are bound together.\n" ] }, { @@ -51,14 +93,76 @@ }, "outputs": [], "source": [ - "# duplicate single PCB to get three layers\n# get the maximum node number for the single layers PCB in the input file\nmax_nodenum = mapdl.get(\"max_nodenum\", \"node\", \"\", \"num\", \"max\")\n\n# generate additional PCBs offset by 20 mm in the -y direction\nmapdl.egen(3, max_nodenum, \"all\", dy=-20)\n\n\n# bind the three layers together\n# select components of interest\nmapdl.cmsel(\"s\", \"N_JOINT_BOARD\")\nmapdl.cmsel(\"a\", \"N_JOINT_LEGS\")\nmapdl.cmsel(\"a\", \"N_BASE\")\n\n# get number of currently selected nodes\nnb_selected_nodes = mapdl.mesh.n_node\ncurrent_node = 0\nqueries = mapdl.queries\n\n# also select similar nodes for copies of the single PCB\n# and couple all dofs at the interface\nfor node_id in range(1, nb_selected_nodes + 1):\n current_node = queries.ndnext(current_node)\n mapdl.nsel(\"a\", \"node\", \"\", current_node + max_nodenum)\n mapdl.nsel(\"a\", \"node\", \"\", current_node + 2 * max_nodenum)\nmapdl.cpintf(\"all\")\n\n# define fixed support boundary condition\n# get max coupled set number\ncp_max = mapdl.get(\"cp_max\", \"cp\", 0, \"max\")\n\n# unselect nodes scoped in CP equations\nmapdl.nsel(\"u\", \"cp\", \"\", 1, \"cp_max\")\n\n# create named selection for base excitation\nmapdl.cm(\"n_base_excite\", \"node\")\n\n# fix displacement for base excitation nodes\nmapdl.d(\"all\", \"all\")\n\n# select all and plot the model using MAPDL's plotter and VTK's\nmapdl.allsel(\"all\")\nmapdl.cmsel(\"all\")\nmapdl.graphics(\"power\")\nmapdl.rgb(\"index\", 100, 100, 100, 0)\nmapdl.rgb(\"index\", 80, 80, 80, 13)\nmapdl.rgb(\"index\", 60, 60, 60, 14)\nmapdl.rgb(\"index\", 0, 0, 0, 15)\nmapdl.triad(\"rbot\")\nmapdl.pnum(\"type\", 1)\nmapdl.number(1)\nmapdl.hbc(1, \"on\")\nmapdl.pbc(\"all\", \"\", 1)\nmapdl.view(1, 1, 1, 1)\n# mapdl.eplot(vtk=False)\nmapdl.eplot(vtk=True)" + "# duplicate single PCB to get three layers\n", + "# get the maximum node number for the single layers PCB in the input file\n", + "max_nodenum = mapdl.get(\"max_nodenum\", \"node\", \"\", \"num\", \"max\")\n", + "\n", + "# generate additional PCBs offset by 20 mm in the -y direction\n", + "mapdl.egen(3, max_nodenum, \"all\", dy=-20)\n", + "\n", + "\n", + "# bind the three layers together\n", + "# select components of interest\n", + "mapdl.cmsel(\"s\", \"N_JOINT_BOARD\")\n", + "mapdl.cmsel(\"a\", \"N_JOINT_LEGS\")\n", + "mapdl.cmsel(\"a\", \"N_BASE\")\n", + "\n", + "# get number of currently selected nodes\n", + "nb_selected_nodes = mapdl.mesh.n_node\n", + "current_node = 0\n", + "queries = mapdl.queries\n", + "\n", + "# also select similar nodes for copies of the single PCB\n", + "# and couple all dofs at the interface\n", + "for node_id in range(1, nb_selected_nodes + 1):\n", + " current_node = queries.ndnext(current_node)\n", + " mapdl.nsel(\"a\", \"node\", \"\", current_node + max_nodenum)\n", + " mapdl.nsel(\"a\", \"node\", \"\", current_node + 2 * max_nodenum)\n", + "mapdl.cpintf(\"all\")\n", + "\n", + "# define fixed support boundary condition\n", + "# get max coupled set number\n", + "cp_max = mapdl.get(\"cp_max\", \"cp\", 0, \"max\")\n", + "\n", + "# unselect nodes scoped in CP equations\n", + "mapdl.nsel(\"u\", \"cp\", \"\", 1, \"cp_max\")\n", + "\n", + "# create named selection for base excitation\n", + "mapdl.cm(\"n_base_excite\", \"node\")\n", + "\n", + "# fix displacement for base excitation nodes\n", + "mapdl.d(\"all\", \"all\")\n", + "\n", + "# select all and plot the model using MAPDL's plotter and VTK's\n", + "mapdl.allsel(\"all\")\n", + "mapdl.cmsel(\"all\")\n", + "mapdl.graphics(\"power\")\n", + "mapdl.rgb(\"index\", 100, 100, 100, 0)\n", + "mapdl.rgb(\"index\", 80, 80, 80, 13)\n", + "mapdl.rgb(\"index\", 60, 60, 60, 14)\n", + "mapdl.rgb(\"index\", 0, 0, 0, 15)\n", + "mapdl.triad(\"rbot\")\n", + "mapdl.pnum(\"type\", 1)\n", + "mapdl.number(1)\n", + "mapdl.hbc(1, \"on\")\n", + "mapdl.pbc(\"all\", \"\", 1)\n", + "mapdl.view(1, 1, 1, 1)\n", + "# mapdl.eplot(vtk=False)\n", + "mapdl.eplot(vtk=True)" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ - "# Modal Analysis\r\n\r\n## Run modal analysis\r\n\r\nA modal analysis is run using Block Lanzos. Only 10 modes are extracted\r\nfor the sake of run times, but using a higher number of nodes is\r\nrecommended (suggestion: 300 modes).\r\n" + "# Modal Analysis\n", + "\n", + "## Run modal analysis\n", + "\n", + "A modal analysis is run using Block Lanczos. Only 10 modes are extracted\n", + "for the sake of run times, but using a higher number of nodes is\n", + "recommended (suggestion: 300 modes).\n" ] }, { @@ -69,14 +173,29 @@ }, "outputs": [], "source": [ - "# enter solution processor and define analysis settings\nmapdl.slashsolu()\nmapdl.antype(\"modal\")\n# set number of modes to extract\n# using a higher number of modes is recommended\nnb_modes = 10\n# use Block Lanzos to extract specified number of modes\nmapdl.modopt(\"lanb\", nb_modes)\nmapdl.mxpand(nb_modes)\noutput = mapdl.solve()\nprint(output)" + "# enter solution processor and define analysis settings\n", + "mapdl.slashsolu()\n", + "mapdl.antype(\"modal\")\n", + "# set number of modes to extract\n", + "# using a higher number of modes is recommended\n", + "nb_modes = 10\n", + "# use Block Lanczos to extract specified number of modes\n", + "mapdl.modopt(\"lanb\", nb_modes)\n", + "mapdl.mxpand(nb_modes)\n", + "output = mapdl.solve()\n", + "print(output)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Post-processing the modal results\r\n\r\nThis sections illustrates different methods to post-process the results\r\nof the modal analysis : PyMAPDL method, PyMAPDL result reader,\r\nPyDPF-Post and PyDPF-Core. All methods lead to the same result and are\r\njust given as an example of how each module can be used.\r\n" + "# Post-processing the modal results\n", + "\n", + "This sections illustrates different methods to post-process the results\n", + "of the modal analysis : PyMAPDL method, PyMAPDL result reader,\n", + "PyDPF-Post and PyDPF-Core. All methods lead to the same result and are\n", + "just given as an example of how each module can be used.\n" ] }, { @@ -87,14 +206,21 @@ }, "outputs": [], "source": [ - "# using MAPDL methods\nmapdl.post1()\nmapdl.set(1, 1)\nmapdl.plnsol(\"u\", \"sum\")" + "# using MAPDL methods\n", + "mapdl.post1()\n", + "mapdl.set(1, 1)\n", + "mapdl.plnsol(\"u\", \"sum\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Using PyMAPDL result reader\r\n\r\n*Not recommended* - PyMAPDL reader library is in process to being\r\ndeprecated. It is recommended to use [DPF\r\nPost](https://postdocs.pyansys.com/).\r\n" + "# Using PyMAPDL result reader\n", + "\n", + "*Not recommended* - PyMAPDL reader library is in process to being\n", + "deprecated. It is recommended to use [DPF\n", + "Post](https://postdocs.pyansys.com/).\n" ] }, { @@ -105,14 +231,15 @@ }, "outputs": [], "source": [ - "mapdl_result = mapdl.result\nmapdl_result.plot_nodal_displacement(0)" + "mapdl_result = mapdl.result\n", + "mapdl_result.plot_nodal_displacement(0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Using DPF-Post\r\n" + "# Using DPF-Post\n" ] }, { @@ -123,14 +250,21 @@ }, "outputs": [], "source": [ - "from ansys.dpf import post\n\nsolution_path = mapdl.result_file\nsolution = post.load_solution(solution_path)\nprint(solution)\ndisplacement = solution.displacement(time_scoping=1)\ntotal_deformation = displacement.norm\ntotal_deformation.plot_contour(show_edges=True, background=\"w\")" + "from ansys.dpf import post\n", + "\n", + "solution_path = mapdl.result_file\n", + "solution = post.load_solution(solution_path)\n", + "print(solution)\n", + "displacement = solution.displacement(time_scoping=1)\n", + "total_deformation = displacement.norm\n", + "total_deformation.plot_contour(show_edges=True, background=\"w\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Using DPF-Core\r\n" + "# Using DPF-Core\n" ] }, { @@ -141,14 +275,25 @@ }, "outputs": [], "source": [ - "from ansys.dpf import core\n\nmodel = core.Model(solution_path)\nresults = model.results\nprint(results)\ndisplacements = results.displacement()\ntotal_def = core.operators.math.norm_fc(displacements)\ntotal_def_container = total_def.outputs.fields_container()\nmesh = model.metadata.meshed_region\nmesh.plot(total_def_container.get_field_by_time_id(1))" + "from ansys.dpf import core\n", + "\n", + "model = core.Model(solution_path)\n", + "results = model.results\n", + "print(results)\n", + "displacements = results.displacement()\n", + "total_def = core.operators.math.norm_fc(displacements)\n", + "total_def_container = total_def.outputs.fields_container()\n", + "mesh = model.metadata.meshed_region\n", + "mesh.plot(total_def_container.get_field_by_time_id(1))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Run PSD analysis\r\n\r\nThe response spectrum analysis is defined, solved and post-processed.\r\n" + "# Run PSD analysis\n", + "\n", + "The response spectrum analysis is defined, solved and post-processed.\n" ] }, { @@ -159,21 +304,73 @@ }, "outputs": [], "source": [ - "# define PSD analysis with input spectrum\nmapdl.slashsolu()\nmapdl.antype(\"spectr\")\n\n# power spectral density\nmapdl.spopt(\"psd\")\n\n# use input table 1 with acceleration spectrum in terms of acceleration due to gravity\nmapdl.psdunit(1, \"accg\", 9.81 * 1000)\n\n# define the frequency points in the input table 1\nmapdl.psdfrq(1, \"\", 1, 40, 50, 70.71678, 100, 700, 900)\n\n# define the PSD values in the input table 1\nmapdl.psdval(1, 0.01, 0.01, 0.1, 1, 10, 10, 1)\n\n# set the damping ratio as 5%\nmapdl.dmprat(0.05)\n\n# apply base excitation on the set of nodes N_BASE_EXCITE in the y-direction from table 1\nmapdl.d(\"N_BASE_EXCITE\", \"uy\", 1)\n\n# calculate the participation factor for PSD with base excitation from input table 1\nmapdl.pfact(1, \"base\")\n\n# write the displacent solution relative to the base excitation to the results file from the PSD analysis\nmapdl.psdres(\"disp\", \"rel\")\n\n# write the absolute velocity solution to the results file from the PSD analysis\nmapdl.psdres(\"velo\", \"abs\")\n\n# write the absolute acceleration solution to the results file from the PSD analysis\nmapdl.psdres(\"acel\", \"abs\")\n\n# combine only those modes whose significance level exceeds 0.0001\nmapdl.psdcom()\noutput = mapdl.solve()\nprint(output)" + "# define PSD analysis with input spectrum\n", + "mapdl.slashsolu()\n", + "mapdl.antype(\"spectr\")\n", + "\n", + "# power spectral density\n", + "mapdl.spopt(\"psd\")\n", + "\n", + "# use input table 1 with acceleration spectrum in terms of acceleration due to gravity\n", + "mapdl.psdunit(1, \"accg\", 9.81 * 1000)\n", + "\n", + "# define the frequency points in the input table 1\n", + "mapdl.psdfrq(1, \"\", 1, 40, 50, 70.71678, 100, 700, 900)\n", + "\n", + "# define the PSD values in the input table 1\n", + "mapdl.psdval(1, 0.01, 0.01, 0.1, 1, 10, 10, 1)\n", + "\n", + "# set the damping ratio as 5%\n", + "mapdl.dmprat(0.05)\n", + "\n", + "# apply base excitation on the set of nodes N_BASE_EXCITE in the y-direction from table 1\n", + "mapdl.d(\"N_BASE_EXCITE\", \"uy\", 1)\n", + "\n", + "# calculate the participation factor for PSD with base excitation from input table 1\n", + "mapdl.pfact(1, \"base\")\n", + "\n", + "# write the displacent solution relative to the base excitation to the results file from the PSD analysis\n", + "mapdl.psdres(\"disp\", \"rel\")\n", + "\n", + "# write the absolute velocity solution to the results file from the PSD analysis\n", + "mapdl.psdres(\"velo\", \"abs\")\n", + "\n", + "# write the absolute acceleration solution to the results file from the PSD analysis\n", + "mapdl.psdres(\"acel\", \"abs\")\n", + "\n", + "# combine only those modes whose significance level exceeds 0.0001\n", + "mapdl.psdcom()\n", + "output = mapdl.solve()\n", + "print(output)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Post-process PSD analysis\r\n\r\nThe response spectrum analysis is post-processed. First, the standard\r\nMAPDL POST1 postprocessor is used. Then, the MAPDL time-history POST26\r\npostprocessor is used to generate the response power spectral density.\r\n\r\n::: note\r\n::: title\r\nNote\r\n:::\r\n\r\nThe graph generated through POST26 is exported as a picture in the\r\nworking directory. Finally, the results from POST26 are saved to Python\r\nvariables to be plotted in the Python environment with the use of\r\nMatplotlib library.\r\n:::\r\n" + "# Post-process PSD analysis\n", + "\n", + "The response spectrum analysis is post-processed. First, the standard\n", + "MAPDL POST1 postprocessor is used. Then, the MAPDL time-history POST26\n", + "postprocessor is used to generate the response power spectral density.\n", + "\n", + "::: note\n", + "::: title\n", + "Note\n", + ":::\n", + "\n", + "The graph generated through POST26 is exported as a picture in the\n", + "working directory. Finally, the results from POST26 are saved to Python\n", + "variables to be plotted in the Python environment with the use of\n", + "Matplotlib library.\n", + ":::\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Post-process PSD analysis in POST1\r\n" + "# Post-process PSD analysis in POST1\n" ] }, { @@ -184,14 +381,18 @@ }, "outputs": [], "source": [ - "mapdl.post1()\nmapdl.set(1, 1)\nmapdl.plnsol(\"u\", \"sum\")\nmapdl.set(\"last\")\nmapdl.plnsol(\"u\", \"sum\")" + "mapdl.post1()\n", + "mapdl.set(1, 1)\n", + "mapdl.plnsol(\"u\", \"sum\")\n", + "mapdl.set(\"last\")\n", + "mapdl.plnsol(\"u\", \"sum\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Post-process PSD analysis in POST26 (time-history post-processing)\r\n" + "# Post-process PSD analysis in POST26 (time-history post-processing)\n" ] }, { @@ -202,14 +403,43 @@ }, "outputs": [], "source": [ - "mapdl.post26()\n\n# allow storage for 200 variables\nmapdl.numvar(200)\nmapdl.cmsel(\"s\", \"MY_MONITOR\")\nmonitored_node = mapdl.queries.ndnext(0)\nmapdl.store(\"psd\")\n\n# store the psd analysis u_y data for the node MYMONITOR as the reference no 2\nmapdl.nsol(2, monitored_node, \"u\", \"y\")\n\n# compute the response power spectral density for displacement associated with variable 2\nmapdl.rpsd(3, 2)\nmapdl.show(\"png\")\n\n# plot the variable 3\nmapdl.plvar(3)\n\n# print the variable 3\nmapdl.prvar(3)\n\n# x-axis is set for Log X scale\nmapdl.gropt(\"logx\", 1)\n\n# y-axis is set for Log X scale\nmapdl.gropt(\"logy\", 1)\n\n# plot the variable 3\nmapdl.plvar(3)\nmapdl.show(\"close\")" + "mapdl.post26()\n", + "\n", + "# allow storage for 200 variables\n", + "mapdl.numvar(200)\n", + "mapdl.cmsel(\"s\", \"MY_MONITOR\")\n", + "monitored_node = mapdl.queries.ndnext(0)\n", + "mapdl.store(\"psd\")\n", + "\n", + "# store the psd analysis u_y data for the node MYMONITOR as the reference no 2\n", + "mapdl.nsol(2, monitored_node, \"u\", \"y\")\n", + "\n", + "# compute the response power spectral density for displacement associated with variable 2\n", + "mapdl.rpsd(3, 2)\n", + "mapdl.show(\"png\")\n", + "\n", + "# plot the variable 3\n", + "mapdl.plvar(3)\n", + "\n", + "# print the variable 3\n", + "mapdl.prvar(3)\n", + "\n", + "# x-axis is set for Log X scale\n", + "mapdl.gropt(\"logx\", 1)\n", + "\n", + "# y-axis is set for Log X scale\n", + "mapdl.gropt(\"logy\", 1)\n", + "\n", + "# plot the variable 3\n", + "mapdl.plvar(3)\n", + "mapdl.show(\"close\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Post-process PSD analysis using Matplotlib\r\n" + "# Post-process PSD analysis using Matplotlib\n" ] }, { @@ -220,14 +450,29 @@ }, "outputs": [], "source": [ - "# store MAPDL results to python variables\nmapdl.dim(\"frequencies\", \"array\", 4000, 1)\nmapdl.dim(\"response\", \"array\", 4000, 1)\nmapdl.vget(\"frequencies(1)\", 1)\nmapdl.vget(\"response(1)\", 3)\nfrequencies = mapdl.parameters[\"frequencies\"]\nresponse = mapdl.parameters[\"response\"]\n\n# use Matplotlib to create graph\nfig = plt.figure()\nax = fig.add_subplot(111)\nplt.xscale(\"log\")\nplt.yscale(\"log\")\nax.plot(frequencies, response)\nax.set_xlabel(\"Frequencies\")\nax.set_ylabel(\"Response power spectral density\")" + "# store MAPDL results to python variables\n", + "mapdl.dim(\"frequencies\", \"array\", 4000, 1)\n", + "mapdl.dim(\"response\", \"array\", 4000, 1)\n", + "mapdl.vget(\"frequencies(1)\", 1)\n", + "mapdl.vget(\"response(1)\", 3)\n", + "frequencies = mapdl.parameters[\"frequencies\"]\n", + "response = mapdl.parameters[\"response\"]\n", + "\n", + "# use Matplotlib to create graph\n", + "fig = plt.figure()\n", + "ax = fig.add_subplot(111)\n", + "plt.xscale(\"log\")\n", + "plt.yscale(\"log\")\n", + "ax.plot(frequencies, response)\n", + "ax.set_xlabel(\"Frequencies\")\n", + "ax.set_ylabel(\"Response power spectral density\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Exit MAPDL\r\n" + "Exit MAPDL\n" ] }, { @@ -244,7 +489,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -258,9 +503,14 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]" + }, + "vscode": { + "interpreter": { + "hash": "269550a72b951409c73f23ea9b5a89d868b3d5a683e175acf6d5151541610ed6" + } } }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} diff --git a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.py b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.py index 15cc7f383..3c548dbcd 100644 --- a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.py +++ b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.py @@ -21,7 +21,7 @@ # ---------------- # # The original FE model is given in the Ansys Mechanical APDL Technology -# Showcase Manual. The .cdb contains a FE model of a single circuit board. The +# Showcase Manual. The .cdb contains a FE model of a single circuit board. The # model is meshed with SOLID186, SHELL181 and BEAM188 elements. All components # of the PCB model is assigned with linear elastic isotropic materials. Bonded # and flexible surface-to-surface contact pairs are used to define the contact @@ -54,7 +54,7 @@ # Creating the complete layered model # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # The original model will be duplicated to create a layered PCB of three layers -# that are binded together. +# that are bound together. # duplicate single PCB to get three layers # get the maximum node number for the single layers PCB in the input file @@ -120,7 +120,7 @@ # Run modal analysis # ~~~~~~~~~~~~~~~~~~ # -# A modal analysis is run using Block Lanzos. +# A modal analysis is run using Block Lanczos. # Only 10 modes are extracted for the sake of run times, but using a higher # number of nodes is recommended (suggestion: 300 modes). # @@ -131,7 +131,7 @@ # set number of modes to extract # using a higher number of modes is recommended nb_modes = 10 -# use Block Lanzos to extract specified number of modes +# use Block Lanczos to extract specified number of modes mapdl.modopt("lanb", nb_modes) mapdl.mxpand(nb_modes) output = mapdl.solve() diff --git a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst index bcc0e6bfd..15af5403c 100644 --- a/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst +++ b/doc/source/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst @@ -41,7 +41,7 @@ Setting up model ---------------- The original FE model is given in the Ansys Mechanical APDL Technology -Showcase Manual. The .cdb contains a FE model of a single circuit board. The +Showcase Manual. The .cdb contains a FE model of a single circuit board. The model is meshed with SOLID186, SHELL181 and BEAM188 elements. All components of the PCB model is assigned with linear elastic isotropic materials. Bonded and flexible surface-to-surface contact pairs are used to define the contact @@ -105,7 +105,7 @@ Starting MAPDL as a service and importing an external model Creating the complete layered model ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The original model will be duplicated to create a layered PCB of three layers -that are binded together. +that are bound together. .. GENERATED FROM PYTHON SOURCE LINES 59-117 @@ -186,7 +186,7 @@ Modal Analysis Run modal analysis ~~~~~~~~~~~~~~~~~~ -A modal analysis is run using Block Lanzos. +A modal analysis is run using Block Lanczos. Only 10 modes are extracted for the sake of run times, but using a higher number of nodes is recommended (suggestion: 300 modes). @@ -202,7 +202,7 @@ number of nodes is recommended (suggestion: 300 modes). # set number of modes to extract # using a higher number of modes is recommended nb_modes = 10 - # use Block Lanzos to extract specified number of modes + # use Block Lanczos to extract specified number of modes mapdl.modopt("lanb", nb_modes) mapdl.mxpand(nb_modes) output = mapdl.solve() @@ -221,28 +221,28 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 0.781 TIME= 06:52:51 The automatic domain decomposition logic has selected the MESH domain - decomposition method with 2 processes per solution. + decomposition method with 2 processes per solution. ***** ANSYS SOLVE COMMAND ***** *** NOTE *** CP = 0.812 TIME= 06:52:51 - There is no title defined for this analysis. + There is no title defined for this analysis. *** NOTE *** CP = 0.828 TIME= 06:52:51 To view 3-D mode shapes of beam or pipe elements, expand the modes with element results calculation active via the MXPAND command's - Elcalc=YES. + Elcalc=YES. *** WARNING *** CP = 0.844 TIME= 06:52:51 Previous testing revealed that 3 of the 26046 selected elements violate - shape warning limits. To review warning messages, please see the - output or error file, or issue the CHECK command. + shape warning limits. To review warning messages, please see the + output or error file, or issue the CHECK command. *** NOTE *** CP = 0.844 TIME= 06:52:51 - The model data was checked and warning messages were found. + The model data was checked and warning messages were found. Please review output or errors file ( C:\Users\gayuso\AppData\Local\Temp\ansys_pasiuwhdkb\file0.err ) for - these warning messages. + these warning messages. *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS *** ---GIVE SUGGESTIONS ONLY--- @@ -321,37 +321,37 @@ number of nodes is recommended (suggestion: 300 modes). DEGREES OF FREEDOM. . . . . . UX UY UZ ROTX ROTY ROTZ ANALYSIS TYPE . . . . . . . . . . . . . . . . .MODAL EXTRACTION METHOD. . . . . . . . . . . . . .BLOCK LANCZOS - NUMBER OF MODES TO EXTRACT. . . . . . . . . . . 10 + NUMBER OF MODES TO EXTRACT. . . . . . . . . . . 10 GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC - NUMBER OF MODES TO EXPAND . . . . . . . . . . . 10 + NUMBER OF MODES TO EXPAND . . . . . . . . . . . 10 ELEMENT RESULTS CALCULATION . . . . . . . . . .OFF *** NOTE *** CP = 0.844 TIME= 06:52:51 SHELL181 and SHELL281 will not support real constant input at a future - release. Please move to section input. + release. Please move to section input. *** NOTE *** CP = 0.891 TIME= 06:52:51 - The conditions for direct assembly have been met. No .emat or .erot - files will be produced. + The conditions for direct assembly have been met. No .emat or .erot + files will be produced. *** NOTE *** CP = 0.922 TIME= 06:52:51 - Internal nodes from 43998 to 44297 are created. + Internal nodes from 43998 to 44297 are created. 300 internal nodes are used for quadratic and/or cubic options of - BEAM188, PIPE288, and/or SHELL208. + BEAM188, PIPE288, and/or SHELL208. *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 22 and contact element type 22 has been set up. The - companion pair has real constant set ID 23. Both pairs should have - the same behavior. + constant set 22 and contact element type 22 has been set up. The + companion pair has real constant set ID 23. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -363,24 +363,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23362 and target element 23450. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23362 and target element 23450. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 23 and contact element type 22 has been set up. The - companion pair has real constant set ID 22. Both pairs should have - the same behavior. + constant set 23 and contact element type 22 has been set up. The + companion pair has real constant set ID 22. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6035 @@ -391,24 +391,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23389 and target element 23348. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23389 and target element 23348. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 24 and contact element type 24 has been set up. The - companion pair has real constant set ID 25. Both pairs should have - the same behavior. + constant set 24 and contact element type 24 has been set up. The + companion pair has real constant set ID 25. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -420,24 +420,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.065814104E-14 was detected between contact - element 23534 and target element 23703. - **************************************** + Max. Initial penetration 1.065814104E-14 was detected between contact + element 23534 and target element 23703. + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 25 and contact element type 24 has been set up. The - companion pair has real constant set ID 24. Both pairs should have - the same behavior. + constant set 25 and contact element type 24 has been set up. The + companion pair has real constant set ID 24. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6670 @@ -448,15 +448,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23619 and target element 23500. - **************************************** + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23619 and target element 23500. + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 26 and contact element type 26 has been set up. The - companion pair has real constant set ID 27. Both pairs should have + constant set 26 and contact element type 26 has been set up. The + companion pair has real constant set ID 27. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -477,15 +477,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact + Max. Initial penetration 7.105427358E-15 was detected between contact element 23799 and target element 23840. - **************************************** + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 27 and contact element type 26 has been set up. The - companion pair has real constant set ID 26. Both pairs should have + constant set 27 and contact element type 26 has been set up. The + companion pair has real constant set ID 26. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -505,15 +505,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 8.437694987E-15 was detected between contact + Max. Initial penetration 8.437694987E-15 was detected between contact element 23816 and target element 23774. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 28 and contact element type 28 has been set up. The - companion pair has real constant set ID 29. Both pairs should have + constant set 28 and contact element type 28 has been set up. The + companion pair has real constant set ID 29. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -541,7 +541,7 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 29 and contact element type 28 has been set up. The + constant set 29 and contact element type 28 has been set up. The companion pair has real constant set ID 28. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, @@ -562,15 +562,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.993605777E-15 was detected between contact + Max. Initial penetration 7.993605777E-15 was detected between contact element 24004 and target element 23917. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 30 and contact element type 30 has been set up. The - companion pair has real constant set ID 31. Both pairs should have + constant set 30 and contact element type 30 has been set up. The + companion pair has real constant set ID 31. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -598,8 +598,8 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 31 and contact element type 30 has been set up. The - companion pair has real constant set ID 30. Both pairs should have + constant set 31 and contact element type 30 has been set up. The + companion pair has real constant set ID 30. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -619,15 +619,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.065814104E-14 was detected between contact + Max. Initial penetration 1.065814104E-14 was detected between contact element 24143 and target element 24111. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 32 and contact element type 32 has been set up. The - companion pair has real constant set ID 33. Both pairs should have + constant set 32 and contact element type 32 has been set up. The + companion pair has real constant set ID 33. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -655,8 +655,8 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 33 and contact element type 32 has been set up. The - companion pair has real constant set ID 32. Both pairs should have + constant set 33 and contact element type 32 has been set up. The + companion pair has real constant set ID 32. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -676,15 +676,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact + Max. Initial penetration 7.105427358E-15 was detected between contact element 24279 and target element 24217. - **************************************** + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 34 and contact element type 34 has been set up. The - companion pair has real constant set ID 35. Both pairs should have + constant set 34 and contact element type 34 has been set up. The + companion pair has real constant set ID 35. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -705,15 +705,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact + Max. Initial penetration 7.105427358E-15 was detected between contact element 24457 and target element 24613. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 35 and contact element type 34 has been set up. The - companion pair has real constant set ID 34. Both pairs should have + constant set 35 and contact element type 34 has been set up. The + companion pair has real constant set ID 34. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -733,15 +733,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.065814104E-14 was detected between contact + Max. Initial penetration 1.065814104E-14 was detected between contact element 24514 and target element 24456. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 36 and contact element type 36 has been set up. The - companion pair has real constant set ID 37. Both pairs should have + constant set 36 and contact element type 36 has been set up. The + companion pair has real constant set ID 37. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -762,15 +762,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact + Max. Initial penetration 1.421085472E-14 was detected between contact element 24670 and target element 24765. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 37 and contact element type 36 has been set up. The - companion pair has real constant set ID 36. Both pairs should have + constant set 37 and contact element type 36 has been set up. The + companion pair has real constant set ID 36. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -790,15 +790,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact + Max. Initial penetration 7.105427358E-15 was detected between contact element 24705 and target element 24663. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 38 and contact element type 38 has been set up. The - companion pair has real constant set ID 39. Both pairs should have + constant set 38 and contact element type 38 has been set up. The + companion pair has real constant set ID 39. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -819,15 +819,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 9.769962617E-15 was detected between contact + Max. Initial penetration 9.769962617E-15 was detected between contact element 24836 and target element 24926. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 39 and contact element type 38 has been set up. The - companion pair has real constant set ID 38. Both pairs should have + constant set 39 and contact element type 38 has been set up. The + companion pair has real constant set ID 38. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -847,15 +847,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 8.881784197E-15 was detected between contact + Max. Initial penetration 8.881784197E-15 was detected between contact element 24879 and target element 24787. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 40 and contact element type 40 has been set up. The - companion pair has real constant set ID 41. Both pairs should have + constant set 40 and contact element type 40 has been set up. The + companion pair has real constant set ID 41. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -875,21 +875,21 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 1.953 TIME= 06:52:52 One of the contact searching regions contains at least 63 target - elements. You may reduce the pinball radius. + elements. You may reduce the pinball radius. Default target edge extension factor TOLS 10.000 Initial penetration/gap is excluded. Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact + Max. Initial penetration 1.421085472E-14 was detected between contact element 24979 and target element 25077. - **************************************** + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 41 and contact element type 40 has been set up. The - companion pair has real constant set ID 40. Both pairs should have + constant set 41 and contact element type 40 has been set up. The + companion pair has real constant set ID 40. Both pairs should have the same behavior. ANSYS will deactivate the current pair and keep its companion pair, resulting in asymmetric contact. @@ -910,15 +910,15 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.065814104E-14 was detected between contact + Max. Initial penetration 1.065814104E-14 was detected between contact element 25011 and target element 24931. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 42 and contact element type 42 has been set up. The - companion pair has real constant set ID 43. Both pairs should have + constant set 42 and contact element type 42 has been set up. The + companion pair has real constant set ID 43. Both pairs should have the same behavior. ANSYS will keep the current pair and deactivate its companion pair, resulting in asymmetric contact. @@ -940,24 +940,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 8.881784197E-15 was detected between contact + Max. Initial penetration 8.881784197E-15 was detected between contact element 25172 and target element 25232. - **************************************** + *************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 43 and contact element type 42 has been set up. The - companion pair has real constant set ID 42. Both pairs should have - the same behavior. + constant set 43 and contact element type 42 has been set up. The + companion pair has real constant set ID 42. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.4761 @@ -969,24 +969,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 25184 and target element 25127. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 25184 and target element 25127. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 44 and contact element type 44 has been set up. The - companion pair has real constant set ID 45. Both pairs should have - the same behavior. + constant set 44 and contact element type 44 has been set up. The + companion pair has real constant set ID 45. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -998,24 +998,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25356 and target element 25570. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25356 and target element 25570. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 45 and contact element type 44 has been set up. The - companion pair has real constant set ID 44. Both pairs should have - the same behavior. + constant set 45 and contact element type 44 has been set up. The + companion pair has real constant set ID 44. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.7967 @@ -1026,24 +1026,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.065814104E-14 was detected between contact - element 25446 and target element 25239. + Max. Initial penetration 1.065814104E-14 was detected between contact + element 25446 and target element 25239. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 46 and contact element type 46 has been set up. The - companion pair has real constant set ID 47. Both pairs should have - the same behavior. + constant set 46 and contact element type 46 has been set up. The + companion pair has real constant set ID 47. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1055,24 +1055,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25628 and target element 25709. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25628 and target element 25709. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 47 and contact element type 46 has been set up. The - companion pair has real constant set ID 46. Both pairs should have - the same behavior. + constant set 47 and contact element type 46 has been set up. The + companion pair has real constant set ID 46. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.5685 @@ -1083,24 +1083,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 25639 and target element 25608. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 25639 and target element 25608. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 48 and contact element type 48 has been set up. The - companion pair has real constant set ID 49. Both pairs should have - the same behavior. + constant set 48 and contact element type 48 has been set up. The + companion pair has real constant set ID 49. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1112,24 +1112,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25779 and target element 25820. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25779 and target element 25820. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 49 and contact element type 48 has been set up. The - companion pair has real constant set ID 48. Both pairs should have - the same behavior. + constant set 49 and contact element type 48 has been set up. The + companion pair has real constant set ID 48. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.8027 @@ -1140,24 +1140,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25787 and target element 25736. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25787 and target element 25736. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 50 and contact element type 50 has been set up. The - companion pair has real constant set ID 51. Both pairs should have - the same behavior. + constant set 50 and contact element type 50 has been set up. The + companion pair has real constant set ID 51. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1169,24 +1169,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 1.33226763E-14 was detected between contact - element 25924 and target element 26035. + Max. Initial penetration 1.33226763E-14 was detected between contact + element 25924 and target element 26035. **************************************** *** NOTE *** CP = 1.953 TIME= 06:52:52 Symmetric Deformable- deformable contact pair identified by real - constant set 51 and contact element type 50 has been set up. The - companion pair has real constant set ID 50. Both pairs should have - the same behavior. + constant set 51 and contact element type 50 has been set up. The + companion pair has real constant set ID 50. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 1.953 TIME= 06:52:52 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6964 @@ -1197,17 +1197,17 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 1.953 TIME= 06:52:52 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 25939 and target element 25890. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 25939 and target element 25890. **************************************** *** NOTE *** CP = 2.016 TIME= 06:52:52 - Internal nodes from 43998 to 44297 are created. + Internal nodes from 43998 to 44297 are created. 300 internal nodes are used for quadratic and/or cubic options of - BEAM188, PIPE288, and/or SHELL208. + BEAM188, PIPE288, and/or SHELL208. @@ -1229,17 +1229,17 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 22 and contact element type 22 has been set up. The - companion pair has real constant set ID 23. Both pairs should have - the same behavior. + constant set 22 and contact element type 22 has been set up. The + companion pair has real constant set ID 23. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1251,24 +1251,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23362 and target element 23450. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23362 and target element 23450. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 23 and contact element type 22 has been set up. The - companion pair has real constant set ID 22. Both pairs should have - the same behavior. + constant set 23 and contact element type 22 has been set up. The + companion pair has real constant set ID 22. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6035 @@ -1279,24 +1279,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23389 and target element 23348. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23389 and target element 23348. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 24 and contact element type 24 has been set up. The - companion pair has real constant set ID 25. Both pairs should have - the same behavior. + constant set 24 and contact element type 24 has been set up. The + companion pair has real constant set ID 25. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1308,24 +1308,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.065814104E-14 was detected between contact - element 23534 and target element 23703. + Max. Initial penetration 1.065814104E-14 was detected between contact + element 23534 and target element 23703. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 25 and contact element type 24 has been set up. The - companion pair has real constant set ID 24. Both pairs should have - the same behavior. + constant set 25 and contact element type 24 has been set up. The + companion pair has real constant set ID 24. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6670 @@ -1336,24 +1336,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 23619 and target element 23500. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 23619 and target element 23500. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 32 and contact element type 32 has been set up. The - companion pair has real constant set ID 33. Both pairs should have - the same behavior. + constant set 32 and contact element type 32 has been set up. The + companion pair has real constant set ID 33. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1365,24 +1365,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 2.131628207E-14 was detected between contact - element 24242 and target element 24365. + Max. Initial penetration 2.131628207E-14 was detected between contact + element 24242 and target element 24365. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 33 and contact element type 32 has been set up. The - companion pair has real constant set ID 32. Both pairs should have - the same behavior. + constant set 33 and contact element type 32 has been set up. The + companion pair has real constant set ID 32. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.7511 @@ -1393,24 +1393,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 24279 and target element 24217. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 24279 and target element 24217. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 38 and contact element type 38 has been set up. The - companion pair has real constant set ID 39. Both pairs should have - the same behavior. + constant set 38 and contact element type 38 has been set up. The + companion pair has real constant set ID 39. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1422,24 +1422,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 9.769962617E-15 was detected between contact - element 24836 and target element 24926. + Max. Initial penetration 9.769962617E-15 was detected between contact + element 24836 and target element 24926. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 39 and contact element type 38 has been set up. The - companion pair has real constant set ID 38. Both pairs should have - the same behavior. + constant set 39 and contact element type 38 has been set up. The + companion pair has real constant set ID 38. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.8514 @@ -1450,24 +1450,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 8.881784197E-15 was detected between contact - element 24879 and target element 24787. + Max. Initial penetration 8.881784197E-15 was detected between contact + element 24879 and target element 24787. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 40 and contact element type 40 has been set up. The - companion pair has real constant set ID 41. Both pairs should have - the same behavior. + constant set 40 and contact element type 40 has been set up. The + companion pair has real constant set ID 41. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1478,30 +1478,30 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 2.891 TIME= 06:52:53 One of the contact searching regions contains at least 63 target - elements. You may reduce the pinball radius. + elements. You may reduce the pinball radius. Default target edge extension factor TOLS 10.000 Initial penetration/gap is excluded. Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 24979 and target element 25077. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 24979 and target element 25077. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 41 and contact element type 40 has been set up. The - companion pair has real constant set ID 40. Both pairs should have - the same behavior. + constant set 41 and contact element type 40 has been set up. The + companion pair has real constant set ID 40. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 1.8845 @@ -1513,24 +1513,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.065814104E-14 was detected between contact - element 25011 and target element 24931. + Max. Initial penetration 1.065814104E-14 was detected between contact + element 25011 and target element 24931. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 48 and contact element type 48 has been set up. The - companion pair has real constant set ID 49. Both pairs should have - the same behavior. + constant set 48 and contact element type 48 has been set up. The + companion pair has real constant set ID 49. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1542,24 +1542,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25779 and target element 25820. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25779 and target element 25820. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 49 and contact element type 48 has been set up. The - companion pair has real constant set ID 48. Both pairs should have - the same behavior. + constant set 49 and contact element type 48 has been set up. The + companion pair has real constant set ID 48. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.8027 @@ -1570,24 +1570,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.421085472E-14 was detected between contact - element 25787 and target element 25736. + Max. Initial penetration 1.421085472E-14 was detected between contact + element 25787 and target element 25736. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 50 and contact element type 50 has been set up. The - companion pair has real constant set ID 51. Both pairs should have - the same behavior. + constant set 50 and contact element type 50 has been set up. The + companion pair has real constant set ID 51. Both pairs should have + the same behavior. ANSYS will keep the current pair and deactivate its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Shell edge - solid surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Default influence distance FTOLN will be used. @@ -1599,24 +1599,24 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 1.33226763E-14 was detected between contact - element 25924 and target element 26035. + Max. Initial penetration 1.33226763E-14 was detected between contact + element 25924 and target element 26035. **************************************** *** NOTE *** CP = 2.891 TIME= 06:52:53 Symmetric Deformable- deformable contact pair identified by real - constant set 51 and contact element type 50 has been set up. The - companion pair has real constant set ID 50. Both pairs should have - the same behavior. + constant set 51 and contact element type 50 has been set up. The + companion pair has real constant set ID 50. Both pairs should have + the same behavior. ANSYS will deactivate the current pair and keep its companion pair, - resulting in asymmetric contact. + resulting in asymmetric contact. Auto surface constraint is built Contact algorithm: MPC based approach *** NOTE *** CP = 2.891 TIME= 06:52:53 Contact related postprocess items (ETABLE, pressure ...) are not - available. + available. Contact detection at: nodal point (normal to target surface) MPC will be built internally to handle bonded contact. Average contact surface length 2.6964 @@ -1627,8 +1627,8 @@ number of nodes is recommended (suggestion: 300 modes). Bonded contact (always) is defined. *** NOTE *** CP = 2.891 TIME= 06:52:53 - Max. Initial penetration 7.105427358E-15 was detected between contact - element 25939 and target element 25890. + Max. Initial penetration 7.105427358E-15 was detected between contact + element 25939 and target element 25890. **************************************** @@ -1687,8 +1687,8 @@ number of nodes is recommended (suggestion: 300 modes). 21 0.568872E-05 Range of element maximum matrix coefficients in global coordinates - Maximum = 11792803.9 at element 17387. - Minimum = 528.07874 at element 3660. + Maximum = 11792803.9 at element 17387. + Minimum = 528.07874 at element 3660. *** ELEMENT MATRIX FORMULATION TIMES TYPE NUMBER ENAME TOTAL CP AVE CP @@ -1744,7 +1744,7 @@ number of nodes is recommended (suggestion: 300 modes). 49 204 TARGE170 0.000 0.000000 50 288 CONTA174 0.000 0.000000 51 288 TARGE170 0.000 0.000000 - Time at end of element matrix formulation CP = 4.40625. + Time at end of element matrix formulation CP = 4.40625. BLOCK LANCZOS CALCULATION OF UP TO 10 EIGENVECTORS. NUMBER OF EQUATIONS = 159678 @@ -1755,8 +1755,8 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 7.078 TIME= 06:52:58 - The initial memory allocation (-m) has been exceeded. - Supplemental memory allocations are being used. + The initial memory allocation (-m) has been exceeded. + Supplemental memory allocations are being used. Local memory allocated for solver = 470.292 MB Local memory required for in-core solution = 448.291 MB @@ -1768,11 +1768,11 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 8.641 TIME= 06:53:00 The Distributed Sparse Matrix Solver used by the Block Lanczos - eigensolver is currently running in the in-core memory mode. This + eigensolver is currently running in the in-core memory mode. This memory mode uses the most amount of memory in order to avoid using the hard drive as much as possible, which most often results in the - fastest solution time. This mode is recommended if enough physical - memory is present to accommodate all of the solver data. + fastest solution time. This mode is recommended if enough physical + memory is present to accommodate all of the solver data. *** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2021 R2 21.2 *** DISTRIBUTED Ansys Mechanical Enterprise @@ -1927,9 +1927,9 @@ number of nodes is recommended (suggestion: 300 modes). *** NOTE *** CP = 10.875 TIME= 06:53:03 - The modes requested are mass normalized (Nrmkey on MODOPT). However, + The modes requested are mass normalized (Nrmkey on MODOPT). However, the modal masses and kinetic energies below are calculated with unit - normalized modes. + normalized modes. ***** MODAL MASSES, KINETIC ENERGIES, AND TRANSLATIONAL EFFECTIVE MASSES SUMMARY ***** @@ -2198,11 +2198,11 @@ The response spectrum analysis is defined, solved and post-processed. *** NOTE *** CP = 16.328 TIME= 06:53:12 The automatic domain decomposition logic has selected the MESH domain - decomposition method with 2 processes per solution. + decomposition method with 2 processes per solution. ***** ANSYS SOLVE COMMAND ***** - Time at start of random vibration closed-form solution CP= 16.328125. + Time at start of random vibration closed-form solution CP= 16.328125. FREQUENCIES USED FOR RANDOM VIBRATION SOLUTION @@ -2226,15 +2226,15 @@ The response spectrum analysis is defined, solved and post-processed. PERFORM INTEGRATION FOR ACCELERATION-TYPE QUANTITIES - Modal covariance matrix computed CP= 16.328125. + Modal covariance matrix computed CP= 16.328125. - Quasi-static modal covariance matrix computed CP= 16.328125. + Quasi-static modal covariance matrix computed CP= 16.328125. - Covariant-modal covariance matrix computed CP= 16.328125. + Covariant-modal covariance matrix computed CP= 16.328125. - Psd file file0.psd created. CP= 16.328125. + Psd file file0.psd created. CP= 16.328125. - Time at start of random vibration mode combinations CP= 16.328125. + Time at start of random vibration mode combinations CP= 16.328125. BASE EXCITATION PROBLEM diff --git a/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst b/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst index 1bd3cdb16..f5628fbcb 100644 --- a/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst +++ b/doc/source/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst @@ -10,11 +10,11 @@ .. role:: yellow-text -Friction Stir Welding (FSW) Simulation +Friction stir welding (FSW) simulation *************************************** This example problem shows how to simulate the friction stir welding (FSW) -process. Several characteristics of FSW are presented, including +process. Several characteristics of FSW are presented, including tool-workpiece surface interaction, heat generation due to friction, and plastic deformation. A nonlinear direct coupled-field analysis is performed, as thermal and mechanical behaviors are mutually dependent and coupled together @@ -58,28 +58,30 @@ the joining of metals without filler materials. A cylindrical rotating tool plunges into a rigidly clamped workpiece and moves along the joint to be welded. As the tool translates along the joint, heat is generated by friction between the tool shoulder and the workpiece. Additional heat is generated by -plastic deformation of the workpiece material. The generated heat results in -thermal softening of the workpiece material. The translation of the tool causes -the softened workpiece material to flow from the front to the back of the tool -where it consolidates. As cooling occurs, a solid continuous joint between the -two plates is formed. No melting occurs during the process, and the resulting +plastic deformation of the workpiece material. +The generated heat results in thermal softening of the workpiece material. +The translation of the tool causes the softened workpiece material to flow +from the front to the back of the tool where it consolidates. +As cooling occurs, a solid continuous joint between the two plates is formed. +No melting occurs during the process, and the resulting temperature remains below the solidus temperature of the metals being joined. FSW offers many advantages over conventional welding techniques, and has been successfully applied in the aerospace, automobile, and shipbuilding industries. Thermal and mechanical behaviors are mutually dependent during the FSW process. Because the temperature field affects stress distribution, this example uses a -fully thermomechanically coupled model. The model consists of a coupled-field -solid element with structural and thermal degrees of freedom. The model has two -rectangular steel plates and a cylindrical tool. All necessary mechanical and -thermal `28.5. Boundary Conditions and Loading`_ are applied on the model. The +fully thermomechanically coupled model. +The model consists of a coupled-field solid element with structural and thermal +degrees of freedom. The model has two rectangular steel plates and a cylindrical +tool. All necessary mechanical and thermal +`28.5. Boundary Conditions and Loading`_ are applied on the model. The simulation occurs over three load steps, representing the `28.5.3. Loading`_ of the process. The temperature rises at the contact interface due to frictional contact between the tool and workpiece. FSW generally occurs when the temperature at the weld line region reaches 70 to 90 percent of the melting temperature of the -workpiece material. The temperature obtained around the weld line region in +workpiece material. The temperature obtained around the weld line region in this example falls within the range reported by Zhu and Chao [Zhu2004]_ and Prasanna and Rao [Prasanna2010]_, while the maximum resulting temperature is well below the melting temperature of the workpiece. @@ -91,10 +93,10 @@ interface of the plates to model the welding behind the tool. When the temperature at the contact surface exceeds this bonding temperature, the contact is changed to bonded. -28.2. Problem Description +28.2. Problem description ------------------------- -**The Zhu and Chao Thermomechanical Model** +**The Zhu and Chao thermomechanical model** The model used in this example is a simplified version of the thermomechanical model developed by Zhu and Chao for FSW with 304L stainless steel [Zhu2004]_. @@ -136,15 +138,17 @@ cylindrical shape tool, as shown in the following figure: from ansys.mapdl.core import examples from ansys.mapdl.core.examples import download_vtk_rotor, download_tech_demo_data - cdbfile = download_tech_demo_data("td-28", "fsw.cdb") + cdbfile = download_tech_demo_data("td-28", "fsw.cdb") # Generating geometry, just for plotting purposes. # The elements and nodes are going to be taken from the cdb file. from ansys.mapdl.core import launch_mapdl mapdl = launch_mapdl() + print(mapdl) + mapdl.clear() - mapdl.prep7() - mapdl.cdread('db', cdbfile) + mapdl.prep7() + mapdl.cdread('db', cdbfile) # ***** Problem parameters ******** l = 76.2e-03 # Length of each plate,m w = 31.75e-03 # Width of each plate,m @@ -190,7 +194,7 @@ cylindrical shape tool, as shown in the following figure: p.show() -**Figure 28.1: 3-D Model of Workpiece and Tool** +**Figure 28.1: 3-D model of workpiece and tool** The FSW process generally requires a tool made of a harder material than the workpiece material being welded. In the past, FSW was used for soft workpiece @@ -217,7 +221,7 @@ Modeling is a two-part task, as described in these topics: * `28.3.1. Workpiece and Tool Modeling`_ * `28.3.2. Contact Modeling`_ -28.3.1. Workpiece and Tool Modeling +28.3.1. Workpiece and tool modeling ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Two rectangular shaped plates (similar to those used in the reference model) @@ -343,20 +347,20 @@ region. The following figure shows the 3-D meshed model: pl.show() -**Figure 28.2: 3-D Meshed Model of Workpiece and Tool** +**Figure 28.2: 3-D meshed model of workpiece and tool** -28.3.2. Contact Modeling +28.3.2. Contact modeling ^^^^^^^^^^^^^^^^^^^^^^^^ Contact is modeled as follows for the FSW simulation: -* Contact Pair Between the Plates -* Contact Pair Between Tool and Workpiece -* Rigid Surface Constraint +* Contact pair between the plates +* Contact pair between tool and workpiece +* Rigid surface constraint -28.3.2.1. Contact Pair Between the Plates +28.3.2.1. Contact pair between the plates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ During the simulation, the surfaces to be joined come into contact. A standard @@ -365,10 +369,10 @@ in the following figure: .. figure:: images/gtecfricstir_fig3.png :align: center - :alt: Contact Pair Between Plates + :alt: Contact pair between plates :figclass: align-center - **Figure 28.3: Contact Pair Between Plates** + **Figure 28.3: Contact pair between plates** The surface-projection-based contact method (``KEYOPT(4) = 3`` for contact elements) is defined at the contact interface. The surface-projection-based @@ -393,15 +397,15 @@ exceeds the bonding temperature, the contact type changes to bonded. The contact status remains bonded for the remainder of the simulation, even though the temperature subsequently decreases below the bonding value. -.. **Example 28.1: Defining the Contact Settings of the Contact Pair** +.. **Example 28.1: Defining the contact settings of the contact pair** .. code:: python # * Define contact pair between two plates mapdl.et(6, "TARGE170") mapdl.et(7, "CONTA174") - mapdl.keyopt(7, 1, 1) # Displacement & Temp dof - mapdl.keyopt(7, 4, 3) # To include Surface projection based method + mapdl.keyopt(7, 1, 1) # Displacement & temp DOF + mapdl.keyopt(7, 4, 3) # To include surface projection based method mapdl.mat(1) mapdl.asel("s", "", "", 5) mapdl.nsla("", 1) @@ -416,7 +420,7 @@ the temperature subsequently decreases below the bonding value. mapdl.allsel("all") mapdl.type(6) mapdl.r(6) - mapdl.rmodif(6, 14, tcc1) # A real constant TCC,Thermal contact + mapdl.rmodif(6, 14, tcc1) # A real constant TCC, thermal contact # conductance coeffi. b/w the plates, W/m^2'C mapdl.rmodif(6, 35, 1000) # A real constant TBND,Bonding temperature # for welding, 'C @@ -431,7 +435,7 @@ the temperature subsequently decreases below the bonding value. mapdl.allsel("all") -28.3.2.2. Contact Pair Between Tool and Workpiece +28.3.2.2. Contact pair between tool and workpiece ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The tool plunges into the work piece, rotates, and moves along the weld line. @@ -460,7 +464,7 @@ model the contact surface on the top surface of the workpiece, and the p.show() -**Figure 28.4: Contact Pair Between Tool and Workpiece.** +**Figure 28.4: Contact pair between tool and workpiece.** ``CONTA174`` in :blue-text:`blue`, and ``TARGE170`` in :red-text:`red`. @@ -473,7 +477,7 @@ to 0.95, so that 95 percent of the heat generated from the friction flows into the workpiece and only five percent flows into the tool. A low TCC value (10 W/m2 °C) is specified for this contact pair because most of -the heat generated transfers to the workpiece. Some additional heat is also +the heat generated transfers to the workpiece. Some additional heat is also generated by plastic deformation of the workpiece material. Because the workpiece material softens and the value of friction coefficient drops as the temperature increases, a variable coefficient of friction (0.4 to 0.2) is @@ -482,14 +486,14 @@ defined (:meth:`Mapdl.tb("FRIC") ` with :meth:`Mapdl.tbdata() `). -.. **Example 28.2: Specifying the Settings for the Contact Pair** +.. **Example 28.2: Specifying the settings for the contact pair** .. code:: python # * Define contact pair between tool & workpiece mapdl.et(4, "TARGE170") mapdl.et(5, "CONTA174") - mapdl.keyopt(5, 1, 1) # Displacement & Temp dof + mapdl.keyopt(5, 1, 1) # Displacement & temp DOF mapdl.keyopt(5, 5, 3) # Close gap/reduce penetration with auto cnof mapdl.keyopt(5, 9, 1) # Exclude both initial penetration or gap mapdl.keyopt(5, 10, 0) # Contact stiffness update each iteration @@ -522,7 +526,7 @@ defined (:meth:`Mapdl.tb("FRIC") ` with mapdl.rmodif(5, 15, 1) # A real constant FHTG,the fraction of # frictional dissipated energy converted # into heat - mapdl.rmodif(5, 18, fwgt) # A real constant FWGT, weight factor for + mapdl.rmodif(5, 18, fwgt) # A real constant FWGT, weight factor for # the distribution of heat between the # contact and target surfaces, 0.95 mapdl.real(5) @@ -533,7 +537,7 @@ defined (:meth:`Mapdl.tb("FRIC") ` with -28.3.2.3. Rigid Surface Constraint +28.3.2.3. Rigid surface constraint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The workpiece remains fixed in all stages of the simulation. The tool rotates @@ -579,7 +583,7 @@ The following contact settings are used for the ``CONTA174`` elements: style='surface', color=color) pl.show() -**Figure 28.5: Rigid Surface Constrained.** +**Figure 28.5: Rigid surface constrained.** Pilot node or master with applied boundary conditions and the constrained top surface of the tool (:blue-text:`blue`).** @@ -627,7 +631,7 @@ top surface of the tool (:blue-text:`blue`).** mapdl.allsel("all") -28.4. Material Properties +28.4. Material properties ------------------------- Accurate temperature calculation is critical to the FSW process because the @@ -638,44 +642,45 @@ plates such as Young's modulus and the coefficient of thermal expansion are considered to be constant due to the limitations of data available in the literature. -It is assumed that the plastic deformation of the material uses the von Misses +It is assumed that the plastic deformation of the material uses the Von Misses yield criterion, as well as the associated flow rule and the work-hardening rule. Therefore, a bilinear isotropic hardening model (``TB,PLASTIC,,,,BISO``) is selected. The following table shows the material properties of the workpiece: -**Table 28.1: Workpiece Material Properties** - -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| **Property** | **Value** | -+==============================================================================================+=========================================+ -| Linear Properties | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Young's modulus | 193 GPa | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Poisson's ratio | 0.3 | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Coefficient of thermal expansion | 18.7 µm/m °C | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| **Bilinear Isotropic Hardening Constants (``TB,PLASTIC,,,,BISO``)** | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Yield stress | 290 MPa | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Tangent modulus | 2.8 GPa | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| **Temperature-Dependent Material Properties** | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Temperature (°C) | 0 | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Thermal Conductivity (W/m °C) | 16 | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Specific Heat (J/Kg °C) | 500 | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ -| Density (Kg/m3) | 7894 | -+----------------------------------------------------------------------------------------------+-----------------------------------------+ - -:meth:`Mapdl.tbdata() ` defines the yield stress and tangent modulus. +**Table 28.1: Workpiece material properties** + ++------------------------------------------------------------------------+-----------------------------------------+ +| **Property** | **Value** | ++========================================================================+=========================================+ +| Linear properties | ++------------------------------------------------------------------------+-----------------------------------------+ +| Young's modulus | 193 GPa | ++------------------------------------------------------------------------+-----------------------------------------+ +| Poisson's ratio | 0.3 | ++------------------------------------------------------------------------+-----------------------------------------+ +| Coefficient of thermal expansion | 18.7 µm/m °C | ++------------------------------------------------------------------------+-----------------------------------------+ +| **Bilinear isotropic hardening constants (``TB,PLASTIC,,,,BISO``)** | ++------------------------------------------------------------------------+-----------------------------------------+ +| Yield stress | 290 MPa | ++------------------------------------------------------------------------+-----------------------------------------+ +| Tangent modulus | 2.8 GPa | ++------------------------------------------------------------------------+-----------------------------------------+ +| **Temperature-dependent material properties** | ++------------------------------------------------------------------------+-----------------------------------------+ +| Temperature (°C) | 0 | ++------------------------------------------------------------------------+-----------------------------------------+ +| Thermal conductivity (W/m °C) | 16 | ++------------------------------------------------------------------------+-----------------------------------------+ +| Specific heat (J/Kg °C) | 500 | ++------------------------------------------------------------------------+-----------------------------------------+ +| Density (Kg/m3) | 7894 | ++------------------------------------------------------------------------+-----------------------------------------+ + +:meth:`Mapdl.tbdata() ` +defines the yield stress and tangent modulus. The fraction of the plastic work dissipated as heat during FSW is about 80 percent. Therefore, the fraction of plastic work converted to heat @@ -692,7 +697,7 @@ references: [Ozel2008]_ and [Mishra2007]_. The following table shows the material properties of the PCBN tool: -**Table 28.2: Material Properties of the PCBN Tool** +**Table 28.2: Material properties of the PCBN tool** +----------------------+-------------+ | Property | Value | @@ -701,9 +706,9 @@ The following table shows the material properties of the PCBN tool: +----------------------+-------------+ | Poisson's ratio | 0.22 | +----------------------+-------------+ -| Thermal Conductivity | 100 W/m °C | +| Thermal conductivity | 100 W/m °C | +----------------------+-------------+ -| Specific Heat | 750 J/Kg °C | +| Specific heat | 750 J/Kg °C | +----------------------+-------------+ | Density | 4280 Kg/m3 | +----------------------+-------------+ @@ -743,7 +748,7 @@ The following code setup the material properties: -28.5. Boundary Conditions and Loading +28.5. Boundary conditions and loading ------------------------------------- This section describes the thermal and mechanical boundary conditions imposed @@ -753,7 +758,7 @@ on the FSW model: * `28.5.2. Mechanical Boundary Conditions`_ * `28.5.3. Loading`_ -28.5.1. Thermal Boundary Conditions +28.5.1. Thermal boundary conditions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The frictional and plastic heat generated during the FSW process propagates @@ -785,23 +790,24 @@ to the backing plate. pl.show() -**Figure 28.6: Thermal Boundary Conditions.** +**Figure 28.6: Thermal boundary conditions.** Convection loads (:red-text:`red`) and conduction loads (:yellow-text:`yellow`) Available data suggest that the value of the convection coefficient lies between 10 and 30 W/m2 °C for the workpiece surfaces, except for the bottom surface. The value of the convection coefficient is 30 W/m2°C for workpiece and -tool. This coefficient affects the output temperature. A lower coefficient +tool. +This coefficient affects the output temperature. A lower coefficient increases the output temperature of the model. A high overall heat-transfer coefficient (about 10 times the convective coefficient) of 300 W/m2 °C is assumed for the conductive heat loss through the bottom surface of the workpiece. As a result, the bottom surface of the workpiece is also treated as a convection surface for modeling conduction losses. Because the percentage of heat lost due to radiation is low, radiation heat losses are ignored. An -initial temperature of 25 °C is applied on the model. Temperature boundary -conditions are not imposed anywhere on the model. +initial temperature of 25 °C is applied on the model. +Temperature boundary conditions are not imposed anywhere on the model. -.. **Example 28.3: Defining the Thermal Boundary Conditions** +.. **Example 28.3: Defining the thermal boundary conditions** .. code:: python @@ -812,7 +818,7 @@ conditions are not imposed anywhere on the model. mapdl.ic("all", "temp", 25) # Initial condition at nodes,temp 25'C - # Thermal Boundary Conditions + # Thermal boundary conditions # Convection heat loss from the workpiece surfaces mapdl.vsel("s", "volume", "", 1, 2) # Selecting the workpiece mapdl.allsel("below", "volume") @@ -844,11 +850,11 @@ conditions are not imposed anywhere on the model. -28.5.2. Mechanical Boundary Conditions +28.5.2. Mechanical boundary conditions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The workpiece is fixed by clamping each plate. The clamped portions of the -plates are constrained in all directions. To simulate support at the bottom of +plates are constrained in all directions. To simulate support at the bottom of the plates, all bottom nodes of the workpiece are constrained in the perpendicular direction (z direction). @@ -868,7 +874,7 @@ perpendicular direction (z direction). show_axes=False) pl.show() -**Figure 28.7: Mechanical Boundary Conditions:** +**Figure 28.7: Mechanical boundary conditions:** X-direction (``UX``) in :red-text:`red`, Y-direction (``UY``) in :green-text:`green`, and Z-direction (``UZ``) in :blue-text:`blue`. @@ -913,10 +919,10 @@ tool. The following table shows the details for each load step. -**Table 28.3: Load Steps** +**Table 28.3: Load steps** +-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ -| Load Step | Time Period (sec)| Loadings on Pilot Node | Boundary Condition | +| Load step | Time period (sec)| Loadings on pilot node | Boundary Condition | +===========+==================+============================================================================+=======================================+ | 1 | 1 | Displacement boundary condition | ``UZ`` = -7.95E-07 m | +-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ @@ -932,7 +938,7 @@ the weld temperatures. The parameters are determined based on the experimental data of Zhu and Chao [Zhu2004]_. The tool travels from one end of the welding line to the other at a speed of 2.7 mm/s. -28.6. Analysis and Solution Controls +28.6. Analysis and solution controls ------------------------------------ A nonlinear transient analysis is performed in three load steps using @@ -947,10 +953,10 @@ The first load step in the solution process converges within a few substeps, but the second and third load steps converge only after applying the proper solution settings shown in the following table: -**Table 28.4: Solution Settings** +**Table 28.4: Solution settings** +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Solution Setting | Description of Setting and Comments | +| Solution setting | Description of setting and comments | +==================================================================================+==================================================================================================================================================================================================================================================================================================================================================================+ | :meth:`Mapdl.antype(4) ` | Transient analysis. | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -971,7 +977,7 @@ To allow for a faster solution, automatic time-stepping is activated (:meth:`Mapdl.autots("on") `). The initial time step size (:meth:`Mapdl.deltim() `) is set to 0.1, and the minimum time step is set to 0.001. The maximum time step is set as -0.2 in load steps 2 and 3. A higher maximum time-step size may result in an +0.2 in load steps 2 and 3. A higher maximum time-step size may result in an unconverged solution. The time step values are determined based on mesh or element size. For @@ -983,7 +989,7 @@ required. It is important to choose a time step size that does not violate the subsequent criterion (minimum element size, maximum thermal conductivity over the whole model, minimum density, and minimum specific heat). -.. **Example 28.5: Defining the Solution Settings** +.. **Example 28.5: Defining the solution settings** .. code:: python @@ -997,7 +1003,7 @@ the whole model, minimum density, and minimum specific heat). mapdl.nropt('unsym') ## Solving - # Load Step1 + # Load step1 mapdl.time(1) mapdl.nsubst(10, 1000, 10) mapdl.d(1, "uz", -uz1) # Tool plunges into the workpiece @@ -1006,7 +1012,7 @@ the whole model, minimum density, and minimum specific heat). mapdl.solve() mapdl.save() - # Load Step2 + # Load step2 mapdl.time(6.5) mapdl.d(1, "rotz", nr1) # Rotation of tool, 60rpm mapdl.deltim(tsz, 0.001, 0.2) @@ -1015,7 +1021,7 @@ the whole model, minimum density, and minimum specific heat). mapdl.solve() mapdl.save() - # Load Step3 + # Load step3 mapdl.time(29) mapdl.d(1, "rotz", nr2) # Rotation of tool,60rpm mapdl.d(1, "uy", uy1) # Displacement of tool along weldline @@ -1027,19 +1033,19 @@ the whole model, minimum density, and minimum specific heat). -28.7. Results and Discussion +28.7. Results and discussion ---------------------------- The following results topics for the FSW simulation are available: -* `28.7.1. Deformation and Stresses`_ -* `28.7.2. Temperature Results`_ -* `28.7.3. Welding Results`_ -* `28.7.4. Heat Generation`_ +* `28.7.1. Deformation and stresses`_ +* `28.7.2. Temperature results`_ +* `28.7.3. Welding results`_ +* `28.7.4. Heat generation`_ -28.7.1. Deformation and Stresses +28.7.1. Deformation and stresses ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It is important to observe the change in various quantities around the weld @@ -1055,7 +1061,7 @@ workpiece due to plunging of the tool in the first load step: pl.show() -**Figure 28.9: Deflection at Workpiece After Load Step 1** +**Figure 28.9: Deflection at workpiece after load step 1** The deflection causes high stresses to develop on the workpiece beneath the @@ -1070,7 +1076,7 @@ tool, as shown in this figure: pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) pl.show() -**Figure 28.10: von Mises Stress After Load Step 1** +**Figure 28.10: Von Mises stress after load step 1** Following load step 1, the temperature remains unchanged (25 °C), as shown in this figure: @@ -1084,7 +1090,7 @@ this figure: pl.show() -**Figure 28.11: Temperature After Load Step 1** +**Figure 28.11: Temperature after load step 1** As the tool begins to rotate at this location, the frictional stresses develop and increase rapidly. The following two figures show the increment in contact @@ -1100,7 +1106,7 @@ frictional stresses from load step 1 to load step 2: pl.show() -**Figure 28.12: Frictional Stress After Load Step 1** +**Figure 28.12: Frictional stress after load step 1** .. jupyter-execute:: @@ -1112,14 +1118,14 @@ frictional stresses from load step 1 to load step 2: pl.show() -**Figure 28.13: Frictional Stress After Load Step 2** +**Figure 28.13: Frictional stress after load step 2** All frictional dissipated energy is converted into heat during load step 2. The heat is generated at the tool-workpiece interface. Most of the heat is transferred to the workpiece (FWGT is specified to 0.95). As a result, the temperature of the workpiece increases rapidly compared to that of the tool. -28.7.2. Temperature Results +28.7.2. Temperature results ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following two figures shows the temperature rise due to heat generation in the @@ -1133,7 +1139,7 @@ second and third load steps: pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) pl.show() -**Figure 28.14: Temperature After Load Step 2** +**Figure 28.14: Temperature after load step 2** .. jupyter-execute:: @@ -1144,7 +1150,7 @@ second and third load steps: pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) pl.show() -**Figure 28.15: Temperature After Load Step 3** +**Figure 28.15: Temperature after load step 3** The maximum temperature on the workpiece occurs beneath the tool during the @@ -1197,7 +1203,7 @@ of the melting temperature: fig.show() -**Figure 28.16: Maximum Temperature (on Workpiece Beneath the Tool) Variation with Time** +**Figure 28.16: Maximum temperature (on workpiece beneath the tool) variation with time** The two plates can be welded together within this temperature range. @@ -1250,7 +1256,7 @@ the workpiece along the transverse distance (perpendicular to the weld line): ) fig.show() -**Figure 28.17: Temperature Distribution on the Top Surface of Workpiece at Various Locations** +**Figure 28.17: Temperature distribution on the top surface of workpiece at various locations** As shown in the following figure and table, the temperature plots indicate the temperature distribution at various locations on the weld line when the maximum @@ -1258,16 +1264,16 @@ temperature occurs at those locations: .. figure:: images/gtecfricstir_fig17.png :align: center - :alt: Various Locations on the Workpiece + :alt: Various locations on the workpiece :figclass: align-center - **Figure 28.18: Various Locations on the Workpiece** + **Figure 28.18: Various locations on the workpiece** -**Table 28.5: Locations on Weld Line** +**Table 28.5: Locations on weld line** +------------------+-------------------------------------------+---------------------------------------+ -| Location Number | Distance on the Weld Line in y Direction | Time When Maximum Temperature Occurs | +| Location Number | Distance on the weld line in y direction | Time when maximum temperature occurs | +==================+===========================================+=======================================+ | 1 | 0.016 m | 15.25 Sec | +------------------+-------------------------------------------+---------------------------------------+ @@ -1289,7 +1295,7 @@ at location 1: pl.camera.position=(0,0.15,0) pl.show() -**Figure 28.19: Temperature Distribution in Thickness Direction at Location 1** +**Figure 28.19: Temperature distribution in thickness direction at location 1** As expected, the highest temperature caused by heat generation appears around @@ -1302,7 +1308,7 @@ The following table and figure show the time-history response of the temperature at various locations on the weld line: +------------------+----------------------------+ -| Location Number | Distance on the Weld Line | +| Location number | Distance on the weld line | +==================+============================+ | 1 | 0.018 m | +------------------+----------------------------+ @@ -1381,10 +1387,10 @@ temperature at various locations on the weld line: fig.show() -**Figure 28.20: Temperature Variation with Time on Various Joint Locations** +**Figure 28.20: Temperature variation with time on various joint locations** -28.7.3. Welding Results +28.7.3. Welding results ^^^^^^^^^^^^^^^^^^^^^^^ A bonding temperature of 1000 °C is already defined for the welding simulation @@ -1402,7 +1408,7 @@ load step is shown in the following figure: pl.show() -**Figure 28.21: Contact Status at Interface with Bonding Temperature 1000 °C** +**Figure 28.21: Contact status at interface with bonding temperature 1000 °C** Elements can be in near-contact (:blue-text:`blue`), sliding (:green-text:`green`) or sticking (:red-text:`red`) states. @@ -1420,11 +1426,11 @@ welding region would increase, as shown in this figure: pl.camera.position=(0.15,0.0,0) pl.show() -**Figure 28.22: Contact Status at Interface with Bonding Temperature 900 °C** +**Figure 28.22: Contact status at interface with bonding temperature 900 °C** Elements can be in near-contact (:blue-text:`blue`), sliding (:green-text:`green`) or sticking (:red-text:`red`) states. -28.7.4. Heat Generation +28.7.4. Heat generation ^^^^^^^^^^^^^^^^^^^^^^^ Friction and plastic deformation generate heat. A calculation of frictional and @@ -1440,7 +1446,7 @@ element of the workpiece, the total frictional heat generation rate is calculated for a given time. It is possible to calculate the total frictional heat-generation rate at each -time-step (:meth:`Mapdl.etable `). The +time-step (:meth:`Mapdl.etable `). The following figure shows the plot of total frictional heat generation rate on the workpiece with time: @@ -1477,7 +1483,7 @@ workpiece with time: ) fig.show() -**Figure 28.23: Total Frictional Heat Rate Variation with Time** +**Figure 28.23: Total frictional heat rate variation with time** The plot indicates that the frictional heat starts from the second load step (after 1 second). @@ -1486,7 +1492,7 @@ The element contact area can be calculated using the ``CONTA174`` element ``CAREA`` (``NMISC, 58``) output option. -.. **Example 28.6: Defining the Frictional Heat Calculations** +.. **Example 28.6: Defining the frictional heat calculations** .. code:: python @@ -1506,7 +1512,7 @@ option. mapdl.etable("fri", "smisc", 18) mapdl.etable("are1", "nmisc", 58) # Area of each contact element - # Multiplying Fri. energy dissipation + # Multiplying frictional energy dissipation # per unit area with the area of # corresponding element mapdl.smult("frri", "fri", "are1") @@ -1537,7 +1543,7 @@ option. A similar calculation is performed to check the heat generation from plastic deformation on the workpiece. The ``SOLID226`` element's output option ``PHEAT`` (``NMISC, 5``) gives the plastic heat generation rate per unit -volume. After multiplying this value with the corresponding element volume, +volume. After multiplying this value with the corresponding element volume, the plastic heat generation rate for an element is calculated. By summing the values from each element (``SOLID226``) of the workpiece, the total plastic heat generation rate is calculated for a particular time. @@ -1579,10 +1585,10 @@ figure shows the plot of the total plastic heat-generation rate with time. fig.show() -**Figure 28.24: Total Plastic Heat Rate Variation with Time** +**Figure 28.24: Total plastic heat rate variation with time** -.. **Example 28.7: Defining the Plastic Heat Calculations** +.. **Example 28.7: Defining the plastic heat calculations** .. code:: python @@ -1591,7 +1597,7 @@ figure shows the plot of the total plastic heat-generation rate with time. mapdl.set("last") nst = mapdl.get("nst", "active", "", "set", "nset") # To get number of data sets on result file - # Total Plastic heat rate + # Total plastic heat rate mapdl.esel("s", "mat", "", 1) # Selecting the coupled elements on workpiece mapdl.etable("vlm1", "volu") # Volume of the each element pha = np.zeros(nst) @@ -1652,7 +1658,7 @@ recommendations: coupling is recommended for such processes. This method involves just one analysis that uses a coupled-field element containing all necessary degrees of freedom. Direct coupling is advantageous when the coupled-field interaction - involves strongly-coupled physics or is highly nonlinear. + involves strongly coupled physics or is highly nonlinear. * A nonlinear transient analysis is preferable for simulations where the objective is to study the transient temperature and transient heat transfer. @@ -1680,9 +1686,9 @@ recommendations: higher than 60 RPM. * A symmetric mesh (about the joint line) is preferred to capture the exact outputs and their effects on the workpiece. A hex mesh with dropped midside - nodes is recommended for the workpiece as well as the tool. This approach helps - to maintain symmetry and prevent the temperature from reaching negative values - during the simulation. + nodes is recommended for the workpiece as well as the tool. + This approach helps to maintain symmetry and prevent the temperature + from reaching negative values during the simulation. * A minimum of two element layers is required in the thickness direction. A fine sweep mesh near the weld line yields more accurate results; however, too fine a mesh increases computational time. A fine mesh is unnecessary on the tool side. @@ -1714,7 +1720,7 @@ The following papers are cited in this example problem: OH: ASM International. -28.10. Input Files +28.10. Input files ------------------ The following files were used in this problem: diff --git a/doc/source/verif-manual/_static/custom.css b/doc/source/verif-manual/_static/custom.css deleted file mode 100644 index 97bda40f4..000000000 --- a/doc/source/verif-manual/_static/custom.css +++ /dev/null @@ -1,17 +0,0 @@ -@import url("default.css"); - -.red-text { - color: red; -} - -.green-text { - color: green; -} - -.blue-text { - color: blue; -} - -.yellow-text { - color: yellow; -} \ No newline at end of file diff --git a/doc/source/verif-manual/_static/lathe_cutter_model.png b/doc/source/verif-manual/_static/lathe_cutter_model.png deleted file mode 100644 index a499b767b..000000000 Binary files a/doc/source/verif-manual/_static/lathe_cutter_model.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png deleted file mode 100644 index fce2f7f4d..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png deleted file mode 100644 index de305b5ce..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png deleted file mode 100644 index 29a51300a..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png deleted file mode 100644 index 9b86d4612..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png deleted file mode 100644 index 452138023..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png deleted file mode 100644 index ba376aaba..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png deleted file mode 100644 index 1593e5bbb..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-008-parametric_calculation_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-008-parametric_calculation_thumb.png deleted file mode 100644 index 5c4451ef6..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-008-parametric_calculation_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png deleted file mode 100644 index 018faae3d..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/images/thumb/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png b/doc/source/verif-manual/images/thumb/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png deleted file mode 100644 index fe0cedd81..000000000 Binary files a/doc/source/verif-manual/images/thumb/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png and /dev/null differ diff --git a/doc/source/verif-manual/index.rst b/doc/source/verif-manual/index.rst deleted file mode 100644 index 69249f4f8..000000000 --- a/doc/source/verif-manual/index.rst +++ /dev/null @@ -1,216 +0,0 @@ -.. _sphx_glr_verif-manual: - -Verification Manual -=================== -This section demonstrates a range of Mechanical APDL elements and -capabilities in straightforward problems which have "classical" or -readily-obtainable theoretical solutions using PyMAPDL. - -These problems may then serve as the basis for additional validation -and qualification of Mechanical APDL capabilities for specific -applications that may be of interest. - - - -.. raw:: html - -
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png - :alt: Statically Indeterminate Reaction Force Analysis - - :ref:`sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis.py` - -.. raw:: html - -
Statically Indeterminate Reaction Force Analysis
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png - :alt: Beam Stresses and Deflections - - :ref:`sphx_glr_vm-002-beam_stresses_and_deflections.py` - -.. raw:: html - -
Beam Stresses and Deflections
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png - :alt: Thermally Loaded Support Structure - - :ref:`sphx_glr_vm-003-thermally_loaded_support_structure.py` - -.. raw:: html - -
Thermally Loaded Support Structure
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png - :alt: Deflection of a Hinged Support - - :ref:`sphx_glr_vm-004-deflection_of_a_hinged_support.py` - -.. raw:: html - -
Deflection of a Hinged Support
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png - :alt: Statically Indeterminate Reaction Force Analysis - - :ref:`sphx_glr_vm-005-laterally_loaded_tapered_support_structure.py` - -.. raw:: html - -
Statically Indeterminate Reaction Force Analysis
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png - :alt: Pinched Cylinder - - :ref:`sphx_glr_vm-006-pinched_cylinder.py` - -.. raw:: html - -
Pinched Cylinder
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png - :alt: Plastic Compression of a Pipe Assembly - - :ref:`sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly.py` - -.. raw:: html - -
Plastic Compression of a Pipe Assembly
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-008-parametric_calculation_thumb.png - :alt: Parametric Calculation - - :ref:`sphx_glr_vm-008-parametric_calculation.py` - -.. raw:: html - -
Parametric Calculation
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png - :alt: Large Lateral Deflection of Unequal Stiffness Springs - - :ref:`sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py` - -.. raw:: html - -
Large Lateral Deflection of Unequal Stiffness Springs
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: images/thumb/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png - :alt: Bending of a Tee-Shaped Beam - - :ref:`sphx_glr_vm-010-bending_of_a_t-shaped_beam.py` - -.. raw:: html - -
Bending of a Tee-Shaped Beam
-
- - -.. raw:: html - -
- - -.. toctree:: - :hidden: - :includehidden: - - vm-001/vm-001-statically_indeterminate_reaction_force_analysis - vm-002/vm-002-beam_stresses_and_deflections - vm-003/vm-003-thermally_loaded_support_structure - vm-004/vm-004-deflection_of_a_hinged_support - vm-005/vm-005-laterally_loaded_tapered_support_structure - vm-006/vm-006-pinched_cylinder - vm-007/vm-007-plastic_compression_of_a_pipe_assembly - vm-008/vm-008-parametric_calculation - vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs - vm-010/vm-010-bending_of_a_t-shaped_beam - - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/sg_execution_times.rst b/doc/source/verif-manual/sg_execution_times.rst deleted file mode 100644 index 8573f1a86..000000000 --- a/doc/source/verif-manual/sg_execution_times.rst +++ /dev/null @@ -1,31 +0,0 @@ - -:orphan: - -.. _sphx_glr_sg_execution_times: - -Computation times -================= - -**00:15.747** total execution time for **verif-manual** files: - -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-006-pinched_cylinder.py` (``vm-006-pinched_cylinder.py``) | 00:04.904 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-005-laterally_loaded_tapered_support_structure.py` (``vm-005-laterally_loaded_tapered_support_structure.py``) | 00:02.092 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly.py` (``vm-007-plastic_compression_of_a_pipe_assembly.py``) | 00:01.807 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-004-deflection_of_a_hinged_support.py` (``vm-004-deflection_of_a_hinged_support.py``) | 00:01.316 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-003-thermally_loaded_support_structure.py` (``vm-003-thermally_loaded_support_structure.py``) | 00:01.294 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-008-parametric_calculation.py` (``vm-008-parametric_calculation.py``) | 00:01.098 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-002-beam_stresses_and_deflections.py` (``vm-002-beam_stresses_and_deflections.py``) | 00:00.960 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-010-bending_of_a_t-shaped_beam.py` (``vm-010-bending_of_a_t-shaped_beam.py``) | 00:00.939 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py` (``vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py``) | 00:00.909 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis.py` (``vm-001-statically_indeterminate_reaction_force_analysis.py``) | 00:00.426 | 0.0 MB | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+--------+ diff --git a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.ipynb b/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.ipynb deleted file mode 100644 index 7894841b2..000000000 --- a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.ipynb +++ /dev/null @@ -1,288 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - "# Statically Indeterminate Reaction Force Analysis\n", - "Problem Description:\n", - " - A prismatical bar with built-in ends is loaded axially at two\n", - " intermediate cross sections. Determine the reactions $R_1$\n", - " and $R_2$.\n", - "\n", - "Reference:\n", - " - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and\n", - " Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955,\n", - " pg. 26, problem 10.\n", - "\n", - "Analysis Type(s):\n", - " - Static Analysis ``ANTYPE=0``\n", - "\n", - "Element Type(s):\n", - " - 3-D Spar (or Truss) Elements (LINK180)\n", - "\n", - "\"VM1\n", - "\n", - "Material Properties\n", - " - $E = 30 \\cdot 10^6 psi$\n", - "\n", - "Geometric Properties:\n", - " - $a = b = 0.3$\n", - " - $l = 10 in$\n", - "\n", - "Loading:\n", - " - $F_1 = 2*F_2 = 1000 lb$\n", - "\n", - "Analytical Equations:\n", - " - $P = R_1 + R_2$ where $P$ is load.\n", - " - $\\frac{R_2}{R_1} = \\frac{a}{b}$\n", - " Where $a$ and $b$ are the ratios of distances between\n", - " the load and the wall.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm1_setup.png'\n", - "\n", - "from ansys.mapdl.core import launch_mapdl\n", - "\n", - "# start mapdl and clear it\n", - "mapdl = launch_mapdl()\n", - "mapdl.clear() # optional as MAPDL just started\n", - "\n", - "# enter verification example mode and the pre-processing routine\n", - "mapdl.verify()\n", - "mapdl.prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\n", - "Set up the material and its type (a single material, with a linking-type\n", - "section and a Young's modulus of 30e6).\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.antype(\"STATIC\")\n", - "mapdl.et(1, \"LINK180\")\n", - "mapdl.sectype(1, \"LINK\")\n", - "mapdl.secdata(1)\n", - "mapdl.mp(\"EX\", 1, 30e6)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\n", - "Set up the nodes and elements. This creates a mesh just like in the\n", - "problem setup.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.n(1, 0, 0)\n", - "mapdl.n(2, 0, 4)\n", - "mapdl.n(3, 0, 7)\n", - "mapdl.n(4, 0, 10)\n", - "mapdl.e(1, 2)\n", - "mapdl.egen(3, 1, 1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\n", - "Full constrain nodes 1 and 4, by incrementing from node 1 to node 4\n", - "in steps of 3. Apply y-direction forces to nodes 2 and 3, with\n", - "values of -500 lb and -1000 lb respectively. Then exit prep7.\n", - "\n", - "Effectiely, this sets:\n", - "- $F_1 = 2*F_2 = 1000 lb$\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.d(1, \"ALL\", \"\", \"\", 4, 3)\n", - "mapdl.f(2, \"FY\", -500)\n", - "mapdl.f(3, \"FY\", -1000)\n", - "mapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\n", - "Enter solution mode and solve the system.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.run(\"/SOLU\")\n", - "out = mapdl.solve()\n", - "mapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\n", - "Enter post-processing. Select the nodes at ``y=10`` and ``y=0``, and\n", - "sum the forces there. Then store the y-components in two variables:\n", - "``reaction_1`` and ``reaction_2``.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.post1()\n", - "mapdl.nsel(\"S\", \"LOC\", \"Y\", 10)\n", - "mapdl.fsum()\n", - "reaction_1 = mapdl.get(\"REAC_1\", \"FSUM\", \"\", \"ITEM\", \"FY\")\n", - "mapdl.nsel(\"S\", \"LOC\", \"Y\", 0)\n", - "mapdl.fsum()\n", - "reaction_2 = mapdl.get(\"REAC_2\", \"FSUM\", \"\", \"ITEM\", \"FY\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\n", - "Now that we have the reaction forces we can compare them to the\n", - "expected values of 900 lbs and 600 lbs for reactions 1 and 2 respectively.\n", - "\n", - "Analytical results obtained from:\n", - "- $P = R_1 + R_2$ where $P$ is load of 1500 lbs\n", - "- $\\frac{R_2}{R_1} = \\frac{a}{b}$\n", - "\n", - "Hint: Solve for each reaction force independently.\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "results = f\"\"\"\n", - " --------------------- RESULTS COMPARISON ---------------------\n", - " | TARGET | Mechanical APDL | RATIO\n", - " /INPUT FILE= LINE= 0\n", - " R1, lb 900.0 {abs(reaction_1)} {abs(reaction_1) / 900}\n", - " R2, lb 600.0 {abs(reaction_2)} {abs(reaction_2) / 600}\n", - " ----------------------------------------------------------------\n", - " \"\"\"\n", - "print(results)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.10.8 ('.venv': venv)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - }, - "vscode": { - "interpreter": { - "hash": "269550a72b951409c73f23ea9b5a89d868b3d5a683e175acf6d5151541610ed6" - } - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py.md5 b/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py.md5 deleted file mode 100644 index f1b77ea5d..000000000 --- a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py.md5 +++ /dev/null @@ -1 +0,0 @@ -90172b3683c5a48710ab734d2f973446 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.rst b/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.rst deleted file mode 100644 index 49535c435..000000000 --- a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.rst +++ /dev/null @@ -1,345 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-001-statically_indeterminate_reaction_force_analysis.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis.py: - - -.. _ref_statically_indeterminate_example: - -Statically Indeterminate Reaction Force Analysis ------------------------------------------------- -Problem Description: - - A prismatical bar with built-in ends is loaded axially at two - intermediate cross sections. Determine the reactions :math:`R_1` - and :math:`R_2`. - -Reference: - - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and - Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, - pg. 26, problem 10. - -Analysis Type(s): - - Static Analysis ``ANTYPE=0`` - -Element Type(s): - - 3-D Spar (or Truss) Elements (LINK180) - -.. image:: _static/vm1_setup.png - :width: 400 - :alt: VM1 Problem Sketch - -Material Properties - - :math:`E = 30 \cdot 10^6 psi` - -Geometric Properties: - - :math:`a = b = 0.3` - - :math:`l = 10 in` - -Loading: - - :math:`F_1 = 2*F_2 = 1000 lb` - -Analytical Equations: - - :math:`P = R_1 + R_2` where :math:`P` is load. - - :math:`\frac{R_2}{R_1} = \frac{a}{b}` - Where :math:`a` and :math:`b` are the ratios of distances between - the load and the wall. - -.. GENERATED FROM PYTHON SOURCE LINES 43-55 - -.. code-block:: default - - # sphinx_gallery_thumbnail_path = '_static/vm1_setup.png' - - from ansys.mapdl.core import launch_mapdl - - # start mapdl and clear it - mapdl = launch_mapdl() - mapdl.clear() # optional as MAPDL just started - - # enter verification example mode and the pre-processing routine - mapdl.verify() - mapdl.prep7() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** - - - -.. GENERATED FROM PYTHON SOURCE LINES 56-60 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material and its type (a single material, with a linking-type -section and a Young's modulus of 30e6). - -.. GENERATED FROM PYTHON SOURCE LINES 60-67 - -.. code-block:: default - - - mapdl.antype("STATIC") - mapdl.et(1, "LINK180") - mapdl.sectype(1, "LINK") - mapdl.secdata(1) - mapdl.mp("EX", 1, 30e6) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - MATERIAL 1 EX = 0.3000000E+08 - - - -.. GENERATED FROM PYTHON SOURCE LINES 68-72 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the nodes and elements. This creates a mesh just like in the -problem setup. - -.. GENERATED FROM PYTHON SOURCE LINES 72-81 - -.. code-block:: default - - - mapdl.n(1, 0, 0) - mapdl.n(2, 0, 4) - mapdl.n(3, 0, 7) - mapdl.n(4, 0, 10) - mapdl.e(1, 2) - mapdl.egen(3, 1, 1) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - GENERATE 3 TOTAL SETS OF ELEMENTS WITH NODE INCREMENT OF 1 - SET IS SELECTED ELEMENTS IN RANGE 1 TO 1 IN STEPS OF 1 - - MAXIMUM ELEMENT NUMBER= 3 - - - -.. GENERATED FROM PYTHON SOURCE LINES 82-90 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Full constrain nodes 1 and 4, by incrementing from node 1 to node 4 -in steps of 3. Apply y-direction forces to nodes 2 and 3, with -values of -500 lb and -1000 lb respectively. Then exit prep7. - -Effectiely, this sets: -- :math:`F_1 = 2*F_2 = 1000 lb` - -.. GENERATED FROM PYTHON SOURCE LINES 90-97 - -.. code-block:: default - - - mapdl.d(1, "ALL", "", "", 4, 3) - mapdl.f(2, "FY", -500) - mapdl.f(3, "FY", -1000) - mapdl.finish() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 98-101 - -Solve -~~~~~ -Enter solution mode and solve the system. - -.. GENERATED FROM PYTHON SOURCE LINES 101-106 - -.. code-block:: default - - - mapdl.run("/SOLU") - out = mapdl.solve() - mapdl.finish() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - FINISH SOLUTION PROCESSING - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 107-112 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing. Select the nodes at ``y=10`` and ``y=0``, and -sum the forces there. Then store the y-components in two variables: -``reaction_1`` and ``reaction_2``. - -.. GENERATED FROM PYTHON SOURCE LINES 112-122 - -.. code-block:: default - - - mapdl.post1() - mapdl.nsel("S", "LOC", "Y", 10) - mapdl.fsum() - reaction_1 = mapdl.get("REAC_1", "FSUM", "", "ITEM", "FY") - mapdl.nsel("S", "LOC", "Y", 0) - mapdl.fsum() - reaction_2 = mapdl.get("REAC_2", "FSUM", "", "ITEM", "FY") - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 123-134 - -Check Results -~~~~~~~~~~~~~ -Now that we have the reaction forces we can compare them to the -expected values of 900 lbs and 600 lbs for reactions 1 and 2 respectively. - -Analytical results obtained from: -- :math:`P = R_1 + R_2` where :math:`P` is load of 1500 lbs -- :math:`\frac{R_2}{R_1} = \frac{a}{b}` - -Hint: Solve for each reaction force independently. - - -.. GENERATED FROM PYTHON SOURCE LINES 134-144 - -.. code-block:: default - - results = f""" - --------------------- RESULTS COMPARISON --------------------- - | TARGET | Mechanical APDL | RATIO - /INPUT FILE= LINE= 0 - R1, lb 900.0 {abs(reaction_1)} {abs(reaction_1) / 900} - R2, lb 600.0 {abs(reaction_2)} {abs(reaction_2) / 600} - ---------------------------------------------------------------- - """ - print(results) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - --------------------- RESULTS COMPARISON --------------------- - | TARGET | Mechanical APDL | RATIO - /INPUT FILE= LINE= 0 - R1, lb 900.0 900.0 1.0 - R2, lb 600.0 600.0 1.0 - ---------------------------------------------------------------- - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 145-146 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 146-147 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 0.426 seconds) - - -.. _sphx_glr_download_vm-001-statically_indeterminate_reaction_force_analysis.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-001-statically_indeterminate_reaction_force_analysis.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-001-statically_indeterminate_reaction_force_analysis.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis_codeobj.pickle b/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis_codeobj.pickle deleted file mode 100644 index 497075c6c..000000000 Binary files a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-002/images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png b/doc/source/verif-manual/vm-002/images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png deleted file mode 100644 index 4343981ee..000000000 Binary files a/doc/source/verif-manual/vm-002/images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.ipynb b/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.ipynb deleted file mode 100644 index a6c781023..000000000 --- a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.ipynb +++ /dev/null @@ -1,259 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Beam Stresses and Deflections\n**Problem Description**\n\nA standard 30 inch WF beam, with a cross-sectional area $A$,\nis supported as shown below and loaded on the overhangs by a\nuniformly distributed load $w$. Determine the maximum bending\nstress, $\\sigma_max$, in the middle portion of the beam and\nthe deflection, $\\delta$, at the middle of the beam.\n\n**Reference**\n\nS. Timoshenko, Strength of Material, Part I, Elementary Theory and\nProblems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955,\npg. 98, problem 4.\n\n**Analysis Type(s)**\n\nStatic Analysis ``ANTYPE=0``\n\n**Element Type(s):**\n\n3-D 2 Node Beam (BEAM188)\n\n\"VM2\n\n**Material Properties**\n\n$E = 30 \\cdot 10^6 psi$\n\n**Geometric Properties**\n\n$a = 120 in$\n$l = 240 in$\n$h = 30 in$\n$A = 50.65 in^2$\n$I_z = 7892 in^4$\n\n**Loading**\n\n$w = (10000/12) lb/in$\n\n**Analytical Equations**\n\n- $M$ is the bending moment for the middle portion of the beam:\n $M = 10000 \\cdot 10 \\cdot 60 = 6 \\cdot 10^6 lb \\cdot in$\n- Determination of the maximum stress in the middle portion of the beam is\n $\\sigma_max = \\frac{M h}{2 I_z}$\n- The deflection, $\\delta$, at the middle of the beam can be defined\n by the formulas of the transversally loaded beam:\n $\\delta = 0.182 in$\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm2_setup.png'\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# Start mapdl and clear it.\nmapdl = launch_mapdl()\nmapdl.clear()\n\n# Enter verification example mode and the pre-processing routine.\nmapdl.verify()\nmapdl.prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Element Type\nSet up the element type (a beam-type).\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Type of analysis: Static.\nmapdl.antype(\"STATIC\")\n\n# Element type: BEAM188.\nmapdl.et(1, \"BEAM188\")\n\n# Special Features are defined by keyoptions of beam element:\n\n# KEYOPT(3)\n# Shape functions along the length:\n# Cubic\nmapdl.keyopt(1, 3, 3) # Cubic shape function\n\n# KEYOPT(9)\n# Output control for values extrapolated to the element\n# and section nodes:\n# Same as KEYOPT(9) = 1 plus stresses and strains at all section nodes\nmapdl.keyopt(1, 9, 3, mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the material.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"PRXY\", 1, 0.3)\nprint(mapdl.mplist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Section\nSet up the cross-section properties for a beam element.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "w_f = 1.048394965\nw_w = 0.6856481\nsec_num = 1\nmapdl.sectype(sec_num, \"BEAM\", \"I\", \"ISection\")\nmapdl.secdata(15, 15, 28 + (2 * w_f), w_f, w_f, w_w)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nSet up the nodes and elements. Create nodes then create elements\nbetween nodes.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define nodes\nfor node_num in range(1, 6):\n mapdl.n(node_num, (node_num - 1) * 120, 0, 0)\n\n# Define one node for the orientation of the beam cross-section.\norient_node = mapdl.n(6, 60, 1)\n\n# Print the list of the created nodes.\nprint(mapdl.nlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Define elements\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "for elem_num in range(1, 5):\n mapdl.e(elem_num, elem_num + 1, orient_node)\n\n# Print the list of the created elements.\nprint(mapdl.elist())\n\n# Display elements with their nodes numbers.\nmapdl.eplot(show_node_numbering=True, line_width=5, cpos=\"xy\", font_size=40)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nApplication of boundary conditions (BC).\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# BC for the beams seats\nmapdl.d(2, \"UX\", lab2=\"UY\")\nmapdl.d(4, \"UY\")\n\n# BC for all nodes of the beam\nmapdl.nsel(\"S\", \"LOC\", \"Y\", 0)\nmapdl.d(\"ALL\", \"UZ\")\nmapdl.d(\"ALL\", \"ROTX\")\nmapdl.d(\"ALL\", \"ROTY\")\nmapdl.nsel(\"ALL\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Distributed Loads\nApply a distributed force of $w = (10000/12) lb/in$\nin the y-direction.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Parametrization of the distributed load.\nw = 10000 / 12\n\n# Application of the surface load to the beam element.\nmapdl.sfbeam(1, 1, \"PRES\", w)\nmapdl.sfbeam(4, 1, \"PRES\", w)\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system. Print the solver output.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.run(\"/SOLU\")\nout = mapdl.solve()\nmapdl.finish()\nprint(out)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing. To get the stress and deflection results\nfrom the middle node and cross-section of the beam we can use\n:meth:`Mapdl.get_value `.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Enter the post-processing routine and select the first load step.\nmapdl.post1()\nmapdl.set(1)\n\n# Get the maximum stress at the middle of the beam.\ns_eqv_max = mapdl.get_value(\"secr\", 2, \"s\", \"eqv\", \"max\")\n\n# Get the deflection at the middle of the beam.\nmid_node_uy = mapdl.get_value(entity=\"NODE\", entnum=3, item1=\"u\", it1num=\"y\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nNow that we have the results we can compare the nodal displacement and stress\nexperienced by middle node of the beam to the known stresses -11,400 psi and\n0.182 inches of the deflection.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Results obtained by hand-calculations.\nstress_target = 11400.0\ndeflection_target = 0.182\n\n# Calculate the deviation.\nstress_ratio = s_eqv_max / stress_target\ndeflection_ratio = mid_node_uy / deflection_target\n\n# Print output results.\noutput = f\"\"\"\n----------------------------- VM3 RESULTS COMPARISON -----------------------------\n | TARGET | Mechanical APDL | RATIO |\n----------------------------------------------------------------------------------\n Stress{stress_target:18.3f} {s_eqv_max:16.3f} {stress_ratio:14.3f}\n Deflection{deflection_target:14.3f} {mid_node_uy:16.3f} {deflection_ratio:14.3f}\n----------------------------------------------------------------------------------\n\"\"\"\nprint(output)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py.md5 b/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py.md5 deleted file mode 100644 index 4e252e67f..000000000 --- a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py.md5 +++ /dev/null @@ -1 +0,0 @@ -c31b149f6427af6ff7080f3dccbab589 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.rst b/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.rst deleted file mode 100644 index 41bccf90f..000000000 --- a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.rst +++ /dev/null @@ -1,639 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-002-beam_stresses_and_deflections.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-002-beam_stresses_and_deflections.py: - - -.. _ref_vm2_example: - -Beam Stresses and Deflections ------------------------------ -**Problem Description** - -A standard 30 inch WF beam, with a cross-sectional area :math:`A`, -is supported as shown below and loaded on the overhangs by a -uniformly distributed load :math:`w`. Determine the maximum bending -stress, :math:`\sigma_max`, in the middle portion of the beam and -the deflection, :math:`\delta`, at the middle of the beam. - -**Reference** - -S. Timoshenko, Strength of Material, Part I, Elementary Theory and -Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, -pg. 98, problem 4. - -**Analysis Type(s)** - -Static Analysis ``ANTYPE=0`` - -**Element Type(s):** - -3-D 2 Node Beam (BEAM188) - -.. image:: _static/vm2_setup.png - :width: 400 - :alt: VM2 Problem Sketch - -**Material Properties** - -:math:`E = 30 \cdot 10^6 psi` - -**Geometric Properties** - -:math:`a = 120 in` -:math:`l = 240 in` -:math:`h = 30 in` -:math:`A = 50.65 in^2` -:math:`I_z = 7892 in^4` - -**Loading** - -:math:`w = (10000/12) lb/in` - -**Analytical Equations** - -- :math:`M` is the bending moment for the middle portion of the beam: - :math:`M = 10000 \cdot 10 \cdot 60 = 6 \cdot 10^6 lb \cdot in` -- Determination of the maximum stress in the middle portion of the beam is - :math:`\sigma_max = \frac{M h}{2 I_z}` -- The deflection, :math:`\delta`, at the middle of the beam can be defined - by the formulas of the transversally loaded beam: - :math:`\delta = 0.182 in` - -.. GENERATED FROM PYTHON SOURCE LINES 61-63 - -Start MAPDL -~~~~~~~~~~~ - -.. GENERATED FROM PYTHON SOURCE LINES 63-77 - -.. code-block:: default - - - # sphinx_gallery_thumbnail_path = '_static/vm2_setup.png' - - from ansys.mapdl.core import launch_mapdl - - # Start mapdl and clear it. - mapdl = launch_mapdl() - mapdl.clear() - - # Enter verification example mode and the pre-processing routine. - mapdl.verify() - mapdl.prep7() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** - - - -.. GENERATED FROM PYTHON SOURCE LINES 78-81 - -Define Element Type -~~~~~~~~~~~~~~~~~~~ -Set up the element type (a beam-type). - -.. GENERATED FROM PYTHON SOURCE LINES 81-102 - -.. code-block:: default - - - # Type of analysis: Static. - mapdl.antype("STATIC") - - # Element type: BEAM188. - mapdl.et(1, "BEAM188") - - # Special Features are defined by keyoptions of beam element: - - # KEYOPT(3) - # Shape functions along the length: - # Cubic - mapdl.keyopt(1, 3, 3) # Cubic shape function - - # KEYOPT(9) - # Output control for values extrapolated to the element - # and section nodes: - # Same as KEYOPT(9) = 1 plus stresses and strains at all section nodes - mapdl.keyopt(1, 9, 3, mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 103-106 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material. - -.. GENERATED FROM PYTHON SOURCE LINES 106-112 - -.. code-block:: default - - - mapdl.mp("EX", 1, 30e6) - mapdl.mp("PRXY", 1, 0.3) - print(mapdl.mplist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - MATERIAL NUMBER 1 - - TEMP EX - 0.3000000E+08 - - TEMP PRXY - 0.3000000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 113-116 - -Define Section -~~~~~~~~~~~~~~ -Set up the cross-section properties for a beam element. - -.. GENERATED FROM PYTHON SOURCE LINES 116-124 - -.. code-block:: default - - - w_f = 1.048394965 - w_w = 0.6856481 - sec_num = 1 - mapdl.sectype(sec_num, "BEAM", "I", "ISection") - mapdl.secdata(15, 15, 28 + (2 * w_f), w_f, w_f, w_w) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - SECTION ID NUMBER IS: 1 - BEAM SECTION TYPE IS: I Section - BEAM SECTION NAME IS: ISection - COMPUTED BEAM SECTION DATA SUMMARY: - Area = 50.650 - Iyy = 7892.0 - Iyz = 0.75318E-12 - Izz = 590.47 - Warping Constant = 0.12403E+06 - Torsion Constant = 14.962 - Centroid Y = 0.13152E-14 - Centroid Z = 15.048 - Shear Center Y =-0.18944E-11 - Shear Center Z = 15.048 - Shear Correction-xy = 0.54626 - Shear Correction-yz = 0.92455E-13 - Shear Correction-xz = 0.38629 - - Beam Section is offset to CENTROID of cross section - - - -.. GENERATED FROM PYTHON SOURCE LINES 125-129 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the nodes and elements. Create nodes then create elements -between nodes. - -.. GENERATED FROM PYTHON SOURCE LINES 129-140 - -.. code-block:: default - - - # Define nodes - for node_num in range(1, 6): - mapdl.n(node_num, (node_num - 1) * 120, 0, 0) - - # Define one node for the orientation of the beam cross-section. - orient_node = mapdl.n(6, 60, 1) - - # Print the list of the created nodes. - print(mapdl.nlist()) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - 1 0.0000 0.0000 0.0000 0.00 0.00 0.00 - 2 120.00 0.0000 0.0000 0.00 0.00 0.00 - 3 240.00 0.0000 0.0000 0.00 0.00 0.00 - 4 360.00 0.0000 0.0000 0.00 0.00 0.00 - 5 480.00 0.0000 0.0000 0.00 0.00 0.00 - 6 60.000 1.0000 0.0000 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 141-142 - -Define elements - -.. GENERATED FROM PYTHON SOURCE LINES 142-153 - -.. code-block:: default - - - for elem_num in range(1, 5): - mapdl.e(elem_num, elem_num + 1, orient_node) - - # Print the list of the created elements. - print(mapdl.elist()) - - # Display elements with their nodes numbers. - mapdl.eplot(show_node_numbering=True, line_width=5, cpos="xy", font_size=40) - - - - - -.. figure:: images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png - :alt: vm 002 beam stresses and deflections - :align: center - :figclass: sphx-glr-single-img - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - LIST ALL SELECTED ELEMENTS. (LIST NODES) - 1 1 1 1 0 1 1 2 6 - 2 1 1 1 0 1 2 3 6 - 3 1 1 1 0 1 3 4 6 - 4 1 1 1 0 1 4 5 6 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 154-157 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Application of boundary conditions (BC). - -.. GENERATED FROM PYTHON SOURCE LINES 157-169 - -.. code-block:: default - - - # BC for the beams seats - mapdl.d(2, "UX", lab2="UY") - mapdl.d(4, "UY") - - # BC for all nodes of the beam - mapdl.nsel("S", "LOC", "Y", 0) - mapdl.d("ALL", "UZ") - mapdl.d("ALL", "ROTX") - mapdl.d("ALL", "ROTY") - mapdl.nsel("ALL") - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ALL SELECT FOR ITEM=NODE COMPONENT= - IN RANGE 1 TO 6 STEP 1 - - 6 NODES (OF 6 DEFINED) SELECTED BY NSEL COMMAND. - - - -.. GENERATED FROM PYTHON SOURCE LINES 170-174 - -Define Distributed Loads -~~~~~~~~~~~~~~~~~~~~~~~~ -Apply a distributed force of :math:`w = (10000/12) lb/in` -in the y-direction. - -.. GENERATED FROM PYTHON SOURCE LINES 174-184 - -.. code-block:: default - - - # Parametrization of the distributed load. - w = 10000 / 12 - - # Application of the surface load to the beam element. - mapdl.sfbeam(1, 1, "PRES", w) - mapdl.sfbeam(4, 1, "PRES", w) - mapdl.finish() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 185-188 - -Solve -~~~~~ -Enter solution mode and solve the system. Print the solver output. - -.. GENERATED FROM PYTHON SOURCE LINES 188-195 - -.. code-block:: default - - - mapdl.run("/SOLU") - out = mapdl.solve() - mapdl.finish() - print(out) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - ***** MAPDL SOLVE COMMAND ***** - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - There is no title defined for this analysis. - - *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS *** - ---GIVE SUGGESTIONS ONLY--- - - ELEMENT TYPE 1 IS BEAM188 . KEYOPT(1)=1 IS SUGGESTED FOR NON-CIRCULAR CROSS - SECTIONS AND KEYOPT(3)=2 IS ALWAYS SUGGESTED. - - ELEMENT TYPE 1 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - S O L U T I O N O P T I O N S - - PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D - DEGREES OF FREEDOM. . . . . . UX UY UZ ROTX ROTY ROTZ - ANALYSIS TYPE . . . . . . . . . . . . . . . . .STATIC (STEADY-STATE) - GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Present time 0 is less than or equal to the previous time. Time will - default to 1. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - The conditions for direct assembly have been met. No .emat or .erot - files will be produced. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Internal nodes from 7 to 14 are created. - 8 internal nodes are used for quadratic and/or cubic options of - BEAM188, PIPE288, and/or SHELL208. - - - - D I S T R I B U T E D D O M A I N D E C O M P O S E R - - ...Number of elements: 4 - ...Number of nodes: 14 - ...Decompose to 0 CPU domains - ...Element load balance ratio = 0.000 - - - L O A D S T E P O P T I O N S - - LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 - TIME AT END OF THE LOAD STEP. . . . . . . . . . 1.0000 - NUMBER OF SUBSTEPS. . . . . . . . . . . . . . . 1 - STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO - PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT - DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN - FOR THE LAST SUBSTEP - - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Predictor is ON by default for structural elements with rotational - degrees of freedom. Use the PRED,OFF command to turn the predictor - OFF if it adversely affects the convergence. - - - Range of element maximum matrix coefficients in global coordinates - Maximum = 2.999405619E+10 at element 0. - Minimum = 2.999405619E+10 at element 0. - - *** ELEMENT MATRIX FORMULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 4 BEAM188 0.000 0.000000 - Time at end of element matrix formulation CP = 0. - - DISTRIBUTED SPARSE MATRIX DIRECT SOLVER. - Number of equations = 60, Maximum wavefront = 0 - Memory available (MB) = 0.0 , Memory required (MB) = 0.0 - - Distributed sparse solver maximum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot in absolute value= 0 at node 0 - . - - *** ELEMENT RESULT CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 4 BEAM188 0.000 0.000000 - - *** NODAL LOAD CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 4 BEAM188 0.000 0.000000 - *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 1 - *** TIME = 1.00000 TIME INC = 1.00000 NEW TRIANG MATRIX - - - - -.. GENERATED FROM PYTHON SOURCE LINES 196-201 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing. To get the stress and deflection results -from the middle node and cross-section of the beam we can use -:meth:`Mapdl.get_value `. - -.. GENERATED FROM PYTHON SOURCE LINES 201-213 - -.. code-block:: default - - - # Enter the post-processing routine and select the first load step. - mapdl.post1() - mapdl.set(1) - - # Get the maximum stress at the middle of the beam. - s_eqv_max = mapdl.get_value("secr", 2, "s", "eqv", "max") - - # Get the deflection at the middle of the beam. - mid_node_uy = mapdl.get_value(entity="NODE", entnum=3, item1="u", it1num="y") - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 214-219 - -Check Results -~~~~~~~~~~~~~ -Now that we have the results we can compare the nodal displacement and stress -experienced by middle node of the beam to the known stresses -11,400 psi and -0.182 inches of the deflection. - -.. GENERATED FROM PYTHON SOURCE LINES 219-240 - -.. code-block:: default - - - # Results obtained by hand-calculations. - stress_target = 11400.0 - deflection_target = 0.182 - - # Calculate the deviation. - stress_ratio = s_eqv_max / stress_target - deflection_ratio = mid_node_uy / deflection_target - - # Print output results. - output = f""" - ----------------------------- VM3 RESULTS COMPARISON ----------------------------- - | TARGET | Mechanical APDL | RATIO | - ---------------------------------------------------------------------------------- - Stress{stress_target:18.3f} {s_eqv_max:16.3f} {stress_ratio:14.3f} - Deflection{deflection_target:14.3f} {mid_node_uy:16.3f} {deflection_ratio:14.3f} - ---------------------------------------------------------------------------------- - """ - print(output) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ----------------------------- VM3 RESULTS COMPARISON ----------------------------- - | TARGET | Mechanical APDL | RATIO | - ---------------------------------------------------------------------------------- - Stress 11400.000 11440.746 1.004 - Deflection 0.182 0.182 1.003 - ---------------------------------------------------------------------------------- - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 241-242 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 242-243 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 0.960 seconds) - - -.. _sphx_glr_download_vm-002-beam_stresses_and_deflections.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-002-beam_stresses_and_deflections.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-002-beam_stresses_and_deflections.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections_codeobj.pickle b/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections_codeobj.pickle deleted file mode 100644 index 6e8a045ea..000000000 Binary files a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png b/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png deleted file mode 100644 index 7feaa4923..000000000 Binary files a/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png b/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png deleted file mode 100644 index 8813a1af1..000000000 Binary files a/doc/source/verif-manual/vm-003/images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.ipynb b/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.ipynb deleted file mode 100644 index 9343f2c7b..000000000 --- a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.ipynb +++ /dev/null @@ -1,198 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Thermally Loaded Support Structure\nProblem Description:\n - Find the stresses in the copper and steel wire structure shown below.\n The wires have a cross-sectional area of math:`A`. The structure is\n subjected to a load math:`Q` and a temperature rise of math:`\\Delta T` after\n assembly.\n\nReference:\n - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and\n Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955,\n pg. 30, problem 9.\n\nAnalysis Type(s):\n - Static Analysis ``ANTYPE=0``\n\nElement Type(s):\n - 3-D Spar (or Truss) Elements (LINK180)\n\n\"VM3\n\nMaterial Properties\n - $E_c = 16 \\cdot 10^6 psi$\n - $E_s = 30 \\cdot 10^6 psi$\n - $\\alpha_c = 70 \\cdot 10^{-7} in/in-^\\circ F$\n - $\\alpha_s = 92 \\cdot 10^{-7} in/in-^\\circ F$\n\nGeometric Properties:\n - $A = 0.1 in^2$\n\nLoading:\n - $Q = 4000 lb$\n - $\\Delta T = 10 ^\\circ F$\n\nAnalytical Equations:\n - The compressive force $X$ is given by the following equation\n - $X = \\frac{\\Delta T (\\alpha_c - \\alpha_s) (A_s - E_s) }{1 + \\frac{1 E_s A_s}{2 E_c A_c}} + \\frac{Q}{1 + \\frac{2 E_c A_c}{E_s A_s}}$\n\nNotes:\n - Length of wires (20 in.), spacing between wires (10 in.), and the reference\n temperature (70\u00b0F) are arbitrarily selected. The rigid lower beam is modeled\n by nodal coupling.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm3_setup.png'\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# start mapdl and clear it\nmapdl = launch_mapdl()\nmapdl.clear() # optional as MAPDL just started\n\n# enter verification example mode and the pre-processing routine\nmapdl.verify()\nmapdl.prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the materials and their properties. We are using copper and\nsteel here.\n- `EX` - X-direction elastic modulus\n- `ALPX` - Secant x - coefficient of thermal expansion\n\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.antype(\"STATIC\")\nmapdl.et(1, \"LINK180\")\nmapdl.sectype(1, \"LINK\")\nmapdl.secdata(0.1)\nmapdl.mp(\"EX\", 1, 16e6)\nmapdl.mp(\"ALPX\", 1, 92e-7)\nmapdl.mp(\"EX\", 2, 30e6)\nmapdl.mp(\"ALPX\", 2, 70e-7)\n# Define the reference temperature for the thermal strain calculations.\nmapdl.tref(70)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry: Nodes\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup. We create a square of nodes and use `fill` to add\nmid-point nodes to two opposite sides.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.n(1, -10)\nmapdl.n(3, 10)\nmapdl.fill()\nmapdl.n(4, -10, -20)\nmapdl.n(6, 10, -20)\nmapdl.fill()\nmapdl.nplot(nnum=True, cpos=\"xy\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry: Elements\nCreate two elements (using material #1) that are two sides of our\nsquare, as links. Then create a single element using material #2\nbetween the first 2 that is parallel to them.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.e(1, 4)\nmapdl.e(3, 6)\nmapdl.mat(2)\nmapdl.e(2, 5)\nmapdl.eplot(show_node_numbering=True, cpos=\"xy\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\n- Couple the degrees of freedom in y-displacement across nodes 5, 4,\n and 6.\n- Fix nodes 1, 2, and 3 in place.\n- Apply a force of -4000 in the y-direction to node 5\n- Apply a uniform temperature of 80 to the whole body\n- Finally, exit the post-processor.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.cp(1, \"UY\", 5, 4, 6)\nmapdl.d(1, \"ALL\", \"\", \"\", 3)\nmapdl.f(5, \"FY\", -4000)\nmapdl.bfunif(\"TEMP\", 80)\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\n- Enter solution mode\n- Specify a timestep of 1 to be used for this load step\n- Solve the system.\n\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.run(\"/SOLU\")\nmapdl.nsubst(1)\nmapdl.solve()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\n- Access the queries functions\n- Find a steel node and a copper node\n- Then use these to get the steel and copper elements\n- Finally extract the stress experienced by each element\n\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.post1()\nq = mapdl.queries\nsteel_n = q.node(0, 0, 0)\ncopper_n = q.node(10, 0, 0)\nsteel_e = q.enearn(steel_n)\ncopper_e = q.enearn(copper_n)\nmapdl.etable(\"STRS_ST\", \"LS\", 1)\nmapdl.etable(\"STRS_CO\", \"LS\", 1)\n\nstress_steel = mapdl.get(\"_\", \"ELEM\", steel_e, \"ETAB\", \"STRS_ST\")\nstress_copper = mapdl.get(\"_\", \"ELEM\", copper_e, \"ETAB\", \"STRS_CO\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nNow that we have the response we can compare the values to the\nexpected stresses of 19695 and 10152 respectively.\n\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "steel_target = 19695\nsteel_ratio = stress_steel / steel_target\ncopper_target = 10152\ncopper_ratio = stress_copper / copper_target\n\nmessage = f\"\"\"\n------------------- VM3 RESULTS COMPARISON ---------------------\n\n | TARGET | Mechanical APDL | RATIO\n----------------------------------------------------------------\n Steel {steel_target} {stress_steel} {steel_ratio:.6f}\n Copper {copper_target} {stress_copper} {copper_ratio:.6f}\n\n----------------------------------------------------------------\n\n\"\"\"\nprint(message)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py.md5 b/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py.md5 deleted file mode 100644 index cf634d62d..000000000 --- a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py.md5 +++ /dev/null @@ -1 +0,0 @@ -a4f0e60e729805068abec7f33bc315a6 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.rst b/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.rst deleted file mode 100644 index 835227801..000000000 --- a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.rst +++ /dev/null @@ -1,465 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-003-thermally_loaded_support_structure.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-003-thermally_loaded_support_structure.py: - - -.. _ref_thermally_loaded_support_structure: - -Thermally Loaded Support Structure ----------------------------------- -Problem Description: - - Find the stresses in the copper and steel wire structure shown below. - The wires have a cross-sectional area of math:`A`. The structure is - subjected to a load math:`Q` and a temperature rise of math:`\Delta T` after - assembly. - -Reference: - - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and - Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, - pg. 30, problem 9. - -Analysis Type(s): - - Static Analysis ``ANTYPE=0`` - -Element Type(s): - - 3-D Spar (or Truss) Elements (LINK180) - -.. image:: _static/vm3_setup.png - :width: 400 - :alt: VM3 Problem Sketch - -Material Properties - - :math:`E_c = 16 \cdot 10^6 psi` - - :math:`E_s = 30 \cdot 10^6 psi` - - :math:`\alpha_c = 70 \cdot 10^{-7} in/in-^\circ F` - - :math:`\alpha_s = 92 \cdot 10^{-7} in/in-^\circ F` - -Geometric Properties: - - :math:`A = 0.1 in^2` - -Loading: - - :math:`Q = 4000 lb` - - :math:`\Delta T = 10 ^\circ F` - -Analytical Equations: - - The compressive force :math:`X` is given by the following equation - - :math:`X = \frac{\Delta T (\alpha_c - \alpha_s) (A_s - E_s) }{1 + \frac{1 E_s A_s}{2 E_c A_c}} + \frac{Q}{1 + \frac{2 E_c A_c}{E_s A_s}}` - -Notes: - - Length of wires (20 in.), spacing between wires (10 in.), and the reference - temperature (70°F) are arbitrarily selected. The rigid lower beam is modeled - by nodal coupling. - -.. GENERATED FROM PYTHON SOURCE LINES 50-62 - -.. code-block:: default - - # sphinx_gallery_thumbnail_path = '_static/vm3_setup.png' - - from ansys.mapdl.core import launch_mapdl - - # start mapdl and clear it - mapdl = launch_mapdl() - mapdl.clear() # optional as MAPDL just started - - # enter verification example mode and the pre-processing routine - mapdl.verify() - mapdl.prep7() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** - - - -.. GENERATED FROM PYTHON SOURCE LINES 63-70 - -Define Material -~~~~~~~~~~~~~~~ -Set up the materials and their properties. We are using copper and -steel here. -- `EX` - X-direction elastic modulus -- `ALPX` - Secant x - coefficient of thermal expansion - - -.. GENERATED FROM PYTHON SOURCE LINES 70-82 - -.. code-block:: default - - - mapdl.antype("STATIC") - mapdl.et(1, "LINK180") - mapdl.sectype(1, "LINK") - mapdl.secdata(0.1) - mapdl.mp("EX", 1, 16e6) - mapdl.mp("ALPX", 1, 92e-7) - mapdl.mp("EX", 2, 30e6) - mapdl.mp("ALPX", 2, 70e-7) - # Define the reference temperature for the thermal strain calculations. - mapdl.tref(70) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - REFERENCE TEMPERATURE= 70.000 (TUNIF= 70.000) - - - -.. GENERATED FROM PYTHON SOURCE LINES 83-88 - -Define Geometry: Nodes -~~~~~~~~~~~~~~~~~~~~~~ -Set up the nodes and elements. This creates a mesh just like in the -problem setup. We create a square of nodes and use `fill` to add -mid-point nodes to two opposite sides. - -.. GENERATED FROM PYTHON SOURCE LINES 88-97 - -.. code-block:: default - - - mapdl.n(1, -10) - mapdl.n(3, 10) - mapdl.fill() - mapdl.n(4, -10, -20) - mapdl.n(6, 10, -20) - mapdl.fill() - mapdl.nplot(nnum=True, cpos="xy") - - -.. figure:: images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png - :alt: vm 003 thermally loaded support structure - :align: center - :figclass: sphx-glr-single-img - - - -.. GENERATED FROM PYTHON SOURCE LINES 98-103 - -Define Geometry: Elements -~~~~~~~~~~~~~~~~~~~~~~~~~ -Create two elements (using material #1) that are two sides of our -square, as links. Then create a single element using material #2 -between the first 2 that is parallel to them. - -.. GENERATED FROM PYTHON SOURCE LINES 103-110 - -.. code-block:: default - - - mapdl.e(1, 4) - mapdl.e(3, 6) - mapdl.mat(2) - mapdl.e(2, 5) - mapdl.eplot(show_node_numbering=True, cpos="xy") - - - - -.. figure:: images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png - :alt: vm 003 thermally loaded support structure - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 111-119 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Couple the degrees of freedom in y-displacement across nodes 5, 4, - and 6. -- Fix nodes 1, 2, and 3 in place. -- Apply a force of -4000 in the y-direction to node 5 -- Apply a uniform temperature of 80 to the whole body -- Finally, exit the post-processor. - -.. GENERATED FROM PYTHON SOURCE LINES 119-127 - -.. code-block:: default - - - mapdl.cp(1, "UY", 5, 4, 6) - mapdl.d(1, "ALL", "", "", 3) - mapdl.f(5, "FY", -4000) - mapdl.bfunif("TEMP", 80) - mapdl.finish() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 128-134 - -Solve -~~~~~ -- Enter solution mode -- Specify a timestep of 1 to be used for this load step -- Solve the system. - - -.. GENERATED FROM PYTHON SOURCE LINES 134-139 - -.. code-block:: default - - - mapdl.run("/SOLU") - mapdl.nsubst(1) - mapdl.solve() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** MAPDL SOLVE COMMAND ***** - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - There is no title defined for this analysis. - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - S O L U T I O N O P T I O N S - - PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D - DEGREES OF FREEDOM. . . . . . UX UY UZ - ANALYSIS TYPE . . . . . . . . . . . . . . . . .STATIC (STEADY-STATE) - GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Present time 0 is less than or equal to the previous time. Time will - default to 1. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - The conditions for direct assembly have been met. No .emat or .erot - files will be produced. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Only 1 processor can be used for the distributed memory parallel - solution for this model due to the presence of the coupling equations - in this particular model. Distributed parallel processing has been - temporarily disabled. - - L O A D S T E P O P T I O N S - - LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 - TIME AT END OF THE LOAD STEP. . . . . . . . . . 1.0000 - NUMBER OF SUBSTEPS. . . . . . . . . . . . . . . 1 - STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO - PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT - DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN - FOR THE LAST SUBSTEP - - - - Range of element maximum matrix coefficients in global coordinates - Maximum = 150000 at element 0. - Minimum = 80000 at element 0. - - *** ELEMENT MATRIX FORMULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 3 LINK180 0.000 0.000000 - Time at end of element matrix formulation CP = 0. - - SPARSE MATRIX DIRECT SOLVER. - Number of equations = 1, Maximum wavefront = 0 - Memory available (MB) = 0.0 , Memory required (MB) = 0.0 - - Sparse solver maximum pivot= 0 at node 0 . - Sparse solver minimum pivot= 0 at node 0 . - Sparse solver minimum pivot in absolute value= 0 at node 0 . - - *** ELEMENT RESULT CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 3 LINK180 0.000 0.000000 - - *** NODAL LOAD CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 3 LINK180 0.000 0.000000 - *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 1 - *** TIME = 1.00000 TIME INC = 1.00000 NEW TRIANG MATRIX - - - -.. GENERATED FROM PYTHON SOURCE LINES 140-147 - -Post-processing -~~~~~~~~~~~~~~~ -- Access the queries functions -- Find a steel node and a copper node -- Then use these to get the steel and copper elements -- Finally extract the stress experienced by each element - - -.. GENERATED FROM PYTHON SOURCE LINES 147-160 - -.. code-block:: default - - - mapdl.post1() - q = mapdl.queries - steel_n = q.node(0, 0, 0) - copper_n = q.node(10, 0, 0) - steel_e = q.enearn(steel_n) - copper_e = q.enearn(copper_n) - mapdl.etable("STRS_ST", "LS", 1) - mapdl.etable("STRS_CO", "LS", 1) - - stress_steel = mapdl.get("_", "ELEM", steel_e, "ETAB", "STRS_ST") - stress_copper = mapdl.get("_", "ELEM", copper_e, "ETAB", "STRS_CO") - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 161-166 - -Check Results -~~~~~~~~~~~~~ -Now that we have the response we can compare the values to the -expected stresses of 19695 and 10152 respectively. - - -.. GENERATED FROM PYTHON SOURCE LINES 166-186 - -.. code-block:: default - - - steel_target = 19695 - steel_ratio = stress_steel / steel_target - copper_target = 10152 - copper_ratio = stress_copper / copper_target - - message = f""" - ------------------- VM3 RESULTS COMPARISON --------------------- - - | TARGET | Mechanical APDL | RATIO - ---------------------------------------------------------------- - Steel {steel_target} {stress_steel} {steel_ratio:.6f} - Copper {copper_target} {stress_copper} {copper_ratio:.6f} - - ---------------------------------------------------------------- - - """ - print(message) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ------------------- VM3 RESULTS COMPARISON --------------------- - - | TARGET | Mechanical APDL | RATIO - ---------------------------------------------------------------- - Steel 19695 19695.4844 1.000025 - Copper 10152 10152.2578 1.000025 - - ---------------------------------------------------------------- - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 187-188 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 188-189 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 1.294 seconds) - - -.. _sphx_glr_download_vm-003-thermally_loaded_support_structure.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-003-thermally_loaded_support_structure.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-003-thermally_loaded_support_structure.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure_codeobj.pickle b/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure_codeobj.pickle deleted file mode 100644 index a61433957..000000000 Binary files a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png b/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png deleted file mode 100644 index 0136e7f1d..000000000 Binary files a/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png b/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png deleted file mode 100644 index 217c028a6..000000000 Binary files a/doc/source/verif-manual/vm-004/images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.ipynb b/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.ipynb deleted file mode 100644 index bde2b1ae5..000000000 --- a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.ipynb +++ /dev/null @@ -1,216 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Deflection of a Hinged Support\nProblem Description:\n - A structure consisting of two equal steel bars, each of length $l$\n and cross-sectional area $A$, with hinged ends is subjected to\n the action of a load $F$. Determine the stress, $\\sigma$,\n in the bars and the deflection, $\\delta$, of point 2. Neglect\n the weight of the bars as a small quantity in comparison with the load\n $F$.\n\nReference:\n - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and\n Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955,\n pg. 10, problem 2.\n\nAnalysis Type(s):\n - Static Analysis ``ANTYPE=0``\n\nElement Type(s):\n - 3-D Spar (or Truss) Elements (LINK180)\n\n\"VM4\n\nMaterial Properties\n - $E = 30 \\cdot 10^6 psi$\n\nGeometric Properties:\n - $l = 15 ft$\n - $A = 0.5 in^2$\n - $\\Theta = 30 ^\\circ$\n\nLoading:\n - $F = 5000 lb$\n\nAnalytical Equations:\n - The tensile force in the bars is $S$\n - $S = \\frac{P}{2 sin \\Theta}$\n - The necessary cross-sectional area $A$ is\n - $A = \\frac{S}{\\sigma}$\n - The elongation of the bar $AB$ is\n - $B_1 D = \\frac{\\sigma l}{E}$\n - The deflection $BB_1$ is\n - $BB_1 = \\frac{B_1 D}{sin \\Theta}$\n\nNotes:\n - Consistent length units are used. The dimensions $a$ and $b$ are\n calculated parametrically in the input as follows:\n - $a = 2 l cos \\Theta$,\n - $b = l sin \\Theta$.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm4_setup.png'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "from math import cos, pi, sin\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# start mapdl and clear it\nmapdl = launch_mapdl()\nmapdl.clear() # optional as MAPDL just started\n\n# enter verification example mode and the pre-processing routine\nmapdl.verify()\nmapdl.prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nCreate a simple hinge geometry.\nWe use the `LINK180` element type to model this and an elastic modulus\nof 30e6.\nWe store the x-coordinate of node 3 and the y-coordinate of node 2 for\nease of use later on.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "length_bar = 15 * 12\ntheta = 30\ntheta_rad = theta * pi / 180.0\nnode3_x = 2 * length_bar * cos(theta_rad)\nnode2_y = length_bar * sin(theta_rad)\n\nmapdl.et(1, \"LINK180\")\nmapdl.sectype(1, \"LINK\")\nmapdl.secdata(0.5)\nmapdl.mp(\"EX\", 1, 30e6)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nWe create three nodes in an isosceles triangle shape, with elements\nalong the equal sides, forming a hinge.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "n1 = mapdl.n(1, 0, 0, 0)\nn2 = mapdl.n(2, node3_x * 0.5, -node2_y, 0)\nn3 = mapdl.n(3, node3_x, 0, 0)\n\nmapdl.e(n1, n2)\nmapdl.e(n2, n3)\nmapdl.eplot(show_node_numbering=True, line_width=5, cpos=\"xy\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\n- Fix nodes 1 and 3 in place\n- Apply a force of -5000 in the negative y-direction to node 2\n- Then finish the prep7 section\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.d(1, \"ALL\", \"\", \"\", 3, 2)\nmapdl.f(2, \"FY\", -5000)\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.run(\"/SOLU\")\nout = mapdl.solve()\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing, get the results and view the nodal displacement\nas well as the equivalent stress on the nodes.\n\nWe make the line width larger for ease of visualization as well as\nusing two perceptually linear colormaps to enhance display of the\ndata.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.post1()\nmapdl.post_processing.plot_nodal_displacement(\n \"Y\",\n cmap=\"magma\",\n line_width=5,\n cpos=\"xy\",\n scalar_bar_args={\"title\": \"Displacement\", \"vertical\": False},\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Principal nodal stress\nUse the ``post_processing`` attribute to get the principal nodal\nstress as an array.\n\n

Note

This returns the same data as :func:`prnsol\n `, except instead of returning\n text, it returns a numpy array.

\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "seqv = mapdl.post_processing.nodal_eqv_stress()\n\n# print out the nodes\nfor i, nnum in enumerate(mapdl.mesh.nnum):\n print(f\"Node {nnum} : {seqv[i]} psi\")\n\n# Which is identical to:\n# print(mapdl.prnsol('S', 'PRIN'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nNow that we have the results we can compare the nodal displacement and\nstress experienced by node 2 to the known quantities 10000 psi and\n-0.12 inches. To do this we:\n\n- Find the mid-node from the coordinates using the :class:`Query\n ` class\n- Get the y-displacement from node 2\n- Get the element nearest to node 2\n- Get the stress on this element\n- Compare\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "q = mapdl.queries\nmid_node = q.node(node3_x * 0.5, -node2_y, 0)\ndisplacement = mapdl.get_value(\"NODE\", mid_node, \"U\", \"Y\")\nleft_element = q.enearn(mid_node)\nmapdl.etable(\"STRS\", \"LS\", 1)\nstress = mapdl.get_value(\"ELEM\", left_element, \"ETAB\", \"STRS\")\n\nresults = f\"\"\"\n--------------------- RESULTS COMPARISON -----------------------\n| TARGET | TARGET | Mechanical APDL | RATIO\n------------------------------------------------------------------\nStress [psi] 10000 {stress} {stress/10000:.2f}\nDisplacement [in] -0.12 {displacement:.2f} {abs(displacement) / 0.12:.2f}\n------------------------------------------------------------------\n\"\"\"\n\nprint(results)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py.md5 b/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py.md5 deleted file mode 100644 index b10544553..000000000 --- a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py.md5 +++ /dev/null @@ -1 +0,0 @@ -e1288c122e7b764965000415eca1f504 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.rst b/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.rst deleted file mode 100644 index 741bb647f..000000000 --- a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.rst +++ /dev/null @@ -1,438 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-004-deflection_of_a_hinged_support.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-004-deflection_of_a_hinged_support.py: - - -.. _ref_deflection_of_a_hinged_support: - -Deflection of a Hinged Support ------------------------------- -Problem Description: - - A structure consisting of two equal steel bars, each of length :math:`l` - and cross-sectional area :math:`A`, with hinged ends is subjected to - the action of a load :math:`F`. Determine the stress, :math:`\sigma`, - in the bars and the deflection, :math:`\delta`, of point 2. Neglect - the weight of the bars as a small quantity in comparison with the load - :math:`F`. - -Reference: - - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and - Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, - pg. 10, problem 2. - -Analysis Type(s): - - Static Analysis ``ANTYPE=0`` - -Element Type(s): - - 3-D Spar (or Truss) Elements (LINK180) - -.. image:: _static/vm4_setup.png - :width: 400 - :alt: VM4 Problem Sketch - -Material Properties - - :math:`E = 30 \cdot 10^6 psi` - -Geometric Properties: - - :math:`l = 15 ft` - - :math:`A = 0.5 in^2` - - :math:`\Theta = 30 ^\circ` - -Loading: - - :math:`F = 5000 lb` - -Analytical Equations: - - The tensile force in the bars is :math:`S` - - :math:`S = \frac{P}{2 sin \Theta}` - - The necessary cross-sectional area :math:`A` is - - :math:`A = \frac{S}{\sigma}` - - The elongation of the bar :math:`AB` is - - :math:`B_1 D = \frac{\sigma l}{E}` - - The deflection :math:`BB_1` is - - :math:`BB_1 = \frac{B_1 D}{sin \Theta}` - -Notes: - - Consistent length units are used. The dimensions :math:`a` and :math:`b` are - calculated parametrically in the input as follows: - - :math:`a = 2 l cos \Theta`, - - :math:`b = l sin \Theta`. - -.. GENERATED FROM PYTHON SOURCE LINES 57-59 - -.. code-block:: default - - # sphinx_gallery_thumbnail_path = '_static/vm4_setup.png' - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 60-62 - -Start MAPDL -~~~~~~~~~~~ - -.. GENERATED FROM PYTHON SOURCE LINES 62-75 - -.. code-block:: default - - - from math import cos, pi, sin - - from ansys.mapdl.core import launch_mapdl - - # start mapdl and clear it - mapdl = launch_mapdl() - mapdl.clear() # optional as MAPDL just started - - # enter verification example mode and the pre-processing routine - mapdl.verify() - mapdl.prep7() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** - - - -.. GENERATED FROM PYTHON SOURCE LINES 76-83 - -Define Material -~~~~~~~~~~~~~~~ -Create a simple hinge geometry. -We use the `LINK180` element type to model this and an elastic modulus -of 30e6. -We store the x-coordinate of node 3 and the y-coordinate of node 2 for -ease of use later on. - -.. GENERATED FROM PYTHON SOURCE LINES 83-95 - -.. code-block:: default - - - length_bar = 15 * 12 - theta = 30 - theta_rad = theta * pi / 180.0 - node3_x = 2 * length_bar * cos(theta_rad) - node2_y = length_bar * sin(theta_rad) - - mapdl.et(1, "LINK180") - mapdl.sectype(1, "LINK") - mapdl.secdata(0.5) - mapdl.mp("EX", 1, 30e6) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - MATERIAL 1 EX = 0.3000000E+08 - - - -.. GENERATED FROM PYTHON SOURCE LINES 96-100 - -Define Geometry -~~~~~~~~~~~~~~~ -We create three nodes in an isosceles triangle shape, with elements -along the equal sides, forming a hinge. - -.. GENERATED FROM PYTHON SOURCE LINES 100-109 - -.. code-block:: default - - - n1 = mapdl.n(1, 0, 0, 0) - n2 = mapdl.n(2, node3_x * 0.5, -node2_y, 0) - n3 = mapdl.n(3, node3_x, 0, 0) - - mapdl.e(n1, n2) - mapdl.e(n2, n3) - mapdl.eplot(show_node_numbering=True, line_width=5, cpos="xy") - - - - -.. figure:: images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png - :alt: vm 004 deflection of a hinged support - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 110-115 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Fix nodes 1 and 3 in place -- Apply a force of -5000 in the negative y-direction to node 2 -- Then finish the prep7 section - -.. GENERATED FROM PYTHON SOURCE LINES 115-121 - -.. code-block:: default - - - mapdl.d(1, "ALL", "", "", 3, 2) - mapdl.f(2, "FY", -5000) - mapdl.finish() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 122-125 - -Solve -~~~~~ -Enter solution mode and solve the system. - -.. GENERATED FROM PYTHON SOURCE LINES 125-130 - -.. code-block:: default - - - mapdl.run("/SOLU") - out = mapdl.solve() - mapdl.finish() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - FINISH SOLUTION PROCESSING - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 131-139 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing, get the results and view the nodal displacement -as well as the equivalent stress on the nodes. - -We make the line width larger for ease of visualization as well as -using two perceptually linear colormaps to enhance display of the -data. - -.. GENERATED FROM PYTHON SOURCE LINES 139-149 - -.. code-block:: default - - - mapdl.post1() - mapdl.post_processing.plot_nodal_displacement( - "Y", - cmap="magma", - line_width=5, - cpos="xy", - scalar_bar_args={"title": "Displacement", "vertical": False}, - ) - - - - -.. figure:: images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png - :alt: vm 004 deflection of a hinged support - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 150-159 - -Principal nodal stress -~~~~~~~~~~~~~~~~~~~~~~ -Use the ``post_processing`` attribute to get the principal nodal -stress as an array. - -.. note:: - This returns the same data as :func:`prnsol - `, except instead of returning - text, it returns a numpy array. - -.. GENERATED FROM PYTHON SOURCE LINES 159-170 - -.. code-block:: default - - - - seqv = mapdl.post_processing.nodal_eqv_stress() - - # print out the nodes - for i, nnum in enumerate(mapdl.mesh.nnum): - print(f"Node {nnum} : {seqv[i]} psi") - - # Which is identical to: - # print(mapdl.prnsol('S', 'PRIN')) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - Node 1 : 10000.0 psi - Node 2 : 10000.0 psi - Node 3 : 10000.0 psi - - - - -.. GENERATED FROM PYTHON SOURCE LINES 171-183 - -Check Results -~~~~~~~~~~~~~ -Now that we have the results we can compare the nodal displacement and -stress experienced by node 2 to the known quantities 10000 psi and --0.12 inches. To do this we: - -- Find the mid-node from the coordinates using the :class:`Query - ` class -- Get the y-displacement from node 2 -- Get the element nearest to node 2 -- Get the stress on this element -- Compare - -.. GENERATED FROM PYTHON SOURCE LINES 183-202 - -.. code-block:: default - - - q = mapdl.queries - mid_node = q.node(node3_x * 0.5, -node2_y, 0) - displacement = mapdl.get_value("NODE", mid_node, "U", "Y") - left_element = q.enearn(mid_node) - mapdl.etable("STRS", "LS", 1) - stress = mapdl.get_value("ELEM", left_element, "ETAB", "STRS") - - results = f""" - --------------------- RESULTS COMPARISON ----------------------- - | TARGET | TARGET | Mechanical APDL | RATIO - ------------------------------------------------------------------ - Stress [psi] 10000 {stress} {stress/10000:.2f} - Displacement [in] -0.12 {displacement:.2f} {abs(displacement) / 0.12:.2f} - ------------------------------------------------------------------ - """ - - print(results) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - --------------------- RESULTS COMPARISON ----------------------- - | TARGET | TARGET | Mechanical APDL | RATIO - ------------------------------------------------------------------ - Stress [psi] 10000 10000.0 1.00 - Displacement [in] -0.12 -0.12 1.00 - ------------------------------------------------------------------ - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 203-204 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 204-205 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 1.316 seconds) - - -.. _sphx_glr_download_vm-004-deflection_of_a_hinged_support.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-004-deflection_of_a_hinged_support.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-004-deflection_of_a_hinged_support.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support_codeobj.pickle b/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support_codeobj.pickle deleted file mode 100644 index d3171e048..000000000 Binary files a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png b/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png deleted file mode 100644 index b004e110a..000000000 Binary files a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png b/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png deleted file mode 100644 index 491f04856..000000000 Binary files a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png b/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png deleted file mode 100644 index 3ce1f317d..000000000 Binary files a/doc/source/verif-manual/vm-005/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.ipynb b/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.ipynb deleted file mode 100644 index a49b4ec94..000000000 --- a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.ipynb +++ /dev/null @@ -1,234 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Statically Indeterminate Reaction Force Analysis\nProblem Description:\n - A cantilever beam of thickness $t$ and length $l$\n has a depth which tapers uniformly from $d$ at the tip\n to $3d$ at the wall. It is loaded by a force $F$\n at the tip, as shown. Find the maximum bending stress at the\n mid-length ($X = l$) and the fixed end of the beam.\n\nReference:\n - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics\n of Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959,\n pg. 342, problem 7.18.\n\nAnalysis Type(s):\n - Static Analysis ``ANTYPE=0``\n\nElement Type(s):\n - 2-D 4-Node Sructural Solid Elements (PLANE182)\n - 2-D 8-Node Structural Solid Elements (PLANE183)\n\n\"VM5\n\nMaterial Properties\n - $E = 30 \\cdot 10^6 psi$\n - $\\nu = 0.0$\n - $d = 3in$\n - $t = 2in$\n\nGeometric Properties:\n - $l = 50 in$\n - $d = 3 in$\n - $t = 2 in$\n\nLoading:\n - $F = 4000 lb$\n\nNotes:\n - Two different solutions are obtained. The first solution uses\n lower order PLANE182 elements and the second solution uses higher\n order PLANE82 elements. The 2 inch thickness is incorporated\n by using the plane stress with thickness option. Poisson's\n ratio is set to 0.0 to agree with beam theory.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm5_setup.png'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "from ansys.mapdl.core import launch_mapdl\n\n# start mapdl and clear it\nmapdl = launch_mapdl()\nmapdl.clear() # optional as MAPDL just started\n\n# enter verification example mode and the pre-processing routine\nmapdl.verify()\nmapdl.prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the material using PLANE182 with a thickness of 2 (using real\nconstants), and create a material with a Young's modulus of 30e6,\nand a poisson's ratio of 0.0 to agree with beam theory.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.antype(\"STATIC\")\nmapdl.et(1, \"PLANE182\", kop1=2, kop3=3)\nmapdl.r(1, 2)\nmapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.0)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.n(1, 25)\nmapdl.n(7, 75)\nmapdl.fill()\nmapdl.n(8, 25, -3)\nmapdl.n(14, 75, -9)\nmapdl.fill()\nmapdl.e(2, 1, 8, 9)\nmapdl.egen(6, 1, 1)\nmapdl.eplot(show_node_numbering=True, cpos=\"xy\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nFix the nodes at the larger end (the \"wall\" end) and apply a vertical force\nto the whole structure.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# constrain nodes at fixed end\nmapdl.nsel(\"S\", \"LOC\", \"X\", 75)\nmapdl.d(\"ALL\", \"ALL\")\nmapdl.nsel(\"ALL\")\nmapdl.f(1, \"FY\", -4000)\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.run(\"/SOLU\")\nmapdl.solve()\nmapdl.finish()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing. Get the stress at the fixed end and the mid point\nof the structure by querying the stress at nodes closest to these locations.\nWe've gathered the code into a function because we'll have use for it later.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def fetch_mid_and_end_stress(m):\n q = m.queries\n m.post1()\n end = q.node(75.0, 0.0, 0.0)\n fixed_end_stress = m.get_value(\"NODE\", end, \"S\", \"X\")\n mid = q.node(50.0, 0.0, 0.0)\n mid_stress = m.get_value(\"NODE\", mid, \"S\", \"EQV\")\n return fixed_end_stress, mid_stress\n\n\nfixed_end_stress_182, mid_stress_182 = fetch_mid_and_end_stress(mapdl)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Plotting\nView the equivalent stress, and displacement, of the cantilever with a\n``displacement_factor`` of 26 to scale up the deformation to a visible\namount.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "result = mapdl.result\nresult.plot_principal_nodal_stress(\n 0,\n \"SEQV\",\n show_edges=True,\n show_displacement=True,\n displacement_factor=26.0,\n cmap=\"Oranges\",\n cpos=\"xy\",\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Redo with Plane 183\nNow we need to perform the simulation again but this time using the PLANE183\nelement type. We additionally remove midside nodes with ``emid``.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.prep7()\nmapdl.et(1, \"PLANE183\", kop3=3)\nmapdl.emid()\nmapdl.nsel(\"R\", \"LOC\", \"X\", 75)\nmapdl.nsel(\"R\", \"LOC\", \"Y\", -4.5)\n\nmapdl.d(\"ALL\", \"ALL\")\nmapdl.nsel(\"ALL\")\nmapdl.finish()\nmapdl.run(\"/SOLU\")\nmapdl.solve()\nmapdl.finish()\n\nmapdl.post1()\n# reuse our function from earlier\nfixed_end_stress_183, mid_stress_183 = fetch_mid_and_end_stress(mapdl)\nmapdl.finish()\n\nresult = mapdl.result\nresult.plot_principal_nodal_stress(\n 0,\n \"SEQV\",\n show_edges=True,\n show_displacement=True,\n displacement_factor=26.0,\n cmap=\"Blues\",\n cpos=\"xy\",\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nNow that we have the stresses we can compare them to the expected values\nof stress at the midpoint (8333) and the fixed end (7407) for both\nsimulations.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "results_182 = f\"\"\"\n----------------- PLANE 182 RESULTS COMPARISON ----------------\n| LABEL | TARGET | Mechanical APDL | RATIO\n mid stress 8333 {mid_stress_182:.2f} {mid_stress_182 / 8333:.2f}\n end stress 7407 {fixed_end_stress_182:.2f} {fixed_end_stress_182 / 7407:.2f}\n----------------------------------------------------------------\n\"\"\"\n\nresults_183 = f\"\"\"\n----------------- PLANE 183 RESULTS COMPARISON ----------------\n| LABEL | TARGET | Mechanical APDL | RATIO\n mid stress 8333 {mid_stress_183:.2f} {mid_stress_183 / 8333:.2f}\n end stress 7407 {fixed_end_stress_183:.2f} {fixed_end_stress_183 / 7407:.2f}\n----------------------------------------------------------------\n\"\"\"\nprint(results_182)\nprint(results_183)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py.md5 b/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py.md5 deleted file mode 100644 index 32ce10427..000000000 --- a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py.md5 +++ /dev/null @@ -1 +0,0 @@ -65aab613a17929053f585ced6682234c \ No newline at end of file diff --git a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.rst b/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.rst deleted file mode 100644 index d92f0b1e0..000000000 --- a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.rst +++ /dev/null @@ -1,466 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-005-laterally_loaded_tapered_support_structure.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-005-laterally_loaded_tapered_support_structure.py: - - -.. _ref_vm5_example: - -Statically Indeterminate Reaction Force Analysis ------------------------------------------------- -Problem Description: - - A cantilever beam of thickness :math:`t` and length :math:`l` - has a depth which tapers uniformly from :math:`d` at the tip - to :math:`3d` at the wall. It is loaded by a force :math:`F` - at the tip, as shown. Find the maximum bending stress at the - mid-length (:math:`X = l`) and the fixed end of the beam. - -Reference: - - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics - of Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959, - pg. 342, problem 7.18. - -Analysis Type(s): - - Static Analysis ``ANTYPE=0`` - -Element Type(s): - - 2-D 4-Node Sructural Solid Elements (PLANE182) - - 2-D 8-Node Structural Solid Elements (PLANE183) - -.. image:: _static/vm5_setup.png - :width: 400 - :alt: VM5 Problem Sketch - -Material Properties - - :math:`E = 30 \cdot 10^6 psi` - - :math:`\nu = 0.0` - - :math:`d = 3in` - - :math:`t = 2in` - -Geometric Properties: - - :math:`l = 50 in` - - :math:`d = 3 in` - - :math:`t = 2 in` - -Loading: - - :math:`F = 4000 lb` - -Notes: - - Two different solutions are obtained. The first solution uses - lower order PLANE182 elements and the second solution uses higher - order PLANE82 elements. The 2 inch thickness is incorporated - by using the plane stress with thickness option. Poisson's - ratio is set to 0.0 to agree with beam theory. - -.. GENERATED FROM PYTHON SOURCE LINES 51-53 - -.. code-block:: default - - # sphinx_gallery_thumbnail_path = '_static/vm5_setup.png' - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 54-56 - -Start MAPDL -~~~~~~~~~~~ - -.. GENERATED FROM PYTHON SOURCE LINES 56-67 - -.. code-block:: default - - - from ansys.mapdl.core import launch_mapdl - - # start mapdl and clear it - mapdl = launch_mapdl() - mapdl.clear() # optional as MAPDL just started - - # enter verification example mode and the pre-processing routine - mapdl.verify() - mapdl.prep7() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** - - - -.. GENERATED FROM PYTHON SOURCE LINES 68-73 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material using PLANE182 with a thickness of 2 (using real -constants), and create a material with a Young's modulus of 30e6, -and a poisson's ratio of 0.0 to agree with beam theory. - -.. GENERATED FROM PYTHON SOURCE LINES 73-81 - -.. code-block:: default - - - mapdl.antype("STATIC") - mapdl.et(1, "PLANE182", kop1=2, kop3=3) - mapdl.r(1, 2) - mapdl.mp("EX", 1, 30e6) - mapdl.mp("NUXY", 1, 0.0) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - MATERIAL 1 NUXY = 0.000000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 82-86 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the nodes and elements. This creates a mesh just like in the -problem setup. - -.. GENERATED FROM PYTHON SOURCE LINES 86-98 - -.. code-block:: default - - - mapdl.n(1, 25) - mapdl.n(7, 75) - mapdl.fill() - mapdl.n(8, 25, -3) - mapdl.n(14, 75, -9) - mapdl.fill() - mapdl.e(2, 1, 8, 9) - mapdl.egen(6, 1, 1) - mapdl.eplot(show_node_numbering=True, cpos="xy") - - - - - -.. figure:: images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png - :alt: vm 005 laterally loaded tapered support structure - :align: center - :class: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 99-103 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Fix the nodes at the larger end (the "wall" end) and apply a vertical force -to the whole structure. - -.. GENERATED FROM PYTHON SOURCE LINES 103-112 - -.. code-block:: default - - - # constrain nodes at fixed end - mapdl.nsel("S", "LOC", "X", 75) - mapdl.d("ALL", "ALL") - mapdl.nsel("ALL") - mapdl.f(1, "FY", -4000) - mapdl.finish() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 113-116 - -Solve -~~~~~ -Enter solution mode and solve the system. - -.. GENERATED FROM PYTHON SOURCE LINES 116-121 - -.. code-block:: default - - - mapdl.run("/SOLU") - mapdl.solve() - mapdl.finish() - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - FINISH SOLUTION PROCESSING - - - ***** ROUTINE COMPLETED ***** CP = 0.000 - - - -.. GENERATED FROM PYTHON SOURCE LINES 122-127 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing. Get the stress at the fixed end and the mid point -of the structure by querying the stress at nodes closest to these locations. -We've gathered the code into a function because we'll have use for it later. - -.. GENERATED FROM PYTHON SOURCE LINES 127-141 - -.. code-block:: default - - - - def fetch_mid_and_end_stress(m): - q = m.queries - m.post1() - end = q.node(75.0, 0.0, 0.0) - fixed_end_stress = m.get_value("NODE", end, "S", "X") - mid = q.node(50.0, 0.0, 0.0) - mid_stress = m.get_value("NODE", mid, "S", "EQV") - return fixed_end_stress, mid_stress - - - fixed_end_stress_182, mid_stress_182 = fetch_mid_and_end_stress(mapdl) - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 142-147 - -Plotting -~~~~~~~~ -View the equivalent stress, and displacement, of the cantilever with a -``displacement_factor`` of 26 to scale up the deformation to a visible -amount. - -.. GENERATED FROM PYTHON SOURCE LINES 147-159 - -.. code-block:: default - - - result = mapdl.result - result.plot_principal_nodal_stress( - 0, - "SEQV", - show_edges=True, - show_displacement=True, - displacement_factor=26.0, - cmap="Oranges", - cpos="xy", - ) - - - - -.. figure:: images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png - :alt: vm 005 laterally loaded tapered support structure - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 160-164 - -Redo with Plane 183 -~~~~~~~~~~~~~~~~~~~ -Now we need to perform the simulation again but this time using the PLANE183 -element type. We additionally remove midside nodes with ``emid``. - -.. GENERATED FROM PYTHON SOURCE LINES 164-194 - -.. code-block:: default - - - mapdl.prep7() - mapdl.et(1, "PLANE183", kop3=3) - mapdl.emid() - mapdl.nsel("R", "LOC", "X", 75) - mapdl.nsel("R", "LOC", "Y", -4.5) - - mapdl.d("ALL", "ALL") - mapdl.nsel("ALL") - mapdl.finish() - mapdl.run("/SOLU") - mapdl.solve() - mapdl.finish() - - mapdl.post1() - # reuse our function from earlier - fixed_end_stress_183, mid_stress_183 = fetch_mid_and_end_stress(mapdl) - mapdl.finish() - - result = mapdl.result - result.plot_principal_nodal_stress( - 0, - "SEQV", - show_edges=True, - show_displacement=True, - displacement_factor=26.0, - cmap="Blues", - cpos="xy", - ) - - - - -.. figure:: images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png - :alt: vm 005 laterally loaded tapered support structure - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 195-200 - -Check Results -~~~~~~~~~~~~~ -Now that we have the stresses we can compare them to the expected values -of stress at the midpoint (8333) and the fixed end (7407) for both -simulations. - -.. GENERATED FROM PYTHON SOURCE LINES 200-221 - -.. code-block:: default - - - - results_182 = f""" - ----------------- PLANE 182 RESULTS COMPARISON ---------------- - | LABEL | TARGET | Mechanical APDL | RATIO - mid stress 8333 {mid_stress_182:.2f} {mid_stress_182 / 8333:.2f} - end stress 7407 {fixed_end_stress_182:.2f} {fixed_end_stress_182 / 7407:.2f} - ---------------------------------------------------------------- - """ - - results_183 = f""" - ----------------- PLANE 183 RESULTS COMPARISON ---------------- - | LABEL | TARGET | Mechanical APDL | RATIO - mid stress 8333 {mid_stress_183:.2f} {mid_stress_183 / 8333:.2f} - end stress 7407 {fixed_end_stress_183:.2f} {fixed_end_stress_183 / 7407:.2f} - ---------------------------------------------------------------- - """ - print(results_182) - print(results_183) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ----------------- PLANE 182 RESULTS COMPARISON ---------------- - | LABEL | TARGET | Mechanical APDL | RATIO - mid stress 8333 8163.66 0.98 - end stress 7407 7151.10 0.97 - ---------------------------------------------------------------- - - - ----------------- PLANE 183 RESULTS COMPARISON ---------------- - | LABEL | TARGET | Mechanical APDL | RATIO - mid stress 8333 8363.71 1.00 - end stress 7407 7408.98 1.00 - ---------------------------------------------------------------- - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 222-223 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 223-224 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 2.092 seconds) - - -.. _sphx_glr_download_vm-005-laterally_loaded_tapered_support_structure.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-005-laterally_loaded_tapered_support_structure.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-005-laterally_loaded_tapered_support_structure.ipynb ` diff --git a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure_codeobj.pickle b/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure_codeobj.pickle deleted file mode 100644 index 1d15a3ba8..000000000 Binary files a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_001.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_001.png deleted file mode 100644 index 5d700078d..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_002.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_002.png deleted file mode 100644 index 5c7266cd8..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_003.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_003.png deleted file mode 100644 index 686d989ac..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_003.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_004.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_004.png deleted file mode 100644 index 39c167410..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_004.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_005.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_005.png deleted file mode 100644 index c1aa9137b..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_005.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_006.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_006.png deleted file mode 100644 index edad0fe8f..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_006.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_007.png b/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_007.png deleted file mode 100644 index cf1f2fad1..000000000 Binary files a/doc/source/verif-manual/vm-006/images/sphx_glr_vm-006-pinched_cylinder_007.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.ipynb b/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.ipynb deleted file mode 100644 index 926947b4e..000000000 --- a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.ipynb +++ /dev/null @@ -1,378 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Pinched Cylinder\nProblem Description:\n - A thin-walled cylinder is pinched by a force $F$ at the middle\n of the cylinder length. Determine the radial displacement $\\delta$\n at the point where the force $F$ is applied.\n The ends of the cylinder are free edges.\n\nReference:\n - R. D. Cook, Concepts and Applications of Finite Element Analysis, 2nd Edition,\n John Wiley and Sons, Inc., New York, NY, 1981, pp. 284-287.\n H. Takemoto, R. D. Cook, \"Some Modifications of an Isoparametric Shell\n Element\", International Journal for Numerical Methods in Engineering, Vol.7\n No. 3, 1973.\n\nAnalysis Type(s):\n - Static Analysis ``ANTYPE=0``\n\nElement Type(s):\n - 4-Node Finite Strain Shell Elements (SHELL181)\n - 8-Node Finite Strain Shell Elements (SHELL281)\n\n\"VM6\n\nMaterial Properties\n - $E = 10.5 \\cdot 10^6 psi$\n - $\\nu = 0.3125$\n\nGeometric Properties:\n - $l = 10.35 in$\n - $r = 4.953 in$\n - $t = 0.094 in$\n\nLoading:\n - $F = 100 lb$\n\nAnalysis Assumptions and Modeling Notes:\n - A one-eighth symmetry model is used. One-fourth of the load is applied\n due to symmetry.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm6_setup.png'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "from ansys.mapdl.core import launch_mapdl\n\n# Start mapdl.\nmapdl = launch_mapdl()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Initiate Pre-Processing\nEnter verification example mode and the pre-processing routine.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def start_prep7():\n mapdl.clear()\n mapdl.verify()\n mapdl.prep7()\n\n\nstart_prep7()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Element Type\nSet up the element type (a shell-type).\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define the element type number.\ndef define_element(elem_type):\n # Type of analysis: Static.\n mapdl.antype(\"STATIC\")\n\n # Define the element type number.\n elem_num = 1\n\n if elem_type == \"SHELL181\":\n\n # Element type: SHELL181.\n mapdl.et(elem_num, elem_type)\n\n # Special Features are defined by keyoptions of shell element:\n\n # KEYOPT(3)\n # Integration option:\n # Full integration with incompatible modes.\n mapdl.keyopt(elem_num, 3, 2) # Cubic shape function\n\n elif elem_type == \"SHELL281\":\n\n # Element type: SHELL181.\n mapdl.et(elem_num, \"SHELL281\")\n\n return elem_type, mapdl.etlist()\n\n\n# Return the number of the element type.\nelem_type, elem_type_list = define_element(elem_type=\"SHELL181\")\nprint(\n f\"Selected element type is: {elem_type},\\n\"\n f\"Printout the element list with its own properties:\\n {elem_type_list}\"\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the material properties, where:\nYoung Modulus is $E = 10.5 \\cdot 10^6 psi$,\nPoisson's ratio is $\\nu = 0.3125$.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define material number.\nmat_num = 1\n\n# Define material properties.\ndef define_material():\n # Define material properties.\n mapdl.mp(\"EX\", mat_num, 10.5e6)\n mapdl.mp(\"NUXY\", mat_num, 0.3125)\n return mapdl.mplist()\n\n\nmaterial_list = define_material()\nprint(material_list)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Section\nSet up the cross-section properties for a shell element.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define cross-section number and thickness of the shell element.\nsec_num = 1\nt = 0.094\n\n# Define shell cross-section.\ndef define_section():\n # Define shell cross-section.\n mapdl.sectype(secid=sec_num, type_=\"SHELL\", name=\"shell181\")\n mapdl.secdata(t, mat_num, 0, 5)\n return mapdl.slist()\n\n\nsection_list = define_section()\nprint(section_list)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nSet up the keypoints and create the area through the keypoints.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define geometry of the simplified mathematical model.\ndef define_geometry():\n # Change active coordinate system\n # to the global cylindrical coordinate system.\n mapdl.csys(1)\n\n # Define keypoints by coordinates.\n mapdl.k(1, 4.953)\n mapdl.k(2, 4.953, \"\", 5.175)\n\n # Generate additional keypoints from a pattern of keypoints.\n mapdl.kgen(2, 1, 2, 1, \"\", 90)\n\n # Create an area through keypoints.\n mapdl.a(1, 2, 4, 3)\n\n if elem_type == \"SHELL181\":\n # Plot the lines.\n mapdl.lplot(color_lines=True, cpos=\"iso\")\n\n # Plot the area using PyVista parameters.\n mapdl.aplot(\n title=\"Display the selected area\",\n cpos=\"iso\",\n vtk=True,\n color=\"#06C2AC\",\n show_line_numbering=True,\n show_area_numbering=True,\n show_lines=True,\n )\n\n\ndefine_geometry()\n\n\n# Define the number of the keypoint where F is applied using inline function.\ndef keypoint_number(mapdl):\n keypoint_num = mapdl.queries.kp(4.953, 90, 0)\n return keypoint_num\n\n\n# Call the function to get the number of keypoint.\ntop_keypoint = keypoint_number(mapdl)\nprint(f\"The number of the keypoint where F is applied: {top_keypoint}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Meshing\nDefine line division of the lines, then mesh the area with shell elements.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define mesh properties and create the mesh with shell elements.\ndef meshing():\n # Specify the default number of line divisions.\n mapdl.esize(size=\"\", ndiv=8)\n\n # Mesh the area.\n mapdl.amesh(1)\n\n # Define global cartesian coordinate system.\n mapdl.csys(0)\n\n if elem_type == \"SHELL181\":\n # Plot the mesh.\n mapdl.eplot(\n title=\"Plot of the currently selected elements\",\n vtk=True,\n cpos=\"iso\",\n show_edges=True,\n edge_color=\"white\",\n show_node_numbering=True,\n color=\"purple\",\n )\n\n # Print the list of elements.\n print(mapdl.elist())\n\n # Plot the nodes using VTK.\n mapdl.nplot(\n vtk=True, nnum=True, background=\"\", cpos=\"iso\", show_bounds=True, point_size=10\n )\n\n # Print the list of nodes.\n print(mapdl.nlist())\n\n\nmeshing()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nApplication of symmetric boundary conditions for simplified model.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Select nodes by location and apply BC.\ndef define_bc():\n # Select nodes by location and apply BC.\n mapdl.nsel(\"S\", \"LOC\", \"X\", 0)\n mapdl.dsym(\"SYMM\", \"X\", 0)\n mapdl.nsel(\"S\", \"LOC\", \"Y\", 0)\n mapdl.dsym(\"SYMM\", \"Y\", 0)\n mapdl.nsel(\"S\", \"LOC\", \"Z\", 0)\n mapdl.dsym(\"SYMM\", \"Z\", 0)\n mapdl.nsel(\"ALL\")\n\n\ndefine_bc()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Distributed Loads\nApply the force of $F = (100/4) lb$ in the y-direction.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define loads.\ndef define_loads():\n # Parametrization of the :math:`F` load for the quarter of the model.\n force = 100 / 4\n\n # Application of the load to the model.\n mapdl.fk(top_keypoint, \"FY\", -force)\n mapdl.finish()\n\n\ndefine_loads()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system. Print the solver output.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def solve_procedure():\n mapdl.run(\"/solu\")\n out = mapdl.solve()\n mapdl.finish()\n return out\n\n\nsimulation_info = solve_procedure()\nprint(simulation_info)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing for the model with elements ``shell181``.\nPlotting nodal displacement.\nGet the the radial displacement at the node where force F is applied.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Start post-processing mode.\ndef post_processing():\n mapdl.post1()\n mapdl.set(1)\n\n\npost_processing()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Plotting\nPlot nodal displacement using PyVista.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def plot_nodal_disp():\n mapdl.post_processing.plot_nodal_displacement(\n title=\"Nodal Displacements\",\n component=\"Y\",\n cpos=\"zx\",\n scalar_bar_args={\"title\": \"Nodal Displacements\", \"vertical\": True},\n show_node_numbering=True,\n show_axes=True,\n show_edges=True,\n )\n\n\nplot_nodal_disp()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Getting the radial displacements\nTo determine the radial displacement $\\delta$ at the point\nwhere F is applied, we can use :meth:`Mapdl.get_value `.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def get_displacements():\n # Select keypoint by its number ``top_keypoint``.\n mapdl.ksel(\"S\", vmin=\"top_keypoint\")\n\n # Select the node associated with the selected keypoint.\n mapdl.nslk()\n\n # Get the number of the selected node by :meth:`Mapdl.get `\n top_node = int(mapdl.get(\"_\", \"node\", 0, \"num\", \"max\"))\n\n # Define radial displacement at the node where F is applied.\n deflect_shell = mapdl.get_value(\n entity=\"node\", entnum=top_node, item1=\"u\", it1num=\"y\"\n )\n\n return top_node, deflect_shell\n\n\n# Call the function and get the value of the deflection.\ntop_node_181, deflect_shell_181 = get_displacements()\nprint(\n f\"Number of the node attached to the top keypoint: {top_node_181},\\n\"\n f\"Radial displacement: {(round(deflect_shell_181, 4))}\"\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Rerun Model with SHELL281\nPerform the simulation again using the element type SHELL281.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Restart pre-processing routine.\nstart_prep7()\nelem_type = define_element(elem_type=\"SHELL281\")\ndefine_material()\ndefine_section()\ndefine_geometry()\nmeshing()\ndefine_bc()\ndefine_loads()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system. Print the solver output.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "solve_procedure()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing for the model with elements ``shell281``.\nPlotting nodal displacement.\nGet the the radial displacement at the node where force F is applied.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "post_processing()\nplot_nodal_disp()\ntop_node_281, deflect_shell_281 = get_displacements()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nNow we have the deflections, we can compare them to the expected values\nof radial deflection at the node where force $F$ was applied\nfor both simulations. The expected value for $\\delta_{\\mathrm{shell181}}$ is 0.1139,\nand $\\delta_{\\mathrm{shell281}}$ is 0.1139.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Results obtained by hand-calculations.\ndeflect_target_181 = 0.1139\ndeflect_target_281 = 0.1139\n\n# Calculate the deviation.\ndeflect_ratio_shell_181 = abs(deflect_shell_181) / deflect_target_181\ndeflect_ratio_shell_281 = abs(deflect_shell_281) / deflect_target_281\n\n# Print output results.\noutput = f\"\"\"\n----------------------------------------------------------------------------\n------------------------- VM3 RESULTS COMPARISON ---------------------------\n----------------------------------------------------------------------------\n | TARGET | Mechanical APDL | RATIO |\n----------------------------------------------------------------------------\n Deflection, in SHELL181{deflect_target_181:11.4f} {abs(deflect_shell_181):17.4f} {deflect_ratio_shell_181:15.3f}\n Deflection, in SHELL281{deflect_target_281:11.4f} {abs(deflect_shell_281):17.4f} {deflect_ratio_shell_281:15.3f}\n----------------------------------------------------------------------------\n\"\"\"\nprint(output)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py.md5 b/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py.md5 deleted file mode 100644 index 39723d38c..000000000 --- a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py.md5 +++ /dev/null @@ -1 +0,0 @@ -800d2bacbaecd57d8c19d67e41781531 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.rst b/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.rst deleted file mode 100644 index db8503178..000000000 --- a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.rst +++ /dev/null @@ -1,1502 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "examples\gallery_examples\06-verif-manual\vm-006-pinched_cylinder.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-006-pinched_cylinder.py: - - -.. _ref_vm6_example: - -Pinched Cylinder ----------------- -Problem Description: - - A thin-walled cylinder is pinched by a force :math:`F` at the middle - of the cylinder length. Determine the radial displacement :math:`\delta` - at the point where the force :math:`F` is applied. - The ends of the cylinder are free edges. - -Reference: - - R. D. Cook, Concepts and Applications of Finite Element Analysis, 2nd Edition, - John Wiley and Sons, Inc., New York, NY, 1981, pp. 284-287. - H. Takemoto, R. D. Cook, "Some Modifications of an Isoparametric Shell - Element", International Journal for Numerical Methods in Engineering, Vol.7 - No. 3, 1973. - -Analysis Type(s): - - Static Analysis ``ANTYPE=0`` - -Element Type(s): - - 4-Node Finite Strain Shell Elements (SHELL181) - - 8-Node Finite Strain Shell Elements (SHELL281) - -.. image:: _static/vm6_setup.png - :width: 400 - :alt: VM6 Pinched Cylinder Problem Sketch - -Material Properties - - :math:`E = 10.5 \cdot 10^6 psi` - - :math:`\nu = 0.3125` - -Geometric Properties: - - :math:`l = 10.35 in` - - :math:`r = 4.953 in` - - :math:`t = 0.094 in` - -Loading: - - :math:`F = 100 lb` - -Analysis Assumptions and Modeling Notes: - - A one-eighth symmetry model is used. One-fourth of the load is applied - due to symmetry. - -.. GENERATED FROM PYTHON SOURCE LINES 47-49 - -.. code-block:: default - - # sphinx_gallery_thumbnail_path = '_static/vm6_setup.png' - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 50-52 - -Start MAPDL -~~~~~~~~~~~ - -.. GENERATED FROM PYTHON SOURCE LINES 52-59 - -.. code-block:: default - - - from ansys.mapdl.core import launch_mapdl - - # Start mapdl. - mapdl = launch_mapdl() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 60-63 - -Initiate Pre-Processing -~~~~~~~~~~~~~~~~~~~~~~~ -Enter verification example mode and the pre-processing routine. - -.. GENERATED FROM PYTHON SOURCE LINES 63-74 - -.. code-block:: default - - - - def start_prep7(): - mapdl.clear() - mapdl.verify() - mapdl.prep7() - - - start_prep7() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 75-78 - -Define Element Type -~~~~~~~~~~~~~~~~~~~ -Set up the element type (a shell-type). - -.. GENERATED FROM PYTHON SOURCE LINES 78-115 - -.. code-block:: default - - - # Define the element type number. - def define_element(elem_type): - # Type of analysis: Static. - mapdl.antype("STATIC") - - # Define the element type number. - elem_num = 1 - - if elem_type == "SHELL181": - - # Element type: SHELL181. - mapdl.et(elem_num, elem_type) - - # Special Features are defined by keyoptions of shell element: - - # KEYOPT(3) - # Integration option: - # Full integration with incompatible modes. - mapdl.keyopt(elem_num, 3, 2) # Cubic shape function - - elif elem_type == "SHELL281": - - # Element type: SHELL181. - mapdl.et(elem_num, "SHELL281") - - return elem_type, mapdl.etlist() - - - # Return the number of the element type. - elem_type, elem_type_list = define_element(elem_type="SHELL181") - print( - f"Selected element type is: {elem_type},\n" - f"Printout the element list with its own properties:\n {elem_type_list}" - ) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - Selected element type is: SHELL181, - Printout the element list with its own properties: - ELEMENT TYPE 1 IS SHELL181 4-NODE SHELL - KEYOPT( 1- 6)= 0 0 2 0 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - CURRENT NODAL DOF SET IS UX UY UZ ROTX ROTY ROTZ - THREE-DIMENSIONAL MODEL - - - - -.. GENERATED FROM PYTHON SOURCE LINES 116-121 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material properties, where: -Young Modulus is :math:`E = 10.5 \cdot 10^6 psi`, -Poisson's ratio is :math:`\nu = 0.3125`. - -.. GENERATED FROM PYTHON SOURCE LINES 121-137 - -.. code-block:: default - - - # Define material number. - mat_num = 1 - - # Define material properties. - def define_material(): - # Define material properties. - mapdl.mp("EX", mat_num, 10.5e6) - mapdl.mp("NUXY", mat_num, 0.3125) - return mapdl.mplist() - - - material_list = define_material() - print(material_list) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - MATERIAL NUMBER 1 - - TEMP EX - 0.1050000E+08 - - TEMP NUXY - 0.3125000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 138-141 - -Define Section -~~~~~~~~~~~~~~ -Set up the cross-section properties for a shell element. - -.. GENERATED FROM PYTHON SOURCE LINES 141-158 - -.. code-block:: default - - - # Define cross-section number and thickness of the shell element. - sec_num = 1 - t = 0.094 - - # Define shell cross-section. - def define_section(): - # Define shell cross-section. - mapdl.sectype(secid=sec_num, type_="SHELL", name="shell181") - mapdl.secdata(t, mat_num, 0, 5) - return mapdl.slist() - - - section_list = define_section() - print(section_list) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - SECTION ID NUMBER: 1 - SHELL SECTION TYPE: - SHELL SECTION NAME IS: shell181 - SHELL SECTION DATA SUMMARY: - Number of Layers = 1 - Total Thickness = 0.094000 - - Layer Thickness MatID Ori. Angle Num Intg. Pts - - 1 0.0940 1 0.0000 5 - - Shell Section is offset to MID surface of Shell - - Section Solution Controls - User Transverse Shear Stiffness (11)= 0.0000 - (22)= 0.0000 - (12)= 0.0000 - Added Mass Per Unit Area = 0.0000 - Hourglass Scale Factor; Membrane = 1.0000 - Bending = 1.0000 - Drill Stiffness Scale Factor = 1.0000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 159-162 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the keypoints and create the area through the keypoints. - -.. GENERATED FROM PYTHON SOURCE LINES 162-209 - -.. code-block:: default - - - # Define geometry of the simplified mathematical model. - def define_geometry(): - # Change active coordinate system - # to the global cylindrical coordinate system. - mapdl.csys(1) - - # Define keypoints by coordinates. - mapdl.k(1, 4.953) - mapdl.k(2, 4.953, "", 5.175) - - # Generate additional keypoints from a pattern of keypoints. - mapdl.kgen(2, 1, 2, 1, "", 90) - - # Create an area through keypoints. - mapdl.a(1, 2, 4, 3) - - if elem_type == "SHELL181": - # Plot the lines. - mapdl.lplot(color_lines=True, cpos="iso") - - # Plot the area using PyVista parameters. - mapdl.aplot( - title="Display the selected area", - cpos="iso", - vtk=True, - color="#06C2AC", - show_line_numbering=True, - show_area_numbering=True, - show_lines=True, - ) - - - define_geometry() - - - # Define the number of the keypoint where F is applied using inline function. - def keypoint_number(mapdl): - keypoint_num = mapdl.queries.kp(4.953, 90, 0) - return keypoint_num - - - # Call the function to get the number of keypoint. - top_keypoint = keypoint_number(mapdl) - print(f"The number of the keypoint where F is applied: {top_keypoint}") - - - - - -.. rst-class:: sphx-glr-horizontal - - - * - - .. figure:: images/sphx_glr_vm-006-pinched_cylinder_001.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-multi-img - - * - - .. figure:: images/sphx_glr_vm-006-pinched_cylinder_002.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-multi-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - The number of the keypoint where F is applied: 3 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 210-213 - -Meshing -~~~~~~~ -Define line division of the lines, then mesh the area with shell elements. - -.. GENERATED FROM PYTHON SOURCE LINES 213-252 - -.. code-block:: default - - - # Define mesh properties and create the mesh with shell elements. - def meshing(): - # Specify the default number of line divisions. - mapdl.esize(size="", ndiv=8) - - # Mesh the area. - mapdl.amesh(1) - - # Define global cartesian coordinate system. - mapdl.csys(0) - - if elem_type == "SHELL181": - # Plot the mesh. - mapdl.eplot( - title="Plot of the currently selected elements", - vtk=True, - cpos="iso", - show_edges=True, - edge_color="white", - show_node_numbering=True, - color="purple", - ) - - # Print the list of elements. - print(mapdl.elist()) - - # Plot the nodes using VTK. - mapdl.nplot( - vtk=True, nnum=True, background="", cpos="iso", show_bounds=True, point_size=10 - ) - - # Print the list of nodes. - print(mapdl.nlist()) - - - meshing() - - - - - -.. rst-class:: sphx-glr-horizontal - - - * - - .. figure:: images/sphx_glr_vm-006-pinched_cylinder_003.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-multi-img - - * - - .. figure:: images/sphx_glr_vm-006-pinched_cylinder_004.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-multi-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - LIST ALL SELECTED ELEMENTS. (LIST NODES) - 1 1 1 1 0 1 1 3 33 32 - 2 1 1 1 0 1 3 4 40 33 - 3 1 1 1 0 1 4 5 47 40 - 4 1 1 1 0 1 5 6 54 47 - 5 1 1 1 0 1 6 7 61 54 - 6 1 1 1 0 1 7 8 68 61 - 7 1 1 1 0 1 8 9 75 68 - 8 1 1 1 0 1 9 2 11 75 - 9 1 1 1 0 1 32 33 34 31 - 10 1 1 1 0 1 33 40 41 34 - 11 1 1 1 0 1 40 47 48 41 - 12 1 1 1 0 1 47 54 55 48 - 13 1 1 1 0 1 54 61 62 55 - 14 1 1 1 0 1 61 68 69 62 - 15 1 1 1 0 1 68 75 76 69 - 16 1 1 1 0 1 75 11 12 76 - 17 1 1 1 0 1 31 34 35 30 - 18 1 1 1 0 1 34 41 42 35 - 19 1 1 1 0 1 41 48 49 42 - 20 1 1 1 0 1 48 55 56 49 - 21 1 1 1 0 1 55 62 63 56 - 22 1 1 1 0 1 62 69 70 63 - 23 1 1 1 0 1 69 76 77 70 - 24 1 1 1 0 1 76 12 13 77 - 25 1 1 1 0 1 30 35 36 29 - 26 1 1 1 0 1 35 42 43 36 - 27 1 1 1 0 1 42 49 50 43 - 28 1 1 1 0 1 49 56 57 50 - 29 1 1 1 0 1 56 63 64 57 - 30 1 1 1 0 1 63 70 71 64 - 31 1 1 1 0 1 70 77 78 71 - 32 1 1 1 0 1 77 13 14 78 - 33 1 1 1 0 1 29 36 37 28 - 34 1 1 1 0 1 36 43 44 37 - 35 1 1 1 0 1 43 50 51 44 - 36 1 1 1 0 1 50 57 58 51 - 37 1 1 1 0 1 57 64 65 58 - 38 1 1 1 0 1 64 71 72 65 - 39 1 1 1 0 1 71 78 79 72 - 40 1 1 1 0 1 78 14 15 79 - 41 1 1 1 0 1 28 37 38 27 - 42 1 1 1 0 1 37 44 45 38 - 43 1 1 1 0 1 44 51 52 45 - 44 1 1 1 0 1 51 58 59 52 - 45 1 1 1 0 1 58 65 66 59 - 46 1 1 1 0 1 65 72 73 66 - 47 1 1 1 0 1 72 79 80 73 - 48 1 1 1 0 1 79 15 16 80 - 49 1 1 1 0 1 27 38 39 26 - 50 1 1 1 0 1 38 45 46 39 - 51 1 1 1 0 1 45 52 53 46 - 52 1 1 1 0 1 52 59 60 53 - 53 1 1 1 0 1 59 66 67 60 - 54 1 1 1 0 1 66 73 74 67 - 55 1 1 1 0 1 73 80 81 74 - 56 1 1 1 0 1 80 16 17 81 - 57 1 1 1 0 1 26 39 25 18 - 58 1 1 1 0 1 39 46 24 25 - 59 1 1 1 0 1 46 53 23 24 - 60 1 1 1 0 1 53 60 22 23 - 61 1 1 1 0 1 60 67 21 22 - 62 1 1 1 0 1 67 74 20 21 - 63 1 1 1 0 1 74 81 19 20 - 64 1 1 1 0 1 81 17 10 19 - 1 4.9530 0.0000 0.0000 0.00 0.00 0.00 - 2 4.9530 0.0000 5.1750 0.00 0.00 0.00 - 3 4.9530 0.0000 0.64687 0.00 0.00 0.00 - 4 4.9530 0.0000 1.2937 0.00 0.00 0.00 - 5 4.9530 0.0000 1.9406 0.00 0.00 0.00 - 6 4.9530 0.0000 2.5875 0.00 0.00 0.00 - 7 4.9530 0.0000 3.2344 0.00 0.00 0.00 - 8 4.9530 0.0000 3.8812 0.00 0.00 0.00 - 9 4.9530 0.0000 4.5281 0.00 0.00 0.00 - 10 0.0000 4.9530 5.1750 0.00 0.00 0.00 - 11 4.8578 0.96628 5.1750 0.00 0.00 0.00 - 12 4.5760 1.8954 5.1750 0.00 0.00 0.00 - 13 4.1183 2.7517 5.1750 0.00 0.00 0.00 - 14 3.5023 3.5023 5.1750 0.00 0.00 0.00 - 15 2.7517 4.1183 5.1750 0.00 0.00 0.00 - 16 1.8954 4.5760 5.1750 0.00 0.00 0.00 - 17 0.96628 4.8578 5.1750 0.00 0.00 0.00 - 18 0.0000 4.9530 0.0000 0.00 0.00 0.00 - 19 0.0000 4.9530 4.5281 0.00 0.00 0.00 - 20 0.0000 4.9530 3.8812 0.00 0.00 0.00 - 21 0.0000 4.9530 3.2344 0.00 0.00 0.00 - 22 0.0000 4.9530 2.5875 0.00 0.00 0.00 - 23 0.0000 4.9530 1.9406 0.00 0.00 0.00 - 24 0.0000 4.9530 1.2937 0.00 0.00 0.00 - 25 0.0000 4.9530 0.64688 0.00 0.00 0.00 - 26 0.96628 4.8578 0.0000 0.00 0.00 0.00 - 27 1.8954 4.5760 0.0000 0.00 0.00 0.00 - 28 2.7517 4.1183 0.0000 0.00 0.00 0.00 - 29 3.5023 3.5023 0.0000 0.00 0.00 0.00 - 30 4.1183 2.7517 0.0000 0.00 0.00 0.00 - 31 4.5760 1.8954 0.0000 0.00 0.00 0.00 - 32 4.8578 0.96628 0.0000 0.00 0.00 0.00 - 33 4.8578 0.96628 0.64687 0.00 0.00 0.00 - 34 4.5760 1.8954 0.64688 0.00 0.00 0.00 - 35 4.1183 2.7517 0.64688 0.00 0.00 0.00 - 36 3.5023 3.5023 0.64688 0.00 0.00 0.00 - 37 2.7517 4.1183 0.64688 0.00 0.00 0.00 - 38 1.8954 4.5760 0.64688 0.00 0.00 0.00 - 39 0.96628 4.8578 0.64688 0.00 0.00 0.00 - 40 4.8578 0.96628 1.2937 0.00 0.00 0.00 - 41 4.5760 1.8954 1.2937 0.00 0.00 0.00 - 42 4.1183 2.7517 1.2937 0.00 0.00 0.00 - 43 3.5023 3.5023 1.2937 0.00 0.00 0.00 - 44 2.7517 4.1183 1.2938 0.00 0.00 0.00 - 45 1.8954 4.5760 1.2938 0.00 0.00 0.00 - 46 0.96628 4.8578 1.2937 0.00 0.00 0.00 - 47 4.8578 0.96628 1.9406 0.00 0.00 0.00 - 48 4.5760 1.8954 1.9406 0.00 0.00 0.00 - 49 4.1183 2.7517 1.9406 0.00 0.00 0.00 - 50 3.5023 3.5023 1.9406 0.00 0.00 0.00 - 51 2.7517 4.1183 1.9406 0.00 0.00 0.00 - 52 1.8954 4.5760 1.9406 0.00 0.00 0.00 - 53 0.96628 4.8578 1.9406 0.00 0.00 0.00 - 54 4.8578 0.96628 2.5875 0.00 0.00 0.00 - 55 4.5760 1.8954 2.5875 0.00 0.00 0.00 - 56 4.1183 2.7517 2.5875 0.00 0.00 0.00 - 57 3.5023 3.5023 2.5875 0.00 0.00 0.00 - 58 2.7517 4.1183 2.5875 0.00 0.00 0.00 - 59 1.8954 4.5760 2.5875 0.00 0.00 0.00 - 60 0.96628 4.8578 2.5875 0.00 0.00 0.00 - 61 4.8578 0.96628 3.2344 0.00 0.00 0.00 - 62 4.5760 1.8954 3.2344 0.00 0.00 0.00 - 63 4.1183 2.7517 3.2344 0.00 0.00 0.00 - 64 3.5023 3.5023 3.2344 0.00 0.00 0.00 - 65 2.7517 4.1183 3.2344 0.00 0.00 0.00 - 66 1.8954 4.5760 3.2344 0.00 0.00 0.00 - 67 0.96628 4.8578 3.2344 0.00 0.00 0.00 - 68 4.8578 0.96628 3.8812 0.00 0.00 0.00 - 69 4.5760 1.8954 3.8812 0.00 0.00 0.00 - 70 4.1183 2.7517 3.8813 0.00 0.00 0.00 - 71 3.5023 3.5023 3.8813 0.00 0.00 0.00 - 72 2.7517 4.1183 3.8813 0.00 0.00 0.00 - 73 1.8954 4.5760 3.8813 0.00 0.00 0.00 - 74 0.96628 4.8578 3.8813 0.00 0.00 0.00 - 75 4.8578 0.96628 4.5281 0.00 0.00 0.00 - 76 4.5760 1.8954 4.5281 0.00 0.00 0.00 - 77 4.1183 2.7517 4.5281 0.00 0.00 0.00 - 78 3.5023 3.5023 4.5281 0.00 0.00 0.00 - 79 2.7517 4.1183 4.5281 0.00 0.00 0.00 - 80 1.8954 4.5760 4.5281 0.00 0.00 0.00 - 81 0.96628 4.8578 4.5281 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 253-256 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Application of symmetric boundary conditions for simplified model. - -.. GENERATED FROM PYTHON SOURCE LINES 256-272 - -.. code-block:: default - - - # Select nodes by location and apply BC. - def define_bc(): - # Select nodes by location and apply BC. - mapdl.nsel("S", "LOC", "X", 0) - mapdl.dsym("SYMM", "X", 0) - mapdl.nsel("S", "LOC", "Y", 0) - mapdl.dsym("SYMM", "Y", 0) - mapdl.nsel("S", "LOC", "Z", 0) - mapdl.dsym("SYMM", "Z", 0) - mapdl.nsel("ALL") - - - define_bc() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 273-276 - -Define Distributed Loads -~~~~~~~~~~~~~~~~~~~~~~~~ -Apply the force of :math:`F = (100/4) lb` in the y-direction. - -.. GENERATED FROM PYTHON SOURCE LINES 276-290 - -.. code-block:: default - - - # Define loads. - def define_loads(): - # Parametrization of the :math:`F` load for the quarter of the model. - force = 100 / 4 - - # Application of the load to the model. - mapdl.fk(top_keypoint, "FY", -force) - mapdl.finish() - - - define_loads() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 291-294 - -Solve -~~~~~ -Enter solution mode and solve the system. Print the solver output. - -.. GENERATED FROM PYTHON SOURCE LINES 294-306 - -.. code-block:: default - - - - def solve_procedure(): - mapdl.run("/solu") - out = mapdl.solve() - mapdl.finish() - return out - - - simulation_info = solve_procedure() - print(simulation_info) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - ***** MAPDL SOLVE COMMAND ***** - - TRANSFER SOLID MODEL BOUNDARY CONDITIONS TO FINITE ELEMENT MODEL - FORCES TRANSFERRED FROM KEYPOINTS = 1 - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - There is no title defined for this analysis. - - *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS *** - ---GIVE SUGGESTIONS ONLY--- - - ELEMENT TYPE 1 IS SHELL181. IT IS ASSOCIATED WITH ELASTOPLASTIC - MATERIALS ONLY. KEYOPT(8)=2 IS SUGGESTED AND KEYOPT(3)=2 IS SUGGESTED FOR - HIGHER ACCURACY OF MEMBRANE STRESSES; OTHERWISE, KEYOPT(3)=0 IS SUGGESTED. - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - S O L U T I O N O P T I O N S - - PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D - DEGREES OF FREEDOM. . . . . . UX UY UZ ROTX ROTY ROTZ - ANALYSIS TYPE . . . . . . . . . . . . . . . . .STATIC (STEADY-STATE) - GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Present time 0 is less than or equal to the previous time. Time will - default to 1. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - The conditions for direct assembly have been met. No .emat or .erot - files will be produced. - - - - D I S T R I B U T E D D O M A I N D E C O M P O S E R - - ...Number of elements: 64 - ...Number of nodes: 81 - ...Decompose to 0 CPU domains - ...Element load balance ratio = 0.000 - - - L O A D S T E P O P T I O N S - - LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 - TIME AT END OF THE LOAD STEP. . . . . . . . . . 1.0000 - NUMBER OF SUBSTEPS. . . . . . . . . . . . . . . 1 - STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO - PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT - DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN - FOR THE LAST SUBSTEP - - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Predictor is ON by default for structural elements with rotational - degrees of freedom. Use the PRED,OFF command to turn the predictor - OFF if it adversely affects the convergence. - - - Range of element maximum matrix coefficients in global coordinates - Maximum = 596623.888 at element 0. - Minimum = 596623.886 at element 0. - - *** ELEMENT MATRIX FORMULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL181 0.000 0.000000 - Time at end of element matrix formulation CP = 0. - - DISTRIBUTED SPARSE MATRIX DIRECT SOLVER. - Number of equations = 407, Maximum wavefront = 0 - Memory available (MB) = 0.0 , Memory required (MB) = 0.0 - - Distributed sparse solver maximum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot in absolute value= 0 at node 0 - . - - *** ELEMENT RESULT CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL181 0.000 0.000000 - - *** NODAL LOAD CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL181 0.000 0.000000 - *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 1 - *** TIME = 1.00000 TIME INC = 1.00000 NEW TRIANG MATRIX - - - - -.. GENERATED FROM PYTHON SOURCE LINES 307-312 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing for the model with elements ``shell181``. -Plotting nodal displacement. -Get the the radial displacement at the node where force F is applied. - -.. GENERATED FROM PYTHON SOURCE LINES 312-322 - -.. code-block:: default - - - # Start post-processing mode. - def post_processing(): - mapdl.post1() - mapdl.set(1) - - - post_processing() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 323-326 - -Plotting -~~~~~~~~ -Plot nodal displacement using PyVista. - -.. GENERATED FROM PYTHON SOURCE LINES 326-343 - -.. code-block:: default - - - - def plot_nodal_disp(): - mapdl.post_processing.plot_nodal_displacement( - title="Nodal Displacements", - component="Y", - cpos="zx", - scalar_bar_args={"title": "Nodal Displacements", "vertical": True}, - show_node_numbering=True, - show_axes=True, - show_edges=True, - ) - - - plot_nodal_disp() - - - - - -.. figure:: images/sphx_glr_vm-006-pinched_cylinder_005.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 344-348 - -Getting the radial displacements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To determine the radial displacement :math:`\delta` at the point -where F is applied, we can use :meth:`Mapdl.get_value `. - -.. GENERATED FROM PYTHON SOURCE LINES 348-376 - -.. code-block:: default - - - - def get_displacements(): - # Select keypoint by its number ``top_keypoint``. - mapdl.ksel("S", vmin="top_keypoint") - - # Select the node associated with the selected keypoint. - mapdl.nslk() - - # Get the number of the selected node by :meth:`Mapdl.get ` - top_node = int(mapdl.get("_", "node", 0, "num", "max")) - - # Define radial displacement at the node where F is applied. - deflect_shell = mapdl.get_value( - entity="node", entnum=top_node, item1="u", it1num="y" - ) - - return top_node, deflect_shell - - - # Call the function and get the value of the deflection. - top_node_181, deflect_shell_181 = get_displacements() - print( - f"Number of the node attached to the top keypoint: {top_node_181},\n" - f"Radial displacement: {(round(deflect_shell_181, 4))}" - ) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - Number of the node attached to the top keypoint: 18, - Radial displacement: -0.11 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 377-380 - -Rerun Model with SHELL281 -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Perform the simulation again using the element type SHELL281. - -.. GENERATED FROM PYTHON SOURCE LINES 380-392 - -.. code-block:: default - - - # Restart pre-processing routine. - start_prep7() - elem_type = define_element(elem_type="SHELL281") - define_material() - define_section() - define_geometry() - meshing() - define_bc() - define_loads() - - - - - -.. figure:: images/sphx_glr_vm-006-pinched_cylinder_006.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-single-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - LIST ALL SELECTED ELEMENTS. (LIST NODES) - 1 1 1 1 0 1 1 4 73 63 3 72 65 64 - 2 1 1 1 0 1 4 6 95 73 5 94 87 72 - 3 1 1 1 0 1 6 8 117 95 7 116 109 94 - 4 1 1 1 0 1 8 10 139 117 9 138 131 116 - 5 1 1 1 0 1 10 12 161 139 11 160 153 138 - 6 1 1 1 0 1 12 14 183 161 13 182 175 160 - 7 1 1 1 0 1 14 16 205 183 15 204 197 182 - 8 1 1 1 0 1 16 2 20 205 17 19 219 204 - 9 1 1 1 0 1 63 73 75 61 65 74 66 62 - 10 1 1 1 0 1 73 95 97 75 87 96 88 74 - 11 1 1 1 0 1 95 117 119 97 109 118 110 96 - 12 1 1 1 0 1 117 139 141 119 131 140 132 118 - 13 1 1 1 0 1 139 161 163 141 153 162 154 140 - 14 1 1 1 0 1 161 183 185 163 175 184 176 162 - 15 1 1 1 0 1 183 205 207 185 197 206 198 184 - 16 1 1 1 0 1 205 20 22 207 219 21 220 206 - 17 1 1 1 0 1 61 75 77 59 66 76 67 60 - 18 1 1 1 0 1 75 97 99 77 88 98 89 76 - 19 1 1 1 0 1 97 119 121 99 110 120 111 98 - 20 1 1 1 0 1 119 141 143 121 132 142 133 120 - 21 1 1 1 0 1 141 163 165 143 154 164 155 142 - 22 1 1 1 0 1 163 185 187 165 176 186 177 164 - 23 1 1 1 0 1 185 207 209 187 198 208 199 186 - 24 1 1 1 0 1 207 22 24 209 220 23 221 208 - 25 1 1 1 0 1 59 77 79 57 67 78 68 58 - 26 1 1 1 0 1 77 99 101 79 89 100 90 78 - 27 1 1 1 0 1 99 121 123 101 111 122 112 100 - 28 1 1 1 0 1 121 143 145 123 133 144 134 122 - 29 1 1 1 0 1 143 165 167 145 155 166 156 144 - 30 1 1 1 0 1 165 187 189 167 177 188 178 166 - 31 1 1 1 0 1 187 209 211 189 199 210 200 188 - 32 1 1 1 0 1 209 24 26 211 221 25 222 210 - 33 1 1 1 0 1 57 79 81 55 68 80 69 56 - 34 1 1 1 0 1 79 101 103 81 90 102 91 80 - 35 1 1 1 0 1 101 123 125 103 112 124 113 102 - 36 1 1 1 0 1 123 145 147 125 134 146 135 124 - 37 1 1 1 0 1 145 167 169 147 156 168 157 146 - 38 1 1 1 0 1 167 189 191 169 178 190 179 168 - 39 1 1 1 0 1 189 211 213 191 200 212 201 190 - 40 1 1 1 0 1 211 26 28 213 222 27 223 212 - 41 1 1 1 0 1 55 81 83 53 69 82 70 54 - 42 1 1 1 0 1 81 103 105 83 91 104 92 82 - 43 1 1 1 0 1 103 125 127 105 113 126 114 104 - 44 1 1 1 0 1 125 147 149 127 135 148 136 126 - 45 1 1 1 0 1 147 169 171 149 157 170 158 148 - 46 1 1 1 0 1 169 191 193 171 179 192 180 170 - 47 1 1 1 0 1 191 213 215 193 201 214 202 192 - 48 1 1 1 0 1 213 28 30 215 223 29 224 214 - 49 1 1 1 0 1 53 83 85 51 70 84 71 52 - 50 1 1 1 0 1 83 105 107 85 92 106 93 84 - 51 1 1 1 0 1 105 127 129 107 114 128 115 106 - 52 1 1 1 0 1 127 149 151 129 136 150 137 128 - 53 1 1 1 0 1 149 171 173 151 158 172 159 150 - 54 1 1 1 0 1 171 193 195 173 180 194 181 172 - 55 1 1 1 0 1 193 215 217 195 202 216 203 194 - 56 1 1 1 0 1 215 30 32 217 224 31 225 216 - 57 1 1 1 0 1 51 85 48 34 71 86 49 50 - 58 1 1 1 0 1 85 107 46 48 93 108 47 86 - 59 1 1 1 0 1 107 129 44 46 115 130 45 108 - 60 1 1 1 0 1 129 151 42 44 137 152 43 130 - 61 1 1 1 0 1 151 173 40 42 159 174 41 152 - 62 1 1 1 0 1 173 195 38 40 181 196 39 174 - 63 1 1 1 0 1 195 217 36 38 203 218 37 196 - 64 1 1 1 0 1 217 32 18 36 225 33 35 218 - 1 4.9530 0.0000 0.0000 0.00 0.00 0.00 - 2 4.9530 0.0000 5.1750 0.00 0.00 0.00 - 3 4.9530 0.0000 0.32344 0.00 0.00 0.00 - 4 4.9530 0.0000 0.64687 0.00 0.00 0.00 - 5 4.9530 0.0000 0.97031 0.00 0.00 0.00 - 6 4.9530 0.0000 1.2937 0.00 0.00 0.00 - 7 4.9530 0.0000 1.6172 0.00 0.00 0.00 - 8 4.9530 0.0000 1.9406 0.00 0.00 0.00 - 9 4.9530 0.0000 2.2641 0.00 0.00 0.00 - 10 4.9530 0.0000 2.5875 0.00 0.00 0.00 - 11 4.9530 0.0000 2.9109 0.00 0.00 0.00 - 12 4.9530 0.0000 3.2344 0.00 0.00 0.00 - 13 4.9530 0.0000 3.5578 0.00 0.00 0.00 - 14 4.9530 0.0000 3.8812 0.00 0.00 0.00 - 15 4.9530 0.0000 4.2047 0.00 0.00 0.00 - 16 4.9530 0.0000 4.5281 0.00 0.00 0.00 - 17 4.9530 0.0000 4.8516 0.00 0.00 0.00 - 18 0.0000 4.9530 5.1750 0.00 0.00 0.00 - 19 4.9291 0.48548 5.1750 0.00 0.00 0.00 - 20 4.8578 0.96628 5.1750 0.00 0.00 0.00 - 21 4.7397 1.4378 5.1750 0.00 0.00 0.00 - 22 4.5760 1.8954 5.1750 0.00 0.00 0.00 - 23 4.3682 2.3348 5.1750 0.00 0.00 0.00 - 24 4.1183 2.7517 5.1750 0.00 0.00 0.00 - 25 3.8287 3.1421 5.1750 0.00 0.00 0.00 - 26 3.5023 3.5023 5.1750 0.00 0.00 0.00 - 27 3.1421 3.8287 5.1750 0.00 0.00 0.00 - 28 2.7517 4.1183 5.1750 0.00 0.00 0.00 - 29 2.3348 4.3682 5.1750 0.00 0.00 0.00 - 30 1.8954 4.5760 5.1750 0.00 0.00 0.00 - 31 1.4378 4.7397 5.1750 0.00 0.00 0.00 - 32 0.96628 4.8578 5.1750 0.00 0.00 0.00 - 33 0.48548 4.9291 5.1750 0.00 0.00 0.00 - 34 0.0000 4.9530 0.0000 0.00 0.00 0.00 - 35 0.0000 4.9530 4.8516 0.00 0.00 0.00 - 36 0.0000 4.9530 4.5281 0.00 0.00 0.00 - 37 0.0000 4.9530 4.2047 0.00 0.00 0.00 - 38 0.0000 4.9530 3.8812 0.00 0.00 0.00 - 39 0.0000 4.9530 3.5578 0.00 0.00 0.00 - 40 0.0000 4.9530 3.2344 0.00 0.00 0.00 - 41 0.0000 4.9530 2.9109 0.00 0.00 0.00 - 42 0.0000 4.9530 2.5875 0.00 0.00 0.00 - 43 0.0000 4.9530 2.2641 0.00 0.00 0.00 - 44 0.0000 4.9530 1.9406 0.00 0.00 0.00 - 45 0.0000 4.9530 1.6172 0.00 0.00 0.00 - 46 0.0000 4.9530 1.2937 0.00 0.00 0.00 - 47 0.0000 4.9530 0.97031 0.00 0.00 0.00 - 48 0.0000 4.9530 0.64688 0.00 0.00 0.00 - 49 0.0000 4.9530 0.32344 0.00 0.00 0.00 - 50 0.48548 4.9291 0.0000 0.00 0.00 0.00 - 51 0.96628 4.8578 0.0000 0.00 0.00 0.00 - 52 1.4378 4.7397 0.0000 0.00 0.00 0.00 - 53 1.8954 4.5760 0.0000 0.00 0.00 0.00 - 54 2.3348 4.3682 0.0000 0.00 0.00 0.00 - 55 2.7517 4.1183 0.0000 0.00 0.00 0.00 - 56 3.1421 3.8287 0.0000 0.00 0.00 0.00 - 57 3.5023 3.5023 0.0000 0.00 0.00 0.00 - 58 3.8287 3.1421 0.0000 0.00 0.00 0.00 - 59 4.1183 2.7517 0.0000 0.00 0.00 0.00 - 60 4.3682 2.3348 0.0000 0.00 0.00 0.00 - 61 4.5760 1.8954 0.0000 0.00 0.00 0.00 - 62 4.7397 1.4378 0.0000 0.00 0.00 0.00 - 63 4.8578 0.96628 0.0000 0.00 0.00 0.00 - 64 4.9291 0.48548 0.0000 0.00 0.00 0.00 - 65 4.8578 0.96628 0.32344 0.00 0.00 0.00 - 66 4.5760 1.8954 0.32344 0.00 0.00 0.00 - 67 4.1183 2.7517 0.32344 0.00 0.00 0.00 - 68 3.5023 3.5023 0.32344 0.00 0.00 0.00 - 69 2.7517 4.1183 0.32344 0.00 0.00 0.00 - 70 1.8954 4.5760 0.32344 0.00 0.00 0.00 - 71 0.96628 4.8578 0.32344 0.00 0.00 0.00 - 72 4.9291 0.48548 0.64687 0.00 0.00 0.00 - 73 4.8578 0.96628 0.64687 0.00 0.00 0.00 - 74 4.7397 1.4378 0.64687 0.00 0.00 0.00 - 75 4.5760 1.8954 0.64687 0.00 0.00 0.00 - 76 4.3682 2.3348 0.64687 0.00 0.00 0.00 - 77 4.1183 2.7517 0.64688 0.00 0.00 0.00 - 78 3.8287 3.1421 0.64688 0.00 0.00 0.00 - 79 3.5023 3.5023 0.64688 0.00 0.00 0.00 - 80 3.1421 3.8287 0.64688 0.00 0.00 0.00 - 81 2.7517 4.1183 0.64688 0.00 0.00 0.00 - 82 2.3348 4.3682 0.64688 0.00 0.00 0.00 - 83 1.8954 4.5760 0.64688 0.00 0.00 0.00 - 84 1.4378 4.7397 0.64688 0.00 0.00 0.00 - 85 0.96628 4.8578 0.64688 0.00 0.00 0.00 - 86 0.48548 4.9291 0.64688 0.00 0.00 0.00 - 87 4.8578 0.96628 0.97031 0.00 0.00 0.00 - 88 4.5760 1.8954 0.97031 0.00 0.00 0.00 - 89 4.1183 2.7517 0.97031 0.00 0.00 0.00 - 90 3.5023 3.5023 0.97031 0.00 0.00 0.00 - 91 2.7517 4.1183 0.97031 0.00 0.00 0.00 - 92 1.8954 4.5760 0.97031 0.00 0.00 0.00 - 93 0.96628 4.8578 0.97031 0.00 0.00 0.00 - 94 4.9291 0.48548 1.2937 0.00 0.00 0.00 - 95 4.8578 0.96628 1.2937 0.00 0.00 0.00 - 96 4.7397 1.4378 1.2937 0.00 0.00 0.00 - 97 4.5760 1.8954 1.2937 0.00 0.00 0.00 - 98 4.3682 2.3348 1.2937 0.00 0.00 0.00 - 99 4.1183 2.7517 1.2937 0.00 0.00 0.00 - 100 3.8287 3.1421 1.2937 0.00 0.00 0.00 - 101 3.5023 3.5023 1.2937 0.00 0.00 0.00 - 102 3.1421 3.8287 1.2937 0.00 0.00 0.00 - 103 2.7517 4.1183 1.2938 0.00 0.00 0.00 - 104 2.3348 4.3682 1.2938 0.00 0.00 0.00 - 105 1.8954 4.5760 1.2937 0.00 0.00 0.00 - 106 1.4378 4.7397 1.2938 0.00 0.00 0.00 - 107 0.96628 4.8578 1.2938 0.00 0.00 0.00 - 108 0.48548 4.9291 1.2938 0.00 0.00 0.00 - 109 4.8578 0.96628 1.6172 0.00 0.00 0.00 - 110 4.5760 1.8954 1.6172 0.00 0.00 0.00 - 111 4.1183 2.7517 1.6172 0.00 0.00 0.00 - 112 3.5023 3.5023 1.6172 0.00 0.00 0.00 - 113 2.7517 4.1183 1.6172 0.00 0.00 0.00 - 114 1.8954 4.5760 1.6172 0.00 0.00 0.00 - 115 0.96628 4.8578 1.6172 0.00 0.00 0.00 - 116 4.9291 0.48548 1.9406 0.00 0.00 0.00 - 117 4.8578 0.96628 1.9406 0.00 0.00 0.00 - 118 4.7397 1.4378 1.9406 0.00 0.00 0.00 - 119 4.5760 1.8954 1.9406 0.00 0.00 0.00 - 120 4.3682 2.3348 1.9406 0.00 0.00 0.00 - 121 4.1183 2.7517 1.9406 0.00 0.00 0.00 - 122 3.8287 3.1421 1.9406 0.00 0.00 0.00 - 123 3.5023 3.5023 1.9406 0.00 0.00 0.00 - 124 3.1421 3.8287 1.9406 0.00 0.00 0.00 - 125 2.7517 4.1183 1.9406 0.00 0.00 0.00 - 126 2.3348 4.3682 1.9406 0.00 0.00 0.00 - 127 1.8954 4.5760 1.9406 0.00 0.00 0.00 - 128 1.4378 4.7397 1.9406 0.00 0.00 0.00 - 129 0.96628 4.8578 1.9406 0.00 0.00 0.00 - 130 0.48548 4.9291 1.9406 0.00 0.00 0.00 - 131 4.8578 0.96628 2.2641 0.00 0.00 0.00 - 132 4.5760 1.8954 2.2641 0.00 0.00 0.00 - 133 4.1183 2.7517 2.2641 0.00 0.00 0.00 - 134 3.5023 3.5023 2.2641 0.00 0.00 0.00 - 135 2.7517 4.1183 2.2641 0.00 0.00 0.00 - 136 1.8954 4.5760 2.2641 0.00 0.00 0.00 - 137 0.96628 4.8578 2.2641 0.00 0.00 0.00 - 138 4.9291 0.48548 2.5875 0.00 0.00 0.00 - 139 4.8578 0.96628 2.5875 0.00 0.00 0.00 - 140 4.7397 1.4378 2.5875 0.00 0.00 0.00 - 141 4.5760 1.8954 2.5875 0.00 0.00 0.00 - 142 4.3682 2.3348 2.5875 0.00 0.00 0.00 - 143 4.1183 2.7517 2.5875 0.00 0.00 0.00 - 144 3.8287 3.1421 2.5875 0.00 0.00 0.00 - 145 3.5023 3.5023 2.5875 0.00 0.00 0.00 - 146 3.1421 3.8287 2.5875 0.00 0.00 0.00 - 147 2.7517 4.1183 2.5875 0.00 0.00 0.00 - 148 2.3348 4.3682 2.5875 0.00 0.00 0.00 - 149 1.8954 4.5760 2.5875 0.00 0.00 0.00 - 150 1.4378 4.7397 2.5875 0.00 0.00 0.00 - 151 0.96628 4.8578 2.5875 0.00 0.00 0.00 - 152 0.48548 4.9291 2.5875 0.00 0.00 0.00 - 153 4.8578 0.96628 2.9109 0.00 0.00 0.00 - 154 4.5760 1.8954 2.9109 0.00 0.00 0.00 - 155 4.1183 2.7517 2.9109 0.00 0.00 0.00 - 156 3.5023 3.5023 2.9109 0.00 0.00 0.00 - 157 2.7517 4.1183 2.9109 0.00 0.00 0.00 - 158 1.8954 4.5760 2.9109 0.00 0.00 0.00 - 159 0.96628 4.8578 2.9109 0.00 0.00 0.00 - 160 4.9291 0.48548 3.2344 0.00 0.00 0.00 - 161 4.8578 0.96628 3.2344 0.00 0.00 0.00 - 162 4.7397 1.4378 3.2344 0.00 0.00 0.00 - 163 4.5760 1.8954 3.2344 0.00 0.00 0.00 - 164 4.3682 2.3348 3.2344 0.00 0.00 0.00 - 165 4.1183 2.7517 3.2344 0.00 0.00 0.00 - 166 3.8287 3.1421 3.2344 0.00 0.00 0.00 - 167 3.5023 3.5023 3.2344 0.00 0.00 0.00 - 168 3.1421 3.8287 3.2344 0.00 0.00 0.00 - 169 2.7517 4.1183 3.2344 0.00 0.00 0.00 - 170 2.3348 4.3682 3.2344 0.00 0.00 0.00 - 171 1.8954 4.5760 3.2344 0.00 0.00 0.00 - 172 1.4378 4.7397 3.2344 0.00 0.00 0.00 - 173 0.96628 4.8578 3.2344 0.00 0.00 0.00 - 174 0.48548 4.9291 3.2344 0.00 0.00 0.00 - 175 4.8578 0.96628 3.5578 0.00 0.00 0.00 - 176 4.5760 1.8954 3.5578 0.00 0.00 0.00 - 177 4.1183 2.7517 3.5578 0.00 0.00 0.00 - 178 3.5023 3.5023 3.5578 0.00 0.00 0.00 - 179 2.7517 4.1183 3.5578 0.00 0.00 0.00 - 180 1.8954 4.5760 3.5578 0.00 0.00 0.00 - 181 0.96628 4.8578 3.5578 0.00 0.00 0.00 - 182 4.9291 0.48548 3.8812 0.00 0.00 0.00 - 183 4.8578 0.96628 3.8812 0.00 0.00 0.00 - 184 4.7397 1.4378 3.8812 0.00 0.00 0.00 - 185 4.5760 1.8954 3.8812 0.00 0.00 0.00 - 186 4.3682 2.3348 3.8812 0.00 0.00 0.00 - 187 4.1183 2.7517 3.8812 0.00 0.00 0.00 - 188 3.8287 3.1421 3.8813 0.00 0.00 0.00 - 189 3.5023 3.5023 3.8813 0.00 0.00 0.00 - 190 3.1421 3.8287 3.8812 0.00 0.00 0.00 - 191 2.7517 4.1183 3.8813 0.00 0.00 0.00 - 192 2.3348 4.3682 3.8813 0.00 0.00 0.00 - 193 1.8954 4.5760 3.8813 0.00 0.00 0.00 - 194 1.4378 4.7397 3.8813 0.00 0.00 0.00 - 195 0.96628 4.8578 3.8813 0.00 0.00 0.00 - 196 0.48548 4.9291 3.8813 0.00 0.00 0.00 - 197 4.8578 0.96628 4.2047 0.00 0.00 0.00 - 198 4.5760 1.8954 4.2047 0.00 0.00 0.00 - 199 4.1183 2.7517 4.2047 0.00 0.00 0.00 - 200 3.5023 3.5023 4.2047 0.00 0.00 0.00 - 201 2.7517 4.1183 4.2047 0.00 0.00 0.00 - 202 1.8954 4.5760 4.2047 0.00 0.00 0.00 - 203 0.96628 4.8578 4.2047 0.00 0.00 0.00 - 204 4.9291 0.48548 4.5281 0.00 0.00 0.00 - 205 4.8578 0.96628 4.5281 0.00 0.00 0.00 - 206 4.7397 1.4378 4.5281 0.00 0.00 0.00 - 207 4.5760 1.8954 4.5281 0.00 0.00 0.00 - 208 4.3682 2.3348 4.5281 0.00 0.00 0.00 - 209 4.1183 2.7517 4.5281 0.00 0.00 0.00 - 210 3.8287 3.1421 4.5281 0.00 0.00 0.00 - 211 3.5023 3.5023 4.5281 0.00 0.00 0.00 - 212 3.1421 3.8287 4.5281 0.00 0.00 0.00 - 213 2.7517 4.1183 4.5281 0.00 0.00 0.00 - 214 2.3348 4.3682 4.5281 0.00 0.00 0.00 - 215 1.8954 4.5760 4.5281 0.00 0.00 0.00 - 216 1.4378 4.7397 4.5281 0.00 0.00 0.00 - 217 0.96628 4.8578 4.5281 0.00 0.00 0.00 - 218 0.48548 4.9291 4.5281 0.00 0.00 0.00 - 219 4.8578 0.96628 4.8516 0.00 0.00 0.00 - 220 4.5760 1.8954 4.8516 0.00 0.00 0.00 - 221 4.1183 2.7517 4.8516 0.00 0.00 0.00 - 222 3.5023 3.5023 4.8516 0.00 0.00 0.00 - 223 2.7517 4.1183 4.8516 0.00 0.00 0.00 - 224 1.8954 4.5760 4.8516 0.00 0.00 0.00 - 225 0.96628 4.8578 4.8516 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 393-396 - -Solve -~~~~~ -Enter solution mode and solve the system. Print the solver output. - -.. GENERATED FROM PYTHON SOURCE LINES 396-400 - -.. code-block:: default - - - solve_procedure() - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ***** MAPDL SOLVE COMMAND ***** - - TRANSFER SOLID MODEL BOUNDARY CONDITIONS TO FINITE ELEMENT MODEL - FORCES TRANSFERRED FROM KEYPOINTS = 1 - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - There is no title defined for this analysis. - - *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS *** - ---GIVE SUGGESTIONS ONLY--- - - ELEMENT TYPE 1 IS SHELL281. IT IS ASSOCIATED WITH ELASTOPLASTIC - MATERIALS ONLY. KEYOPT(8)=2 IS SUGGESTED. - - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - S O L U T I O N O P T I O N S - - PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D - DEGREES OF FREEDOM. . . . . . UX UY UZ ROTX ROTY ROTZ - ANALYSIS TYPE . . . . . . . . . . . . . . . . .STATIC (STEADY-STATE) - GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Present time 0 is less than or equal to the previous time. Time will - default to 1. - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - The conditions for direct assembly have been met. No .emat or .erot - files will be produced. - - - - D I S T R I B U T E D D O M A I N D E C O M P O S E R - - ...Number of elements: 64 - ...Number of nodes: 225 - ...Decompose to 0 CPU domains - ...Element load balance ratio = 0.000 - - - L O A D S T E P O P T I O N S - - LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 - TIME AT END OF THE LOAD STEP. . . . . . . . . . 1.0000 - NUMBER OF SUBSTEPS. . . . . . . . . . . . . . . 1 - STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO - PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT - DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN - FOR THE LAST SUBSTEP - - - *** NOTE *** CP = 0.000 TIME= 00:00:00 - Predictor is ON by default for structural elements with rotational - degrees of freedom. Use the PRED,OFF command to turn the predictor - OFF if it adversely affects the convergence. - - - Range of element maximum matrix coefficients in global coordinates - Maximum = 3034922.21 at element 0. - Minimum = 3034922.21 at element 0. - - *** ELEMENT MATRIX FORMULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL281 0.000 0.000000 - Time at end of element matrix formulation CP = 0. - - DISTRIBUTED SPARSE MATRIX DIRECT SOLVER. - Number of equations = 1199, Maximum wavefront = 0 - Memory available (MB) = 0.0 , Memory required (MB) = 0.0 - - Distributed sparse solver maximum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot= 0 at node 0 . - Distributed sparse solver minimum pivot in absolute value= 0 at node 0 - . - - *** ELEMENT RESULT CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL281 0.000 0.000000 - - *** NODAL LOAD CALCULATION TIMES - TYPE NUMBER ENAME TOTAL CP AVE CP - - 1 64 SHELL281 0.000 0.000000 - *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 1 - *** TIME = 1.00000 TIME INC = 1.00000 NEW TRIANG MATRIX - - - -.. GENERATED FROM PYTHON SOURCE LINES 401-406 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing for the model with elements ``shell281``. -Plotting nodal displacement. -Get the the radial displacement at the node where force F is applied. - -.. GENERATED FROM PYTHON SOURCE LINES 406-412 - -.. code-block:: default - - - post_processing() - plot_nodal_disp() - top_node_281, deflect_shell_281 = get_displacements() - - - - - -.. figure:: images/sphx_glr_vm-006-pinched_cylinder_007.png - :alt: vm 006 pinched cylinder - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 413-419 - -Check Results -~~~~~~~~~~~~~ -Now we have the deflections, we can compare them to the expected values -of radial deflection at the node where force :math:`F` was applied -for both simulations. The expected value for :math:`\delta_{\mathrm{shell181}}` is 0.1139, -and :math:`\delta_{\mathrm{shell281}}` is 0.1139. - -.. GENERATED FROM PYTHON SOURCE LINES 419-441 - -.. code-block:: default - - - # Results obtained by hand-calculations. - deflect_target_181 = 0.1139 - deflect_target_281 = 0.1139 - - # Calculate the deviation. - deflect_ratio_shell_181 = abs(deflect_shell_181) / deflect_target_181 - deflect_ratio_shell_281 = abs(deflect_shell_281) / deflect_target_281 - - # Print output results. - output = f""" - ---------------------------------------------------------------------------- - ------------------------- VM3 RESULTS COMPARISON --------------------------- - ---------------------------------------------------------------------------- - | TARGET | Mechanical APDL | RATIO | - ---------------------------------------------------------------------------- - Deflection, in SHELL181{deflect_target_181:11.4f} {abs(deflect_shell_181):17.4f} {deflect_ratio_shell_181:15.3f} - Deflection, in SHELL281{deflect_target_281:11.4f} {abs(deflect_shell_281):17.4f} {deflect_ratio_shell_281:15.3f} - ---------------------------------------------------------------------------- - """ - print(output) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - - ---------------------------------------------------------------------------- - ------------------------- VM3 RESULTS COMPARISON --------------------------- - ---------------------------------------------------------------------------- - | TARGET | Mechanical APDL | RATIO | - ---------------------------------------------------------------------------- - Deflection, in SHELL181 0.1139 0.1100 0.965 - Deflection, in SHELL281 0.1139 0.1137 0.998 - ---------------------------------------------------------------------------- - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 442-443 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 443-444 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 4.904 seconds) - - -.. _sphx_glr_download_vm-006-pinched_cylinder.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-006-pinched_cylinder.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-006-pinched_cylinder.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder_codeobj.pickle b/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder_codeobj.pickle deleted file mode 100644 index 840fdab1d..000000000 Binary files a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png b/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png deleted file mode 100644 index 0e3797f6f..000000000 Binary files a/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png b/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png deleted file mode 100644 index 9f1899adc..000000000 Binary files a/doc/source/verif-manual/vm-007/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.ipynb b/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.ipynb deleted file mode 100644 index 542d69446..000000000 --- a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.ipynb +++ /dev/null @@ -1,313 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Plastic Compression of a Pipe Assembly\nProblem Description:\n - Two coaxial tubes, the inner one of 1020 CR steel and cross-sectional\n area $A_{\\mathrm{s}}$, and the outer one of 2024-T4 aluminum alloy\n and of area $A_{\\mathrm{a}}$, are compressed between heavy, flat end plates,\n as shown below. Determine the load-deflection curve of the assembly\n as it is compressed into the plastic region by an axial displacement.\n Assume that the end plates are so stiff that both tubes are shortened by\n exactly the same amount.\n\nReference:\n - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics of Solids,\n McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 180, ex. 5.1.\n\nAnalysis Type(s):\n - Static, Plastic Analysis (``ANTYPE=0``)\n\nElement Type(s):\n - Plastic Straight Pipe Element (PIPE288)\n - 4-Node Finite Strain Shell (SHELL181)\n - 3-D Structural Solid Elements (SOLID185)\n\n\"VM7\n\nMaterial Properties\n - $E_{\\mathrm{s}} = 26875000\\,psi$\n - $\\sigma_{\\mathrm{(yp)s}} = 86000\\,psi$\n - $E_{\\mathrm{a}} = 11000000\\,psi$\n - $\\sigma_{\\mathrm{(yp)a}} = 55000\\,psi$\n - $\\nu = 0.3$\n\n\"VM7\n\nGeometric Properties:\n - $l = 10\\,in$\n - $A_{\\mathrm{s}} = 7\\,in^2$\n - $A_{\\mathrm{a}} = 12\\,in^2$\n\nLoading:\n - 1st Load Step: $\\delta = 0.032\\,in$\n - 2nd Load Step: $\\delta = 0.050\\,in$\n - 3rd Load Step: $\\delta = 0.100\\,in$\n\n\"VM7\n\nAnalysis Assumptions and Modeling Notes:\n - The following tube dimensions, which provide the desired cross-sectional\n areas, are arbitrarily chosen:\n\n * Inner (steel) tube: inside radius = 1.9781692 in., wall thickness = 0.5 in.\n * Outer (aluminum) tube: inside radius = 3.5697185 in., wall thickness = 0.5 in.\n\n - The problem can be solved in three ways:\n\n * using ``PIPE288`` - the plastic straight pipe element\n * using ``SOLID185`` - the 3-D structural solid element\n * using ``SHELL181`` - the 4-Node Finite Strain Shell\n\n - In the SOLID185 and SHELL181 cases, since the problem is axisymmetric,\n only a one element $\\theta$ -sector is modeled. A small angle $\\theta = 6\u00b0$\n is arbitrarily chosen to reasonably approximate the circular boundary\n with straight sided elements.\n The nodes at the boundaries have the ``UX`` (radial) degree of freedom coupled.\n In the SHELL181 model, the nodes at the boundaries additionally have\n the ``ROTY`` degree of freedom coupled.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\nStart MAPDL and import Numpy and Pandas libraries.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm7_setup.png'\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# Start MAPDL.\nmapdl = launch_mapdl()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Pre-Processing\nEnter verification example mode and the pre-processing routine.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.clear()\nmapdl.verify()\nmapdl.prep7(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Parameterization\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Angle of the model sector.\ntheta = 6\n\n# Deflection load steps.\ndefl_ls1 = -0.032\ndefl_ls2 = -0.05\ndefl_ls3 = -0.1" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Element Type\nSet up the element types .\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Element type PIPE288.\nmapdl.et(1, \"PIPE288\")\n\n# Special Features are defined by keyoptions of pipe element.\n# KEYOPT(4)(2)\n# Hoop strain treatment:\n# Thick pipe theory.\nmapdl.keyopt(1, 4, 2) # Cubic shape function\n\n# Element type SOLID185.\nmapdl.et(2, \"SOLID185\")\n\n# Element type SHELL181.\nmapdl.et(3, \"SHELL181\") # FULL INTEGRATION\n\n# Special Features are defined by keyoptions of shell element.\n# KEYOPT(3)(2)\n# Integration option:\n# Full integration with incompatible modes.\nmapdl.keyopt(3, 3, 2)\n\n# Print\nprint(mapdl.etlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the material properties.\n\n* Young Modulus of steel is: $E_{\\mathrm{s}} = 26875000\\,psi$,\n* Yield strength of steel is: $\\sigma_{\\mathrm{(yp)s}} = 86000\\, psi$,\n* Young Modulus of aluminum is: $E_{\\mathrm{a}} = 11000000\\,psi$,\n* Yield strength of aluminum is: $\\sigma_{\\mathrm{(yp)a}} = 55000\\,psi$,\n* Poisson's ratio is: $\\nu = 0.3$\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Steel material model.\n# Define Young's moulus and Poisson ratio for Steel.\nmapdl.mp(\"EX\", 1, 26.875e6)\nmapdl.mp(\"PRXY\", 1, 0.3)\n\n# Define non-linear material properties for Steel.\nmapdl.tb(\"BKIN\", 1, 1)\nmapdl.tbtemp(0)\nmapdl.tbdata(1, 86000, 0)\n\n# Aluminum material model.\n# Define Young's moulus and Poisson ratio for Aluminum.\nmapdl.mp(\"EX\", 2, 11e6)\nmapdl.mp(\"PRXY\", 2, 0.3)\n\n# Define non-linear material properties for Aluminum.\nmapdl.tb(\"BKIN\", 2, 1)\nmapdl.tbtemp(0)\nmapdl.tbdata(1, 55000, 0)\n\n# Print\nprint(mapdl.mplist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Plot Stress - Strain Curve\nUse Matplotlib library to plot material model curves of steel and aluminum.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define stress - strain properties of the steel.\nsteel = {\"stress_s\": [0, 86000, 86000, 86000], \"strain_s\": [0, 0.032, 0.1, 0.2]}\n\n# Define yielding strength point of the steel on the curve.\nxp = steel[\"strain_s\"][1]\nyp = steel[\"stress_s\"][1]\n\n# Set up the settings of the steel curve.\nplt.plot(\n steel[\"strain_s\"],\n steel[\"stress_s\"],\n label=\"1020 CR STEEL\",\n linewidth=2,\n color=\"steelblue\",\n linestyle=\"-\",\n marker=\"o\",\n)\nplt.plot(xp, yp, marker=\"o\")\n\n# Annotation settings\nplt.annotate(\n r\"${(\\sigma_{yp})_s}$\",\n xy=(xp, yp),\n xytext=(0.05, 75000),\n arrowprops=dict(facecolor=\"steelblue\", shrink=0.05),\n bbox=dict(facecolor=\"steelblue\", edgecolor=\"black\", boxstyle=\"round, pad=1\"),\n)\n\n# Define stress - strain properties of the aluminum.\naluminum = {\"stress_a\": [0, 55000, 55000, 55000], \"strain_a\": [0, 0.05, 0.1, 0.2]}\n\n# Define yielding strength point of the Aluminum on the curve.\nxp = aluminum[\"strain_a\"][1]\nyp = aluminum[\"stress_a\"][1]\n\n# Set up the settings of the aluminum curve.\nplt.plot(\n aluminum[\"strain_a\"],\n aluminum[\"stress_a\"],\n label=\"2024-T4 Aluminum\",\n linewidth=2,\n color=\"sandybrown\",\n linestyle=\"-\",\n marker=\"o\",\n)\nplt.plot(xp, yp, marker=\"o\")\n\n# Annotation settings\nplt.annotate(\n r\"${(\\sigma_{yp})_a}$\",\n xy=(xp, yp),\n xytext=(0.07, 45000),\n arrowprops=dict(facecolor=\"sandybrown\", shrink=0.05),\n bbox=dict(facecolor=\"sandybrown\", edgecolor=\"black\", boxstyle=\"round, pad=1\"),\n)\n\nplt.grid(True)\nplt.legend()\nplt.title(\"Stress - Strain Curve\", fontsize=18)\nplt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Section\nSet up the cross-section properties for a shell and pipe elements.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Shell cross-section for inside tube(steel).\nmapdl.sectype(1, \"SHELL\")\n\n# Thickness (SHELL181)\nmapdl.secdata(0.5, 1, 0, 5)\n\n# Shell cross-section for outside tube(aluminum).\nmapdl.sectype(2, \"SHELL\")\n\n# Thickness (SHELL181)\nmapdl.secdata(0.5, 2, 0, 5)\n\n# Define Pipe cross-section for inside tube(steel).\nmapdl.sectype(3, \"PIPE\")\n\n# Outside diameter and wall thickness settings for inside tube(PIPE288).\nmapdl.secdata(4.9563384, 0.5)\n\n# Pipe cross-section for outside tube(aluminum) .\nmapdl.sectype(4, \"PIPE\")\n\n# Outside diameter and wall thickness settings for outside tube (PIPE288).\nmapdl.secdata(8.139437, 0.5)\n\n# Print the section properties for all sections.\nprint(mapdl.slist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nSet up the nodes and create the elements through the nodes.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Generate nodes and elements for PIPE288.\nmapdl.n(1, x=0, y=0, z=0)\nmapdl.n(2, x=0, y=0, z=10)\n\n# Create element for steel(inside) tube cross-section.\nmapdl.mat(1)\nmapdl.secnum(3)\nmapdl.e(1, 2)\n\n# Create element for aluminum(outside) tube cross-section.\nmapdl.mat(2)\nmapdl.secnum(4)\nmapdl.e(1, 2)\n\n# Activate the global cylindrical coordinate system.\nmapdl.csys(1)\n\n# Generate nodes and elements for SOLID185.\nmapdl.n(node=101, x=1.9781692)\nmapdl.n(node=101, x=1.9781692)\nmapdl.n(node=102, x=2.4781692)\nmapdl.n(node=103, x=3.5697185)\nmapdl.n(node=104, x=4.0697185)\nmapdl.n(node=105, x=1.9781692, z=10)\nmapdl.n(node=106, x=2.4781692, z=10)\nmapdl.n(node=107, x=3.5697185, z=10)\nmapdl.n(node=108, x=4.0697185, z=10)\n\n# Generate 2nd set of nodes to form a theta degree slice.\nmapdl.ngen(itime=2, inc=10, node1=101, node2=108, dy=theta)\n\n# Rotate nodal coordinate systems into the active system.\nmapdl.nrotat(node1=101, node2=118, ninc=1)\n\n# Create elements for Inside (Steel) tube.\nmapdl.type(2)\nmapdl.mat(1)\nmapdl.e(101, 102, 112, 111, 105, 106, 116, 115)\n\n# Create elements for Outside (Aluminum) tube\nmapdl.mat(2)\nmapdl.e(103, 104, 114, 113, 107, 108, 118, 117)\n\n# Generate nodes.\nmapdl.n(node=201, x=2.2281692)\nmapdl.n(node=203, x=2.2281692, z=10)\nmapdl.n(node=202, x=3.8197185)\nmapdl.n(node=204, x=3.8197185, z=10)\n\n# Generate nodes to form a theta degree slice\nmapdl.ngen(itime=2, inc=4, node1=201, node2=204, dy=theta)\n\n# Create element for Steel(Inside) tube cross-section.\nmapdl.type(3)\nmapdl.secnum(1)\nmapdl.e(203, 201, 205, 207)\n\n# Create element for Aluminum(Outside) tube cross-section.\nmapdl.secnum(2)\nmapdl.e(204, 202, 206, 208)\n\n# Plot element model to demonstrate the axisymmetric element model.\ncpos = [\n (19.67899462804619, 17.856836088414664, 22.644135378046194),\n (2.03485925, 0.21270071036846988, 5.0),\n (0.0, 0.0, 1.0),\n]\nmapdl.eplot(cpos=cpos)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nApplication of boundary conditions (BC) for simplified axisymmetric model.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Apply constraints to the PIPE288 model.\n# Fix all DOFs for bottom end of PIPE288.\nmapdl.d(node=1, lab=\"ALL\")\n\n# Allow only UZ DOF at top end of the PIPE288.\nmapdl.d(node=2, lab=\"UX\", lab2=\"UY\", lab3=\"ROTX\", lab4=\"ROTY\", lab5=\"ROTZ\")\n\n# Apply constraints to SOLID185 and SHELL181 models\"\n# Couple nodes at boundary in RADIAL direction for SOLID185.\nmapdl.cp(nset=1, lab=\"UX\", node1=101, node2=111, node3=105, node4=115)\nmapdl.cpsgen(itime=4, nset1=1)\n\n# Couple nodes at boundary in RADIAL direction for the SHELL181.\nmapdl.cp(5, lab=\"UX\", node1=201, node2=205, node3=203, node4=20)\nmapdl.cpsgen(itime=2, nset1=5)\n\n# Couple nodes at boundary in ROTY dir for SHELL181.\nmapdl.cp(7, lab=\"ROTY\", node1=201, node2=205)\nmapdl.cpsgen(itime=4, nset1=7)\n\n# Select only nodes in SOLID185 and SHELL181 models.\nmapdl.nsel(type_=\"S\", item=\"NODE\", vmin=101, vmax=212)\n\n# Select only nodes at theta = 0 from the selected set.\nmapdl.nsel(\"R\", \"LOC\", \"Y\", 0)\n\n# Apply symmetry boundary conditions.\nmapdl.dsym(\"SYMM\", \"Y\", 1)\n\n# Select only nodes in SOLID185 and SHELL181 models.\nmapdl.nsel(type_=\"S\", item=\"NODE\", vmin=101, vmax=212)\n\n# elect nodes at theta from the selected set.\nmapdl.nsel(\"R\", \"LOC\", \"Y\", theta)\n\n# Apply symmetry boundary conditions.\nmapdl.dsym(\"SYMM\", \"Y\", 1)\n\n# Select all nodes and RESELECT only nodes at Z = 0.\nmapdl.nsel(\"ALL\")\nmapdl.nsel(\"R\", \"LOC\", \"Z\", 0)\n\n# Constrain bottom nodes in Z direction.\nmapdl.d(\"ALL\", \"UZ\", 0)\n\n# Select all nodes.\nmapdl.nsel(\"ALL\")\nmapdl.finish(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and solve the system.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Start solution procedure.\nmapdl.slashsolu()\n\n# Define solution function.\ndef solution(deflect):\n mapdl.nsel(\"R\", \"LOC\", \"Z\", 10)\n mapdl.d(node=\"ALL\", lab=\"UZ\", value=deflect)\n mapdl.nsel(\"ALL\")\n mapdl.solve()\n\n\n# Run each load step to reproduce needed deflection subsequently.\n# Load Step 1\nsolution(deflect=defl_ls1)\n\n# Load Step 2\nsolution(deflect=defl_ls2)\n\n# Load Step 3\nsolution(deflect=defl_ls3)\nmapdl.finish(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Enter the post-processing routine.\nmapdl.post1(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Getting loads\nSet up the function to get load values of each load step of the simplified\naxisymmetric model and convert it to the full model.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "def getload():\n\n # Select the nodes in the PIPE288 element model.\n mapdl.nsel(type_=\"S\", item=\"NODE\", vmin=1, vmax=2)\n mapdl.nsel(\"R\", \"LOC\", \"Z\", 0)\n\n # Sum the nodal force contributions of elements.\n mapdl.fsum()\n\n # Extrapolation of the force results in the full 360 (deg) model.\n load_288 = mapdl.get_value(\"FSUM\", 0, \"ITEM\", \"FZ\")\n\n # Select the nodes in the SOLID185 element model.\n mapdl.nsel(type_=\"S\", item=\"NODE\", vmin=101, vmax=118)\n mapdl.nsel(\"R\", \"LOC\", \"Z\", 0)\n mapdl.fsum()\n\n # Get the force value of the simplified model.\n load_185_theta = mapdl.get_value(\"FSUM\", 0, \"ITEM\", \"FZ\")\n\n # Extrapolation of the force results in the full 360 (deg) model.\n load_185 = load_185_theta * 360 / theta\n\n # Select the nodes in the SHELL181 element model.\n mapdl.nsel(\"S\", \"NODE\", \"\", 201, 212)\n mapdl.nsel(\"R\", \"LOC\", \"Z\", 0)\n\n # Sum the nodal force contributions of elements.\n mapdl.fsum()\n\n # Get the force value of the simplified model.\n load_181_theta = mapdl.get_value(\"FSUM\", 0, \"ITEM\", \"FZ\")\n\n # Extrapolation of the force results in the full 360 (deg) model.\n load_181 = load_181_theta * 360 / theta\n\n # Return load results of each element model.\n return abs(round(load_288, 0)), abs(round(load_185, 0)), abs(round(load_181, 0))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Getting Loads For Each Load Step\nObtain the loads of the model using :func:`getload()` function.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Activate Load Step 1 and extract load data.\nmapdl.set(1, 1)\npipe288_ls1, solid185_ls1, shell181_ls1 = getload()\n\n# Activate Load Step 2 and extract load data.\nmapdl.set(2, 1)\npipe288_ls2, solid185_ls2, shell181_ls2 = getload()\n\n# Activate Load Step 3 and extract load data.\nmapdl.set(3, 1)\npipe288_ls3, solid185_ls3, shell181_ls3 = getload()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nFinally we have the results of the loads for the simplified axisymmetric model,\nwhich can be compared with expected target values for models with ``PIPE288``,\n``SOLID185``, and ``SHELL181`` elements. Loads expected for each load step are:\n\n- 1st Load Step with deflection $\\delta = 0.032 (in)$ has $load_1 = 1024400\\,(lb)$.\n- 2nd Load Step with deflection $\\delta = 0.05 (in)$ has $load_2 = 1262000\\,(lb)$.\n- 3rd Load Step with deflection $\\delta = 0.1 (in)$ has $load_3 = 1262000\\,(lb)$.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "target_res = np.asarray(\n [1024400, 1262000, 1262000, 1024400, 1262000, 1262000, 1024400, 1262000, 1262000]\n)\n\nsimulation_res = np.asarray(\n [\n pipe288_ls1,\n pipe288_ls2,\n pipe288_ls2,\n solid185_ls1,\n solid185_ls2,\n solid185_ls3,\n shell181_ls1,\n shell181_ls2,\n shell181_ls3,\n ]\n)\n\nmain_columns = {\n \"Target\": target_res,\n \"Mechanical APDL\": simulation_res,\n \"Ratio\": list(np.divide(simulation_res, target_res)),\n}\n\nrow_tuple = [\n (\"PIPE288\", \"Load, lb for Deflection = 0.032 in\"),\n (\"PIPE288\", \"Load, lb for Deflection = 0.05 in\"),\n (\"PIPE288\", \"Load, lb for Deflection = 0.1 in\"),\n (\"SOLID185\", \"Load, lb for Deflection = 0.032 in\"),\n (\"SOLID185\", \"Load, lb for Deflection = 0.05 in\"),\n (\"SOLID185\", \"Load, lb for Deflection = 0.1 in\"),\n (\"SHELL181\", \"Load, lb for Deflection = 0.032 in\"),\n (\"SHELL181\", \"Load, lb for Deflection = 0.05 in\"),\n (\"SHELL181\", \"Load, lb for Deflection = 0.1 in\"),\n]\n\nindex_names = [\"Element Type\", \"Load Step\"]\nrow_indexing = pd.MultiIndex.from_tuples(row_tuple)\ndf = pd.DataFrame(main_columns, index=row_indexing)\n\ndf.style.set_caption(\"Results Comparison\",).set_table_styles(\n [\n {\n \"selector\": \"th.col_heading\",\n \"props\": [\n (\"background-color\", \"#FFEFD5\"),\n (\"color\", \"black\"),\n (\"border\", \"0.5px solid black\"),\n (\"font-style\", \"italic\"),\n (\"text-align\", \"center\"),\n ],\n },\n {\n \"selector\": \"th.row_heading\",\n \"props\": [\n (\"background-color\", \"#FFEFD5\"),\n (\"color\", \"black\"),\n (\"border\", \"0.5px solid black\"),\n (\"font-style\", \"italic\"),\n (\"text-align\", \"center\"),\n ],\n },\n {\"selector\": \"td:hover\", \"props\": [(\"background-color\", \"#FFF8DC\")]},\n {\"selector\": \"th\", \"props\": [(\"max-width\", \"120px\")]},\n {\"selector\": \"\", \"props\": [(\"border\", \"0.5px solid black\")]},\n {\n \"selector\": \"caption\",\n \"props\": [\n (\"color\", \"black\"),\n (\"font-style\", \"italic\"),\n (\"font-size\", \"24px\"),\n (\"text-align\", \"center\"),\n ],\n },\n ],\n).set_properties(\n **{\n \"background-color\": \"#FFFAFA\",\n \"color\": \"black\",\n \"border-color\": \"black\",\n \"border-width\": \"0.5px\",\n \"border-style\": \"solid\",\n \"text-align\": \"center\",\n }\n).format(\n \"{:.3f}\"\n)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py.md5 b/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py.md5 deleted file mode 100644 index f832e05f2..000000000 --- a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py.md5 +++ /dev/null @@ -1 +0,0 @@ -5a8fc5d3064d49414f2b495a562d4a32 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.rst b/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.rst deleted file mode 100644 index 8d29dbc51..000000000 --- a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.rst +++ /dev/null @@ -1,1095 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-007-plastic_compression_of_a_pipe_assembly.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly.py: - - -.. _ref_vm7_example: - -Plastic Compression of a Pipe Assembly --------------------------------------- -Problem Description: - - Two coaxial tubes, the inner one of 1020 CR steel and cross-sectional - area :math:`A_{\mathrm{s}}`, and the outer one of 2024-T4 aluminum alloy - and of area :math:`A_{\mathrm{a}}`, are compressed between heavy, flat end plates, - as shown below. Determine the load-deflection curve of the assembly - as it is compressed into the plastic region by an axial displacement. - Assume that the end plates are so stiff that both tubes are shortened by - exactly the same amount. - -Reference: - - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics of Solids, - McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 180, ex. 5.1. - -Analysis Type(s): - - Static, Plastic Analysis (``ANTYPE=0``) - -Element Type(s): - - Plastic Straight Pipe Element (PIPE288) - - 4-Node Finite Strain Shell (SHELL181) - - 3-D Structural Solid Elements (SOLID185) - -.. image:: _static/vm7_setup_2.png - :width: 400 - :alt: VM7 Finite Element Models - -Material Properties - - :math:`E_{\mathrm{s}} = 26875000\,psi` - - :math:`\sigma_{\mathrm{(yp)s}} = 86000\,psi` - - :math:`E_{\mathrm{a}} = 11000000\,psi` - - :math:`\sigma_{\mathrm{(yp)a}} = 55000\,psi` - - :math:`\nu = 0.3` - -.. image:: _static/vm7_setup_1.png - :width: 300 - :alt: VM7 Material Model - -Geometric Properties: - - :math:`l = 10\,in` - - :math:`A_{\mathrm{s}} = 7\,in^2` - - :math:`A_{\mathrm{a}} = 12\,in^2` - -Loading: - - 1st Load Step: :math:`\delta = 0.032\,in` - - 2nd Load Step: :math:`\delta = 0.050\,in` - - 3rd Load Step: :math:`\delta = 0.100\,in` - -.. image:: _static/vm7_setup.png - :width: 300 - :alt: VM7 Problem Sketch - -Analysis Assumptions and Modeling Notes: - - The following tube dimensions, which provide the desired cross-sectional - areas, are arbitrarily chosen: - - * Inner (steel) tube: inside radius = 1.9781692 in., wall thickness = 0.5 in. - * Outer (aluminum) tube: inside radius = 3.5697185 in., wall thickness = 0.5 in. - - - The problem can be solved in three ways: - - * using ``PIPE288`` - the plastic straight pipe element - * using ``SOLID185`` - the 3-D structural solid element - * using ``SHELL181`` - the 4-Node Finite Strain Shell - - - In the SOLID185 and SHELL181 cases, since the problem is axisymmetric, - only a one element :math:`\theta` -sector is modeled. A small angle :math:`\theta = 6°` - is arbitrarily chosen to reasonably approximate the circular boundary - with straight sided elements. - The nodes at the boundaries have the ``UX`` (radial) degree of freedom coupled. - In the SHELL181 model, the nodes at the boundaries additionally have - the ``ROTY`` degree of freedom coupled. - -.. GENERATED FROM PYTHON SOURCE LINES 80-83 - -Start MAPDL -~~~~~~~~~~~ -Start MAPDL and import Numpy and Pandas libraries. - -.. GENERATED FROM PYTHON SOURCE LINES 83-96 - -.. code-block:: default - - - # sphinx_gallery_thumbnail_path = '_static/vm7_setup.png' - - import matplotlib.pyplot as plt - import numpy as np - import pandas as pd - - from ansys.mapdl.core import launch_mapdl - - # Start MAPDL. - mapdl = launch_mapdl() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 97-100 - -Pre-Processing -~~~~~~~~~~~~~~ -Enter verification example mode and the pre-processing routine. - -.. GENERATED FROM PYTHON SOURCE LINES 100-106 - -.. code-block:: default - - - mapdl.clear() - mapdl.verify() - mapdl.prep7(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 107-109 - -Parameterization -~~~~~~~~~~~~~~~~ - -.. GENERATED FROM PYTHON SOURCE LINES 109-119 - -.. code-block:: default - - - # Angle of the model sector. - theta = 6 - - # Deflection load steps. - defl_ls1 = -0.032 - defl_ls2 = -0.05 - defl_ls3 = -0.1 - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 120-123 - -Define Element Type -~~~~~~~~~~~~~~~~~~~ -Set up the element types . - -.. GENERATED FROM PYTHON SOURCE LINES 123-149 - -.. code-block:: default - - - # Element type PIPE288. - mapdl.et(1, "PIPE288") - - # Special Features are defined by keyoptions of pipe element. - # KEYOPT(4)(2) - # Hoop strain treatment: - # Thick pipe theory. - mapdl.keyopt(1, 4, 2) # Cubic shape function - - # Element type SOLID185. - mapdl.et(2, "SOLID185") - - # Element type SHELL181. - mapdl.et(3, "SHELL181") # FULL INTEGRATION - - # Special Features are defined by keyoptions of shell element. - # KEYOPT(3)(2) - # Integration option: - # Full integration with incompatible modes. - mapdl.keyopt(3, 3, 2) - - # Print - print(mapdl.etlist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - ELEMENT TYPE 1 IS PIPE288 3-D 2-NODE PIPE - KEYOPT( 1- 6)= 0 0 0 2 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - ELEMENT TYPE 2 IS SOLID185 3-D 8-NODE STRUCTURAL SOLID - KEYOPT( 1- 6)= 0 0 0 0 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - ELEMENT TYPE 3 IS SHELL181 4-NODE SHELL - KEYOPT( 1- 6)= 0 0 2 0 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - CURRENT NODAL DOF SET IS UX UY UZ ROTX ROTY ROTZ - THREE-DIMENSIONAL MODEL - - - - -.. GENERATED FROM PYTHON SOURCE LINES 150-159 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material properties. - -* Young Modulus of steel is: :math:`E_{\mathrm{s}} = 26875000\,psi`, -* Yield strength of steel is: :math:`\sigma_{\mathrm{(yp)s}} = 86000\, psi`, -* Young Modulus of aluminum is: :math:`E_{\mathrm{a}} = 11000000\,psi`, -* Yield strength of aluminum is: :math:`\sigma_{\mathrm{(yp)a}} = 55000\,psi`, -* Poisson's ratio is: :math:`\nu = 0.3` - -.. GENERATED FROM PYTHON SOURCE LINES 159-184 - -.. code-block:: default - - - # Steel material model. - # Define Young's moulus and Poisson ratio for Steel. - mapdl.mp("EX", 1, 26.875e6) - mapdl.mp("PRXY", 1, 0.3) - - # Define non-linear material properties for Steel. - mapdl.tb("BKIN", 1, 1) - mapdl.tbtemp(0) - mapdl.tbdata(1, 86000, 0) - - # Aluminum material model. - # Define Young's moulus and Poisson ratio for Aluminum. - mapdl.mp("EX", 2, 11e6) - mapdl.mp("PRXY", 2, 0.3) - - # Define non-linear material properties for Aluminum. - mapdl.tb("BKIN", 2, 1) - mapdl.tbtemp(0) - mapdl.tbdata(1, 55000, 0) - - # Print - print(mapdl.mplist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - MATERIAL NUMBER 1 - - TEMP EX - 0.2687500E+08 - - TEMP PRXY - 0.3000000 - - MATERIAL NUMBER 2 - - TEMP EX - 0.1100000E+08 - - TEMP PRXY - 0.3000000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 185-188 - -Plot Stress - Strain Curve -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use Matplotlib library to plot material model curves of steel and aluminum. - -.. GENERATED FROM PYTHON SOURCE LINES 188-251 - -.. code-block:: default - - - # Define stress - strain properties of the steel. - steel = {"stress_s": [0, 86000, 86000, 86000], "strain_s": [0, 0.032, 0.1, 0.2]} - - # Define yielding strength point of the steel on the curve. - xp = steel["strain_s"][1] - yp = steel["stress_s"][1] - - # Set up the settings of the steel curve. - plt.plot( - steel["strain_s"], - steel["stress_s"], - label="1020 CR STEEL", - linewidth=2, - color="steelblue", - linestyle="-", - marker="o", - ) - plt.plot(xp, yp, marker="o") - - # Annotation settings - plt.annotate( - r"${(\sigma_{yp})_s}$", - xy=(xp, yp), - xytext=(0.05, 75000), - arrowprops=dict(facecolor="steelblue", shrink=0.05), - bbox=dict(facecolor="steelblue", edgecolor="black", boxstyle="round, pad=1"), - ) - - # Define stress - strain properties of the aluminum. - aluminum = {"stress_a": [0, 55000, 55000, 55000], "strain_a": [0, 0.05, 0.1, 0.2]} - - # Define yielding strength point of the Aluminum on the curve. - xp = aluminum["strain_a"][1] - yp = aluminum["stress_a"][1] - - # Set up the settings of the aluminum curve. - plt.plot( - aluminum["strain_a"], - aluminum["stress_a"], - label="2024-T4 Aluminum", - linewidth=2, - color="sandybrown", - linestyle="-", - marker="o", - ) - plt.plot(xp, yp, marker="o") - - # Annotation settings - plt.annotate( - r"${(\sigma_{yp})_a}$", - xy=(xp, yp), - xytext=(0.07, 45000), - arrowprops=dict(facecolor="sandybrown", shrink=0.05), - bbox=dict(facecolor="sandybrown", edgecolor="black", boxstyle="round, pad=1"), - ) - - plt.grid(True) - plt.legend() - plt.title("Stress - Strain Curve", fontsize=18) - plt.show() - - - - - -.. figure:: images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png - :alt: Stress - Strain Curve - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 252-255 - -Define Section -~~~~~~~~~~~~~~ -Set up the cross-section properties for a shell and pipe elements. - -.. GENERATED FROM PYTHON SOURCE LINES 255-284 - -.. code-block:: default - - - # Shell cross-section for inside tube(steel). - mapdl.sectype(1, "SHELL") - - # Thickness (SHELL181) - mapdl.secdata(0.5, 1, 0, 5) - - # Shell cross-section for outside tube(aluminum). - mapdl.sectype(2, "SHELL") - - # Thickness (SHELL181) - mapdl.secdata(0.5, 2, 0, 5) - - # Define Pipe cross-section for inside tube(steel). - mapdl.sectype(3, "PIPE") - - # Outside diameter and wall thickness settings for inside tube(PIPE288). - mapdl.secdata(4.9563384, 0.5) - - # Pipe cross-section for outside tube(aluminum) . - mapdl.sectype(4, "PIPE") - - # Outside diameter and wall thickness settings for outside tube (PIPE288). - mapdl.secdata(8.139437, 0.5) - - # Print the section properties for all sections. - print(mapdl.slist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - SECTION ID NUMBER: 1 - SHELL SECTION TYPE: - SHELL SECTION NAME IS: - SHELL SECTION DATA SUMMARY: - Number of Layers = 1 - Total Thickness = 0.500000 - - Layer Thickness MatID Ori. Angle Num Intg. Pts - - 1 0.5000 1 0.0000 5 - - Shell Section is offset to MID surface of Shell - - Section Solution Controls - User Transverse Shear Stiffness (11)= 0.0000 - (22)= 0.0000 - (12)= 0.0000 - Added Mass Per Unit Area = 0.0000 - Hourglass Scale Factor; Membrane = 1.0000 - Bending = 1.0000 - Drill Stiffness Scale Factor = 1.0000 - - SECTION ID NUMBER: 2 - SHELL SECTION TYPE: - SHELL SECTION NAME IS: - SHELL SECTION DATA SUMMARY: - Number of Layers = 1 - Total Thickness = 0.500000 - - Layer Thickness MatID Ori. Angle Num Intg. Pts - - 1 0.5000 2 0.0000 5 - - Shell Section is offset to MID surface of Shell - - Section Solution Controls - User Transverse Shear Stiffness (11)= 0.0000 - (22)= 0.0000 - (12)= 0.0000 - Added Mass Per Unit Area = 0.0000 - Hourglass Scale Factor; Membrane = 1.0000 - Bending = 1.0000 - Drill Stiffness Scale Factor = 1.0000 - - SECTION ID NUMBER: 3 - PIPE SECTION NAME IS: - PIPE SECTION DATA SUMMARY: - Outside Diameter = 4.9563 - Thickness = 0.50000 - Area = 6.9946 - Iyy = 17.559 - Torsion Constant = 35.118 - Shear Correction-yy = 0.50995 - - SECTION ID NUMBER: 4 - PIPE SECTION NAME IS: - PIPE SECTION DATA SUMMARY: - Outside Diameter = 8.1394 - Thickness = 0.50000 - Area = 11.991 - Iyy = 87.735 - Torsion Constant = 175.47 - Shear Correction-yy = 0.50305 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 285-288 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the nodes and create the elements through the nodes. - -.. GENERATED FROM PYTHON SOURCE LINES 288-359 - -.. code-block:: default - - - # Generate nodes and elements for PIPE288. - mapdl.n(1, x=0, y=0, z=0) - mapdl.n(2, x=0, y=0, z=10) - - # Create element for steel(inside) tube cross-section. - mapdl.mat(1) - mapdl.secnum(3) - mapdl.e(1, 2) - - # Create element for aluminum(outside) tube cross-section. - mapdl.mat(2) - mapdl.secnum(4) - mapdl.e(1, 2) - - # Activate the global cylindrical coordinate system. - mapdl.csys(1) - - # Generate nodes and elements for SOLID185. - mapdl.n(node=101, x=1.9781692) - mapdl.n(node=101, x=1.9781692) - mapdl.n(node=102, x=2.4781692) - mapdl.n(node=103, x=3.5697185) - mapdl.n(node=104, x=4.0697185) - mapdl.n(node=105, x=1.9781692, z=10) - mapdl.n(node=106, x=2.4781692, z=10) - mapdl.n(node=107, x=3.5697185, z=10) - mapdl.n(node=108, x=4.0697185, z=10) - - # Generate 2nd set of nodes to form a theta degree slice. - mapdl.ngen(itime=2, inc=10, node1=101, node2=108, dy=theta) - - # Rotate nodal coordinate systems into the active system. - mapdl.nrotat(node1=101, node2=118, ninc=1) - - # Create elements for Inside (Steel) tube. - mapdl.type(2) - mapdl.mat(1) - mapdl.e(101, 102, 112, 111, 105, 106, 116, 115) - - # Create elements for Outside (Aluminum) tube - mapdl.mat(2) - mapdl.e(103, 104, 114, 113, 107, 108, 118, 117) - - # Generate nodes. - mapdl.n(node=201, x=2.2281692) - mapdl.n(node=203, x=2.2281692, z=10) - mapdl.n(node=202, x=3.8197185) - mapdl.n(node=204, x=3.8197185, z=10) - - # Generate nodes to form a theta degree slice - mapdl.ngen(itime=2, inc=4, node1=201, node2=204, dy=theta) - - # Create element for Steel(Inside) tube cross-section. - mapdl.type(3) - mapdl.secnum(1) - mapdl.e(203, 201, 205, 207) - - # Create element for Aluminum(Outside) tube cross-section. - mapdl.secnum(2) - mapdl.e(204, 202, 206, 208) - - # Plot element model to demonstrate the axisymmetric element model. - cpos = [ - (19.67899462804619, 17.856836088414664, 22.644135378046194), - (2.03485925, 0.21270071036846988, 5.0), - (0.0, 0.0, 1.0), - ] - mapdl.eplot(cpos=cpos) - - - - - -.. figure:: images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png - :alt: vm 007 plastic compression of a pipe assembly - :align: center - :figclass: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 360-363 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Application of boundary conditions (BC) for simplified axisymmetric model. - -.. GENERATED FROM PYTHON SOURCE LINES 363-414 - -.. code-block:: default - - - # Apply constraints to the PIPE288 model. - # Fix all DOFs for bottom end of PIPE288. - mapdl.d(node=1, lab="ALL") - - # Allow only UZ DOF at top end of the PIPE288. - mapdl.d(node=2, lab="UX", lab2="UY", lab3="ROTX", lab4="ROTY", lab5="ROTZ") - - # Apply constraints to SOLID185 and SHELL181 models" - # Couple nodes at boundary in RADIAL direction for SOLID185. - mapdl.cp(nset=1, lab="UX", node1=101, node2=111, node3=105, node4=115) - mapdl.cpsgen(itime=4, nset1=1) - - # Couple nodes at boundary in RADIAL direction for the SHELL181. - mapdl.cp(5, lab="UX", node1=201, node2=205, node3=203, node4=20) - mapdl.cpsgen(itime=2, nset1=5) - - # Couple nodes at boundary in ROTY dir for SHELL181. - mapdl.cp(7, lab="ROTY", node1=201, node2=205) - mapdl.cpsgen(itime=4, nset1=7) - - # Select only nodes in SOLID185 and SHELL181 models. - mapdl.nsel(type_="S", item="NODE", vmin=101, vmax=212) - - # Select only nodes at theta = 0 from the selected set. - mapdl.nsel("R", "LOC", "Y", 0) - - # Apply symmetry boundary conditions. - mapdl.dsym("SYMM", "Y", 1) - - # Select only nodes in SOLID185 and SHELL181 models. - mapdl.nsel(type_="S", item="NODE", vmin=101, vmax=212) - - # elect nodes at theta from the selected set. - mapdl.nsel("R", "LOC", "Y", theta) - - # Apply symmetry boundary conditions. - mapdl.dsym("SYMM", "Y", 1) - - # Select all nodes and RESELECT only nodes at Z = 0. - mapdl.nsel("ALL") - mapdl.nsel("R", "LOC", "Z", 0) - - # Constrain bottom nodes in Z direction. - mapdl.d("ALL", "UZ", 0) - - # Select all nodes. - mapdl.nsel("ALL") - mapdl.finish(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 415-418 - -Solve -~~~~~ -Enter solution mode and solve the system. - -.. GENERATED FROM PYTHON SOURCE LINES 418-442 - -.. code-block:: default - - - # Start solution procedure. - mapdl.slashsolu() - - # Define solution function. - def solution(deflect): - mapdl.nsel("R", "LOC", "Z", 10) - mapdl.d(node="ALL", lab="UZ", value=deflect) - mapdl.nsel("ALL") - mapdl.solve() - - - # Run each load step to reproduce needed deflection subsequently. - # Load Step 1 - solution(deflect=defl_ls1) - - # Load Step 2 - solution(deflect=defl_ls2) - - # Load Step 3 - solution(deflect=defl_ls3) - mapdl.finish(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 443-446 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing. - -.. GENERATED FROM PYTHON SOURCE LINES 446-451 - -.. code-block:: default - - - # Enter the post-processing routine. - mapdl.post1(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 452-456 - -Getting loads -~~~~~~~~~~~~~ -Set up the function to get load values of each load step of the simplified -axisymmetric model and convert it to the full model. - -.. GENERATED FROM PYTHON SOURCE LINES 456-498 - -.. code-block:: default - - - - def getload(): - - # Select the nodes in the PIPE288 element model. - mapdl.nsel(type_="S", item="NODE", vmin=1, vmax=2) - mapdl.nsel("R", "LOC", "Z", 0) - - # Sum the nodal force contributions of elements. - mapdl.fsum() - - # Extrapolation of the force results in the full 360 (deg) model. - load_288 = mapdl.get_value("FSUM", 0, "ITEM", "FZ") - - # Select the nodes in the SOLID185 element model. - mapdl.nsel(type_="S", item="NODE", vmin=101, vmax=118) - mapdl.nsel("R", "LOC", "Z", 0) - mapdl.fsum() - - # Get the force value of the simplified model. - load_185_theta = mapdl.get_value("FSUM", 0, "ITEM", "FZ") - - # Extrapolation of the force results in the full 360 (deg) model. - load_185 = load_185_theta * 360 / theta - - # Select the nodes in the SHELL181 element model. - mapdl.nsel("S", "NODE", "", 201, 212) - mapdl.nsel("R", "LOC", "Z", 0) - - # Sum the nodal force contributions of elements. - mapdl.fsum() - - # Get the force value of the simplified model. - load_181_theta = mapdl.get_value("FSUM", 0, "ITEM", "FZ") - - # Extrapolation of the force results in the full 360 (deg) model. - load_181 = load_181_theta * 360 / theta - - # Return load results of each element model. - return abs(round(load_288, 0)), abs(round(load_185, 0)), abs(round(load_181, 0)) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 499-502 - -Getting Loads For Each Load Step -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Obtain the loads of the model using :func:`getload()` function. - -.. GENERATED FROM PYTHON SOURCE LINES 502-516 - -.. code-block:: default - - - # Activate Load Step 1 and extract load data. - mapdl.set(1, 1) - pipe288_ls1, solid185_ls1, shell181_ls1 = getload() - - # Activate Load Step 2 and extract load data. - mapdl.set(2, 1) - pipe288_ls2, solid185_ls2, shell181_ls2 = getload() - - # Activate Load Step 3 and extract load data. - mapdl.set(3, 1) - pipe288_ls3, solid185_ls3, shell181_ls3 = getload() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 517-526 - -Check Results -~~~~~~~~~~~~~ -Finally we have the results of the loads for the simplified axisymmetric model, -which can be compared with expected target values for models with ``PIPE288``, -``SOLID185``, and ``SHELL181`` elements. Loads expected for each load step are: - -- 1st Load Step with deflection :math:`\delta = 0.032 (in)` has :math:`load_1 = 1024400\,(lb)`. -- 2nd Load Step with deflection :math:`\delta = 0.05 (in)` has :math:`load_2 = 1262000\,(lb)`. -- 3rd Load Step with deflection :math:`\delta = 0.1 (in)` has :math:`load_3 = 1262000\,(lb)`. - -.. GENERATED FROM PYTHON SOURCE LINES 526-615 - -.. code-block:: default - - - target_res = np.asarray( - [1024400, 1262000, 1262000, 1024400, 1262000, 1262000, 1024400, 1262000, 1262000] - ) - - simulation_res = np.asarray( - [ - pipe288_ls1, - pipe288_ls2, - pipe288_ls2, - solid185_ls1, - solid185_ls2, - solid185_ls3, - shell181_ls1, - shell181_ls2, - shell181_ls3, - ] - ) - - main_columns = { - "Target": target_res, - "Mechanical APDL": simulation_res, - "Ratio": list(np.divide(simulation_res, target_res)), - } - - row_tuple = [ - ("PIPE288", "Load, lb for Deflection = 0.032 in"), - ("PIPE288", "Load, lb for Deflection = 0.05 in"), - ("PIPE288", "Load, lb for Deflection = 0.1 in"), - ("SOLID185", "Load, lb for Deflection = 0.032 in"), - ("SOLID185", "Load, lb for Deflection = 0.05 in"), - ("SOLID185", "Load, lb for Deflection = 0.1 in"), - ("SHELL181", "Load, lb for Deflection = 0.032 in"), - ("SHELL181", "Load, lb for Deflection = 0.05 in"), - ("SHELL181", "Load, lb for Deflection = 0.1 in"), - ] - - index_names = ["Element Type", "Load Step"] - row_indexing = pd.MultiIndex.from_tuples(row_tuple) - df = pd.DataFrame(main_columns, index=row_indexing) - - df.style.set_caption("Results Comparison",).set_table_styles( - [ - { - "selector": "th.col_heading", - "props": [ - ("background-color", "#FFEFD5"), - ("color", "black"), - ("border", "0.5px solid black"), - ("font-style", "italic"), - ("text-align", "center"), - ], - }, - { - "selector": "th.row_heading", - "props": [ - ("background-color", "#FFEFD5"), - ("color", "black"), - ("border", "0.5px solid black"), - ("font-style", "italic"), - ("text-align", "center"), - ], - }, - {"selector": "td:hover", "props": [("background-color", "#FFF8DC")]}, - {"selector": "th", "props": [("max-width", "120px")]}, - {"selector": "", "props": [("border", "0.5px solid black")]}, - { - "selector": "caption", - "props": [ - ("color", "black"), - ("font-style", "italic"), - ("font-size", "24px"), - ("text-align", "center"), - ], - }, - ], - ).set_properties( - **{ - "background-color": "#FFFAFA", - "color": "black", - "border-color": "black", - "border-width": "0.5px", - "border-style": "solid", - "text-align": "center", - } - ).format( - "{:.3f}" - ) - - - - - - -.. raw:: html - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Results Comparison
  TargetMechanical APDLRatio
PIPE288Load, lb for Deflection = 0.032 in1024400.0001024400.0001.000
Load, lb for Deflection = 0.05 in1262000.0001262000.0001.000
Load, lb for Deflection = 0.1 in1262000.0001262000.0001.000
SOLID185Load, lb for Deflection = 0.032 in1024400.0001022529.0000.998
Load, lb for Deflection = 0.05 in1262000.0001259695.0000.998
Load, lb for Deflection = 0.1 in1262000.0001259695.0000.998
SHELL181Load, lb for Deflection = 0.032 in1024400.0001023932.0001.000
Load, lb for Deflection = 0.05 in1262000.0001261654.0001.000
Load, lb for Deflection = 0.1 in1262000.0001261423.0001.000
- -
-
-
- -.. GENERATED FROM PYTHON SOURCE LINES 616-617 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 617-618 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 1.807 seconds) - - -.. _sphx_glr_download_vm-007-plastic_compression_of_a_pipe_assembly.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-007-plastic_compression_of_a_pipe_assembly.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-007-plastic_compression_of_a_pipe_assembly.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly_codeobj.pickle b/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly_codeobj.pickle deleted file mode 100644 index 401fc7768..000000000 Binary files a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_001.png b/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_001.png deleted file mode 100644 index edc8fe6c5..000000000 Binary files a/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_002.png b/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_002.png deleted file mode 100644 index 1e72175bf..000000000 Binary files a/doc/source/verif-manual/vm-008/images/sphx_glr_vm-008-parametric_calculation_002.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.ipynb b/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.ipynb deleted file mode 100644 index b2f15b581..000000000 --- a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.ipynb +++ /dev/null @@ -1,169 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Parametric Calculation\nProblem Description:\n - Write a user file macro to calculate the distance ``d`` between either nodes\n or keypoints in ``PREP7``. Define abbreviations for calling the macro and\n verify the parametric expressions by using the macro to calculate\n the distance between nodes $N_1$ and $N_2$ and\n between keypoints $K_3$ and $K_4$.\n\nReference:\n - None.\n\nAnalysis Type(s):\n - Parametric Arithmetic.\n\nElement Type:\n - None.\n\nGeometric Properties(Coordinates):\n - $N_{\\mathrm{1(x,y,z)}} = 1.5, 2.5, 3.5$\n - $N_{\\mathrm{2(x,y,z)}} = -3.7, 4.6, -3$\n - $K_{\\mathrm{3(x,y,z)}} = 100, 0, 30$\n - $K_{\\mathrm{4(x,y,z)}} = -200,25,80$\n\n\"VM8\n\nAnalysis Assumptions and Modeling Notes:\n - Instead of ``*CREATE``, ``*USE``, etc., we have created a class\n ``Create`` with methods that correspond to each type of simulation.\n This class gives a possibility to change coordinates and reuse it.\n The simulation can be checked not just by target values, but also\n with the simple distances' formula between keypoints as:\n\n * Calculate distance between two keypoints in the Cartesian coordinate system:\n $D = \\sqrt[2]{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$\n * Python representation of the distance formula:\n .. doctest::\n\n import math\n # Define coordinates for keypoints K3 and K4.\n x1, y1, z1 = 100, 0, 30\n x2, y2, z2 = -200, 25, 80\n dist_kp = math.sqrt((x2 - x1)**2 + (y2 - y1)**2 + (z2 - z1)**2)\n print(dist_kp)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\nStart MAPDL and import Numpy and Pandas libraries.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm8_setup.png'\n\nimport numpy as np\nimport pandas as pd\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# Start MAPDL.\nmapdl = launch_mapdl()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Pre-Processing\nEnter verification example mode and the pre-processing routine.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.clear()\nmapdl.verify()\nmapdl.prep7(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Class\nIdentifying the class ``create`` with methods ``create_kp_method`` and\n``create_node_method`` to calculate and plot the distances between keypoints\nand nodes.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "class Create:\n def __init__(self, p1, p2):\n # Points Attributes.\n self.p1 = p1\n self.p2 = p2\n\n def kp_distances(self):\n\n # Define keypoints by coordinates.\n kp1 = mapdl.k(npt=3, x=self.p1[0], y=self.p1[1], z=self.p1[2])\n kp2 = mapdl.k(npt=4, x=self.p2[0], y=self.p2[1], z=self.p2[2])\n\n # Get the distance between keypoints.\n dist_kp, kx, ky, kz = mapdl.kdist(kp1, kp2)\n\n # Plot keypoints.\n mapdl.kplot(\n show_keypoint_numbering=True,\n vtk=True,\n background=\"grey\",\n show_bounds=True,\n font_size=26,\n )\n return dist_kp\n\n def node_distances(self):\n\n # Define nodes by coordinates.\n node1 = mapdl.n(node=1, x=self.p1[0], y=self.p1[1], z=self.p1[2])\n node2 = mapdl.n(node=2, x=self.p2[0], y=self.p2[1], z=self.p2[2])\n\n # Get the distance between nodes.\n dist_node, node_x, node_y, node_z = mapdl.ndist(node1, node2)\n\n # Plot nodes.\n mapdl.nplot(nnum=True, vtk=True, color=\"grey\", show_bounds=True, font_size=26)\n return dist_node\n\n @property\n def p1(self):\n # Getting value\n return self._p1\n\n @p1.setter\n def p1(self, new_value):\n # Check the data type:\n if not isinstance(new_value, list):\n raise ValueError(\"The coordinates should be implemented by the list!\")\n # Check the quantity of items:\n if len(new_value) != 3:\n raise ValueError(\n \"The coordinates should have three items in the list as [X, Y, Z]\"\n )\n self._p1 = new_value\n\n @property\n def p2(self):\n return self._p2\n\n @p2.setter\n def p2(self, new_value):\n # Check the data type:\n if not isinstance(new_value, list):\n raise ValueError(\"The coordinates should be implemented by the list!\")\n # Check the quantity of items:\n if len(new_value) != 3:\n raise ValueError(\n \"The coordinates should have three items in the list as [X, Y, Z]\"\n )\n self._p2 = new_value" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Distance between keypoints\nUsing already created method for keypoints to get the distance between them\nand print out an output. The keypoints have got next coordinates:\n\n* $K_{\\mathrm{3(x,y,z)}} = 100, 0, 30$\n* $K_{\\mathrm{4(x,y,z)}} = -200, 25,80$\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "kp1 = [100, 0, 30]\nkp2 = [-200, 25, 80]\nkp = Create(kp1, kp2)\nkp_dist = kp.kp_distances()\nprint(f\"Distance between keypoint is: {kp_dist:.2f}\\n\\n\")\n\n# Print the list of keypoints.\nprint(mapdl.klist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Distance between nodes.\nUsing already created method for nodes to get the distance between them and\nprint out an output. The nodes have got next coordinates:\n\n* $N_{\\mathrm{1(x,y,z)}} = 1.5, 2.5, 3.5$\n* $N_{\\mathrm{2(x,y,z)}} = -3.7, 4.6, -3$\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "node1 = [1.5, 2.5, 3.5]\nnode2 = [-3.7, 4.6, -3]\nnodes = Create(node1, node2)\nnode_dist = nodes.node_distances()\nprint(f\"Distance between nodes is: {node_dist:.2f}\\n\\n\")\n\n# Print the list of nodes.\nprint(mapdl.nlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nFinally we have the results of the distances for both simulations,\nwhich can be compared with expected target values:\n\n- 1st simulation to get the distance between keypoints $K_3$ and $K_4$, where $LEN_1 = 305.16\\,(in)$\n- 2nd simulation to get the distance between nodes $N_1$ and $N_2$, where $LEN_2 = 8.58\\,(in)$\n\nFor better representation of the results we can use ``pandas`` dataframe\nwith following settings below:\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define the names of the rows.\nrow_names = [\"N1 - N2 distance (LEN2)\", \"K3 - K4 distance (LEN1)\"]\n\n# Define the names of the columns.\ncol_names = [\"Target\", \"Mechanical APDL\", \"RATIO\"]\n\n# Define the values of the target results.\ntarget_res = np.asarray([8.5849, 305.16])\n\n# Create an array with outputs of the simulations.\nsimulation_res = np.asarray([node_dist, kp_dist])\n\n# Identifying and filling corresponding columns.\nmain_columns = {\n \"Target\": target_res,\n \"Mechanical APDL\": simulation_res,\n \"Ratio\": list(np.divide(simulation_res, target_res)),\n}\n\n# Create and fill the output dataframe with pandas.\ndf2 = pd.DataFrame(main_columns, index=row_names).round(2)\n\n# Apply settings for the dataframe.\ndf2.head()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py.md5 b/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py.md5 deleted file mode 100644 index 6ca43eccb..000000000 --- a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py.md5 +++ /dev/null @@ -1 +0,0 @@ -624af9486b8caf3c65b9de3e86e8b71a \ No newline at end of file diff --git a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.rst b/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.rst deleted file mode 100644 index c001fb1ad..000000000 --- a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.rst +++ /dev/null @@ -1,445 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-008-parametric_calculation.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-008-parametric_calculation.py: - - -.. _ref_vm8_example: - -Parametric Calculation ----------------------- -Problem Description: - - Write a user file macro to calculate the distance ``d`` between either nodes - or keypoints in ``PREP7``. Define abbreviations for calling the macro and - verify the parametric expressions by using the macro to calculate - the distance between nodes :math:`N_1` and :math:`N_2` and - between keypoints :math:`K_3` and :math:`K_4`. - -Reference: - - None. - -Analysis Type(s): - - Parametric Arithmetic. - -Element Type: - - None. - -Geometric Properties(Coordinates): - - :math:`N_{\mathrm{1(x,y,z)}} = 1.5, 2.5, 3.5` - - :math:`N_{\mathrm{2(x,y,z)}} = -3.7, 4.6, -3` - - :math:`K_{\mathrm{3(x,y,z)}} = 100, 0, 30` - - :math:`K_{\mathrm{4(x,y,z)}} = -200,25,80` - -.. image:: _static/vm8_setup.png - :width: 300 - :alt: VM8 Problem Sketch - -Analysis Assumptions and Modeling Notes: - - Instead of ``*CREATE``, ``*USE``, etc., we have created a class - ``Create`` with methods that correspond to each type of simulation. - This class gives a possibility to change coordinates and reuse it. - The simulation can be checked not just by target values, but also - with the simple distances' formula between keypoints as: - - * Calculate distance between two keypoints in the Cartesian coordinate system: - :math:`D = \sqrt[2]{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}` - * Python representation of the distance formula: - .. doctest:: - - import math - # Define coordinates for keypoints K3 and K4. - x1, y1, z1 = 100, 0, 30 - x2, y2, z2 = -200, 25, 80 - dist_kp = math.sqrt((x2 - x1)**2 + (y2 - y1)**2 + (z2 - z1)**2) - print(dist_kp) - -.. GENERATED FROM PYTHON SOURCE LINES 54-57 - -Start MAPDL -~~~~~~~~~~~ -Start MAPDL and import Numpy and Pandas libraries. - -.. GENERATED FROM PYTHON SOURCE LINES 57-69 - -.. code-block:: default - - - # sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' - - import numpy as np - import pandas as pd - - from ansys.mapdl.core import launch_mapdl - - # Start MAPDL. - mapdl = launch_mapdl() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 70-73 - -Pre-Processing -~~~~~~~~~~~~~~ -Enter verification example mode and the pre-processing routine. - -.. GENERATED FROM PYTHON SOURCE LINES 73-79 - -.. code-block:: default - - - mapdl.clear() - mapdl.verify() - mapdl.prep7(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 80-85 - -Define Class -~~~~~~~~~~~~ -Identifying the class ``create`` with methods ``create_kp_method`` and -``create_node_method`` to calculate and plot the distances between keypoints -and nodes. - -.. GENERATED FROM PYTHON SOURCE LINES 85-159 - -.. code-block:: default - - - - class Create: - def __init__(self, p1, p2): - # Points Attributes. - self.p1 = p1 - self.p2 = p2 - - def kp_distances(self): - - # Define keypoints by coordinates. - kp1 = mapdl.k(npt=3, x=self.p1[0], y=self.p1[1], z=self.p1[2]) - kp2 = mapdl.k(npt=4, x=self.p2[0], y=self.p2[1], z=self.p2[2]) - - # Get the distance between keypoints. - dist_kp, kx, ky, kz = mapdl.kdist(kp1, kp2) - - # Plot keypoints. - mapdl.kplot( - show_keypoint_numbering=True, - vtk=True, - background="grey", - show_bounds=True, - font_size=26, - ) - return dist_kp - - def node_distances(self): - - # Define nodes by coordinates. - node1 = mapdl.n(node=1, x=self.p1[0], y=self.p1[1], z=self.p1[2]) - node2 = mapdl.n(node=2, x=self.p2[0], y=self.p2[1], z=self.p2[2]) - - # Get the distance between nodes. - dist_node, node_x, node_y, node_z = mapdl.ndist(node1, node2) - - # Plot nodes. - mapdl.nplot(nnum=True, vtk=True, color="grey", show_bounds=True, font_size=26) - return dist_node - - @property - def p1(self): - # Getting value - return self._p1 - - @p1.setter - def p1(self, new_value): - # Check the data type: - if not isinstance(new_value, list): - raise ValueError("The coordinates should be implemented by the list!") - # Check the quantity of items: - if len(new_value) != 3: - raise ValueError( - "The coordinates should have three items in the list as [X, Y, Z]" - ) - self._p1 = new_value - - @property - def p2(self): - return self._p2 - - @p2.setter - def p2(self, new_value): - # Check the data type: - if not isinstance(new_value, list): - raise ValueError("The coordinates should be implemented by the list!") - # Check the quantity of items: - if len(new_value) != 3: - raise ValueError( - "The coordinates should have three items in the list as [X, Y, Z]" - ) - self._p2 = new_value - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 160-167 - -Distance between keypoints -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Using already created method for keypoints to get the distance between them -and print out an output. The keypoints have got next coordinates: - -* :math:`K_{\mathrm{3(x,y,z)}} = 100, 0, 30` -* :math:`K_{\mathrm{4(x,y,z)}} = -200, 25,80` - -.. GENERATED FROM PYTHON SOURCE LINES 167-178 - -.. code-block:: default - - - kp1 = [100, 0, 30] - kp2 = [-200, 25, 80] - kp = Create(kp1, kp2) - kp_dist = kp.kp_distances() - print(f"Distance between keypoint is: {kp_dist:.2f}\n\n") - - # Print the list of keypoints. - print(mapdl.klist()) - - - - - -.. figure:: images/sphx_glr_vm-008-parametric_calculation_001.png - :alt: vm 008 parametric calculation - :align: center - :figclass: sphx-glr-single-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - Distance between keypoint is: 305.16 - - - 3 100. 0.00 30.0 0.00 0 0 0 0 0 0 - 4 -200. 25.0 80.0 0.00 0 0 0 0 0 0 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 179-186 - -Distance between nodes. -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Using already created method for nodes to get the distance between them and -print out an output. The nodes have got next coordinates: - -* :math:`N_{\mathrm{1(x,y,z)}} = 1.5, 2.5, 3.5` -* :math:`N_{\mathrm{2(x,y,z)}} = -3.7, 4.6, -3` - -.. GENERATED FROM PYTHON SOURCE LINES 186-197 - -.. code-block:: default - - - node1 = [1.5, 2.5, 3.5] - node2 = [-3.7, 4.6, -3] - nodes = Create(node1, node2) - node_dist = nodes.node_distances() - print(f"Distance between nodes is: {node_dist:.2f}\n\n") - - # Print the list of nodes. - print(mapdl.nlist()) - - - - - -.. figure:: images/sphx_glr_vm-008-parametric_calculation_002.png - :alt: vm 008 parametric calculation - :align: center - :figclass: sphx-glr-single-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - Distance between nodes is: 8.58 - - - 1 1.5000 2.5000 3.5000 0.00 0.00 0.00 - 2 -3.7000 4.6000 -3.0000 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 198-208 - -Check Results -~~~~~~~~~~~~~ -Finally we have the results of the distances for both simulations, -which can be compared with expected target values: - -- 1st simulation to get the distance between keypoints :math:`K_3` and :math:`K_4`, where :math:`LEN_1 = 305.16\,(in)` -- 2nd simulation to get the distance between nodes :math:`N_1` and :math:`N_2`, where :math:`LEN_2 = 8.58\,(in)` - -For better representation of the results we can use ``pandas`` dataframe -with following settings below: - -.. GENERATED FROM PYTHON SOURCE LINES 208-234 - -.. code-block:: default - - - # Define the names of the rows. - row_names = ["N1 - N2 distance (LEN2)", "K3 - K4 distance (LEN1)"] - - # Define the names of the columns. - col_names = ["Target", "Mechanical APDL", "RATIO"] - - # Define the values of the target results. - target_res = np.asarray([8.5849, 305.16]) - - # Create an array with outputs of the simulations. - simulation_res = np.asarray([node_dist, kp_dist]) - - # Identifying and filling corresponding columns. - main_columns = { - "Target": target_res, - "Mechanical APDL": simulation_res, - "Ratio": list(np.divide(simulation_res, target_res)), - } - - # Create and fill the output dataframe with pandas. - df2 = pd.DataFrame(main_columns, index=row_names).round(2) - - # Apply settings for the dataframe. - df2.head() - - - - - - -.. raw:: html - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
TargetMechanical APDLRatio
N1 - N2 distance (LEN2)8.588.581.0
K3 - K4 distance (LEN1)305.16305.161.0
-
-
-
-
- -.. GENERATED FROM PYTHON SOURCE LINES 235-236 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 236-237 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 1.098 seconds) - - -.. _sphx_glr_download_vm-008-parametric_calculation.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-008-parametric_calculation.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-008-parametric_calculation.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation_codeobj.pickle b/doc/source/verif-manual/vm-008/vm-008-parametric_calculation_codeobj.pickle deleted file mode 100644 index d6c5e7d95..000000000 Binary files a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb b/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb deleted file mode 100644 index bff0eada5..000000000 --- a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb +++ /dev/null @@ -1,295 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Large Lateral Deflection of Unequal Stiffness Springs\nProblem Description:\n - A two-spring system is subjected to a force $F$ as shown below.\n Determine the strain energy of the system and\n the displacements $\\delta_x$ and $\\delta_y$.\n\nReference:\n - G. N. Vanderplaats, *Numerical Optimization Techniques for Engineering\n Design with Applications*, McGraw-Hill Book Co., Inc., New York,\n NY,1984, pp. 72-73, ex. 3-1.\n\nAnalysis Type(s):\n - Nonlinear Transient Dynamic Analysis (``ANTYPE = 4``)\n\nElement Type(s):\n - Spring-Damper Elements (COMBIN14)\n - Spring-Damper Elements (COMBIN40)\n\n\"Geometry\n\nMaterial Properties\n - $k_1 = 8\\,N/cm$\n - $k_2 = 1\\,N/cm$\n - $m = 1$\n\nGeometric Properties:\n - $l = 10\\,cm$\n\nLoading:\n - $F = 5{\\sqrt[2]{2}}\\,N$\n - $\\alpha = 45\\,\u00ba$\n\n\"VM9\n\nAnalysis Assumptions and Modeling Notes:\n - The solution to this problem is best obtained by adding mass and using\n the \"slow dynamics\" technique with approximately critical damping.\n Combination elements ``COMBIN40`` are used to provide damping\n in the $X$ and $Y$ directions. Approximate damping coefficients\n $c_x$ and $c_y$, in the $X$ and $Y$ directions respectively,\n are determined from:\n\n * $c_x = \\sqrt[2]{k_xm}$\n * $c_y = \\sqrt[2]{k_ym}$\n\n where m is arbitrarily assumed to be unity.\n\n - $k_x$ and $k_y$ cannot be known before solving so are approximated\n by $k_y = k_2 = 1\\,N/cm$ and $k_x = k_y/2 = 0.5\\,N/cm$,\n hence $c_x = 1.41$ and $c_y = 2.0$. Large deflection analysis is\n performed due to the fact that the resistance to the load is a function of\n the deformed position. ``POST1`` is used to extract results from\n the solution phase.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\nStart MAPDL and import Numpy and Pandas libraries.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm9_setup.png'\n\nimport numpy as np\nimport pandas as pd\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# Start MAPDL.\nmapdl = launch_mapdl()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Pre-Processing\nEnter verification example mode and the pre-processing routine.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.clear()\nmapdl.verify()\nmapdl.prep7(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Parameterization\nParameterization block includes main variables as :\n\n* $l = 10\\,cm$ - spring length.\n* $k_1 = 8\\,N/cm$ - stiffness of the 1st spring.\n* $k_2 = 1\\,N/cm$ - stiffness of the 2nd spring.\n* $m = 1$ - mass.\n* $F = 5\\sqrt[2]{2}\\,N$ - main load\n* $\\alpha = 45\\,\u00ba$ - force angle\n* $c_x = \\sqrt[2]{k_xm} = 1,41$ - damping coefficient, x-direction.\n* $c_y = \\sqrt[2]{k_ym} = 2.0$ - damping coefficient, y-direction.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Main variables:\nlength = 10\nk_spring1 = 8\nk_spring2 = 1\nc_damp_x = 1.41\nc_damp_y = 2.0\nmass = 1\n\n# Fx and Fy has been obtained by the projection F on the X and Y axes.\nf_x = 5\nf_y = 5" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Element Type\nSet up the element types.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Element type COMBIN14.\nmapdl.et(1, \"COMBIN14\")\n\n# Special Features are defined by keyoptions of the element COMBIN14.\n# KEYOPT(3)(2)\n# Degree-of-freedom selection for 2-D and 3-D behavior:\n# 2-D longitudinal spring-damper (2-D elements must lie in an X-Y plane)\nmapdl.keyopt(1, 3, 2)\n\n# Element type COMBIN40.\nmapdl.et(3, \"COMBIN40\")\n\n# Special Features are defined by keyoptions of the element COMBIN40.\n# KEYOPT(3)(1)\n# Element degrees of freedom:\n# UX (Displacement along nodal X axes)\nmapdl.keyopt(3, 3, 1)\n\n# KEYOPT(6)(2)\n# Mass location:\n# Mass at node J\nmapdl.keyopt(3, 6, 2)\n\n# Element type COMBIN40.\nmapdl.et(4, \"COMBIN40\")\n\n# Special Features are defined by keyoptions of the element COMBIN40.\n# KEYOPT(3)(2)\n# Element degrees of freedom:\n# UX (Displacement along nodal X axes)\nmapdl.keyopt(4, 3, 2)\n\n# KEYOPT(6)(2)\n# Mass location:\n# Mass at node J\nmapdl.keyopt(4, 6, 2)\n\n# Print the list of the elements and their attributes.\nprint(mapdl.etlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Real Constants\nDefine damping coefficients $c_x = 1.41$, $c_y = 2.0$ and\nstiffness values $k_1 = 8\\,N/cm$, $k_2 = 1\\,N/cm$ for the\nspring elements.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define real constant 1 with stiffness k2.\nmapdl.r(nset=1, r1=k_spring2) # SPRING STIFFNESS = 1\n\n# Define real constant 2 with stiffness k1.\nmapdl.r(nset=2, r1=k_spring1) # SPRING STIFFNESS = 8\n\n# Define real constant 3 with damping coef. in X-direction and mass.\nmapdl.r(nset=3, r2=c_damp_x, r3=mass)\n\n# Define real constant 4 with damping coef. in y-direction and mass.\nmapdl.r(nset=4, r2=c_damp_y, r3=mass)\n\n# Print the real constant list.\nprint(mapdl.rlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Nodes\nSet up the nodes coordinates using python ``for`` loop.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Lists with nodes coordinates.\nnode_x_coord = [0, 0, 0, -1, 0]\nnode_y_coord = [0, 10, 20, 10, 9]\n\n# Create nodes.\nfor i in range(0, 5):\n mapdl.n(node=i + 1, x=node_x_coord[i], y=node_y_coord[i])\n\n# Print the list of the created nodes.\nprint(mapdl.nlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Create Elements\nCreate the elements through the nodes.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Create spring element COMBIN14 between nodes 1 nad 2\n# with stiffness k_2 = 1 N/cm.\nmapdl.type(1)\nmapdl.real(1)\nmapdl.e(1, 2)\n\n# Create spring element COMBIN14 between nodes 2 nad 3\n# with stiffness k_1 = 8 N/cm.\nmapdl.type(1)\nmapdl.real(2)\nmapdl.e(2, 3)\n\n# Create spring element COMBIN40 between nodes 4 nad 2\n# with damping coefficient c_x = 1.41.\nmapdl.type(3)\nmapdl.real(3)\nmapdl.e(4, 2)\n\n# Create spring element COMBIN40 between nodes 5 nad 2\n# with damping coefficient c_y = 2.0.\nmapdl.type(4)\nmapdl.real(4)\nmapdl.e(5, 2)\n\n# Print the list of the created elements.\nprint(mapdl.elist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nApplication of boundary conditions (BC) for the spring model.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Unselect the node where the force is applied.\nmapdl.nsel(\"U\", \"NODE\", vmin=2)\n\n# Apply BC to the selected set of the nodes.\nmapdl.d(\"ALL\", \"ALL\")\nmapdl.nsel(\"ALL\")\n\n# Finish pre-processing mode.\nmapdl.finish(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solution settings\nEnter solution mode and apply settings for *Transient Dynamic Analysis*.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Starts solution (/solu) mode.\nmapdl.slashsolu()\n\n# Define transient analysis with large deflection setting.\nmapdl.antype(\"TRANS\")\nmapdl.nlgeom(\"ON\")\n\n# Specifies the stepped loading condition within a load step.\nmapdl.kbc(1)\n\n# Apply forces to the node 2.\nmapdl.f(2, \"FX\", f_x)\nmapdl.f(2, \"FY\", f_y)\n\n# Uses automatic time stepping.\nmapdl.autots(\"ON\")\n\n# Specifies the number of substeps to be taken this load step.\nmapdl.nsubst(30)\n\n# Controls the solution printout.\nmapdl.outpr(\"\", \"LAST\")\nmapdl.outpr(\"VENG\", \"LAST\")\n\n# Sets the time for a load step.\nmapdl.time(15, mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nSolve the system , avoiding the printing output.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Run the simulation.\nmapdl.solve()\nmapdl.finish(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing, avoiding the printing output.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Enter the post-processing mode.\nmapdl.post1(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Getting Displacements\nEnter post-processing. To get results of the strain energy and displacements\nin X and Y directions from the node where the force is applied using\n:meth:`Mapdl.get_value `.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Defines the data set to be read from the results file by the time-point.\nmapdl.set(time=15)\n\n# Fills a table of element values for further processing for strain energy.\nmapdl.etable(\"SENE\", \"SENE\")\n\n# Sum all active entries in element stress table.\nmapdl.ssum()\n\n# Get the value of the stain energy of the spring elements.\nstrain_energy = mapdl.get_value(entity=\"SSUM\", entnum=0, item1=\"ITEM\", it1num=\"SENE\")\n\n# Prints nodal solution results of the X, Y, and Z structural displacements\n# and vector sum.\nprint(mapdl.prnsol(\"U\", \"COMP\"))\n\n# Get the value of the displacements in X-direction.\ndisp_x = mapdl.get_value(entity=\"NODE\", entnum=2, item1=\"U\", it1num=\"X\")\n\n# Get the value of the displacements in Y-direction.\ndisp_y = mapdl.get_value(entity=\"NODE\", entnum=2, item1=\"U\", it1num=\"Y\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nFinally we have the results of the strain energy and\ndisplacements in $X$ and $Y$ directions, which can be compared with\nexpected target values:\n\n- Strain energy of the system $U_{\\mathrm{(energy)}} = 24.01\\;N\\,cm$.\n- Displacement in X-direction $U_x = 8.631\\,cm$.\n- Displacement in Y-direction $U_y = 4.533\\,cm$.\n\nFor better representation of the results we can use ``pandas`` dataframe\nwith following settings below:\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define the names of the rows.\nrow_names = [\"Strain Energy, N-cm\", \"Deflection-x , cm\", \"Deflection-y , cm\"]\n\n# Define the names of the columns.\ncol_names = [\"Target\", \"Mechanical APDL\", \"RATIO\"]\n\n# Define the values of the target results.\ntarget_res = np.asarray([24.01, 8.631, 4.533])\n\n# Create an array with outputs of the simulations.\nsimulation_res = np.asarray([strain_energy, disp_x, disp_y])\n\n# Identifying and filling corresponding columns.\nmain_columns = {\n \"Target\": target_res,\n \"Mechanical APDL\": simulation_res,\n \"Ratio\": list(np.divide(simulation_res, target_res)),\n}\n\n# Create and fill the output dataframe with pandas.\ndf2 = pd.DataFrame(main_columns, index=row_names).round(2)\n\n# Apply settings for the dataframe.\ndf2.head()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py.md5 b/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py.md5 deleted file mode 100644 index 07b014f30..000000000 --- a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py.md5 +++ /dev/null @@ -1 +0,0 @@ -78f0df5517660674d5ca915b83ecd7f2 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst b/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst deleted file mode 100644 index 27287199f..000000000 --- a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst +++ /dev/null @@ -1,724 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py: - - -.. _ref_vm9_example: - -Large Lateral Deflection of Unequal Stiffness Springs ------------------------------------------------------ -Problem Description: - - A two-spring system is subjected to a force :math:`F` as shown below. - Determine the strain energy of the system and - the displacements :math:`\delta_x` and :math:`\delta_y`. - -Reference: - - G. N. Vanderplaats, *Numerical Optimization Techniques for Engineering - Design with Applications*, McGraw-Hill Book Co., Inc., New York, - NY,1984, pp. 72-73, ex. 3-1. - -Analysis Type(s): - - Nonlinear Transient Dynamic Analysis (``ANTYPE = 4``) - -Element Type(s): - - Spring-Damper Elements (COMBIN14) - - Spring-Damper Elements (COMBIN40) - -.. image:: _static/vm9_setup_2.png - :width: 400 - :alt: Geometry of COMBIN14 and COMBIN40 - -Material Properties - - :math:`k_1 = 8\,N/cm` - - :math:`k_2 = 1\,N/cm` - - :math:`m = 1` - -Geometric Properties: - - :math:`l = 10\,cm` - -Loading: - - :math:`F = 5{\sqrt[2]{2}}\,N` - - :math:`\alpha = 45\,º` - -.. image:: _static/vm9_setup.png - :width: 400 - :alt: VM9 Problem Sketch - -Analysis Assumptions and Modeling Notes: - - The solution to this problem is best obtained by adding mass and using - the "slow dynamics" technique with approximately critical damping. - Combination elements ``COMBIN40`` are used to provide damping - in the :math:`X` and :math:`Y` directions. Approximate damping coefficients - :math:`c_x` and :math:`c_y`, in the :math:`X` and :math:`Y` directions respectively, - are determined from: - - * :math:`c_x = \sqrt[2]{k_xm}` - * :math:`c_y = \sqrt[2]{k_ym}` - - where m is arbitrarily assumed to be unity. - - - :math:`k_x` and :math:`k_y` cannot be known before solving so are approximated - by :math:`k_y = k_2 = 1\,N/cm` and :math:`k_x = k_y/2 = 0.5\,N/cm`, - hence :math:`c_x = 1.41` and :math:`c_y = 2.0`. Large deflection analysis is - performed due to the fact that the resistance to the load is a function of - the deformed position. ``POST1`` is used to extract results from - the solution phase. - -.. GENERATED FROM PYTHON SOURCE LINES 66-69 - -Start MAPDL -~~~~~~~~~~~ -Start MAPDL and import Numpy and Pandas libraries. - -.. GENERATED FROM PYTHON SOURCE LINES 69-81 - -.. code-block:: default - - - # sphinx_gallery_thumbnail_path = '_static/vm9_setup.png' - - import numpy as np - import pandas as pd - - from ansys.mapdl.core import launch_mapdl - - # Start MAPDL. - mapdl = launch_mapdl() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 82-85 - -Pre-Processing -~~~~~~~~~~~~~~ -Enter verification example mode and the pre-processing routine. - -.. GENERATED FROM PYTHON SOURCE LINES 85-91 - -.. code-block:: default - - - mapdl.clear() - mapdl.verify() - mapdl.prep7(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 92-104 - -Parameterization -~~~~~~~~~~~~~~~~ -Parameterization block includes main variables as : - -* :math:`l = 10\,cm` - spring length. -* :math:`k_1 = 8\,N/cm` - stiffness of the 1st spring. -* :math:`k_2 = 1\,N/cm` - stiffness of the 2nd spring. -* :math:`m = 1` - mass. -* :math:`F = 5\sqrt[2]{2}\,N` - main load -* :math:`\alpha = 45\,º` - force angle -* :math:`c_x = \sqrt[2]{k_xm} = 1,41` - damping coefficient, x-direction. -* :math:`c_y = \sqrt[2]{k_ym} = 2.0` - damping coefficient, y-direction. - -.. GENERATED FROM PYTHON SOURCE LINES 104-118 - -.. code-block:: default - - - # Main variables: - length = 10 - k_spring1 = 8 - k_spring2 = 1 - c_damp_x = 1.41 - c_damp_y = 2.0 - mass = 1 - - # Fx and Fy has been obtained by the projection F on the X and Y axes. - f_x = 5 - f_y = 5 - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 119-122 - -Define Element Type -~~~~~~~~~~~~~~~~~~~ -Set up the element types. - -.. GENERATED FROM PYTHON SOURCE LINES 122-164 - -.. code-block:: default - - - # Element type COMBIN14. - mapdl.et(1, "COMBIN14") - - # Special Features are defined by keyoptions of the element COMBIN14. - # KEYOPT(3)(2) - # Degree-of-freedom selection for 2-D and 3-D behavior: - # 2-D longitudinal spring-damper (2-D elements must lie in an X-Y plane) - mapdl.keyopt(1, 3, 2) - - # Element type COMBIN40. - mapdl.et(3, "COMBIN40") - - # Special Features are defined by keyoptions of the element COMBIN40. - # KEYOPT(3)(1) - # Element degrees of freedom: - # UX (Displacement along nodal X axes) - mapdl.keyopt(3, 3, 1) - - # KEYOPT(6)(2) - # Mass location: - # Mass at node J - mapdl.keyopt(3, 6, 2) - - # Element type COMBIN40. - mapdl.et(4, "COMBIN40") - - # Special Features are defined by keyoptions of the element COMBIN40. - # KEYOPT(3)(2) - # Element degrees of freedom: - # UX (Displacement along nodal X axes) - mapdl.keyopt(4, 3, 2) - - # KEYOPT(6)(2) - # Mass location: - # Mass at node J - mapdl.keyopt(4, 6, 2) - - # Print the list of the elements and their attributes. - print(mapdl.etlist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - ELEMENT TYPE 1 IS COMBIN14 SPRING-DAMPER - KEYOPT( 1- 6)= 0 0 2 0 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - ELEMENT TYPE 3 IS COMBIN40 COMBINATION - KEYOPT( 1- 6)= 0 0 1 0 0 2 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - ELEMENT TYPE 4 IS COMBIN40 COMBINATION - KEYOPT( 1- 6)= 0 0 2 0 0 2 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - CURRENT NODAL DOF SET IS UX UY - THREE-DIMENSIONAL MODEL - - - - -.. GENERATED FROM PYTHON SOURCE LINES 165-170 - -Define Real Constants -~~~~~~~~~~~~~~~~~~~~~ -Define damping coefficients :math:`c_x = 1.41`, :math:`c_y = 2.0` and -stiffness values :math:`k_1 = 8\,N/cm`, :math:`k_2 = 1\,N/cm` for the -spring elements. - -.. GENERATED FROM PYTHON SOURCE LINES 170-187 - -.. code-block:: default - - - # Define real constant 1 with stiffness k2. - mapdl.r(nset=1, r1=k_spring2) # SPRING STIFFNESS = 1 - - # Define real constant 2 with stiffness k1. - mapdl.r(nset=2, r1=k_spring1) # SPRING STIFFNESS = 8 - - # Define real constant 3 with damping coef. in X-direction and mass. - mapdl.r(nset=3, r2=c_damp_x, r3=mass) - - # Define real constant 4 with damping coef. in y-direction and mass. - mapdl.r(nset=4, r2=c_damp_y, r3=mass) - - # Print the real constant list. - print(mapdl.rlist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - REAL CONSTANT SET 1 ITEMS 1 TO 6 - 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - - REAL CONSTANT SET 2 ITEMS 1 TO 6 - 8.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - - REAL CONSTANT SET 3 ITEMS 1 TO 6 - 0.0000 1.4100 1.0000 0.0000 0.0000 0.0000 - - REAL CONSTANT SET 4 ITEMS 1 TO 6 - 0.0000 2.0000 1.0000 0.0000 0.0000 0.0000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 188-191 - -Define Nodes -~~~~~~~~~~~~ -Set up the nodes coordinates using python ``for`` loop. - -.. GENERATED FROM PYTHON SOURCE LINES 191-204 - -.. code-block:: default - - - # Lists with nodes coordinates. - node_x_coord = [0, 0, 0, -1, 0] - node_y_coord = [0, 10, 20, 10, 9] - - # Create nodes. - for i in range(0, 5): - mapdl.n(node=i + 1, x=node_x_coord[i], y=node_y_coord[i]) - - # Print the list of the created nodes. - print(mapdl.nlist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - 1 0.0000 0.0000 0.0000 0.00 0.00 0.00 - 2 0.0000 10.000 0.0000 0.00 0.00 0.00 - 3 0.0000 20.000 0.0000 0.00 0.00 0.00 - 4 -1.0000 10.000 0.0000 0.00 0.00 0.00 - 5 0.0000 9.0000 0.0000 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 205-208 - -Create Elements -~~~~~~~~~~~~~~~ -Create the elements through the nodes. - -.. GENERATED FROM PYTHON SOURCE LINES 208-237 - -.. code-block:: default - - - # Create spring element COMBIN14 between nodes 1 nad 2 - # with stiffness k_2 = 1 N/cm. - mapdl.type(1) - mapdl.real(1) - mapdl.e(1, 2) - - # Create spring element COMBIN14 between nodes 2 nad 3 - # with stiffness k_1 = 8 N/cm. - mapdl.type(1) - mapdl.real(2) - mapdl.e(2, 3) - - # Create spring element COMBIN40 between nodes 4 nad 2 - # with damping coefficient c_x = 1.41. - mapdl.type(3) - mapdl.real(3) - mapdl.e(4, 2) - - # Create spring element COMBIN40 between nodes 5 nad 2 - # with damping coefficient c_y = 2.0. - mapdl.type(4) - mapdl.real(4) - mapdl.e(5, 2) - - # Print the list of the created elements. - print(mapdl.elist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - LIST ALL SELECTED ELEMENTS. (LIST NODES) - 1 1 1 1 0 1 1 2 - 2 1 1 2 0 1 2 3 - 3 1 3 3 0 1 4 2 - 4 1 4 4 0 1 5 2 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 238-241 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Application of boundary conditions (BC) for the spring model. - -.. GENERATED FROM PYTHON SOURCE LINES 241-253 - -.. code-block:: default - - - # Unselect the node where the force is applied. - mapdl.nsel("U", "NODE", vmin=2) - - # Apply BC to the selected set of the nodes. - mapdl.d("ALL", "ALL") - mapdl.nsel("ALL") - - # Finish pre-processing mode. - mapdl.finish(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 254-257 - -Solution settings -~~~~~~~~~~~~~~~~~ -Enter solution mode and apply settings for *Transient Dynamic Analysis*. - -.. GENERATED FROM PYTHON SOURCE LINES 257-286 - -.. code-block:: default - - - # Starts solution (/solu) mode. - mapdl.slashsolu() - - # Define transient analysis with large deflection setting. - mapdl.antype("TRANS") - mapdl.nlgeom("ON") - - # Specifies the stepped loading condition within a load step. - mapdl.kbc(1) - - # Apply forces to the node 2. - mapdl.f(2, "FX", f_x) - mapdl.f(2, "FY", f_y) - - # Uses automatic time stepping. - mapdl.autots("ON") - - # Specifies the number of substeps to be taken this load step. - mapdl.nsubst(30) - - # Controls the solution printout. - mapdl.outpr("", "LAST") - mapdl.outpr("VENG", "LAST") - - # Sets the time for a load step. - mapdl.time(15, mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 287-290 - -Solve -~~~~~ -Solve the system , avoiding the printing output. - -.. GENERATED FROM PYTHON SOURCE LINES 290-296 - -.. code-block:: default - - - # Run the simulation. - mapdl.solve() - mapdl.finish(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 297-300 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing, avoiding the printing output. - -.. GENERATED FROM PYTHON SOURCE LINES 300-305 - -.. code-block:: default - - - # Enter the post-processing mode. - mapdl.post1(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 306-311 - -Getting Displacements -~~~~~~~~~~~~~~~~~~~~~ -Enter post-processing. To get results of the strain energy and displacements -in X and Y directions from the node where the force is applied using -:meth:`Mapdl.get_value `. - -.. GENERATED FROM PYTHON SOURCE LINES 311-335 - -.. code-block:: default - - - # Defines the data set to be read from the results file by the time-point. - mapdl.set(time=15) - - # Fills a table of element values for further processing for strain energy. - mapdl.etable("SENE", "SENE") - - # Sum all active entries in element stress table. - mapdl.ssum() - - # Get the value of the stain energy of the spring elements. - strain_energy = mapdl.get_value(entity="SSUM", entnum=0, item1="ITEM", it1num="SENE") - - # Prints nodal solution results of the X, Y, and Z structural displacements - # and vector sum. - print(mapdl.prnsol("U", "COMP")) - - # Get the value of the displacements in X-direction. - disp_x = mapdl.get_value(entity="NODE", entnum=2, item1="U", it1num="X") - - # Get the value of the displacements in Y-direction. - disp_y = mapdl.get_value(entity="NODE", entnum=2, item1="U", it1num="Y") - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - PRINT U NODAL SOLUTION PER NODE - 1 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 - 2 0.8631926066E+001 0.4532094298E+001 0.0000000000E+000 0.9749360304E+001 - 3 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 - 4 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 - 5 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 0.0000000000E+000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 336-348 - -Check Results -~~~~~~~~~~~~~ -Finally we have the results of the strain energy and -displacements in :math:`X` and :math:`Y` directions, which can be compared with -expected target values: - -- Strain energy of the system :math:`U_{\mathrm{(energy)}} = 24.01\;N\,cm`. -- Displacement in X-direction :math:`U_x = 8.631\,cm`. -- Displacement in Y-direction :math:`U_y = 4.533\,cm`. - -For better representation of the results we can use ``pandas`` dataframe -with following settings below: - -.. GENERATED FROM PYTHON SOURCE LINES 348-374 - -.. code-block:: default - - - # Define the names of the rows. - row_names = ["Strain Energy, N-cm", "Deflection-x , cm", "Deflection-y , cm"] - - # Define the names of the columns. - col_names = ["Target", "Mechanical APDL", "RATIO"] - - # Define the values of the target results. - target_res = np.asarray([24.01, 8.631, 4.533]) - - # Create an array with outputs of the simulations. - simulation_res = np.asarray([strain_energy, disp_x, disp_y]) - - # Identifying and filling corresponding columns. - main_columns = { - "Target": target_res, - "Mechanical APDL": simulation_res, - "Ratio": list(np.divide(simulation_res, target_res)), - } - - # Create and fill the output dataframe with pandas. - df2 = pd.DataFrame(main_columns, index=row_names).round(2) - - # Apply settings for the dataframe. - df2.head() - - - - - - -.. raw:: html - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TargetMechanical APDLRatio
Strain Energy, N-cm24.0124.011.0
Deflection-x , cm8.638.631.0
Deflection-y , cm4.534.531.0
-
-
-
-
- -.. GENERATED FROM PYTHON SOURCE LINES 375-376 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 376-377 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 0.909 seconds) - - -.. _sphx_glr_download_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs_codeobj.pickle b/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs_codeobj.pickle deleted file mode 100644 index f3e29b418..000000000 Binary files a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs_codeobj.pickle and /dev/null differ diff --git a/doc/source/verif-manual/vm-010/images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png b/doc/source/verif-manual/vm-010/images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png deleted file mode 100644 index d434499e3..000000000 Binary files a/doc/source/verif-manual/vm-010/images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png and /dev/null differ diff --git a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.ipynb b/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.ipynb deleted file mode 100644 index cf49a57c8..000000000 --- a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.ipynb +++ /dev/null @@ -1,295 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "%matplotlib inline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n\n# Bending of a Tee-Shaped Beam\nProblem Description:\n - Find the maximum tensile $\\sigma_{\\mathrm{(B,Bot)}}$ and compressive $\\sigma_{\\mathrm{(B,Top)}}$\n bending stresses in an unsymmetrical `T-beam` subjected to uniform bending $M_z$,\n with dimensions and geometric properties as shown below.\n\nReference:\n - S. H. Crandall, N. C. Dahl, *An Introduction to the Mechanics of Solids*,\n McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 294, ex. 7.2.\n\nAnalysis Type(s):\n - Static Analysis (``ANTYPE = 0``)\n\nElement Type(s):\n - 3-D 2 Node Beam (``BEAM188``)\n\n.. figure:: ../../../_static/vm10_setup_1.png\n :align: center\n :width: 400\n :alt: VM10 Geometry of Beam188 and Element Model\n :figclass: align-center\n\n **Figure 1: VM10 Geometry of Beam188 and Element Model**\n\nMaterial Properties\n - $E = 30 \\cdot 10^6 psi$\n - $\\nu = 0.3$\n\nGeometric Properties:\n - $l = 100\\,in$\n - $h = 1.5\\,in$\n - $b = 8\\,in$\n\nLoading:\n - $M_z = 100,000\\,in\\,lb$\n\n\"VM10\n\nAnalysis Assumptions and Modeling Notes:\n - A length $(l = 100 in)$ is arbitrarily selected since the bending moment is constant.\n A `T-section` beam is modeled using flange width $(6b)$,\n flange thickness $(\\frac{h}{2})$, overall depth $(2h + \\frac{h}{2})$, and\n stem thickness $(b)$, input using :meth:`Mapdl.secdata `.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Start MAPDL\nStart MAPDL and import Numpy and Pandas libraries.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# sphinx_gallery_thumbnail_path = '_static/vm10_setup.png'\n\nimport numpy as np\nimport pandas as pd\n\nfrom ansys.mapdl.core import launch_mapdl\n\n# Start MAPDL.\nmapdl = launch_mapdl()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Pre-Processing\nEnter verification example mode and the pre-processing routine.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.clear()\nmapdl.verify()\nmapdl.prep7(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Element Type\nSet up the element type ``BEAM188``.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Type of analysis: Static.\nmapdl.antype(\"STATIC\")\n\n# Element type: BEAM188.\nmapdl.et(1, \"BEAM188\")\n\n# Special Features are defined by keyoptions of BEAM188:\n\n# KEYOPT(3)\n# Shape functions along the length:\n# Cubic\nmapdl.keyopt(1, 3, 3) # Cubic shape function\n\n# Print the list with currently defined element types.\nprint(mapdl.etlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Material\nSet up the material, where:\n\n* $E = 30 \\cdot 10^6 psi$ - Young Modulus of steel.\n* $\\nu = 0.3$ - Poisson's ratio.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Steel material model.\n# Define Young's moulus and Poisson ratio for Steel.\nmapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"PRXY\", 1, 0.3)\n\n# Print the list of material properties.\nprint(mapdl.mplist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Section\nSet up the cross-section properties for a beam elements, where:\n\n* $w_1 = 6b = 6 \\cdot 1.5 = 9\\,in$ - flange width.\n* $w_2 = 2h + h/2 = 2 \\cdot 8 + 8/2 = 20\\,in$ - overall depth.\n* $t_1 = h/2 = 8/2 = 4\\,in$ - flange thickness.\n* $t_2 = b = 1.5\\,in$ - stem thickness.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Parameterization of the cross-section dimensions.\nsec_num = 1\nw1 = 9\nw2 = 20\nt1 = 4\nt2 = 1.5\n\n# Define the beam cross-section.\nmapdl.sectype(sec_num, \"BEAM\", \"T\")\nmapdl.secdata(w1, w2, t1, t2)\n\n# Print the section properties.\nprint(mapdl.slist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Geometry\nSet up the nodes and elements. Create nodes between elements.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define nodes for the beam element.\nmapdl.n(1, x=0, y=0)\nmapdl.n(2, x=100, y=0)\n\n# Define one node for the orientation of the beam T-section.\nmapdl.n(3, x=0, y=1)\n\n# Print the list of the created nodes.\nprint(mapdl.nlist())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define elements\nCreate element between nodes 1 and 2 using node 3 as orientational node.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Create element.\nmapdl.e(1, 2, 3)\n\n# Print the list of the elements and their attributes.\nprint(mapdl.elist())\n\n# Display elements with their nodes numbers.\ncpos = [\n (162.20508123980457, 109.41124535475498, 112.95887397446565),\n (50.0, 0.0, 0.0),\n (-0.4135015240403764, -0.4134577015789461, 0.8112146563156641),\n]\n\nmapdl.eplot(show_node_numbering=True, line_width=5, cpos=cpos, font_size=40)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Boundary Conditions\nApplication of boundary conditions (BC).\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.d(node=1, lab=\"ALL\", mute=True)\nmapdl.d(node=\"ALL\", lab=\"UZ\", lab2=\"ROTX\", lab3=\"ROTY\", mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Define Distributed Loads\nApply a bending moment $\\mathrm{M_{z}}= 100000\\,in\\,lb$.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Parametrization of the bending moment.\nbending_mz = 100000\n\n# Application of the surface load to the beam element.\nmapdl.f(node=2, lab=\"MZ\", value=bending_mz)\nmapdl.finish(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Solve\nEnter solution mode and run the simulation.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Start solution procedure.\nmapdl.slashsolu()\n\n# Define the number of substeps to be taken this load step.\nmapdl.nsubst(1)\nmapdl.solve(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Post-processing\nEnter post-processing.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Enter the post-processing routine.\nmapdl.post1(mute=True)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Getting Displacements\nUsing :meth:`Mapdl.etable ` get the results of\nthe the maximum tensile and compressive bending stresses in\nan unsymmetric `T-beam` with :meth:`Mapdl.get_value `.\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Create a table of element values for BEAM188.\nmapdl.etable(lab=\"STRS_B\", item=\"LS\", comp=1)\nmapdl.etable(lab=\"STRS_T\", item=\"LS\", comp=31)\n\n# Get the value of the maximum compressive stress.\nstrss_top_compr = mapdl.get_value(\n entity=\"ELEM\", entnum=1, item1=\"ETAB\", it1num=\"STRS_T\"\n)\n\n# Get the value of the maximum tensile bending stress.\nstrss_bot_tens = mapdl.get_value(entity=\"ELEM\", entnum=1, item1=\"ETAB\", it1num=\"STRS_B\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check Results\nFinally we have the results of the the maximum tensile and\ncompressive bending stresses, which can be compared with expected target\nvalues:\n\n- maximum tensile bending stress $\\sigma_{\\mathrm{(B,Bot)}} = 300\\,psi$.\n- maximum compressive bending stress $\\sigma_{\\mathrm{(B,Top)}} = -700\\,psi$.\n\nFor better representation of the results we can use ``pandas`` dataframe\nwith following settings below:\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# Define the names of the rows.\nrow_names = [\n \"$$Stress - \\sigma_{\\mathrm{(B,Bot)}},\\,psi$$\",\n \"$$Stress - \\sigma_{\\mathrm{(B,Top)}},\\,psi$$\",\n]\n\n# Define the names of the columns.\ncol_names = [\"Target\", \"Mechanical APDL\", \"RATIO\"]\n\n# Define the values of the target results.\ntarget_res = np.asarray([300, -700])\n\n# Create an array with outputs of the simulations.\nsimulation_res = np.asarray([strss_bot_tens, strss_top_compr])\n\n# Identifying and filling corresponding columns.\nmain_columns = {\n \"Target\": target_res,\n \"Mechanical APDL\": simulation_res,\n \"Ratio\": list(np.divide(simulation_res, target_res)),\n}\n\n# Create and fill the output dataframe with pandas.\ndf2 = pd.DataFrame(main_columns, index=row_names).round(1)\n\n# Apply settings for the dataframe.\ndf2.head()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "stop mapdl\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "mapdl.exit()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.8" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py.md5 b/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py.md5 deleted file mode 100644 index f94c2c15e..000000000 --- a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py.md5 +++ /dev/null @@ -1 +0,0 @@ -cee2196432e77de6a2b5a3abbaa34072 \ No newline at end of file diff --git a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.rst b/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.rst deleted file mode 100644 index 454038728..000000000 --- a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.rst +++ /dev/null @@ -1,626 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "vm-010-bending_of_a_t-shaped_beam.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - Click :ref:`here ` - to download the full example code - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_vm-010-bending_of_a_t-shaped_beam.py: - - -.. _ref_vm10_example: - -Bending of a Tee-Shaped Beam ----------------------------- -Problem Description: - - Find the maximum tensile :math:`\sigma_{\mathrm{(B,Bot)}}` and compressive :math:`\sigma_{\mathrm{(B,Top)}}` - bending stresses in an unsymmetrical `T-beam` subjected to uniform bending :math:`M_z`, - with dimensions and geometric properties as shown below. - -Reference: - - S. H. Crandall, N. C. Dahl, *An Introduction to the Mechanics of Solids*, - McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 294, ex. 7.2. - -Analysis Type(s): - - Static Analysis (``ANTYPE = 0``) - -Element Type(s): - - 3-D 2 Node Beam (``BEAM188``) - -.. figure:: _static/vm10_setup_1.png - :align: center - :width: 400 - :alt: VM10 Geometry of Beam188 and Element Model - :figclass: align-center - - **Figure 1: VM10 Geometry of Beam188 and Element Model** - -Material Properties - - :math:`E = 30 \cdot 10^6 psi` - - :math:`\nu = 0.3` - -Geometric Properties: - - :math:`l = 100\,in` - - :math:`h = 1.5\,in` - - :math:`b = 8\,in` - -Loading: - - :math:`M_z = 100,000\,in\,lb` - -.. image:: _static/vm10_setup.png - :width: 400 - :alt: VM10 Problem Sketch - -Analysis Assumptions and Modeling Notes: - - A length :math:`(l = 100 in)` is arbitrarily selected since the bending moment is constant. - A `T-section` beam is modeled using flange width :math:`(6b)`, - flange thickness :math:`(\frac{h}{2})`, overall depth :math:`(2h + \frac{h}{2})`, and - stem thickness :math:`(b)`, input using :meth:`Mapdl.secdata `. - -.. GENERATED FROM PYTHON SOURCE LINES 54-57 - -Start MAPDL -~~~~~~~~~~~ -Start MAPDL and import Numpy and Pandas libraries. - -.. GENERATED FROM PYTHON SOURCE LINES 57-69 - -.. code-block:: default - - - # sphinx_gallery_thumbnail_path = '_static/vm10_setup.png' - - import numpy as np - import pandas as pd - - from ansys.mapdl.core import launch_mapdl - - # Start MAPDL. - mapdl = launch_mapdl() - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 70-73 - -Pre-Processing -~~~~~~~~~~~~~~ -Enter verification example mode and the pre-processing routine. - -.. GENERATED FROM PYTHON SOURCE LINES 73-79 - -.. code-block:: default - - - mapdl.clear() - mapdl.verify() - mapdl.prep7(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 80-83 - -Define Element Type -~~~~~~~~~~~~~~~~~~~ -Set up the element type ``BEAM188``. - -.. GENERATED FROM PYTHON SOURCE LINES 83-101 - -.. code-block:: default - - - # Type of analysis: Static. - mapdl.antype("STATIC") - - # Element type: BEAM188. - mapdl.et(1, "BEAM188") - - # Special Features are defined by keyoptions of BEAM188: - - # KEYOPT(3) - # Shape functions along the length: - # Cubic - mapdl.keyopt(1, 3, 3) # Cubic shape function - - # Print the list with currently defined element types. - print(mapdl.etlist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - ELEMENT TYPE 1 IS BEAM188 3-D 2-NODE BEAM - KEYOPT( 1- 6)= 0 0 3 0 0 0 - KEYOPT( 7-12)= 0 0 0 0 0 0 - KEYOPT(13-18)= 0 0 0 0 0 0 - - CURRENT NODAL DOF SET IS UX UY UZ ROTX ROTY ROTZ - THREE-DIMENSIONAL MODEL - - - - -.. GENERATED FROM PYTHON SOURCE LINES 102-108 - -Define Material -~~~~~~~~~~~~~~~ -Set up the material, where: - -* :math:`E = 30 \cdot 10^6 psi` - Young Modulus of steel. -* :math:`\nu = 0.3` - Poisson's ratio. - -.. GENERATED FROM PYTHON SOURCE LINES 108-118 - -.. code-block:: default - - - # Steel material model. - # Define Young's moulus and Poisson ratio for Steel. - mapdl.mp("EX", 1, 30e6) - mapdl.mp("PRXY", 1, 0.3) - - # Print the list of material properties. - print(mapdl.mplist()) - - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - MATERIAL NUMBER 1 - - TEMP EX - 0.3000000E+08 - - TEMP PRXY - 0.3000000 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 119-127 - -Define Section -~~~~~~~~~~~~~~ -Set up the cross-section properties for a beam elements, where: - -* :math:`w_1 = 6b = 6 \cdot 1.5 = 9\,in` - flange width. -* :math:`w_2 = 2h + h/2 = 2 \cdot 8 + 8/2 = 20\,in` - overall depth. -* :math:`t_1 = h/2 = 8/2 = 4\,in` - flange thickness. -* :math:`t_2 = b = 1.5\,in` - stem thickness. - -.. GENERATED FROM PYTHON SOURCE LINES 127-142 - -.. code-block:: default - - - # Parameterization of the cross-section dimensions. - sec_num = 1 - w1 = 9 - w2 = 20 - t1 = 4 - t2 = 1.5 - - # Define the beam cross-section. - mapdl.sectype(sec_num, "BEAM", "T") - mapdl.secdata(w1, w2, t1, t2) - - # Print the section properties. - print(mapdl.slist()) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - *****MAPDL VERIFICATION RUN ONLY***** - DO NOT USE RESULTS FOR PRODUCTION - - SECTION ID NUMBER: 1 - BEAM SECTION SUBTYPE: T Section - BEAM SECTION NAME IS: - BEAM SECTION DATA SUMMARY: - Area = 60.000 - Iyy = 2000.0 - Iyz = 0.0000 - Izz = 247.50 - Warping Constant = 673.35 - Torsion Constant = 174.86 - Centroid Y = 0.37007E-16 - Centroid Z = 4.0000 - Shear Center Y = 0.18531E-13 - Shear Center Z = 0.30468 - Shear Correction-xy = 0.54640 - Shear Correction-yz =-0.14994E-14 - Shear Correction-xz = 0.45475 - - Beam Section is offset to CENTROID of cross section - - - - -.. GENERATED FROM PYTHON SOURCE LINES 143-146 - -Define Geometry -~~~~~~~~~~~~~~~ -Set up the nodes and elements. Create nodes between elements. - -.. GENERATED FROM PYTHON SOURCE LINES 146-157 - -.. code-block:: default - - - # Define nodes for the beam element. - mapdl.n(1, x=0, y=0) - mapdl.n(2, x=100, y=0) - - # Define one node for the orientation of the beam T-section. - mapdl.n(3, x=0, y=1) - - # Print the list of the created nodes. - print(mapdl.nlist()) - - - - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - 1 0.0000 0.0000 0.0000 0.00 0.00 0.00 - 2 100.00 0.0000 0.0000 0.00 0.00 0.00 - 3 0.0000 1.0000 0.0000 0.00 0.00 0.00 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 158-161 - -Define elements -~~~~~~~~~~~~~~~ -Create element between nodes 1 and 2 using node 3 as orientational node. - -.. GENERATED FROM PYTHON SOURCE LINES 161-178 - -.. code-block:: default - - - # Create element. - mapdl.e(1, 2, 3) - - # Print the list of the elements and their attributes. - print(mapdl.elist()) - - # Display elements with their nodes numbers. - cpos = [ - (162.20508123980457, 109.41124535475498, 112.95887397446565), - (50.0, 0.0, 0.0), - (-0.4135015240403764, -0.4134577015789461, 0.8112146563156641), - ] - - mapdl.eplot(show_node_numbering=True, line_width=5, cpos=cpos, font_size=40) - - - - - -.. figure:: images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png - :alt: vm 010 bending of a t shaped beam - :align: center - :figclass: sphx-glr-single-img - - -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - LIST ALL SELECTED ELEMENTS. (LIST NODES) - 1 1 1 1 0 1 1 2 3 - - - - -.. GENERATED FROM PYTHON SOURCE LINES 179-182 - -Define Boundary Conditions -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Application of boundary conditions (BC). - -.. GENERATED FROM PYTHON SOURCE LINES 182-187 - -.. code-block:: default - - - mapdl.d(node=1, lab="ALL", mute=True) - mapdl.d(node="ALL", lab="UZ", lab2="ROTX", lab3="ROTY", mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 188-191 - -Define Distributed Loads -~~~~~~~~~~~~~~~~~~~~~~~~ -Apply a bending moment :math:`\mathrm{M_{z}}= 100000\,in\,lb`. - -.. GENERATED FROM PYTHON SOURCE LINES 191-200 - -.. code-block:: default - - - # Parametrization of the bending moment. - bending_mz = 100000 - - # Application of the surface load to the beam element. - mapdl.f(node=2, lab="MZ", value=bending_mz) - mapdl.finish(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 201-204 - -Solve -~~~~~ -Enter solution mode and run the simulation. - -.. GENERATED FROM PYTHON SOURCE LINES 204-213 - -.. code-block:: default - - - # Start solution procedure. - mapdl.slashsolu() - - # Define the number of substeps to be taken this load step. - mapdl.nsubst(1) - mapdl.solve(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 214-217 - -Post-processing -~~~~~~~~~~~~~~~ -Enter post-processing. - -.. GENERATED FROM PYTHON SOURCE LINES 217-222 - -.. code-block:: default - - - # Enter the post-processing routine. - mapdl.post1(mute=True) - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 223-228 - -Getting Displacements -~~~~~~~~~~~~~~~~~~~~~ -Using :meth:`Mapdl.etable ` get the results of -the the maximum tensile and compressive bending stresses in -an unsymmetric `T-beam` with :meth:`Mapdl.get_value `. - -.. GENERATED FROM PYTHON SOURCE LINES 228-242 - -.. code-block:: default - - - # Create a table of element values for BEAM188. - mapdl.etable(lab="STRS_B", item="LS", comp=1) - mapdl.etable(lab="STRS_T", item="LS", comp=31) - - # Get the value of the maximum compressive stress. - strss_top_compr = mapdl.get_value( - entity="ELEM", entnum=1, item1="ETAB", it1num="STRS_T" - ) - - # Get the value of the maximum tensile bending stress. - strss_bot_tens = mapdl.get_value(entity="ELEM", entnum=1, item1="ETAB", it1num="STRS_B") - - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 243-254 - -Check Results -~~~~~~~~~~~~~ -Finally we have the results of the the maximum tensile and -compressive bending stresses, which can be compared with expected target -values: - -- maximum tensile bending stress :math:`\sigma_{\mathrm{(B,Bot)}} = 300\,psi`. -- maximum compressive bending stress :math:`\sigma_{\mathrm{(B,Top)}} = -700\,psi`. - -For better representation of the results we can use ``pandas`` dataframe -with following settings below: - -.. GENERATED FROM PYTHON SOURCE LINES 254-283 - -.. code-block:: default - - - # Define the names of the rows. - row_names = [ - "$$Stress - \sigma_{\mathrm{(B,Bot)}},\,psi$$", - "$$Stress - \sigma_{\mathrm{(B,Top)}},\,psi$$", - ] - - # Define the names of the columns. - col_names = ["Target", "Mechanical APDL", "RATIO"] - - # Define the values of the target results. - target_res = np.asarray([300, -700]) - - # Create an array with outputs of the simulations. - simulation_res = np.asarray([strss_bot_tens, strss_top_compr]) - - # Identifying and filling corresponding columns. - main_columns = { - "Target": target_res, - "Mechanical APDL": simulation_res, - "Ratio": list(np.divide(simulation_res, target_res)), - } - - # Create and fill the output dataframe with pandas. - df2 = pd.DataFrame(main_columns, index=row_names).round(1) - - # Apply settings for the dataframe. - df2.head() - - - - - - -.. raw:: html - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
TargetMechanical APDLRatio
$$Stress - \sigma_{\mathrm{(B,Bot)}},\,psi$$300300.01.0
$$Stress - \sigma_{\mathrm{(B,Top)}},\,psi$$-700-700.01.0
-
-
-
-
- -.. GENERATED FROM PYTHON SOURCE LINES 284-285 - -stop mapdl - -.. GENERATED FROM PYTHON SOURCE LINES 285-286 - -.. code-block:: default - - mapdl.exit() - - - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** ( 0 minutes 0.939 seconds) - - -.. _sphx_glr_download_vm-010-bending_of_a_t-shaped_beam.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: vm-010-bending_of_a_t-shaped_beam.py ` - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: vm-010-bending_of_a_t-shaped_beam.ipynb ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam_codeobj.pickle b/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam_codeobj.pickle deleted file mode 100644 index fda7df5b4..000000000 Binary files a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam_codeobj.pickle and /dev/null differ diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt index f59f77121..7836f0182 100644 --- a/doc/styles/Vocab/ANSYS/accept.txt +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -1,3 +1,59 @@ -ANSYS -Ansys +Allgaier ansys +Ansys +ANSYS +centerline +Chao +Conshohocken +DOF +eigenfrequency +eigensolution +Eigensolver +eigensolver +eigensolvers +elastoplastic +equibiaxial +gage +Gerges +GPa +hexahedral +Hoffmann +hyperelastic +Hyperelastic +Jordon +Karpat +Keiper +keypoints +Lanczos +Mahoney +MAPDL +Matplotlib +midside +Mises +Mishra +MPa +multipoint +nonlinearities +Ozel +Poisson +postprocess +Prasanna +Prestressed +prestressed +Rao +ROTY +Schroth +Srivastava +substep +Technology Showcases +thermomechanical +Thermomechanical +thermomechanically +Triches +unconverged +unsymmetric +UZ +Von +Willner +Young +Zhu \ No newline at end of file diff --git a/examples/verif-manual/README.txt b/examples/verif-manual/README.txt new file mode 100644 index 000000000..f46f189e5 --- /dev/null +++ b/examples/verif-manual/README.txt @@ -0,0 +1,11 @@ +.. _ref_vm_examples: + +Verification Manual +=================== +This section demonstrates a range of Mechanical APDL elements and capabilities +in straightforward problems which have “classical” or readily-obtainable +theoretical solutions using PyMAPDL. + +These problems may then serve as the basis for additional validation and +qualification of Mechanical APDL capabilities for specific applications that +may be of interest. \ No newline at end of file diff --git a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py b/examples/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.py similarity index 88% rename from doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py rename to examples/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.py index 6f67334f7..1c01d2dc8 100644 --- a/doc/source/verif-manual/vm-001/vm-001-statically_indeterminate_reaction_force_analysis.py +++ b/examples/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.py @@ -1,11 +1,10 @@ -r""" -.. _ref_statically_indeterminate_example: +r""".. _ref_statically_indeterminate_example: -Statically Indeterminate Reaction Force Analysis +Statically indeterminate reaction force analysis ------------------------------------------------ -Problem Description: +Problem description: - A prismatical bar with built-in ends is loaded axially at two - intermediate cross sections. Determine the reactions :math:`R_1` + intermediate cross sections. Determine the reactions :math:`R_1` and :math:`R_2`. Reference: @@ -13,27 +12,27 @@ Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, pg. 26, problem 10. -Analysis Type(s): +Analysis type(s): - Static Analysis ``ANTYPE=0`` -Element Type(s): +Element type(s): - 3-D Spar (or Truss) Elements (LINK180) -.. image:: _static/vm1_setup.png +.. image:: ../_static/vm1_setup.png :width: 400 :alt: VM1 Problem Sketch -Material Properties +Material properties - :math:`E = 30 \cdot 10^6 psi` -Geometric Properties: +Geometric properties: - :math:`a = b = 0.3` - :math:`l = 10 in` Loading: - :math:`F_1 = 2*F_2 = 1000 lb` -Analytical Equations: +Analytical equations: - :math:`P = R_1 + R_2` where :math:`P` is load. - :math:`\frac{R_2}{R_1} = \frac{a}{b}` Where :math:`a` and :math:`b` are the ratios of distances between @@ -53,7 +52,7 @@ mapdl.prep7() ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material and its type (a single material, with a linking-type # section and a Young's modulus of 30e6). @@ -65,9 +64,9 @@ mapdl.mp("EX", 1, 30e6) ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ -# Set up the nodes and elements. This creates a mesh just like in the +# Set up the nodes and elements. This creates a mesh just like in the # problem setup. mapdl.n(1, 0, 0) @@ -79,7 +78,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Full constrain nodes 1 and 4, by incrementing from node 1 to node 4 # in steps of 3. Apply y-direction forces to nodes 2 and 3, with @@ -120,7 +119,7 @@ ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now that we have the reaction forces we can compare them to the # expected values of 900 lbs and 600 lbs for reactions 1 and 2 respectively. @@ -142,5 +141,5 @@ print(results) ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py b/examples/verif-manual/vm-002-beam_stresses_and_deflections.py similarity index 82% rename from doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py rename to examples/verif-manual/vm-002-beam_stresses_and_deflections.py index b43fcbbae..5939d00b0 100644 --- a/doc/source/verif-manual/vm-002/vm-002-beam_stresses_and_deflections.py +++ b/examples/verif-manual/vm-002-beam_stresses_and_deflections.py @@ -1,51 +1,50 @@ -r""" -.. _ref_vm2_example: +r""".. _ref_vm2_example: -Beam Stresses and Deflections +Beam stresses and deflections ----------------------------- -**Problem Description** +Problem description: -A standard 30 inch WF beam, with a cross-sectional area :math:`A`, -is supported as shown below and loaded on the overhangs by a -uniformly distributed load :math:`w`. Determine the maximum bending -stress, :math:`\sigma_max`, in the middle portion of the beam and -the deflection, :math:`\delta`, at the middle of the beam. + - A standard 30 inch WF beam, with a cross-sectional area :math:`A`, + is supported as shown below and loaded on the overhangs by a + uniformly distributed load :math:`w`. Determine the maximum bending + stress, :math:`\sigma_max`, in the middle portion of the beam and + the deflection, :math:`\delta`, at the middle of the beam. -**Reference** +Reference: -S. Timoshenko, Strength of Material, Part I, Elementary Theory and -Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, -pg. 98, problem 4. + - S. Timoshenko, Strength of Material, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 98, problem 4. -**Analysis Type(s)** +Analysis type(s): -Static Analysis ``ANTYPE=0`` + - Static Analysis ``ANTYPE=0`` -**Element Type(s):** +Element type(s): -3-D 2 Node Beam (BEAM188) + - 3-D 2 Node Beam (BEAM188) -.. image:: _static/vm2_setup.png +.. image:: ../_static/vm2_setup.png :width: 400 :alt: VM2 Problem Sketch -**Material Properties** +Material properties: -:math:`E = 30 \cdot 10^6 psi` + - :math:`E = 30 \cdot 10^6 psi` -**Geometric Properties** +Geometric properties: -:math:`a = 120 in` -:math:`l = 240 in` -:math:`h = 30 in` -:math:`A = 50.65 in^2` -:math:`I_z = 7892 in^4` + - :math:`a = 120 in` + - :math:`l = 240 in` + - :math:`h = 30 in` + - :math:`A = 50.65 in^2` + - :math:`I_z = 7892 in^4` -**Loading** +Loading: -:math:`w = (10000/12) lb/in` + - :math:`w = (10000/12) lb/in` -**Analytical Equations** +Analytical equations: - :math:`M` is the bending moment for the middle portion of the beam: :math:`M = 10000 \cdot 10 \cdot 60 = 6 \cdot 10^6 lb \cdot in` @@ -56,13 +55,12 @@ :math:`\delta = 0.182 in` """ +# sphinx_gallery_thumbnail_path = '_static/vm2_setup.png' ############################################################################### # Start MAPDL # ~~~~~~~~~~~ -# sphinx_gallery_thumbnail_path = '_static/vm2_setup.png' - from ansys.mapdl.core import launch_mapdl # Start mapdl and clear it. @@ -75,11 +73,11 @@ ############################################################################### -# Define Element Type +# Define element type # ~~~~~~~~~~~~~~~~~~~ # Set up the element type (a beam-type). -# Type of analysis: Static. +# Type of analysis: static. mapdl.antype("STATIC") # Element type: BEAM188. @@ -100,7 +98,7 @@ ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material. @@ -110,7 +108,7 @@ ############################################################################### -# Define Section +# Define section # ~~~~~~~~~~~~~~ # Set up the cross-section properties for a beam element. @@ -122,7 +120,7 @@ ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ # Set up the nodes and elements. Create nodes then create elements # between nodes. @@ -151,7 +149,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Application of boundary conditions (BC). @@ -167,7 +165,7 @@ mapdl.nsel("ALL") ############################################################################### -# Define Distributed Loads +# Define distributed loads # ~~~~~~~~~~~~~~~~~~~~~~~~ # Apply a distributed force of :math:`w = (10000/12) lb/in` # in the y-direction. @@ -211,7 +209,7 @@ ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now that we have the results we can compare the nodal displacement and stress # experienced by middle node of the beam to the known stresses -11,400 psi and @@ -238,5 +236,5 @@ ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py b/examples/verif-manual/vm-003-thermally_loaded_support_structure.py similarity index 90% rename from doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py rename to examples/verif-manual/vm-003-thermally_loaded_support_structure.py index 5fd706dc2..1ec1ef6be 100644 --- a/doc/source/verif-manual/vm-003/vm-003-thermally_loaded_support_structure.py +++ b/examples/verif-manual/vm-003-thermally_loaded_support_structure.py @@ -1,9 +1,8 @@ -r""" -.. _ref_thermally_loaded_support_structure: +r""".. _ref_thermally_loaded_support_structure: -Thermally Loaded Support Structure +Thermally loaded support structure ---------------------------------- -Problem Description: +Problem description: - Find the stresses in the copper and steel wire structure shown below. The wires have a cross-sectional area of math:`A`. The structure is subjected to a load math:`Q` and a temperature rise of math:`\Delta T` after @@ -14,40 +13,40 @@ Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, pg. 30, problem 9. -Analysis Type(s): +Analysis type(s): - Static Analysis ``ANTYPE=0`` -Element Type(s): +Element type(s): - 3-D Spar (or Truss) Elements (LINK180) -.. image:: _static/vm3_setup.png +.. image:: ../_static/vm3_setup.png :width: 400 :alt: VM3 Problem Sketch -Material Properties +Material properties - :math:`E_c = 16 \cdot 10^6 psi` - :math:`E_s = 30 \cdot 10^6 psi` - :math:`\alpha_c = 70 \cdot 10^{-7} in/in-^\circ F` - :math:`\alpha_s = 92 \cdot 10^{-7} in/in-^\circ F` -Geometric Properties: +Geometric properties: - :math:`A = 0.1 in^2` Loading: - :math:`Q = 4000 lb` - :math:`\Delta T = 10 ^\circ F` -Analytical Equations: +Analytical equations: - The compressive force :math:`X` is given by the following equation - - :math:`X = \frac{\Delta T (\alpha_c - \alpha_s) (A_s - E_s) }{1 + \frac{1 E_s A_s}{2 E_c A_c}} - + \frac{Q}{1 + \frac{2 E_c A_c}{E_s A_s}}` + - :math:`X = \frac{\Delta T (\alpha_c - \alpha_s) (A_s - E_s) }{1 + \frac{1 E_s A_s}{2 E_c A_c}} + \frac{Q}{1 + \frac{2 E_c A_c}{E_s A_s}}` Notes: - Length of wires (20 in.), spacing between wires (10 in.), and the reference temperature (70°F) are arbitrarily selected. The rigid lower beam is modeled by nodal coupling. -""" +""" # noqa:E501 + # sphinx_gallery_thumbnail_path = '_static/vm3_setup.png' from ansys.mapdl.core import launch_mapdl @@ -61,7 +60,7 @@ mapdl.prep7() ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the materials and their properties. We are using copper and # steel here. @@ -81,9 +80,9 @@ mapdl.tref(70) ############################################################################### -# Define Geometry: Nodes +# Define geometry: nodes # ~~~~~~~~~~~~~~~~~~~~~~ -# Set up the nodes and elements. This creates a mesh just like in the +# Set up the nodes and elements. This creates a mesh just like in the # problem setup. We create a square of nodes and use `fill` to add # mid-point nodes to two opposite sides. @@ -96,7 +95,7 @@ mapdl.nplot(nnum=True, cpos="xy") ############################################################################### -# Define Geometry: Elements +# Define geometry: elements # ~~~~~~~~~~~~~~~~~~~~~~~~~ # Create two elements (using material #1) that are two sides of our # square, as links. Then create a single element using material #2 @@ -109,7 +108,7 @@ mapdl.eplot(show_node_numbering=True, cpos="xy") ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # - Couple the degrees of freedom in y-displacement across nodes 5, 4, # and 6. @@ -159,7 +158,7 @@ stress_copper = mapdl.get("_", "ELEM", copper_e, "ETAB", "STRS_CO") ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now that we have the response we can compare the values to the # expected stresses of 19695 and 10152 respectively. @@ -185,5 +184,5 @@ ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py b/examples/verif-manual/vm-004-deflection_of_a_hinged_support.py similarity index 94% rename from doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py rename to examples/verif-manual/vm-004-deflection_of_a_hinged_support.py index bc3b79fa1..91690d888 100644 --- a/doc/source/verif-manual/vm-004/vm-004-deflection_of_a_hinged_support.py +++ b/examples/verif-manual/vm-004-deflection_of_a_hinged_support.py @@ -1,9 +1,8 @@ -r""" -.. _ref_deflection_of_a_hinged_support: +r""".. _ref_deflection_of_a_hinged_support: -Deflection of a Hinged Support +Deflection of a hinged support ------------------------------ -Problem Description: +Problem description: - A structure consisting of two equal steel bars, each of length :math:`l` and cross-sectional area :math:`A`, with hinged ends is subjected to the action of a load :math:`F`. Determine the stress, :math:`\sigma`, @@ -16,20 +15,20 @@ Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, pg. 10, problem 2. -Analysis Type(s): +Analysis type(s): - Static Analysis ``ANTYPE=0`` -Element Type(s): +Element type(s): - 3-D Spar (or Truss) Elements (LINK180) -.. image:: _static/vm4_setup.png +.. image:: ../_static/vm4_setup.png :width: 400 :alt: VM4 Problem Sketch -Material Properties +Material properties - :math:`E = 30 \cdot 10^6 psi` -Geometric Properties: +Geometric properties: - :math:`l = 15 ft` - :math:`A = 0.5 in^2` - :math:`\Theta = 30 ^\circ` @@ -37,7 +36,7 @@ Loading: - :math:`F = 5000 lb` -Analytical Equations: +Analytical equations: - The tensile force in the bars is :math:`S` - :math:`S = \frac{P}{2 sin \Theta}` - The necessary cross-sectional area :math:`A` is @@ -73,7 +72,7 @@ mapdl.prep7() ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Create a simple hinge geometry. # We use the `LINK180` element type to model this and an elastic modulus @@ -93,7 +92,7 @@ mapdl.mp("EX", 1, 30e6) ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ # We create three nodes in an isosceles triangle shape, with elements # along the equal sides, forming a hinge. @@ -107,7 +106,7 @@ mapdl.eplot(show_node_numbering=True, line_width=5, cpos="xy") ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # - Fix nodes 1 and 3 in place # - Apply a force of -5000 in the negative y-direction to node 2 @@ -168,7 +167,7 @@ # print(mapdl.prnsol('S', 'PRIN')) ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now that we have the results we can compare the nodal displacement and # stress experienced by node 2 to the known quantities 10000 psi and @@ -200,5 +199,5 @@ print(results) ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py b/examples/verif-manual/vm-005-laterally_loaded_tapered_support_structure.py similarity index 94% rename from doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py rename to examples/verif-manual/vm-005-laterally_loaded_tapered_support_structure.py index c4011d3f2..322263372 100644 --- a/doc/source/verif-manual/vm-005/vm-005-laterally_loaded_tapered_support_structure.py +++ b/examples/verif-manual/vm-005-laterally_loaded_tapered_support_structure.py @@ -1,9 +1,8 @@ -r""" -.. _ref_vm5_example: +r""".. _ref_vm5_example: -Statically Indeterminate Reaction Force Analysis +Statically indeterminate reaction force analysis ------------------------------------------------ -Problem Description: +Problem description: - A cantilever beam of thickness :math:`t` and length :math:`l` has a depth which tapers uniformly from :math:`d` at the tip to :math:`3d` at the wall. It is loaded by a force :math:`F` @@ -15,24 +14,24 @@ of Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 342, problem 7.18. -Analysis Type(s): +Analysis type(s): - Static Analysis ``ANTYPE=0`` -Element Type(s): +Element type(s): - 2-D 4-Node Sructural Solid Elements (PLANE182) - 2-D 8-Node Structural Solid Elements (PLANE183) -.. image:: _static/vm5_setup.png +.. image:: ../_static/vm5_setup.png :width: 400 :alt: VM5 Problem Sketch -Material Properties +Material properties - :math:`E = 30 \cdot 10^6 psi` - :math:`\nu = 0.0` - :math:`d = 3in` - :math:`t = 2in` -Geometric Properties: +Geometric properties: - :math:`l = 50 in` - :math:`d = 3 in` - :math:`t = 2 in` @@ -65,7 +64,7 @@ mapdl.prep7() ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material using PLANE182 with a thickness of 2 (using real # constants), and create a material with a Young's modulus of 30e6, @@ -79,9 +78,9 @@ ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ -# Set up the nodes and elements. This creates a mesh just like in the +# Set up the nodes and elements. This creates a mesh just like in the # problem setup. mapdl.n(1, 25) @@ -96,7 +95,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Fix the nodes at the larger end (the "wall" end) and apply a vertical force # to the whole structure. @@ -192,7 +191,7 @@ def fetch_mid_and_end_stress(m): ) ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now that we have the stresses we can compare them to the expected values # of stress at the midpoint (8333) and the fixed end (7407) for both @@ -219,5 +218,5 @@ def fetch_mid_and_end_stress(m): ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py b/examples/verif-manual/vm-006-pinched_cylinder.py similarity index 96% rename from doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py rename to examples/verif-manual/vm-006-pinched_cylinder.py index 1f469ecb6..35bf17fba 100644 --- a/doc/source/verif-manual/vm-006/vm-006-pinched_cylinder.py +++ b/examples/verif-manual/vm-006-pinched_cylinder.py @@ -1,9 +1,8 @@ -r""" -.. _ref_vm6_example: +r""".. _ref_vm6_example: -Pinched Cylinder +Pinched cylinder ---------------- -Problem Description: +Problem description: - A thin-walled cylinder is pinched by a force :math:`F` at the middle of the cylinder length. Determine the radial displacement :math:`\delta` at the point where the force :math:`F` is applied. @@ -16,22 +15,22 @@ Element", International Journal for Numerical Methods in Engineering, Vol.7 No. 3, 1973. -Analysis Type(s): +Analysis type(s): - Static Analysis ``ANTYPE=0`` -Element Type(s): +Element type(s): - 4-Node Finite Strain Shell Elements (SHELL181) - 8-Node Finite Strain Shell Elements (SHELL281) -.. image:: _static/vm6_setup.png +.. image:: ../_static/vm6_setup.png :width: 400 :alt: VM6 Pinched Cylinder Problem Sketch -Material Properties +Material properties - :math:`E = 10.5 \cdot 10^6 psi` - :math:`\nu = 0.3125` -Geometric Properties: +Geometric properties: - :math:`l = 10.35 in` - :math:`r = 4.953 in` - :math:`t = 0.094 in` @@ -39,7 +38,7 @@ Loading: - :math:`F = 100 lb` -Analysis Assumptions and Modeling Notes: +Analysis assumptions and modeling notes: - A one-eighth symmetry model is used. One-fourth of the load is applied due to symmetry. @@ -57,7 +56,7 @@ ############################################################################### -# Initiate Pre-Processing +# Initiate pre-processing # ~~~~~~~~~~~~~~~~~~~~~~~ # Enter verification example mode and the pre-processing routine. @@ -72,7 +71,7 @@ def start_prep7(): ############################################################################### -# Define Element Type +# Define element type # ~~~~~~~~~~~~~~~~~~~ # Set up the element type (a shell-type). @@ -113,7 +112,7 @@ def define_element(elem_type): ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material properties, where: # Young Modulus is :math:`E = 10.5 \cdot 10^6 psi`, @@ -135,7 +134,7 @@ def define_material(): ############################################################################### -# Define Section +# Define section # ~~~~~~~~~~~~~~ # Set up the cross-section properties for a shell element. @@ -156,7 +155,7 @@ def define_section(): ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ # Set up the keypoints and create the area through the keypoints. @@ -250,7 +249,7 @@ def meshing(): ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Application of symmetric boundary conditions for simplified model. @@ -270,7 +269,7 @@ def define_bc(): ############################################################################### -# Define Distributed Loads +# Define distributed loads # ~~~~~~~~~~~~~~~~~~~~~~~~ # Apply the force of :math:`F = (100/4) lb` in the y-direction. @@ -374,7 +373,7 @@ def get_displacements(): ############################################################################### -# Rerun Model with SHELL281 +# Rerun model with SHELL281 # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Perform the simulation again using the element type SHELL281. @@ -410,7 +409,7 @@ def get_displacements(): ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Now we have the deflections, we can compare them to the expected values # of radial deflection at the node where force :math:`F` was applied @@ -441,5 +440,5 @@ def get_displacements(): print(output) ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py b/examples/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py similarity index 89% rename from doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py rename to examples/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py index cf8b632eb..ad29df474 100644 --- a/doc/source/verif-manual/vm-007/vm-007-plastic_compression_of_a_pipe_assembly.py +++ b/examples/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py @@ -1,9 +1,8 @@ -r""" -.. _ref_vm7_example: +r""".. _ref_vm7_example: -Plastic Compression of a Pipe Assembly +Plastic compression of a pipe assembly -------------------------------------- -Problem Description: +Problem description: - Two coaxial tubes, the inner one of 1020 CR steel and cross-sectional area :math:`A_{\mathrm{s}}`, and the outer one of 2024-T4 aluminum alloy and of area :math:`A_{\mathrm{a}}`, are compressed between heavy, flat end plates, @@ -16,30 +15,30 @@ - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics of Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 180, ex. 5.1. -Analysis Type(s): +Analysis type(s): - Static, Plastic Analysis (``ANTYPE=0``) -Element Type(s): +Element type(s): - Plastic Straight Pipe Element (PIPE288) - 4-Node Finite Strain Shell (SHELL181) - 3-D Structural Solid Elements (SOLID185) -.. image:: _static/vm7_setup_2.png +.. image:: ../_static/vm7_setup_2.png :width: 400 :alt: VM7 Finite Element Models -Material Properties +Material properties - :math:`E_{\mathrm{s}} = 26875000\,psi` - :math:`\sigma_{\mathrm{(yp)s}} = 86000\,psi` - :math:`E_{\mathrm{a}} = 11000000\,psi` - :math:`\sigma_{\mathrm{(yp)a}} = 55000\,psi` - :math:`\nu = 0.3` -.. image:: _static/vm7_setup_1.png +.. image:: ../_static/vm7_setup_1.png :width: 300 :alt: VM7 Material Model -Geometric Properties: +Geometric properties: - :math:`l = 10\,in` - :math:`A_{\mathrm{s}} = 7\,in^2` - :math:`A_{\mathrm{a}} = 12\,in^2` @@ -49,11 +48,11 @@ - 2nd Load Step: :math:`\delta = 0.050\,in` - 3rd Load Step: :math:`\delta = 0.100\,in` -.. image:: _static/vm7_setup.png +.. image:: ../_static/vm7_setup.png :width: 300 :alt: VM7 Problem Sketch -Analysis Assumptions and Modeling Notes: +Analysis assumptions and modeling notes: - The following tube dimensions, which provide the desired cross-sectional areas, are arbitrarily chosen: @@ -75,14 +74,13 @@ the ``ROTY`` degree of freedom coupled. """ +# sphinx_gallery_thumbnail_path = '_static/vm7_setup.png' ############################################################################### # Start MAPDL # ~~~~~~~~~~~ # Start MAPDL and import Numpy and Pandas libraries. -# sphinx_gallery_thumbnail_path = '_static/vm7_setup.png' - from ansys.mapdl.core import launch_mapdl import matplotlib.pyplot as plt import numpy as np @@ -93,7 +91,7 @@ ############################################################################### -# Pre-Processing +# Pre-processing # ~~~~~~~~~~~~~~ # Enter verification example mode and the pre-processing routine. @@ -116,14 +114,14 @@ ############################################################################### -# Define Element Type +# Define element type # ~~~~~~~~~~~~~~~~~~~ # Set up the element types . # Element type PIPE288. mapdl.et(1, "PIPE288") -# Special Features are defined by keyoptions of pipe element. +# Special features are defined by keyoptions of pipe element. # KEYOPT(4)(2) # Hoop strain treatment: # Thick pipe theory. @@ -135,7 +133,7 @@ # Element type SHELL181. mapdl.et(3, "SHELL181") # FULL INTEGRATION -# Special Features are defined by keyoptions of shell element. +# Special features are defined by keyoptions of shell element. # KEYOPT(3)(2) # Integration option: # Full integration with incompatible modes. @@ -146,32 +144,32 @@ ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material properties. # -# * Young Modulus of steel is: :math:`E_{\mathrm{s}} = 26875000\,psi`, +# * Young modulus of steel is: :math:`E_{\mathrm{s}} = 26875000\,psi`, # * Yield strength of steel is: :math:`\sigma_{\mathrm{(yp)s}} = 86000\, psi`, -# * Young Modulus of aluminum is: :math:`E_{\mathrm{a}} = 11000000\,psi`, +# * Young modulus of aluminum is: :math:`E_{\mathrm{a}} = 11000000\,psi`, # * Yield strength of aluminum is: :math:`\sigma_{\mathrm{(yp)a}} = 55000\,psi`, # * Poisson's ratio is: :math:`\nu = 0.3` # Steel material model. -# Define Young's moulus and Poisson ratio for Steel. +# Define Young's moulus and Poisson ratio for steel. mapdl.mp("EX", 1, 26.875e6) mapdl.mp("PRXY", 1, 0.3) -# Define non-linear material properties for Steel. +# Define non-linear material properties for steel. mapdl.tb("BKIN", 1, 1) mapdl.tbtemp(0) mapdl.tbdata(1, 86000, 0) # Aluminum material model. -# Define Young's moulus and Poisson ratio for Aluminum. +# Define Young's moulus and Poisson ratio for aluminum. mapdl.mp("EX", 2, 11e6) mapdl.mp("PRXY", 2, 0.3) -# Define non-linear material properties for Aluminum. +# Define non-linear material properties for aluminum. mapdl.tb("BKIN", 2, 1) mapdl.tbtemp(0) mapdl.tbdata(1, 55000, 0) @@ -181,7 +179,7 @@ ############################################################################### -# Plot Stress - Strain Curve +# Plot stress - strain curve # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Use Matplotlib library to plot material model curves of steel and aluminum. @@ -216,7 +214,7 @@ # Define stress - strain properties of the aluminum. aluminum = {"stress_a": [0, 55000, 55000, 55000], "strain_a": [0, 0.05, 0.1, 0.2]} -# Define yielding strength point of the Aluminum on the curve. +# Define yielding strength point of the aluminum on the curve. xp = aluminum["strain_a"][1] yp = aluminum["stress_a"][1] @@ -248,7 +246,7 @@ ############################################################################### -# Define Section +# Define section # ~~~~~~~~~~~~~~ # Set up the cross-section properties for a shell and pipe elements. @@ -264,7 +262,7 @@ # Thickness (SHELL181) mapdl.secdata(0.5, 2, 0, 5) -# Define Pipe cross-section for inside tube(steel). +# Define pipe cross-section for inside tube(steel). mapdl.sectype(3, "PIPE") # Outside diameter and wall thickness settings for inside tube(PIPE288). @@ -281,7 +279,7 @@ ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ # Set up the nodes and create the elements through the nodes. @@ -319,12 +317,12 @@ # Rotate nodal coordinate systems into the active system. mapdl.nrotat(node1=101, node2=118, ninc=1) -# Create elements for Inside (Steel) tube. +# Create elements for the inside (steel) tube. mapdl.type(2) mapdl.mat(1) mapdl.e(101, 102, 112, 111, 105, 106, 116, 115) -# Create elements for Outside (Aluminum) tube +# Create elements for the outside (aluminum) tube mapdl.mat(2) mapdl.e(103, 104, 114, 113, 107, 108, 118, 117) @@ -337,12 +335,12 @@ # Generate nodes to form a theta degree slice mapdl.ngen(itime=2, inc=4, node1=201, node2=204, dy=theta) -# Create element for Steel(Inside) tube cross-section. +# Create element for steel (inside) tube cross-section. mapdl.type(3) mapdl.secnum(1) mapdl.e(203, 201, 205, 207) -# Create element for Aluminum(Outside) tube cross-section. +# Create element for aluminum (outside) tube cross-section. mapdl.secnum(2) mapdl.e(204, 202, 206, 208) @@ -356,7 +354,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Application of boundary conditions (BC) for simplified axisymmetric model. @@ -368,15 +366,15 @@ mapdl.d(node=2, lab="UX", lab2="UY", lab3="ROTX", lab4="ROTY", lab5="ROTZ") # Apply constraints to SOLID185 and SHELL181 models" -# Couple nodes at boundary in RADIAL direction for SOLID185. +# Couple nodes at boundary in radial direction for SOLID185. mapdl.cp(nset=1, lab="UX", node1=101, node2=111, node3=105, node4=115) mapdl.cpsgen(itime=4, nset1=1) -# Couple nodes at boundary in RADIAL direction for the SHELL181. +# Couple nodes at boundary in radial direction for the SHELL181. mapdl.cp(5, lab="UX", node1=201, node2=205, node3=203, node4=20) mapdl.cpsgen(itime=2, nset1=5) -# Couple nodes at boundary in ROTY dir for SHELL181. +# Couple nodes at boundary in ROTY direction for SHELL181. mapdl.cp(7, lab="ROTY", node1=201, node2=205) mapdl.cpsgen(itime=4, nset1=7) @@ -398,7 +396,7 @@ # Apply symmetry boundary conditions. mapdl.dsym("SYMM", "Y", 1) -# Select all nodes and RESELECT only nodes at Z = 0. +# Select all nodes and reselect only nodes at Z = 0. mapdl.nsel("ALL") mapdl.nsel("R", "LOC", "Z", 0) @@ -495,33 +493,33 @@ def getload(): ############################################################################### -# Getting Loads For Each Load Step +# Getting loads for each load step # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Obtain the loads of the model using :func:`getload()` function. -# Activate Load Step 1 and extract load data. +# Activate load step 1 and extract load data. mapdl.set(1, 1) pipe288_ls1, solid185_ls1, shell181_ls1 = getload() -# Activate Load Step 2 and extract load data. +# Activate load step 2 and extract load data. mapdl.set(2, 1) pipe288_ls2, solid185_ls2, shell181_ls2 = getload() -# Activate Load Step 3 and extract load data. +# Activate load step 3 and extract load data. mapdl.set(3, 1) pipe288_ls3, solid185_ls3, shell181_ls3 = getload() ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Finally we have the results of the loads for the simplified axisymmetric model, # which can be compared with expected target values for models with ``PIPE288``, # ``SOLID185``, and ``SHELL181`` elements. Loads expected for each load step are: # -# - 1st Load Step with deflection :math:`\delta = 0.032 (in)` has :math:`load_1 = 1024400\,(lb)`. -# - 2nd Load Step with deflection :math:`\delta = 0.05 (in)` has :math:`load_2 = 1262000\,(lb)`. -# - 3rd Load Step with deflection :math:`\delta = 0.1 (in)` has :math:`load_3 = 1262000\,(lb)`. +# - 1st load step with deflection :math:`\delta = 0.032 (in)` has :math:`load_1 = 1024400\,(lb)`. +# - 2nd load step with deflection :math:`\delta = 0.05 (in)` has :math:`load_2 = 1262000\,(lb)`. +# - 3rd load step with deflection :math:`\delta = 0.1 (in)` has :math:`load_3 = 1262000\,(lb)`. target_res = np.asarray( [1024400, 1262000, 1262000, 1024400, 1262000, 1262000, 1024400, 1262000, 1262000] @@ -612,5 +610,5 @@ def getload(): ) ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py b/examples/verif-manual/vm-008-parametric_calculation.py similarity index 95% rename from doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py rename to examples/verif-manual/vm-008-parametric_calculation.py index 1021ee8de..893326514 100644 --- a/doc/source/verif-manual/vm-008/vm-008-parametric_calculation.py +++ b/examples/verif-manual/vm-008-parametric_calculation.py @@ -1,9 +1,8 @@ -r""" -.. _ref_vm8_example: +r""".. _ref_vm8_example: -Parametric Calculation +Parametric calculation ---------------------- -Problem Description: +Problem description: - Write a user file macro to calculate the distance ``d`` between either nodes or keypoints in ``PREP7``. Define abbreviations for calling the macro and verify the parametric expressions by using the macro to calculate @@ -13,23 +12,23 @@ Reference: - None. -Analysis Type(s): - - Parametric Arithmetic. +Analysis type(s): + - Parametric arithmetic. -Element Type: +Element type: - None. -Geometric Properties(Coordinates): +Geometric properties (coordinates): - :math:`N_{\mathrm{1(x,y,z)}} = 1.5, 2.5, 3.5` - :math:`N_{\mathrm{2(x,y,z)}} = -3.7, 4.6, -3` - :math:`K_{\mathrm{3(x,y,z)}} = 100, 0, 30` - :math:`K_{\mathrm{4(x,y,z)}} = -200,25,80` -.. image:: _static/vm8_setup.png +.. image:: ../_static/vm8_setup.png :width: 300 :alt: VM8 Problem Sketch -Analysis Assumptions and Modeling Notes: +Analysis assumptions and modeling notes: - Instead of ``*CREATE``, ``*USE``, etc., we have created a class ``Create`` with methods that correspond to each type of simulation. This class gives a possibility to change coordinates and reuse it. @@ -49,13 +48,13 @@ print(dist_kp) """ +# sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' ############################################################################### # Start MAPDL # ~~~~~~~~~~~ # Start MAPDL and import Numpy and Pandas libraries. -# sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' from ansys.mapdl.core import launch_mapdl import numpy as np @@ -66,7 +65,7 @@ ############################################################################### -# Pre-Processing +# Pre-processing # ~~~~~~~~~~~~~~ # Enter verification example mode and the pre-processing routine. @@ -76,7 +75,7 @@ ############################################################################### -# Define Class +# Define class # ~~~~~~~~~~~~ # Identifying the class ``create`` with methods ``create_kp_method`` and # ``create_node_method`` to calculate and plot the distances between keypoints @@ -194,7 +193,7 @@ def p2(self, new_value): ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Finally we have the results of the distances for both simulations, # which can be compared with expected target values: @@ -233,5 +232,5 @@ def p2(self, new_value): df2.head() ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py b/examples/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py similarity index 94% rename from doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py rename to examples/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py index 925433be0..569bb542d 100644 --- a/doc/source/verif-manual/vm-009/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py +++ b/examples/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py @@ -1,9 +1,8 @@ -r""" -.. _ref_vm9_example: +r""".. _ref_vm9_example: -Large Lateral Deflection of Unequal Stiffness Springs +Large lateral deflection of unequal stiffness springs ----------------------------------------------------- -Problem Description: +Problem description: - A two-spring system is subjected to a force :math:`F` as shown below. Determine the strain energy of the system and the displacements :math:`\delta_x` and :math:`\delta_y`. @@ -13,14 +12,14 @@ Design with Applications*, McGraw-Hill Book Co., Inc., New York, NY,1984, pp. 72-73, ex. 3-1. -Analysis Type(s): +Analysis type(s): - Nonlinear Transient Dynamic Analysis (``ANTYPE = 4``) -Element Type(s): - - Spring-Damper Elements (COMBIN14) - - Spring-Damper Elements (COMBIN40) +Element type(s): + - Spring-damper elements (COMBIN14) + - Spring-damper elements (COMBIN40) -.. image:: _static/vm9_setup_2.png +.. image:: ../_static/vm9_setup_2.png :width: 400 :alt: Geometry of COMBIN14 and COMBIN40 @@ -29,18 +28,18 @@ - :math:`k_2 = 1\,N/cm` - :math:`m = 1` -Geometric Properties: +Geometric properties: - :math:`l = 10\,cm` Loading: - :math:`F = 5{\sqrt[2]{2}}\,N` - :math:`\alpha = 45\,º` -.. image:: _static/vm9_setup.png +.. image:: ../_static/vm9_setup.png :width: 400 :alt: VM9 Problem Sketch -Analysis Assumptions and Modeling Notes: +Analysis assumptions and modeling notes: - The solution to this problem is best obtained by adding mass and using the "slow dynamics" technique with approximately critical damping. Combination elements ``COMBIN40`` are used to provide damping @@ -61,14 +60,13 @@ the solution phase. """ +# sphinx_gallery_thumbnail_path = '_static/vm9_setup.png' ############################################################################### # Start MAPDL # ~~~~~~~~~~~ # Start MAPDL and import Numpy and Pandas libraries. -# sphinx_gallery_thumbnail_path = '_static/vm9_setup.png' - from ansys.mapdl.core import launch_mapdl import numpy as np import pandas as pd @@ -78,7 +76,7 @@ ############################################################################### -# Pre-Processing +# Pre-processing # ~~~~~~~~~~~~~~ # Enter verification example mode and the pre-processing routine. @@ -115,7 +113,7 @@ ############################################################################### -# Define Element Type +# Define element type # ~~~~~~~~~~~~~~~~~~~ # Set up the element types. @@ -131,7 +129,7 @@ # Element type COMBIN40. mapdl.et(3, "COMBIN40") -# Special Features are defined by keyoptions of the element COMBIN40. +# Special features are defined by keyoptions of the element COMBIN40. # KEYOPT(3)(1) # Element degrees of freedom: # UX (Displacement along nodal X axes) @@ -145,7 +143,7 @@ # Element type COMBIN40. mapdl.et(4, "COMBIN40") -# Special Features are defined by keyoptions of the element COMBIN40. +# Special features are defined by keyoptions of the element COMBIN40. # KEYOPT(3)(2) # Element degrees of freedom: # UX (Displacement along nodal X axes) @@ -161,7 +159,7 @@ ############################################################################### -# Define Real Constants +# Define real constants # ~~~~~~~~~~~~~~~~~~~~~ # Define damping coefficients :math:`c_x = 1.41`, :math:`c_y = 2.0` and # stiffness values :math:`k_1 = 8\,N/cm`, :math:`k_2 = 1\,N/cm` for the @@ -184,7 +182,7 @@ ############################################################################### -# Define Nodes +# Define nodes # ~~~~~~~~~~~~ # Set up the nodes coordinates using python ``for`` loop. @@ -201,7 +199,7 @@ ############################################################################### -# Create Elements +# Create elements # ~~~~~~~~~~~~~~~ # Create the elements through the nodes. @@ -234,7 +232,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Application of boundary conditions (BC) for the spring model. @@ -302,7 +300,7 @@ ############################################################################### -# Getting Displacements +# Getting displacements # ~~~~~~~~~~~~~~~~~~~~~ # Enter post-processing. To get results of the strain energy and displacements # in X and Y directions from the node where the force is applied using @@ -332,7 +330,7 @@ ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Finally we have the results of the strain energy and # displacements in :math:`X` and :math:`Y` directions, which can be compared with @@ -371,5 +369,5 @@ df2.head() ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py b/examples/verif-manual/vm-010-bending_of_a_t-shaped_beam.py similarity index 94% rename from doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py rename to examples/verif-manual/vm-010-bending_of_a_t-shaped_beam.py index f38997d88..a42814ebf 100644 --- a/doc/source/verif-manual/vm-010/vm-010-bending_of_a_t-shaped_beam.py +++ b/examples/verif-manual/vm-010-bending_of_a_t-shaped_beam.py @@ -1,5 +1,4 @@ -r""" -.. _ref_vm10_example: +r""".. _ref_vm10_example: Bending of a Tee-Shaped Beam ---------------------------- @@ -19,7 +18,7 @@ Element Type(s): - 3-D 2 Node Beam (``BEAM188``) -.. figure:: _static/vm10_setup_1.png +.. figure:: ../_static/vm10_setup_1.png :align: center :width: 400 :alt: VM10 Geometry of Beam188 and Element Model @@ -39,7 +38,7 @@ Loading: - :math:`M_z = 100,000\,in\,lb` -.. image:: _static/vm10_setup.png +.. image:: ../_static/vm10_setup.png :width: 400 :alt: VM10 Problem Sketch @@ -50,14 +49,13 @@ stem thickness :math:`(b)`, input using :meth:`Mapdl.secdata `. """ +# sphinx_gallery_thumbnail_path = '_static/vm10_setup.png' ############################################################################### # Start MAPDL # ~~~~~~~~~~~ # Start MAPDL and import Numpy and Pandas libraries. -# sphinx_gallery_thumbnail_path = '_static/vm10_setup.png' - from ansys.mapdl.core import launch_mapdl import numpy as np import pandas as pd @@ -67,7 +65,7 @@ ############################################################################### -# Pre-Processing +# Pre-processing # ~~~~~~~~~~~~~~ # Enter verification example mode and the pre-processing routine. @@ -77,7 +75,7 @@ ############################################################################### -# Define Element Type +# Define element type # ~~~~~~~~~~~~~~~~~~~ # Set up the element type ``BEAM188``. @@ -87,7 +85,7 @@ # Element type: BEAM188. mapdl.et(1, "BEAM188") -# Special Features are defined by keyoptions of BEAM188: +# Special features are defined by keyoptions of BEAM188: # KEYOPT(3) # Shape functions along the length: @@ -99,7 +97,7 @@ ############################################################################### -# Define Material +# Define material # ~~~~~~~~~~~~~~~ # Set up the material, where: # @@ -107,7 +105,7 @@ # * :math:`\nu = 0.3` - Poisson's ratio. # Steel material model. -# Define Young's moulus and Poisson ratio for Steel. +# Define Young's moulus and Poisson ratio for steel. mapdl.mp("EX", 1, 30e6) mapdl.mp("PRXY", 1, 0.3) @@ -116,7 +114,7 @@ ############################################################################### -# Define Section +# Define section # ~~~~~~~~~~~~~~ # Set up the cross-section properties for a beam elements, where: # @@ -140,7 +138,7 @@ print(mapdl.slist()) ############################################################################### -# Define Geometry +# Define geometry # ~~~~~~~~~~~~~~~ # Set up the nodes and elements. Create nodes between elements. @@ -176,7 +174,7 @@ ############################################################################### -# Define Boundary Conditions +# Define boundary conditions # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Application of boundary conditions (BC). @@ -185,7 +183,7 @@ ############################################################################### -# Define Distributed Loads +# Define distributed loads # ~~~~~~~~~~~~~~~~~~~~~~~~ # Apply a bending moment :math:`\mathrm{M_{z}}= 100000\,in\,lb`. @@ -220,7 +218,7 @@ ############################################################################### -# Getting Displacements +# Getting displacements # ~~~~~~~~~~~~~~~~~~~~~ # Using :meth:`Mapdl.etable ` get the results of # the the maximum tensile and compressive bending stresses in @@ -240,7 +238,7 @@ ############################################################################### -# Check Results +# Check results # ~~~~~~~~~~~~~ # Finally we have the results of the the maximum tensile and # compressive bending stresses, which can be compared with expected target @@ -281,5 +279,5 @@ df2.head() ############################################################################### -# stop mapdl +# Stop MAPDL. mapdl.exit() diff --git a/examples/verif-manual/vm-012-combined-bending-and-torsion.py b/examples/verif-manual/vm-012-combined-bending-and-torsion.py new file mode 100644 index 000000000..d36304fd2 --- /dev/null +++ b/examples/verif-manual/vm-012-combined-bending-and-torsion.py @@ -0,0 +1,180 @@ +r""".. _ref_vm12_example: + +Combined bending and torsion +---------------------------- + +Problem description: + - A vertical bar of length :math:`l` is subjected to the action of a + horizontal force F acting at a distance d from the axis of the bar. + Determine the maximum principal stress :math:`\sigma _{max}` and the + maximum shear stress :math:`\tau _ {max}` in the bar. + +Reference: + - Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 299, problem 2. + +Analysis type(s): + - Static analysis ``ANTYPE=0`` + +Element type(s): + - Elastic straight pipe element (``PIPE16``) + - 3D 2 Node pipe element (``PIPE288``) + +.. image:: ../_static/vm12_setup.png + :width: 400 + :alt: VM12 Problem Sketch + +Material properties + - :math:`E = 30 \cdot 10^6 psi` + - :math:`u=0.3` + +Geometric properties: + - :math:`l = 25 l` + - :math:`d = 3 ft` + - Section modulus :math:`(l/c) = 10 in^3` + - Outer Diameter :math:`= 4.67017 in` + - Wall Thickness :math:`= 2.33508 in` + +Loading: + - :math:`F = 250 lb` + - :math:`M = Fd = 9000 in-lb` + +Analysis assumptions and modeling notes: + - Use consistent length units of inches. Real constants for PIPE16 and + section properties for PIPE288 are used to define the pipe Outer Diameter + and Wall Thickness. These values are calculated for a solid cross-section + from the given section modulus. The offset load is applied as a centroidal + force and a moment. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm12_setup.png' + +from ansys.mapdl.core import launch_mapdl + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL. +mapdl = launch_mapdl(loglevel="WARNING", print_com=True) +mapdl.clear() # optional as MAPDL just started + +############################################################################### +# Enter verification example mode and the pre-processing routine +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.verify("vm12") +mapdl.prep7() + +mapdl.antype("STATIC") +mapdl.et(1, "PIPE16") +mapdl.r(1, 4.67017, 2.33508) # REAL CONSTANTS FOR SOLID CROSS SECTION +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.3) +mapdl.n(1) +mapdl.n(2, "", "", 300) +mapdl.e(1, 2) +mapdl.d(1, "ALL") +mapdl.f(2, "MZ", 9000) +mapdl.f(2, "FX", -250) +mapdl.finish() +mapdl.slashsolu() +mapdl.outpr("BASIC", 1) +with mapdl.non_interactive: + mapdl.run("/OUT,SCRATCH") + mapdl.solve() + mapdl.finish() + mapdl.post1() + mapdl.etable("P_STRS", "NMISC", 86) + mapdl.etable("SHR", "NMISC", 88) + mapdl.run("/OUT") + mapdl.run("/GOPR") +mapdl.last_response +mapdl.get("P_STRESS", "ELEM", 1, "ETAB", "P_STRS") +mapdl.get("SHEAR", "ELEM", 1, "ETAB", "SHR") +mapdl.dim("LABEL", "CHAR", 2, 2) +mapdl.dim("VALUE", "", 2, 3) +mapdl.run("LABEL(1,1) = 'MAX PRIN','MAX SH S'") +mapdl.run("LABEL(1,2) = 'STRS psi','TRS psi '") +mapdl.vfill("VALUE(1", "1)", "DATA", 7527, 3777) +mapdl.vfill("VALUE(1", "2)", "DATA", "P_STRESS", "(SHEAR/2)") +mapdl.vfill("VALUE(1", "3)", "DATA", "ABS(P_STRESS/7527 )", "ABS((SHEAR/2)/3777 )") +mapdl.save("TABLE_1") +mapdl.run("FINI") +mapdl.run("/CLEAR,NOSTART") + +mapdl.prep7() +mapdl.run("C*** USING PIPE288") +mapdl.run("ANTYPE,STATIC") +mapdl.et(1, "PIPE288", "", "", "", 2) +mapdl.sectype(1, "PIPE") +mapdl.secdata(4.67017, 2.33508) +mapdl.keyopt(1, 3, 3) # CUBIC SHAPE FUNCTION +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.3) +mapdl.n(1) +mapdl.n(2, "", "", 300) +mapdl.e(1, 2) +mapdl.d(1, "ALL") +mapdl.f(2, "MZ", 9000) +mapdl.f(2, "FX", -250) +mapdl.finish() + +mapdl.slashsolu() +mapdl.outpr("BASIC", 1) +with mapdl.non_interactive: + mapdl.run("/OUT,SCRATCH") + mapdl.solve() + mapdl.finish() + mapdl.post1() + mapdl.set("LAST") + mapdl.graphics("POWER") + mapdl.eshape(1) + mapdl.view(1, 1, 1, 1) + mapdl.plesol("S", 1) + mapdl.run("/OUT") + mapdl.run("/GOPR") +mapdl.get("P_STRESS", "PLNSOL", 0, "MAX") +mapdl.plesol("S", "INT") +mapdl.get("SHEAR", "PLNSOL", 0, "MAX") +mapdl.dim("LABEL", "CHAR", 2, 2) +mapdl.dim("VALUE", "", 2, 3) +mapdl.run("LABEL(1,1) = 'MAX PRIN','MAX SH S'") +mapdl.run("LABEL(1,2) = 'STRS psi','TRS psi '") +mapdl.vfill("VALUE(1", "1)", "DATA", 7527, 3777) +mapdl.vfill("VALUE(1", "2)", "DATA", "P_STRESS", "(SHEAR/2)") +mapdl.vfill("VALUE(1", "3)", "DATA", "ABS(P_STRESS/7527 )", "ABS((SHEAR/2)/3777 )") +mapdl.save("TABLE_2") +mapdl.run("FINI") +mapdl.run("/CLEAR,NOSTART") +mapdl._run("/NOPR") # It is not recommended to use '/NOPR' in a normal PyMAPDL session. +mapdl.com("") + +with mapdl.non_interactive: + mapdl.run("/OUT,vm12,vrt") + mapdl.com("------------------- VM12 RESULTS COMPARISON ---------------------") + mapdl.com("") + mapdl.com("| TARGET | Mechanical APDL | RATIO") + mapdl.com("") + mapdl.resume("TABLE_1") + mapdl.com("USING PIPE16") + mapdl.com("") + mapdl.run("*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)") + mapdl.run("(1X,A8,A8,' ',F10.0,' ',F12.0,' ',1F15.3)") + mapdl.com("") + mapdl.resume("TABLE_2") + mapdl.com("USING PIPE288") + mapdl.com("") + mapdl.run("*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)") + mapdl.run("(1X,A8,A8,' ',F10.0,' ',F12.0,' ',1F15.3)") + mapdl.com("") + mapdl.com("-----------------------------------------------------------------") + mapdl.run("/OUT") + +mapdl.run("/GOPR") + +mapdl.finish() +mapdl.starlist("vm12", "vrt") + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index 3b28f6ae0..e9cf70c54 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -5,10 +5,10 @@ pandas==1.5.3 plotly==5.13.0 pythreejs==2.4.1 pyvista==0.37.0 -vtk==9.1.0 +vtk==9.2.5 # Documentation dependencies -Sphinx==6.1.2 +Sphinx==5.3.0 numpydoc==1.5.0 ansys-sphinx-theme==0.8.1 sphinx-copybutton==0.5.1 @@ -20,4 +20,3 @@ sphinx-autobuild==2021.3.14 sphinx-autodoc-typehints==1.22 sphinx-notfound-page==0.8.3 pypandoc==1.10 -vtk==9.1.0