.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "verif-manual/vm-011-residual-stress-problem.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_verif-manual_vm-011-residual-stress-problem.py: .. _ref_vm11_example: Residual Stress Problem ---------------------------- Problem description: - A chain hoist is attached to the ceiling through three tie rods as shown below. The tie rods are made of cold-rolled steel with yield strength :math:`\sigma_{yp}` and each has an area A. Find the deflection :math:`\delta` at load :math:`F_1` when the deflections are elastic in all three rods. When the frame is loaded to :math:`F_2` (where all three rods become fully plastic), and then unloaded, find the residual stress :math:`\sigma_r` in the central rod. Reference: - S. H. Crandall, N. C. Dahl, *An Introduction to the Mechanics of Solids*, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 234, problem 5.31. Analysis Type(s): - Static Analysis (``ANTYPE = 0``) Element Type(s): - 3-D Spar (or Truss) Elements (``LINK180``) .. figure:: ../_static/vm11_setup_1.png :align: center :width: 400 :alt: VM11 Problem Sketch :figclass: align-center **VM11 Problem model** Material properties - :math:`\sigma_{yp} = 30,000\,psi` - :math:`E = 30 \cdot 10^6\,psi` .. figure:: ../_static/vm11_setup_2.png :align: center :width: 400 :alt: VM11 Material Model :figclass: align-center **VM11 Material Model** Geometric Properties: - :math:`A = 1\,in^2` - :math:`l = 100\,in` - :math:`\Theta = 30°` Loading: - :math:`F_1 = 51,961.5\,lb` - :math:`F_2 = 81,961.5\,lb` Analysis Assumptions and Modeling Notes: - Automatic load stepping (:meth: Mapl.autots ,ON) is used to obtain the nonlinear plastic solution (load steps 2 and 3). .. GENERATED FROM PYTHON SOURCE LINES 79-85 .. code-block:: Python # sphinx_gallery_thumbnail_path = '_static/vm11_setup_1.png' import math from ansys.mapdl.core import launch_mapdl .. GENERATED FROM PYTHON SOURCE LINES 86-89 Start MAPDL ~~~~~~~~~~~ Start MAPDL. .. GENERATED FROM PYTHON SOURCE LINES 89-93 .. code-block:: Python mapdl = launch_mapdl() mapdl.clear() # optional as MAPDL just started .. GENERATED FROM PYTHON SOURCE LINES 94-97 Pre-processing ~~~~~~~~~~~~~~ Enter verification example mode and the pre-processing routine. .. GENERATED FROM PYTHON SOURCE LINES 97-102 .. code-block:: Python mapdl.verify("vm11") mapdl.prep7() mapdl.title("VM11 RESIDUAL STRESS PROBLEM", mute=True) .. GENERATED FROM PYTHON SOURCE LINES 103-106 Define element type ~~~~~~~~~~~~~~~~~~~ Set up the element type ``LINK180``. .. GENERATED FROM PYTHON SOURCE LINES 106-122 .. code-block:: Python # Type of analysis: Static. mapdl.antype("STATIC") # Element type: LINK180. mapdl.et(1, "LINK180") mapdl.sectype(1, "LINK") mapdl.secdata(1) mapdl.mp("EX", 1, 30e6) mapdl.tb("PLAS", 1, tbopt="BKIN") # TABLE FOR BILINEAR KINEMATIC HARDENING mapdl.tbtemp(100) mapdl.tbdata(1, 30000) # YIELD STRESS # Print print(mapdl.mplist()) .. rst-class:: sphx-glr-script-out .. code-block:: none LIST MATERIALS 1 TO 1 BY 1 PROPERTY= ALL MATERIAL NUMBER 1 TEMP EX 0.3000000E+08 .. GENERATED FROM PYTHON SOURCE LINES 123-126 Define model geometry ~~~~~~~~~~~~~~~~~~~~~ Set up parameters and geometry. .. GENERATED FROM PYTHON SOURCE LINES 126-135 .. code-block:: Python L = 100 theta = 30 xloc = L * math.tan(math.radians(theta)) mapdl.n(1, -xloc) mapdl.n(3, xloc) mapdl.fill() mapdl.n(4, y=-L, mute=True) .. GENERATED FROM PYTHON SOURCE LINES 136-139 Define elements ~~~~~~~~~~~~~~~ Create elements. .. GENERATED FROM PYTHON SOURCE LINES 139-148 .. code-block:: Python mapdl.e(1, 4) mapdl.e(2, 4) mapdl.e(3, 4) mapdl.outpr(freq=1) mapdl.d(1, "ALL", nend=3) mapdl.f(4, "FY", -51961.5) # APPLY LOAD F1 mapdl.finish(mute=True) mapdl.eplot() .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /verif-manual/images/sphx_glr_vm-011-residual-stress-problem_001.png :alt: vm 011 residual stress problem :srcset: /verif-manual/images/sphx_glr_vm-011-residual-stress-problem_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/runner/work/pymapdl-examples/pymapdl-examples/doc/source/verif-manual/images/sphx_glr_vm-011-residual-stress-problem_001.vtksz .. GENERATED FROM PYTHON SOURCE LINES 149-152 Solve ~~~~~ Enter solution mode and run the simulation. .. GENERATED FROM PYTHON SOURCE LINES 152-156 .. code-block:: Python mapdl.slashsolu() mapdl.solve() mapdl.finish(mute=True) .. GENERATED FROM PYTHON SOURCE LINES 157-160 Post-processing ~~~~~~~~~~~~~~~ Enter post-processing. .. GENERATED FROM PYTHON SOURCE LINES 160-195 .. code-block:: Python # Enter the post-processing routine. mapdl.post1() q = mapdl.queries bot_node = q.node(0, -100, 0) def_node = mapdl.get_value("NODE", bot_node, "U", "Y") mapdl.finish() mapdl.slashsolu() mapdl.autots("ON") # TURN ON AUTOMATIC LOAD STEPPING mapdl.nsubst(10) mapdl.outpr(freq=10) mapdl.f(4, "FY", -81961.5) # APPLY LOAD F2 mapdl.solve() mapdl.nsubst(5) mapdl.outpr(freq=5) mapdl.fdele(4, "FY") # REMOVE LOAD F2 mapdl.solve() mapdl.finish() mapdl.post1() mapdl.etable("STRS", "LS", 1) strss = mapdl.get_value("ELEM", 2, "ETAB", "STRS") message = f""" ------------------- VM11 RESULTS COMPARISON --------------------- TARGET | TARGET | ANSYS | RATIO Def at F1 (in) {-0.07533:.5f} {def_node:.5f} {abs(def_node/0.07533):.5f} Stress (psi) {-5650:.5f} {strss:.5f} {abs(strss/-5650):.5f} ----------------------------------------------------------------- """ print(message) mapdl.finish() .. rst-class:: sphx-glr-script-out .. code-block:: none ------------------- VM11 RESULTS COMPARISON --------------------- TARGET | TARGET | ANSYS | RATIO Def at F1 (in) -0.07533 -0.07534 1.00011 Stress (psi) -5650.00000 -5650.34424 1.00006 ----------------------------------------------------------------- EXIT THE MAPDL POST1 DATABASE PROCESSOR ***** ROUTINE COMPLETED ***** CP = 0.000 .. GENERATED FROM PYTHON SOURCE LINES 196-197 Stop MAPDL. .. GENERATED FROM PYTHON SOURCE LINES 197-198 .. code-block:: Python mapdl.exit() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.740 seconds) .. _sphx_glr_download_verif-manual_vm-011-residual-stress-problem.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: vm-011-residual-stress-problem.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: vm-011-residual-stress-problem.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_