diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 00000000..844be15e --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: db6c102188b85d5df54a00f7531d1e7d +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ + diff --git a/404.html b/404.html new file mode 100644 index 00000000..8c21d6f8 --- /dev/null +++ b/404.html @@ -0,0 +1,520 @@ + + + + + + + + + + Page not found — PyMAPDL Examples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ +
+ +
+ + +
+
+ + + + + +
+ +

Page not found

+ +Unfortunately we couldn't find the content you were looking for. + +
+ + + + + +
+ + + +
+ + +
+ + +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..e83b0b1a --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +examples.mapdl.docs.pyansys.com \ No newline at end of file diff --git a/_downloads/0caf39f9a9c8374b355335cab7490dab/vm-020.ipynb b/_downloads/0caf39f9a9c8374b355335cab7490dab/vm-020.ipynb new file mode 100644 index 00000000..b1604852 --- /dev/null +++ b/_downloads/0caf39f9a9c8374b355335cab7490dab/vm-020.ipynb @@ -0,0 +1,205 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Cylindrical Membrane Under Pressure {#ref_vm20}\n===================================\n\nProblem description:\n\n: - A long cylindrical membrane container of diameter d and wall\n thickness t is subjected to a uniform internal pressure P.\n Determine the axial stress $\\sigma_1$ and the hoop stress\n $\\sigma_2$ in the container. See VM13 for the problem sketch.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part II, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1956, pg. 121, article 25.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 4-Node Finite Strain Shell Elements (SHELL181)\n\n![VM20 Cylindrical Membrane Problem Sketch](../_static/vm20_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n\nGeometric properties:\n\n: - $d = 120 in$\n - $t = 1 in$\n\nLoading:\n\n: - $p = 500 psi$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - An arbitrary axial length is selected. Since the problem is\n axisymmetric, only a one element sector is needed. A small angle\n $\\theta$ = 10\u00b0 is used for approximating the circular boundary\n with a straight-sided element. Nodal coupling is used at the\n boundaries. An axial traction of 15,000 psi is applied to the\n edge of the element to simulate the closed-end effect. The\n internal pressure is applied as an equivalent negative pressure\n on the exterior (face 1) of the element.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm20_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear the existing database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the VM20 verification\nmapdl.run(\"/VERIFY,VM20\")\n\n# Set the analysis title\nmapdl.title(\"VM20 CYLINDRICAL MEMBRANE UNDER PRESSURE\")\n\n# Enter the model creation /Prep7 preprocessor\nmapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and section properties\n==========================================\n\nUse 4-Node Structural Shell element (SHELL181) for finite strain\nmembrane. Specify key option for membrane stiffness only via setting\nKeyopt(1)=1. Include full integration via setting Keyopt(3)=2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"SHELL181\") # Define element type as SHELL181\nmapdl.keyopt(1, 1, 1) # Set key option for membrane stiffness only\nmapdl.keyopt(1, 3, 2) # Set key option for full integration\nmapdl.sectype(1, \"SHELL\") # Section type SHELL\nmapdl.secdata(1, 1) # Define section data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio NUXY of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6) # Define modulus of elasticity\nmapdl.mp(\"NUXY\", 1, 0.3) # Define Poisson's ratio" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.csys(1) # Define cylindrical coordinate system\n\nmapdl.n(1, 60) # Define nodes\n\n# Define additional node with translation\nmapdl.n(2, 60, \"\", 10)\n\n# Generate additional nodes from an existing pattern\nmapdl.ngen(2, 2, 1, 2, 1, \"\", 10)\n\n# Rotate nodal coordinate system to cylindrical\nmapdl.nrotat(\"ALL\")\n\n# Define elements\nmapdl.e(1, 2, 4, 3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define coupling and boundary conditions\n=======================================\n\nApply couplings and fix UZ displacement at specific node and UY\ndisplacement for all nodes. Specify axial traction= -15000 psi and\ninternal pressure= -500 psi on elements uaing SFE command. Then exit\nprep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.cp(1, \"UX\", 1, 2, 3, 4) # Couple radial displacements\nmapdl.cp(2, \"UZ\", 2, 4) # Couple UZ displacements\n\nmapdl.d(1, \"UZ\", \"\", \"\", 3, 2) # Fix UZ displacement at specific node\nmapdl.d(\"ALL\", \"UY\") # Fix UY displacement for all nodes\n\nmapdl.sfe(1, 4, \"PRES\", \"\", -15000) # Apply axial traction on elements\nmapdl.sfe(1, 1, \"PRES\", \"\", -500) # Apply internal pressure on elements\n\n# Selects all entities\nmapdl.allsel()\n# Element plot\nmapdl.eplot(background=\"w\")\n\n# Finish the preprocessing steps\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n\nmapdl.outpr(\"NSOL\", 1) # Output the nodal solution\nmapdl.outpr(\"RSOL\", 1) # Output the result summary\n\n# Perform the solution\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute stress quantities.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Get hoop stresses at node 1\nstrs_hop = mapdl.get(\"STRS_HOP\", \"NODE\", 1, \"S\", 2)\n# Get axial stresses at node 1\nstrs_ax = mapdl.get(\"STRS_AX\", \"NODE\", 1, \"S\", 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_stress = [15000, 29749]\n\n# Fill result values\nsim_res = [strs_hop, strs_ax]\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Stress_1 (psi)\", \"Stress_2 (psi)\"]\n\ndata = [target_stress, sim_res, np.abs(target_stress) / np.abs(sim_res)]\n\ntitle = f\"\"\"\n\n------------------- VM20 RESULTS COMPARISON ---------------------\n\n\"\"\"\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/1b2fe1a2634b81f14b7232f4724579a8/vm-007-plastic_compression_of_a_pipe_assembly.ipynb b/_downloads/1b2fe1a2634b81f14b7232f4724579a8/vm-007-plastic_compression_of_a_pipe_assembly.ipynb new file mode 100644 index 00000000..62d07d37 --- /dev/null +++ b/_downloads/1b2fe1a2634b81f14b7232f4724579a8/vm-007-plastic_compression_of_a_pipe_assembly.ipynb @@ -0,0 +1,313 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plastic compression of a pipe assembly {#ref_vm7_example}\n======================================\n\nProblem description:\n\n: - Two coaxial tubes, the inner one of 1020 CR steel and\n cross-sectional area $A_{\\mathrm{s}}$, and the outer one of\n 2024-T4 aluminum alloy and of area $A_{\\mathrm{a}}$, are\n compressed between heavy, flat end plates, as shown below.\n Determine the load-deflection curve of the assembly as it is\n compressed into the plastic region by an axial displacement.\n Assume that the end plates are so stiff that both tubes are\n shortened by exactly the same amount.\n\nReference:\n\n: - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics of\n Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 180,\n ex. 5.1.\n\nAnalysis type(s):\n\n: - Static, Plastic Analysis (`ANTYPE=0`)\n\nElement type(s):\n\n: - Plastic Straight Pipe Element (PIPE288)\n - 4-Node Finite Strain Shell (SHELL181)\n - 3-D Structural Solid Elements (SOLID185)\n\n![VM7 Finite Element Models](../_static/vm7_setup_2.png){width=\"400px\"}\n\nMaterial properties\n\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 Material Model](../_static/vm7_setup_1.png){width=\"300px\"}\n\nGeometric properties:\n\n: - $l = 10\\,in$\n - $A_{\\mathrm{s}} = 7\\,in^2$\n - $A_{\\mathrm{a}} = 12\\,in^2$\n\nLoading:\n\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 Problem Sketch](../_static/vm7_setup.png){width=\"300px\"}\n\nAnalysis assumptions and modeling notes:\n\n: - The following tube dimensions, which provide the desired\n cross-sectional areas, are arbitrarily chosen:\n - Inner (steel) tube: inside radius = 1.9781692 in., wall\n thickness = 0.5 in.\n - Outer (aluminum) tube: inside radius = 3.5697185 in., wall\n thickness = 0.5 in.\n - The problem can be solved in three ways:\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 - In the SOLID185 and SHELL181 cases, since the problem is\n axisymmetric, only a one element $\\theta$ -sector is modeled. A\n small angle $\\theta = 6\u00b0$ is arbitrarily chosen to reasonably\n approximate the circular boundary with straight sided elements.\n The nodes at the boundaries have the `UX` (radial) degree of\n freedom coupled. In the SHELL181 model, the nodes at the\n boundaries additionally have the `ROTY` degree of freedom\n coupled.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm7_setup.png'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL and import Numpy and Pandas libraries.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.mapdl.core import launch_mapdl\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\n# Start MAPDL.\nmapdl = launch_mapdl()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing\n==============\n\nEnter verification example mode and the pre-processing routine.\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\n===================\n\nSet up the element types .\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\n===============\n\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:\n $\\sigma_{\\mathrm{(yp)a}} = 55000\\,psi$,\n- Poisson\\'s ratio is: $\\nu = 0.3$\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\n==========================\n\nUse Matplotlib library to plot material model curves of steel and\naluminum.\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\n==============\n\nSet up the cross-section properties for a shell and pipe elements.\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\n===============\n\nSet up the nodes and create the elements through the nodes.\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 the inside (steel) tube.\nmapdl.type(2)\nmapdl.mat(1)\nmapdl.e(101, 102, 112, 111, 105, 106, 116, 115)\n\n# Create elements for the 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\n==========================\n\nApplication of boundary conditions (BC) for simplified axisymmetric\nmodel.\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 direction 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\n=====\n\nEnter solution mode and solve the system.\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\n===============\n\nEnter post-processing.\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\n=============\n\nSet up the function to get load values of each load step of the\nsimplified axisymmetric model and convert it to the full model.\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\n================================\n\nObtain the loads of the model using `getload()`{.interpreted-text\nrole=\"func\"} function.\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\n=============\n\nFinally we have the results of the loads for the simplified axisymmetric\nmodel, which can be compared with expected target values for models with\n`PIPE288`, `SOLID185`, and `SHELL181` elements. Loads expected for each\nload step are:\n\n- 1st load step with deflection $\\delta = 0.032 (in)$ has\n $load_1 = 1024400\\,(lb)$.\n- 2nd load step with deflection $\\delta = 0.05 (in)$ has\n $load_2 = 1262000\\,(lb)$.\n- 3rd load step with deflection $\\delta = 0.1 (in)$ has\n $load_3 = 1262000\\,(lb)$.\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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/1f3980b5f444e19c0c120453e4cc4d18/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py b/_downloads/1f3980b5f444e19c0c120453e4cc4d18/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py new file mode 100644 index 00000000..68f92eea --- /dev/null +++ b/_downloads/1f3980b5f444e19c0c120453e4cc4d18/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py @@ -0,0 +1,395 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm9_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL and import Numpy and Pandas libraries. + +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Start MAPDL. +mapdl = launch_mapdl() + + +############################################################################### +# Pre-processing +# ~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + +mapdl.clear() +mapdl.verify() +mapdl.prep7(mute=True) + + +############################################################################### +# 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. + +# 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 + + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element types. + +# 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()) + + +############################################################################### +# 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. + +# 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()) + + +############################################################################### +# Define nodes +# ~~~~~~~~~~~~ +# Set up the nodes coordinates using python ``for`` loop. + +# 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()) + + +############################################################################### +# Create elements +# ~~~~~~~~~~~~~~~ +# Create the elements through the nodes. + +# 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()) + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Application of boundary conditions (BC) for the spring model. + +# 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) + + +############################################################################### +# Solution settings +# ~~~~~~~~~~~~~~~~~ +# Enter solution mode and apply settings for *Transient Dynamic Analysis*. + +# 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) + + +############################################################################### +# Solve +# ~~~~~ +# Solve the system , avoiding the printing output. + +# Run the simulation. +mapdl.solve() +mapdl.finish(mute=True) + + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing, avoiding the printing output. + +# Enter the post-processing mode. +mapdl.post1(mute=True) + + +############################################################################### +# 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 `. + +# 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") + + +############################################################################### +# 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: + +# 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() + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/26a2918c0fedb4785d2e8cde4afa6aaf/vm-014.py b/_downloads/26a2918c0fedb4785d2e8cde4afa6aaf/vm-014.py new file mode 100644 index 00000000..0dcdce4a --- /dev/null +++ b/_downloads/26a2918c0fedb4785d2e8cde4afa6aaf/vm-014.py @@ -0,0 +1,226 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm14: + +Large Deflection Eccentric Compression of Slender Column +-------------------------------------------------------- +Problem description: + - Find the deflection :math:`\delta` at the middle and the maximum tensile and compressive stresses + in an eccentrically compressed steel strut of length L. The cross-section is a channel + with the dimensions shown in the diagram. The ends are pinned at the point of load application. + The distance between the centroid and the back of the channel is e, and the compressive force F + acts in the plane of the back of the channel and in the symmetry plane of the channel. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 263, problem 1. + +Analysis type(s): + - Static, Large Deflection Analysis ``ANTYPE=0`` + +Element type(s): + - Elastic Tapered Unsymmetric Beam Elements (BEAM188) + +.. image:: ../_static/vm14_setup.png + :width: 400 + :alt: VM14 Slender Column Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`L = 10 ft` + - :math:`h = 8 in` + - :math:`s = 0.22 in` + - :math:`t = 0.39 in` + - :math:`e = 0.6465 in` + - :math:`b = 2.26 in` + +Loading: + - :math:`F = 4000 lb` + +Analysis Assumptions and Modeling Notes: + - Only one-half of the structure is modeled because of symmetry. + The boundary conditions for the equivalent half model become fixed-free. + Large deflection is needed since the stiffness of the structure and the + loading change significantly with deflection. The offset e is defined in + the element coordinate system. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm14_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import pandas + +# Launch MAPDL with specified settings +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear any existing database +mapdl.clear() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Run the /VERIFY command for VM14 +mapdl.run("/VERIFY,VM14") + +# Set the title of the analysis +mapdl.title("VM14 LARGE DEFLECTION ECCENTRIC COMPRESSION OF SLENDER COLUMN") + +# Enter the model creation preprocessor +mapdl.prep7(mute=True) + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 3D 2-Node Beam element (Beam188) and set cubic shape function Keyopt(3)=3. + +mapdl.et(1, "BEAM188", "", "", 3) # Element type BEAM188 +mapdl.sectype(1, "BEAM", "CHAN") # Section type BEAM CHAN +mapdl.secdata(2.26, 2.26, 8, 0.39, 0.39, 0.22) # Section data +mapdl.secoffset("USER", "", 0.6465) # Section offset + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio of 0.3 is specified. + +mapdl.mp("EX", 1, 30e6) +mapdl.mp("PRXY", 1, 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1) # Node 1 +mapdl.n(5, "", 60) # Node 5 at 60 degrees + +# Generate additional nodes +mapdl.fill() + +# Define element connectivity +mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + +# Generates elements from an existing pattern +mapdl.egen(4, 1, 1) + +############################################################################### +# Define coupling and boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all degrees of freedom for node 1. Apply a negative force 4000 lb in FY +# direction at node 5. Apply symmetry boundary condition along z-direction. +# Then exit prep7 processor. +# +# Effectively, this sets: +# :math:`F = 4000 lb` + +mapdl.d(1, "ALL") # Fix all degrees of freedom for node 1 +mapdl.f(5, "FY", -4000) # Apply a negative force FY to node 5 +mapdl.dsym("SYMM", "Z") # Apply symmetry boundary condition in Z-direction + +# select all entities +mapdl.allsel() +# element plot +mapdl.eplot() + +# Finish the pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.slashsolu() + +# Activate large deflections +mapdl.nlgeom("ON") + +# Set convergence tolerances +mapdl.cnvtol("F", "", 1e-4) +mapdl.cnvtol("M", "", 1e-4) + +mapdl.solve() # starts a solution +mapdl.finish() # exists solution processor + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components. + +mapdl.post1() + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +end_node = q.node(0, 60, 0) + +############################################################################### +# Retrieve nodal deflection and section stresses +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +deflection = mapdl.get("DEF", "NODE", end_node, "U", "X") # Nodal deflection +strss_tens = float( + mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")[:11] +) # Maximum section tensile stress +strss_comp = float( + mapdl.get("STS_COMP", "SECR", 1, "S", "X", "MIN")[:11] +) # Minimum section compressive stress + +# Fill the array with target values +target_def = 0.1086 +target_tens = 1803.63 +target_comp = -2394.53 + +data = [ + [target_def, deflection, target_def / deflection], + [target_tens, strss_tens, target_tens / strss_tens], + [target_comp, strss_comp, target_comp / strss_comp], +] +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["DEFLECTION (in)", "STRSS_TENS (psi)", "STRSS_COMP (psi)"] + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +print(pandas.DataFrame(data, row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/2bf04b33de8062f8b71d688b35bce139/vm-295.ipynb b/_downloads/2bf04b33de8062f8b71d688b35bce139/vm-295.ipynb new file mode 100644 index 00000000..c3eaf58b --- /dev/null +++ b/_downloads/2bf04b33de8062f8b71d688b35bce139/vm-295.ipynb @@ -0,0 +1,259 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "One Dimensional Terzaghi\\'s Consolidation Problem with Permeability as Function of Depth {#ref_vm295}\n========================================================================================\n\nProblem description:\n\n: - The test case is to simulate a one-dimensional Terzaghi\\'s\n problem with permeability as a function of the soil depth. A\n pressure P is applied on the top surface of the soil with depth\n H and width W. The top surface of the soil is fully permeable\n and the permeability decreases linearly with depth. The excess\n pore water pressure for 0.1, 0.2, 0.3, 0.4, and 0.5 day is\n calculated and compared against the reference results obtained\n using the PIM method (Figure 5, pg. 5916).\n\nReference:\n\n: - A POINT INTERPOLATION METHOD FOR SIMULATING DISSIPATION PROCESS\n OF CONSOLIDATION, J.G.WANG, G.R.LIU, Y.G.WU, COMPUTER METHODS IN\n APPLIED MECHANICS AND ENGINEERING 190 (2001),PG: 5907-5922\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2D 4-Node Coupled Pore-Pressure Element (CPT212)\n\n![VM295 Problem Sketch](../_static/vm295_setup.png){width=\"100px\"}\n\nMaterial properties:\n\n: - Youngs modulus, $E = 4 \\cdot 10^7 Pa$\n - Poissons ratio, $\\mu = 0.3$\n - Permeability value at bottom of the soil,\n $fpx = 1.728 \\cdot 10^-3 m/day$\n - Permeability value at the top of the soil = $100 * fpx$\n\nGeometric properties:\n\n: - Height, $H = 16 m$\n - Width, $W = 1 m$\n\nLoading:\n\n: - Pressure, $P = 1 \\cdot 10^4 Pa$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - The soil is modeled using 2D CPT212 elements with plane strain\n element behavior. The UX degree of freedom for all nodes is\n constrained and the UY degree of freedom at the bottom of the\n soil is constrained. The pressure degree of freedom at the top\n edge is constrained to make it fully permeable. Linearly varying\n permeability of the soil is defined using the TB,PM material\n model. Static analysis is performed with an end time of 86400\n seconds (1 day) and with stepped pressure loading P on the top\n edge of the soil. The excess water pore pressure at depth H = 6\n m is computed for 0.1 (8640 s), 0.2 (17280 s), 0.3 (25920 s),\n 0.4 (34560 s), and 0.5 days (43200 s) by interpolating the\n solution obtained at the nearest time points.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm295_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n# Clear the current database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command for VM295\nmapdl.run(\"/VERIFY,VM295\")\n\n# Set the title of the analysis\nmapdl.title(\n \"VM295 1D TERZAGHI'S CONSOLIDATION PROBLEM WITH PERMEABILITY AS FUNCTION OF DEPTH\"\n)\n\n# Entering the PREP7 environment in MAPDL\nmapdl.prep7(mute=True)\n\n# Set Parameters\nday = 24 * 3600 # SECONDS IN ONE DAY\nh = 16 # TOTAL DEPTH OF SOIL IN METERS\nw = 1 # WIDTH OF SOIL IN METERS\npres = 1e4 # PRESSURE IN PA\nex = 4e7 # YOUNG'S MODULUS IN PA\ntt = 1 * day" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2D 4 NOode Coupled Pore Pressure Element (CPT212) and set PLANE\nSTRAIN Formulation Keyopt(3)=2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"CPT212\")\nmapdl.keyopt(1, 12, 1)\nmapdl.keyopt(1, 3, 2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 4e7 and Poisson\\'s ratio of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, ex)\nmapdl.mp(\"NUXY\", 1, 0.3)\n\n# Set parameters\nfpx = 1.728e-3 / day / 1e4 # PERMEABILITY FROM REFERENCE\none = 1.0\n\n# Define TB material properties\nmapdl.tb(\"PM\", 1, \"\", \"\", \"PERM\") # DEFINING PERMEABILITY FOR THE SOIL\nmapdl.tbfield(\"YCOR\", 0) # LOCATION Y = 0\nmapdl.tbdata(1, fpx, fpx, fpx) # PERMEABILITY VALUES AT LOCATION Y=0\nmapdl.tbfield(\"YCOR\", h) # LOCATION Y=16\n# PERMEABILITY VALUES AT LOCATION Y=16, LINEAR VARIABLE PERMEABILITY\nmapdl.tbdata(1, fpx * 100, fpx * 100, fpx * 100)\nmapdl.tb(\"PM\", 1, \"\", \"\", \"BIOT\") # DEFINING BIOT COEFFICINET FOR SOIL\nmapdl.tbdata(1, one) # BIOT COEFFICIENT" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.rectng(0, w, 0, h) # Generate rectangle\n# Specifies the divisions and spacing ratio on unmeshed lines\nmapdl.lesize(4, \"\", \"\", 16)\nmapdl.lesize(3, \"\", \"\", 1)\n# For elements that support multiple shapes, specifies the element shape, set mshape=2D\nmapdl.mshape(0, \"2D\")\nmapdl.mshkey(1) # Key(1) = Specifies mapped meshing should be used to mesh\nmapdl.amesh(1) # CREATING CPT212 ELEMENTS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nFix UX degrees of freedom. Constraining UY DOF AT Location Y=0. Defining\nthe top portion of the soil as permeable. Then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(\"ALL\", \"UX\", 0) # CONSTRAINING ALL UX DOF\n\nmapdl.nsel(\"S\", \"LOC\", \"Y\", 0)\nmapdl.d(\"ALL\", \"UY\", 0) # CONSTRAINING UY DOF AT LOCATION Y=0\nmapdl.nsel(\"ALL\")\n\nmapdl.nsel(\"S\", \"LOC\", \"Y\", h)\nmapdl.d(\"ALL\", \"PRES\", 0) # DEFINING THE TOP PORTION OF SOIL AS PERMEABLE\n# selects all nodes\nmapdl.nsel(\"ALL\")\n# selects all element\nmapdl.esel(\"ALL\")\nmapdl.aplot()\n\n# Finish pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\nmapdl.antype(\"STATIC\") # Performing static analysis\nmapdl.nropt(\"UNSYM\") # UNSYMMETRIC NEWTON RAPHSON OPTION\nmapdl.time(tt) # END TIME\n\nmapdl.nsel(\"S\", \"LOC\", \"Y\", h)\n# APPLYING Surface PRESSURE LOAD AT TOP OF THE SOIL\nmapdl.sf(\"ALL\", \"PRES\", pres)\n# selects all nodes\nmapdl.nsel(\"ALL\")\n\n# Specify number of SUBSTEPS\nmapdl.nsubst(nsbstp=350, nsbmx=1000, nsbmn=150)\n\n# Controls the solution data written to the database.\nmapdl.outres(\"ALL\", \"ALL\")\nmapdl.kbc(1) # STEPPED LOADING\n\n# SOLVE STATIC ANALYSIS\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n# Set the current results set to the last set to be read from result file\nmapdl.set(\"LAST\")\n# redirects output to the default system output file\nmapdl.run(\"/OUT\")\n# reactivates suppressed printout\nmapdl.gopr()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Specify Reference Solution\n==========================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.com(\"\")\nmapdl.com(\"EXCESS PORE PRESSURE IN KILOPASCALS AT LOCATION X=1,Y=6\")\nmapdl.com(\"FOR 0.1 DAY (8640 SECONDS),0.2 DAY (17280 SECONDS)\")\nmapdl.com(\"0.3 DAY (25920 SECONDS), 0.4 DAY (34560 SECONDS)\")\nmapdl.com(\"AND 0.5 DAY (43200 SECONDS) ARE COMPUTED AND COMPARED\")\nmapdl.com(\"AGAINST REFERENCE SOLUTION\")\nmapdl.com(\"\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nnd1 = q.node(1.0, 6.0, 0.0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing: Compute pore pressure\n======================================\n\nredirects solver output to a file named \\\"SCRATCH\\\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.run(\"/OUT,SCRATCH\")\n# Specify load set to read from the result file, load step =1, sub-step=16\nmapdl.set(1, 16)\np11 = mapdl.get(\"P11\", \"NODE\", nd1, \"PRES\")\nt11 = mapdl.get(\"T11\", \"ACTIVE\", 0, \"SET\", \"TIME\")\n# Specify load set to read from the result file, load step =1, sub-step=17\nmapdl.set(1, 17)\np12 = mapdl.get(\"P12\", \"NODE\", nd1, \"PRES\")\nt12 = mapdl.get(\"T12\", \"ACTIVE\", 0, \"SET\", \"TIME\")\nt1 = day * 0.1\nmapdl.com(\"\")\nmapdl.com(\"INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.1DAY\")\nmapdl.com(\"\")\npt1 = (p11 + (t1 - t11) / (t12 - t11) * (p12 - p11)) / 1e3\n# Specify load set to read from the result file, load step =1, sub-step=31\nmapdl.set(1, 31)\np21 = mapdl.get(\"P21\", \"NODE\", nd1, \"PRES\")\nt21 = mapdl.get(\"T21\", \"ACTIVE\", 0, \"SET\", \"TIME\")\n# Specify load set to read from the result file, load step =1, sub-step=32\nmapdl.set(1, 32)\np22 = mapdl.get(\"P22\", \"NODE\", nd1, \"PRES\")\nt22 = mapdl.get(\"T22\", \"ACTIVE\", 0, \"SET\", \"TIME\")\nt2 = day * 0.2\nmapdl.com(\"\")\nmapdl.com(\"INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.2DAY\")\nmapdl.com(\"\")\npt2 = (p21 + (t2 - t21) / (t22 - t21) * (p22 - p21)) / 1e3\n# Specify load set to read from the result file, load step =1, sub-step=46\nmapdl.set(1, 46)\np31 = mapdl.get(\"P31\", \"NODE\", nd1, \"PRES\")\nt31 = mapdl.get(\"T31\", \"ACTIVE\", 0, \"SET\", \"TIME\")\n# Specify load set to read from the result file, load step =1, sub-step=47\nmapdl.set(1, 47)\np32 = mapdl.get(\"P32\", \"NODE\", nd1, \"PRES\")\nt32 = mapdl.get(\"T32\", \"ACTIVE\", 0, \"SET\", \"TIME\")\nt3 = day * 0.3\nmapdl.com(\"\")\nmapdl.com(\"INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.3DAY\")\nmapdl.com(\"\")\npt3 = (p31 + (t3 - t31) / (t32 - t31) * (p32 - p31)) / 1e3\n# Specify load set to read from the result file, load step =1, sub-step=61\nmapdl.set(1, 61)\np41 = mapdl.get(\"P41\", \"NODE\", nd1, \"PRES\")\nt41 = mapdl.get(\"T41\", \"ACTIVE\", 0, \"SET\", \"TIME\")\n# Specify load set to read from the result file, load step =1, sub-step=62\nmapdl.set(1, 62)\np42 = mapdl.get(\"P42\", \"NODE\", nd1, \"PRES\")\nt42 = mapdl.get(\"T42\", \"ACTIVE\", 0, \"SET\", \"TIME\")\nt4 = day * 0.4\nmapdl.com(\"\")\nmapdl.com(\"INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.4DAY\")\nmapdl.com(\"\")\npt4 = (p41 + (t4 - t41) / (t42 - t41) * (p42 - p41)) / 1e3\n# Specify load set to read from the result file, load step =1, sub-step=76\nmapdl.set(1, 76)\np51 = mapdl.get(\"P51\", \"NODE\", nd1, \"PRES\")\nt51 = mapdl.get(\"T51\", \"ACTIVE\", 0, \"SET\", \"TIME\")\n# Specify load set to read from the result file, load step =1, sub-step=77\nmapdl.set(1, 77)\np52 = mapdl.get(\"P52\", \"NODE\", nd1, \"PRES\")\nt52 = mapdl.get(\"T52\", \"ACTIVE\", 0, \"SET\", \"TIME\")\nt5 = day * 0.5\nmapdl.com(\"\")\nmapdl.com(\"INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.5DAY\")\nmapdl.com(\"\")\npt5 = (p51 + (t5 - t51) / (t52 - t51) * (p52 - p51)) / 1e3\n# Store result values in array\nP = np.array([pt1, pt2, pt3, pt4, pt5])\n\n# REFERENCE RESULTS, FIGURE 5, PG 5916\n# Fill the Target Result Values in array\nTarget_CP = np.array([5.230, 2.970, 1.769, 1.043, 0.632])\n\n# store ratio\nRT = []\nfor i in range(len(Target_CP)):\n a = P[i] / Target_CP[i]\n RT.append(a)\n\n# assign labels for days\nlabel = np.array([0.1, 0.2, 0.3, 0.4, 0.5])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "message = f\"\"\"\n------------------- VM295 RESULTS COMPARISON ---------------------\n Time (day) | TARGET (kPa) | Mechanical APDL | RATIO\n-----------------------------------------------------------------\n\"\"\"\nprint(message)\n\nfor i in range(len(Target_CP)):\n message = f\"\"\"\n {label[i]:.5f} {Target_CP[i]:.5f} {P[i]:.5f} {RT[i]:.5f}\n \"\"\"\n print(message)\n\nmessage = f\"\"\"\n-----------------------------------------------------------------\n\"\"\"\nprint(message)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/2c78093c230ad473de2ae5b074838077/vm-014.ipynb b/_downloads/2c78093c230ad473de2ae5b074838077/vm-014.ipynb new file mode 100644 index 00000000..91a5ff16 --- /dev/null +++ b/_downloads/2c78093c230ad473de2ae5b074838077/vm-014.ipynb @@ -0,0 +1,241 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Large Deflection Eccentric Compression of Slender Column {#ref_vm14}\n========================================================\n\nProblem description:\n\n: - Find the deflection $\\delta$ at the middle and the maximum\n tensile and compressive stresses in an eccentrically compressed\n steel strut of length L. The cross-section is a channel with the\n dimensions shown in the diagram. The ends are pinned at the\n point of load application. The distance between the centroid and\n the back of the channel is e, and the compressive force F acts\n in the plane of the back of the channel and in the symmetry\n plane of the channel.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 263, problem 1.\n\nAnalysis type(s):\n\n: - Static, Large Deflection Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - Elastic Tapered Unsymmetric Beam Elements (BEAM188)\n\n![VM14 Slender Column Problem Sketch](../_static/vm14_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n\nGeometric properties:\n\n: - $L = 10 ft$\n - $h = 8 in$\n - $s = 0.22 in$\n - $t = 0.39 in$\n - $e = 0.6465 in$\n - $b = 2.26 in$\n\nLoading:\n\n: - $F = 4000 lb$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - Only one-half of the structure is modeled because of symmetry.\n The boundary conditions for the equivalent half model become\n fixed-free. Large deflection is needed since the stiffness of\n the structure and the loading change significantly with\n deflection. The offset e is defined in the element coordinate\n system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm14_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport pandas\n\n# Launch MAPDL with specified settings\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear any existing database\nmapdl.clear()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Run the /VERIFY command for VM14\nmapdl.run(\"/VERIFY,VM14\")\n\n# Set the title of the analysis\nmapdl.title(\"VM14 LARGE DEFLECTION ECCENTRIC COMPRESSION OF SLENDER COLUMN\")\n\n# Enter the model creation preprocessor\nmapdl.prep7(mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 3D 2-Node Beam element (Beam188) and set cubic shape function\nKeyopt(3)=3.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"BEAM188\", \"\", \"\", 3) # Element type BEAM188\nmapdl.sectype(1, \"BEAM\", \"CHAN\") # Section type BEAM CHAN\nmapdl.secdata(2.26, 2.26, 8, 0.39, 0.39, 0.22) # Section data\nmapdl.secoffset(\"USER\", \"\", 0.6465) # Section offset" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"PRXY\", 1, 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1) # Node 1\nmapdl.n(5, \"\", 60) # Node 5 at 60 degrees\n\n# Generate additional nodes\nmapdl.fill()\n\n# Define element connectivity\nmapdl.e(1, 2) # Element 1 with nodes 1 and 2\n\n# Generates elements from an existing pattern\nmapdl.egen(4, 1, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define coupling and boundary conditions\n=======================================\n\nFix all degrees of freedom for node 1. Apply a negative force 4000 lb in\nFY direction at node 5. Apply symmetry boundary condition along\nz-direction. Then exit prep7 processor.\n\nEffectively, this sets:\n\n: $F = 4000 lb$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(1, \"ALL\") # Fix all degrees of freedom for node 1\nmapdl.f(5, \"FY\", -4000) # Apply a negative force FY to node 5\nmapdl.dsym(\"SYMM\", \"Z\") # Apply symmetry boundary condition in Z-direction\n\n# select all entities\nmapdl.allsel()\n# element plot\nmapdl.eplot()\n\n# Finish the pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Activate large deflections\nmapdl.nlgeom(\"ON\")\n\n# Set convergence tolerances\nmapdl.cnvtol(\"F\", \"\", 1e-4)\nmapdl.cnvtol(\"M\", \"\", 1e-4)\n\nmapdl.solve() # starts a solution\nmapdl.finish() # exists solution processor" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nend_node = q.node(0, 60, 0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Retrieve nodal deflection and section stresses\n==============================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "deflection = mapdl.get(\"DEF\", \"NODE\", end_node, \"U\", \"X\") # Nodal deflection\nstrss_tens = float(\n mapdl.get(\"STS_TENS\", \"SECR\", 1, \"S\", \"X\", \"MAX\")[:11]\n) # Maximum section tensile stress\nstrss_comp = float(\n mapdl.get(\"STS_COMP\", \"SECR\", 1, \"S\", \"X\", \"MIN\")[:11]\n) # Minimum section compressive stress\n\n# Fill the array with target values\ntarget_def = 0.1086\ntarget_tens = 1803.63\ntarget_comp = -2394.53\n\ndata = [\n [target_def, deflection, target_def / deflection],\n [target_tens, strss_tens, target_tens / strss_tens],\n [target_comp, strss_comp, target_comp / strss_comp],\n]\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"DEFLECTION (in)\", \"STRSS_TENS (psi)\", \"STRSS_COMP (psi)\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(pandas.DataFrame(data, row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/2dcc244e61b4dce659fd4000aa55e873/vm-299.py b/_downloads/2dcc244e61b4dce659fd4000aa55e873/vm-299.py new file mode 100644 index 00000000..8e1530dd --- /dev/null +++ b/_downloads/2dcc244e61b4dce659fd4000aa55e873/vm-299.py @@ -0,0 +1,323 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm299: + +Sound Diffusion in a Flat Room +------------------------------ +Problem description: + - Sound diffusion is modeled in a flat room of size 30 x 30 x 3 :math:`m^3`. A sound source + is placed at (2,2,1) with a sound power level of :math:`1 \cdot 10^-2 W`. The wall absorption + coefficient is equal to 0.1. The coefficient of atmospheric attenuation is :math:`0.01 m^-1`. + +Reference: + - A.BILLON,J.PICAUT,'INTRODUCING ATMOSPHERIC ATTENUATION + WITHIN A DIFFUSION MODEL FOR ROOM-ACOUSTIC PREDICTIONS MARCH 2008. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 3D 20-Node Acoustic Solid (FLUID220) + +.. image:: ../_static/vm299_setup.png + :width: 400 + :alt: VM299 Finite Element Model of a Flat Room + +Material properties: + - Speed of sound, :math:`c_0 = 343 m/s` + - Density, :math:`\rho = 1.21 kg/m^3` + - Wall absorption coefficient, :math:`\alpha = 0.1` + - Atmospheric attenuation coefficient attn. = :math:`0.01 m^-1` + +Geometric properties: + - Room length = :math:`30 m` + - Room width = :math:`30 m` + - Room height = :math:`3 m` + +Loading: + - Sound power source = :math:`1 \cdot 10^{-2} W` + + +Analysis Assumptions and Modeling Notes: + - Steady analysis is performed to determine the sound pressure level inside the room. + In the post-processing, the sound pressure level (SPL) is listed every 2 m along a line + passing through the room center at 1 m high. The sound pressure level is calculated in + Mechanical APDL as: + + :math:`SPL = 10 \times \log_{10} \times \frac{\rho \times c_0^2 \times w}{P_{ref}^2}` + + where w is diffuse sound energy and reference pressure :math:`P_{ref} = 2 \times 10^{-5}`. +""" # noqa:E501 + +# sphinx_gallery_thumbnail_path = '_static/vm299_setup.png' + +import math + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) +# Clear the current database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command for VM299 +mapdl.run("/VERIFY,VM299") + +# Set the title of the analysis +mapdl.title("VM299 SOUND PRESSURE LEVEL IN A FLAT ROOM") + +# Entering the PREP7 environment in MAPDL +mapdl.prep7() + +# It is not recommended to use '/NOPR' in a normal PyMAPDL session. +mapdl._run("/NOPR") + +# Constant value of PI +pi = math.pi + +# Set parameters for ROOM SIZE +LX = 30 +LY = 30 +LZ = 3 +VOL = LX * LY * LZ +SURF = 2 * (LX * LY + LY * LZ + LX * LZ) +MFP = 4 * VOL / SURF + +# set parameters for MATERIAL PROPERTIES +C0 = 343 +RHO = 1.21 +ROOMD = MFP * C0 / 3 +ATTN_Val = 0.01 +ROOMDP = ROOMD / (1.0 + ATTN_Val * MFP) +ALPHA = 0.1 +WS = 1.0e-2 + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), density, speed of sound +# wall absorption coefficient and Atmospheric attenuation coefficient is specified. + +mapdl.mp("DENS", 1, RHO) +mapdl.mp("SONC", 1, C0) +mapdl.tb("AFDM", 1, "", "", "ROOM") +mapdl.tbdata(1, ROOMDP, ATTN_Val) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. +H = 0.5 +a = np.array([0, 2.0, LX]) +b = np.array([0, 2.0, LY]) +c = np.array([0, 2.0, LZ]) +for i in range(2): + for j in range(2): + for k in range(2): + mapdl.block(a[i], a[i + 1], b[j], b[j + 1], c[k], c[k + 1]) +# mapdl.aplot() + +# Generates new volumes by “gluing” volumes. +mapdl.vglue("ALL") +# Define element, 3-D Acoustic Fluid 20-Node Solid Element +mapdl.et(1, 220, 3, 4) +mapdl.type(1) # set element type, Type=1 +mapdl.mat(1) # set material type, MAT=1 +mapdl.esize(H) # Specifies the element size. + +# Generates nodes and volume elements within volumes. +mapdl.vmesh(9, 15, 1) + +# For elements that support multiple shapes, specifies the element shape, set mshape=3D +mapdl.mshape(0, "3D") +# Generates nodes and volume elements within volumes. +mapdl.vmesh(1) +# select nodes of specified location +mapdl.nsel("S", "LOC", "X", 0) +mapdl.nsel("A", "LOC", "X", LX) +mapdl.nsel("A", "LOC", "Y", 0) +mapdl.nsel("A", "LOC", "Y", LY) +mapdl.nsel("A", "LOC", "Z", 0) +mapdl.nsel("A", "LOC", "Z", LZ) + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define Absorption coefficient and transmission loss.Define Mass source; mass +# source rate; or power source in an energy diffusion solution for room acoustics. +# Then exit prep7 processor. +# +# Effectiely, this sets: +# - Sound power source = :math:`1 \cdot 10^{-2} W` + +mapdl.sf("ALL", "ATTN", ALPHA) +# Selects all entities +mapdl.allsel() +# select nodes of specified location +mapdl.nsel("S", "LOC", "X", a[1]) +mapdl.nsel("R", "LOC", "Y", b[1]) +mapdl.nsel("R", "LOC", "Z", c[1]) + +mapdl.bf("ALL", "MASS", WS) + +# Selects all entities +mapdl.allsel() +mapdl.eplot() +# Finish pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() +# SOLVE STATIC ANALYSIS +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing and read results set + +mapdl.post1() +# Set the current results set to the last set to be read from result file +mapdl.set("LAST") +# Defines a path name and establishes parameters for the path +mapdl.path("X_SPL", 2, "", 15) +mapdl.ppath(1, "NODE", 0, 15, 1) +mapdl.ppath(2, "NODE", 30, 15, 1) +# Interpolates an item onto a path. +mapdl.pdef("UX", "U", "X", "NOAV") +mapdl.pdef("SPLX", "SPL", "", "NOAV") + +# redirects output to the default system output file +mapdl.run("/OUT") + +# Prints path items along a geometry path. +mapdl.prpath("UX", "SPLX") + +# redirects solver output to a file named "SCRATCH" +mapdl.run("/OUT,SCRATCH") +# Sets various line graph display options +# DIVX: Determines the number of divisions (grid markers) that will be plotted on the X +mapdl.gropt("DIVX", 15) +# Specifies a linear ordinate (Y) scale range. +mapdl.yrange(71, 82) +# DIVY: Determines the number of divisions (grid markers) that will be plotted on the Y +mapdl.gropt("DIVY", 11) +# Specifies the device and other parameters for graphics displays. +# Creates PNG (Portable Network Graphics) files that are named Jobnamennn.png +mapdl.show("PNG", "rev") + +mapdl.plpath("UX", "SPLX") # Displays path items on a graph. +mapdl.show("CLOSE") # This option purges the graphics file buffer. + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +n1 = q.node(5, 15, 1) +n2 = q.node(10, 15, 1) +n3 = q.node(15, 15, 1) +n4 = q.node(20, 15, 1) +n5 = q.node(25, 15, 1) + +############################################################################### +# Post-processing: Compute sound pressure level (SPL) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +en_1 = mapdl.get("EN_1", "NODE", n1, "ENKE") +en_2 = mapdl.get("EN_2", "NODE", n2, "ENKE") +en_3 = mapdl.get("EN_3", "NODE", n3, "ENKE") +en_4 = mapdl.get("EN_4", "NODE", n4, "ENKE") +en_5 = mapdl.get("EN_5", "NODE", n5, "ENKE") + +PREF = 2e-5 +x1 = (RHO * en_1 * C0**2) / PREF**2 +x2 = (RHO * en_2 * C0**2) / PREF**2 +x3 = (RHO * en_3 * C0**2) / PREF**2 +x4 = (RHO * en_4 * C0**2) / PREF**2 +x5 = (RHO * en_5 * C0**2) / PREF**2 +SPL_1 = 10 * (math.log10(x1)) +SPL_2 = 10 * (math.log10(x2)) +SPL_3 = 10 * (math.log10(x3)) +SPL_4 = 10 * (math.log10(x4)) +SPL_5 = 10 * (math.log10(x5)) + +# Fill the target tesult values in array +target_ref = np.array([80.0, 79.0, 77.5, 76.0, 74.5]) + +# Fill the simulated result values in array +value = np.array([SPL_1, SPL_2, SPL_3, SPL_4, SPL_5]) + +# store ratio +value_ratio = [] +for i in range(len(target_ref)): + a = value[i] / target_ref[i] + value_ratio.append(a) + +# assign labels position in meter +label = np.array([5, 10, 15, 20, 25]) + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +message = f""" +------------------- VM299 RESULTS COMPARISON --------------------- + SPL at Position, X(m) | TARGET | Mechanical APDL | RATIO +----------------------------------------------------------------- +""" +print(message) + +for i in range(len(target_ref)): + message = f""" + {label[i]:.5f} {target_ref[i]:.5f} {value[i]:.5f} {value_ratio[i]:.5f} + """ + print(message) + +message = f""" +----------------------------------------------------------------- +""" +print(message) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/2f212cf26d5522183046c440dc5b443c/vm-008-parametric_calculation.py b/_downloads/2f212cf26d5522183046c440dc5b443c/vm-008-parametric_calculation.py new file mode 100644 index 00000000..812eb547 --- /dev/null +++ b/_downloads/2f212cf26d5522183046c440dc5b443c/vm-008-parametric_calculation.py @@ -0,0 +1,258 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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) + +""" +# sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL and import Numpy and Pandas libraries. + + +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Start MAPDL. +mapdl = launch_mapdl() + + +############################################################################### +# Pre-processing +# ~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + +mapdl.clear() +mapdl.verify() +mapdl.prep7(mute=True) + + +############################################################################### +# 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. + + +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 + + +############################################################################### +# 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` + +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()) + + +############################################################################### +# 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` + +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()) + + +############################################################################### +# 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: + +# 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() + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/31efd3bca1e47262c71b89cd72b87d91/vm-006-pinched_cylinder.ipynb b/_downloads/31efd3bca1e47262c71b89cd72b87d91/vm-006-pinched_cylinder.ipynb new file mode 100644 index 00000000..e12245f4 --- /dev/null +++ b/_downloads/31efd3bca1e47262c71b89cd72b87d91/vm-006-pinched_cylinder.ipynb @@ -0,0 +1,367 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pinched cylinder {#ref_vm6_example}\n================\n\nProblem description:\n\n: - A thin-walled cylinder is pinched by a force $F$ at the middle\n of the cylinder length. Determine the radial displacement\n $\\delta$ at the point where the force $F$ is applied. The ends\n of the cylinder are free edges.\n\nReference:\n\n: - R. D. Cook, Concepts and Applications of Finite Element\n Analysis, 2nd Edition, John Wiley and Sons, Inc., New York, NY,\n 1981, pp. 284-287.\n H. Takemoto, R. D. Cook, \\\"Some Modifications of an\n Isoparametric Shell Element\\\", International Journal for\n Numerical Methods in Engineering, Vol.7 No. 3, 1973.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 4-Node Finite Strain Shell Elements (SHELL181)\n - 8-Node Finite Strain Shell Elements (SHELL281)\n\n![VM6 Pinched Cylinder Problem Sketch](../_static/vm6_setup.png){width=\"400px\"}\n\nMaterial properties\n\n: - $E = 10.5 \\cdot 10^6 psi$\n - $\\nu = 0.3125$\n\nGeometric properties:\n\n: - $l = 10.35 in$\n - $r = 4.953 in$\n - $t = 0.094 in$\n\nLoading:\n\n: - $F = 100 lb$\n\nAnalysis assumptions and modeling notes:\n\n: - A one-eighth symmetry model is used. One-fourth of the load is\n applied 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\n=======================\n\nEnter verification example mode and the pre-processing routine.\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\n===================\n\nSet up the element type (a shell-type).\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\n===============\n\nSet up the material properties, where: Young Modulus is\n$E = 10.5 \\cdot 10^6 psi$, Poisson\\'s ratio is $\\nu = 0.3125$.\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\n==============\n\nSet up the cross-section properties for a shell element.\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\n===============\n\nSet up the keypoints and create the area through the keypoints.\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\n=======\n\nDefine line division of the lines, then mesh the area with shell\nelements.\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\n==========================\n\nApplication of symmetric boundary conditions for simplified model.\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\n========================\n\nApply the force of $F = (100/4) lb$ in the y-direction.\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\n=====\n\nEnter solution mode and solve the system. Print the solver output.\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\n===============\n\nEnter post-processing for the model with elements `shell181`. Plotting\nnodal displacement. Get the the radial displacement at the node where\nforce F is applied.\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\n========\n\nPlot nodal displacement using PyVista.\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\n================================\n\nTo determine the radial displacement $\\delta$ at the point where F is\napplied, we can use\n`Mapdl.get_value `{.interpreted-text\nrole=\"meth\"}.\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\n=========================\n\nPerform the simulation again using the element type SHELL281.\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\n=====\n\nEnter solution mode and solve the system. Print the solver output.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "solve_procedure()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing for the model with elements `shell281`. Plotting\nnodal displacement. Get the the radial displacement at the node where\nforce F is applied.\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\n=============\n\nNow we have the deflections, we can compare them to the expected values\nof radial deflection at the node where force $F$ was applied for both\nsimulations. The expected value for $\\delta_{\\mathrm{shell181}}$ is\n0.1139, and $\\delta_{\\mathrm{shell281}}$ is 0.1139.\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}\n {deflect_ratio_shell_181:15.3f}\n Deflection, in SHELL281{deflect_target_281:11.4f} {abs(deflect_shell_281):17.4f}\n {deflect_ratio_shell_281:15.3f}\n----------------------------------------------------------------------------\n\"\"\"\nprint(output)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Stop MAPDL.\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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/4ac8357564af966a36063a28e4a32b04/vm-015.ipynb b/_downloads/4ac8357564af966a36063a28e4a32b04/vm-015.ipynb new file mode 100644 index 00000000..7fffbc93 --- /dev/null +++ b/_downloads/4ac8357564af966a36063a28e4a32b04/vm-015.ipynb @@ -0,0 +1,241 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Bending of a Circular Plate Using Axisymmetric Shell Elements {#ref_vm15}\n=============================================================\n\nProblem description:\n\n: - A flat circular plate of radius r and thickness t is subject to\n various edge constraints and surface loadings. Determine the\n deflection $\\delta$ at the middle and the maximum stress\n $\\sigma_{max}$ for each case.\n - Case 1: Uniform loading $P$, clamped edge.\n - Case 2: Concentrated center loading $F$, clamped edge.\n - Case 3: Uniform loading $\\frac{P}{4}$, simply supported\n edge.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part II, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1956, pg. 96,97, and 103.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2-Node Finite Strain Axisymmetric Shell (SHELL208)\n\n![VM15 Flat Circular Plate Problem Sketch](../_static/vm15_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n\nGeometric properties:\n\n: - $r = 40.0 in$\n - $t = 1.0 in$\n\nLoading:\n\n: - $P = 6.0 psi$\n - $F = 7,539.82 lb$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - The stiffness matrix formed in the first load step is\n automatically reused in the second load step. A new stiffness\n matrix is automatically formed in the third load step because of\n changed boundary constraints. The mesh density is biased near\n the centerline and outer edge to recover stress values near\n those points.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm15_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport pandas as pd\n\n# Launch MAPDL with specified settings\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear any existing database\nmapdl.clear()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Run the /VERIFY command for VM15\nmapdl.run(\"/VERIFY,VM15\")\n\n# Set the title of the analysis\nmapdl.title(\"VM15 BENDING OF A CIRCULAR PLATE USING AXISYMMETRIC SHELL ELEMENTS\")\n\n# Enter the model creation prep7 preprocessor\nmapdl.prep7(mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and section properties\n==========================================\n\nUse 2-Node Axisymmetric Shell (SHELL208) and include extra internal\nnode, via Keyopt(3)=2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"SHELL208\", \"\", \"\", 2) # Element type SHELL208\nmapdl.sectype(1, \"SHELL\") # Section type SHELL\nmapdl.secdata(1, 1) # Section data\nmapdl.secnum(1) # Section number" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6) # Young's modulus\nmapdl.mp(\"NUXY\", 1, 0.3) # Poisson's ratio" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1) # Node 1\nmapdl.n(11, 40) # Node 11 at 40 degrees\nmapdl.n(6, 20) # Node 6 at 20 degrees\n\n# Generate mesh with biased elements\nmapdl.fill(1, 6, 4, \"\", \"\", \"\", \"\", 20) # BIAS THE MESH TO ALLOW STRESS RECOVERY NEAR\nmapdl.fill(6, 11, 4, \"\", \"\", \"\", \"\", 0.05) # THE CENTERLINE AND EDGE CONSTRAINTS\n\n# Define element connectivity\nmapdl.e(1, 2) # Element 1 with nodes 1 and 2\n\n# Generates elements from an existing pattern\nmapdl.egen(10, 1, -1)\n\n# select all entities\nmapdl.allsel()\n# element plot\nmapdl.eplot()\n\n# Finish the pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system for three load steps.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set analysis type to static\nmapdl.antype(\"STATIC\")\n\n# Controls the solution printout\nmapdl.outpr(\"\", 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loadings\n=======================================\n\nFix all degrees of freedom (dof) at node 11 and fix UX & ROTZ dofs at\nnode 1. Solve for three load case scenarios as defined.\n\nCase 1: Apply uniform pressure loading, P = 6 psi near clamped edge.\nCase 2: Concentrated center loading F = 7,539.82 lb, clamped edge. Case\n3: Uniform loading P/4, simply supported edge. Then exit prep7\nprocessor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Apply boundary conditions and loads for CASE 1\nmapdl.d(1, \"UX\", \"\", \"\", \"\", \"ROTZ\") # Fix UX and ROTZ for node 1\nmapdl.d(11, \"ALL\") # Fix all degrees of freedom for node 11\nmapdl.sfe(\"ALL\", 1, \"PRES\", \"\", 6) # Surface Pressure load = 6 PSI on all elements\n\n# start solve for 1st load case\nmapdl.solve()\n\n# Apply boundary conditions and loads for Load Case 2\n# Load Case 2: Concentrated Center Loading - Clamped Edge\nmapdl.f(1, \"FY\", -7539.82) # apply concentrated force FY on node 1\nmapdl.sfe(\n \"ALL\", 1, \"PRES\", \"\", 0\n) # apply elemental surface pressure load of magnitude \"0\"\n\n# start solve for 2nd load case\nmapdl.solve()\n\n# Apply boundary conditions and loads for Load Case 3\n# Load Case 3: Uniform Loading - Simply Supported Edge\nmapdl.ddele(11, \"ROTZ\") # Delete clamped boundary condition constraint\nmapdl.f(1, \"FY\") # apply nodal force of magnitude \"0\"\nmapdl.sfe(\"ALL\", 1, \"PRES\", \"\", 1.5) # elemental surface pressure load = 1.5 PSI\n\n# start solve for 3rd load case\nmapdl.solve()\n\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set displacement scaling for post-processing\n# mapdl.dscale(1, 35)\n\n# Set up and activate window 1\nmapdl.window(1, -1, 1, -1, -0.333)\n\n# reactivates suppressed printout\nmapdl.gopr()\n\n# Set 1st load case to be read from result file for post-processing\nmapdl.set(1, 1)\n\nmapdl.pldisp(1) # Displays the displaced structure\nmapdl.window(1, \"OFF\") # Turn off window 1\nmapdl.window(2, -1, 1, -0.333, 0.333, 1) # Turn on window 2\n\n# Don't erase existing displays\nmapdl.run(\"/NOERASE\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\n# Grab node using coordinates and assign it variable to \"MID_NODE\"\nMID_NODE = q.node(0, 0, 0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Retrieve nodal deflection and elemental stresses for each load cases\n====================================================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# 1st load case, retrieve nodal defection UY for a node assigned to \"DEF_C1\"\ndef_c1 = mapdl.get(\"DEF_C1\", \"NODE\", MID_NODE, \"U\", \"Y\")\n# Define etable for elemental component stress (X)\nmapdl.etable(\"STRS\", \"S\", \"X\")\n# using *get command extracting elemental stress via ETAB\nstrss_c1 = mapdl.get(\"STRSS_C1\", \"ELEM\", 10, \"ETAB\", \"STRS\")\n\n# Set 2nd load case to be read from result file for post-processing\nmapdl.set(2, 1)\n\nmapdl.pldisp() # Displays the displaced structure\nmapdl.window(2, \"OFF\") # Turn off window 2\nmapdl.window(3, -1, 1, 0.333, 1, 1) # Turn on window 3\n\n# retrieve nodal defection UY for a node assigned to \"DEF_C2\"\ndef_c2 = mapdl.get(\"DEF_C2\", \"NODE\", MID_NODE, \"U\", \"Y\")\n# Define etable for elemental component stress (X)\nmapdl.etable(\"STRS\", \"S\", \"X\")\n# using *get command extracting elemental stress via ETAB\nstrss_c2 = mapdl.get(\"STRSS_C2\", \"ELEM\", 10, \"ETAB\", \"STRS\")\n\n# Set 2nd load case to be read from result file for post-processing\nmapdl.set(3, 1)\n\nmapdl.pldisp() # Displays the displaced structure\n# retrieve nodal defection UY for a node assigned to \"DEF_C3\"\ndef_c3 = mapdl.get(\"DEF_C3\", \"NODE\", MID_NODE, \"U\", \"Y\")\n# Define etable for elemental component stress (X)\nmapdl.etable(\"STRS\", \"S\", \"X\")\n# using *get command extracting elemental stress via ETAB\nstrss_c3 = mapdl.get(\"STRSS_C3\", \"ELEM\", 1, \"ETAB\", \"STRS\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_def = [-0.08736, -0.08736, -0.08904]\ntarget_strss = [7200, 3600, 2970]\n\n# Fill result values\nres_def = [def_c1, def_c2, def_c3]\nres_strss = [strss_c1, strss_c2, strss_c3]\n\ntitle = f\"\"\"\n\n------------------- VM15 RESULTS COMPARISON ---------------------\n\"\"\"\nprint(title)\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"DEFLECTION (in)\", \"MAX STRESS (psi)\"]\n\nfor lc in range(len(res_def)):\n data = [\n [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])],\n [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])],\n ]\n\n title = f\"\"\"\n\nRESULTS FOR CASE {lc+1:1d}:\n-------------------\n\n \"\"\"\n print(title)\n print(pd.DataFrame(data, row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/694e371bb7324ee691e4f7daa207a6c4/vm-010-bending_of_a_t-shaped_beam.py b/_downloads/694e371bb7324ee691e4f7daa207a6c4/vm-010-bending_of_a_t-shaped_beam.py new file mode 100644 index 00000000..8e62136d --- /dev/null +++ b/_downloads/694e371bb7324ee691e4f7daa207a6c4/vm-010-bending_of_a_t-shaped_beam.py @@ -0,0 +1,305 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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 `. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm10_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL and import Numpy and Pandas libraries. + +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Start MAPDL. +mapdl = launch_mapdl() + + +############################################################################### +# Pre-processing +# ~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + +mapdl.clear() +mapdl.verify() +mapdl.prep7(mute=True) + + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element type ``BEAM188``. + +# 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()) + + +############################################################################### +# 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. + +# 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()) + + +############################################################################### +# 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. + +# 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()) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. Create nodes between elements. + +# 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()) + +############################################################################### +# Define elements +# ~~~~~~~~~~~~~~~ +# Create element between nodes 1 and 2 using node 3 as orientational node. + +# 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) + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Application of boundary conditions (BC). + +mapdl.d(node=1, lab="ALL", mute=True) +mapdl.d(node="ALL", lab="UZ", lab2="ROTX", lab3="ROTY", mute=True) + + +############################################################################### +# Define distributed loads +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply a bending moment :math:`\mathrm{M_{z}}= 100000\,in\,lb`. + +# 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) + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and run the simulation. + +# Start solution procedure. +mapdl.slashsolu() + +# Define the number of substeps to be taken this load step. +mapdl.nsubst(1) +mapdl.solve(mute=True) + + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. + +# Enter the post-processing routine. +mapdl.post1(mute=True) + + +############################################################################### +# 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 `. + +# 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") + + +############################################################################### +# 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: + +# 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() + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/72fcb9b38627bbd5bf1073f263a1a0b9/vm-299.ipynb b/_downloads/72fcb9b38627bbd5bf1073f263a1a0b9/vm-299.ipynb new file mode 100644 index 00000000..b4998c80 --- /dev/null +++ b/_downloads/72fcb9b38627bbd5bf1073f263a1a0b9/vm-299.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Sound Diffusion in a Flat Room {#ref_vm299}\n==============================\n\nProblem description:\n\n: - Sound diffusion is modeled in a flat room of size 30 x 30 x 3\n $m^3$. A sound source is placed at (2,2,1) with a sound power\n level of $1 \\cdot 10^-2 W$. The wall absorption coefficient is\n equal to 0.1. The coefficient of atmospheric attenuation is\n $0.01 m^-1$.\n\nReference:\n\n: - A.BILLON,J.PICAUT,\\'INTRODUCING ATMOSPHERIC ATTENUATION WITHIN A\n DIFFUSION MODEL FOR ROOM-ACOUSTIC PREDICTIONS MARCH 2008.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 3D 20-Node Acoustic Solid (FLUID220)\n\n![VM299 Finite Element Model of a Flat Room](../_static/vm299_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - Speed of sound, $c_0 = 343 m/s$\n - Density, $\\rho = 1.21 kg/m^3$\n - Wall absorption coefficient, $\\alpha = 0.1$\n - Atmospheric attenuation coefficient attn. = $0.01 m^-1$\n\nGeometric properties:\n\n: - Room length = $30 m$\n - Room width = $30 m$\n - Room height = $3 m$\n\nLoading:\n\n: - Sound power source = $1 \\cdot 10^{-2} W$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - Steady analysis is performed to determine the sound pressure\n level inside the room. In the post-processing, the sound\n pressure level (SPL) is listed every 2 m along a line passing\n through the room center at 1 m high. The sound pressure level is\n calculated in Mechanical APDL as:\n\n $SPL = 10 \\times \\log_{10} \\times \\frac{\\rho \\times c_0^2 \\times w}{P_{ref}^2}$\n\n where w is diffuse sound energy and reference pressure\n $P_{ref} = 2 \\times 10^{-5}$.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm299_setup.png'\n\nimport math\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n# Clear the current database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command for VM299\nmapdl.run(\"/VERIFY,VM299\")\n\n# Set the title of the analysis\nmapdl.title(\"VM299 SOUND PRESSURE LEVEL IN A FLAT ROOM\")\n\n# Entering the PREP7 environment in MAPDL\nmapdl.prep7()\n\n# It is not recommended to use '/NOPR' in a normal PyMAPDL session.\nmapdl._run(\"/NOPR\")\n\n# Constant value of PI\npi = math.pi\n\n# Set parameters for ROOM SIZE\nLX = 30\nLY = 30\nLZ = 3\nVOL = LX * LY * LZ\nSURF = 2 * (LX * LY + LY * LZ + LX * LZ)\nMFP = 4 * VOL / SURF\n\n# set parameters for MATERIAL PROPERTIES\nC0 = 343\nRHO = 1.21\nROOMD = MFP * C0 / 3\nATTN_Val = 0.01\nROOMDP = ROOMD / (1.0 + ATTN_Val * MFP)\nALPHA = 0.1\nWS = 1.0e-2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), density, speed of\nsound wall absorption coefficient and Atmospheric attenuation\ncoefficient is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"DENS\", 1, RHO)\nmapdl.mp(\"SONC\", 1, C0)\nmapdl.tb(\"AFDM\", 1, \"\", \"\", \"ROOM\")\nmapdl.tbdata(1, ROOMDP, ATTN_Val)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "H = 0.5\na = np.array([0, 2.0, LX])\nb = np.array([0, 2.0, LY])\nc = np.array([0, 2.0, LZ])\nfor i in range(2):\n for j in range(2):\n for k in range(2):\n mapdl.block(a[i], a[i + 1], b[j], b[j + 1], c[k], c[k + 1])\n# mapdl.aplot()\n\n# Generates new volumes by \u201cgluing\u201d volumes.\nmapdl.vglue(\"ALL\")\n# Define element, 3-D Acoustic Fluid 20-Node Solid Element\nmapdl.et(1, 220, 3, 4)\nmapdl.type(1) # set element type, Type=1\nmapdl.mat(1) # set material type, MAT=1\nmapdl.esize(H) # Specifies the element size.\n\n# Generates nodes and volume elements within volumes.\nmapdl.vmesh(9, 15, 1)\n\n# For elements that support multiple shapes, specifies the element shape, set mshape=3D\nmapdl.mshape(0, \"3D\")\n# Generates nodes and volume elements within volumes.\nmapdl.vmesh(1)\n# select nodes of specified location\nmapdl.nsel(\"S\", \"LOC\", \"X\", 0)\nmapdl.nsel(\"A\", \"LOC\", \"X\", LX)\nmapdl.nsel(\"A\", \"LOC\", \"Y\", 0)\nmapdl.nsel(\"A\", \"LOC\", \"Y\", LY)\nmapdl.nsel(\"A\", \"LOC\", \"Z\", 0)\nmapdl.nsel(\"A\", \"LOC\", \"Z\", LZ)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nDefine Absorption coefficient and transmission loss.Define Mass source;\nmass source rate; or power source in an energy diffusion solution for\nroom acoustics. Then exit prep7 processor.\n\nEffectiely, this sets: - Sound power source = $1 \\cdot 10^{-2} W$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.sf(\"ALL\", \"ATTN\", ALPHA)\n# Selects all entities\nmapdl.allsel()\n# select nodes of specified location\nmapdl.nsel(\"S\", \"LOC\", \"X\", a[1])\nmapdl.nsel(\"R\", \"LOC\", \"Y\", b[1])\nmapdl.nsel(\"R\", \"LOC\", \"Z\", c[1])\n\nmapdl.bf(\"ALL\", \"MASS\", WS)\n\n# Selects all entities\nmapdl.allsel()\nmapdl.eplot()\n# Finish pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n# SOLVE STATIC ANALYSIS\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing and read results set\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n# Set the current results set to the last set to be read from result file\nmapdl.set(\"LAST\")\n# Defines a path name and establishes parameters for the path\nmapdl.path(\"X_SPL\", 2, \"\", 15)\nmapdl.ppath(1, \"NODE\", 0, 15, 1)\nmapdl.ppath(2, \"NODE\", 30, 15, 1)\n# Interpolates an item onto a path.\nmapdl.pdef(\"UX\", \"U\", \"X\", \"NOAV\")\nmapdl.pdef(\"SPLX\", \"SPL\", \"\", \"NOAV\")\n\n# redirects output to the default system output file\nmapdl.run(\"/OUT\")\n\n# Prints path items along a geometry path.\nmapdl.prpath(\"UX\", \"SPLX\")\n\n# redirects solver output to a file named \"SCRATCH\"\nmapdl.run(\"/OUT,SCRATCH\")\n# Sets various line graph display options\n# DIVX: Determines the number of divisions (grid markers) that will be plotted on the X\nmapdl.gropt(\"DIVX\", 15)\n# Specifies a linear ordinate (Y) scale range.\nmapdl.yrange(71, 82)\n# DIVY: Determines the number of divisions (grid markers) that will be plotted on the Y\nmapdl.gropt(\"DIVY\", 11)\n# Specifies the device and other parameters for graphics displays.\n# Creates PNG (Portable Network Graphics) files that are named Jobnamennn.png\nmapdl.show(\"PNG\", \"rev\")\n\nmapdl.plpath(\"UX\", \"SPLX\") # Displays path items on a graph.\nmapdl.show(\"CLOSE\") # This option purges the graphics file buffer." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nn1 = q.node(5, 15, 1)\nn2 = q.node(10, 15, 1)\nn3 = q.node(15, 15, 1)\nn4 = q.node(20, 15, 1)\nn5 = q.node(25, 15, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing: Compute sound pressure level (SPL)\n===================================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "en_1 = mapdl.get(\"EN_1\", \"NODE\", n1, \"ENKE\")\nen_2 = mapdl.get(\"EN_2\", \"NODE\", n2, \"ENKE\")\nen_3 = mapdl.get(\"EN_3\", \"NODE\", n3, \"ENKE\")\nen_4 = mapdl.get(\"EN_4\", \"NODE\", n4, \"ENKE\")\nen_5 = mapdl.get(\"EN_5\", \"NODE\", n5, \"ENKE\")\n\nPREF = 2e-5\nx1 = (RHO * en_1 * C0**2) / PREF**2\nx2 = (RHO * en_2 * C0**2) / PREF**2\nx3 = (RHO * en_3 * C0**2) / PREF**2\nx4 = (RHO * en_4 * C0**2) / PREF**2\nx5 = (RHO * en_5 * C0**2) / PREF**2\nSPL_1 = 10 * (math.log10(x1))\nSPL_2 = 10 * (math.log10(x2))\nSPL_3 = 10 * (math.log10(x3))\nSPL_4 = 10 * (math.log10(x4))\nSPL_5 = 10 * (math.log10(x5))\n\n# Fill the target tesult values in array\ntarget_ref = np.array([80.0, 79.0, 77.5, 76.0, 74.5])\n\n# Fill the simulated result values in array\nvalue = np.array([SPL_1, SPL_2, SPL_3, SPL_4, SPL_5])\n\n# store ratio\nvalue_ratio = []\nfor i in range(len(target_ref)):\n a = value[i] / target_ref[i]\n value_ratio.append(a)\n\n# assign labels position in meter\nlabel = np.array([5, 10, 15, 20, 25])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "message = f\"\"\"\n------------------- VM299 RESULTS COMPARISON ---------------------\n SPL at Position, X(m) | TARGET | Mechanical APDL | RATIO\n-----------------------------------------------------------------\n\"\"\"\nprint(message)\n\nfor i in range(len(target_ref)):\n message = f\"\"\"\n {label[i]:.5f} {target_ref[i]:.5f} {value[i]:.5f} {value_ratio[i]:.5f}\n \"\"\"\n print(message)\n\nmessage = f\"\"\"\n-----------------------------------------------------------------\n\"\"\"\nprint(message)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/7d3bdbb0eca307fc27e8a2c9d78b727f/vm-005-laterally_loaded_tapered_support_structure.py b/_downloads/7d3bdbb0eca307fc27e8a2c9d78b727f/vm-005-laterally_loaded_tapered_support_structure.py new file mode 100644 index 00000000..bc1ec216 --- /dev/null +++ b/_downloads/7d3bdbb0eca307fc27e8a2c9d78b727f/vm-005-laterally_loaded_tapered_support_structure.py @@ -0,0 +1,244 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm5_example: + +Laterally Loaded Tapered Support Structure +------------------------------------------ +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. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm5_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ + +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() + +############################################################################### +# 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. + +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) + + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +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") + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix the nodes at the larger end (the "wall" end) and apply a vertical force +# to the whole structure. + +# 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() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.run("/SOLU") +mapdl.solve() +mapdl.finish() + +############################################################################### +# 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. + + +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) + +############################################################################### +# 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. + +result = mapdl.result +result.plot_principal_nodal_stress( + 0, + "SEQV", + show_edges=True, + show_displacement=True, + displacement_factor=26.0, + cmap="Oranges", + cpos="xy", +) + +############################################################################### +# 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``. + +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", +) + +############################################################################### +# 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. + + +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) + + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/8f53b8ad96f2d4fff76d46243a5d8126/vm-003-thermally_loaded_support_structure.py b/_downloads/8f53b8ad96f2d4fff76d46243a5d8126/vm-003-thermally_loaded_support_structure.py new file mode 100644 index 00000000..40880ddf --- /dev/null +++ b/_downloads/8f53b8ad96f2d4fff76d46243a5d8126/vm-003-thermally_loaded_support_structure.py @@ -0,0 +1,210 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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. + +""" # noqa:E501 + +# 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() + +############################################################################### +# 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 +# + +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) + +############################################################################### +# 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. + +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") + +############################################################################### +# 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. + +mapdl.e(1, 4) +mapdl.e(3, 6) +mapdl.mat(2) +mapdl.e(2, 5) +mapdl.eplot(show_node_numbering=True, cpos="xy") + +############################################################################### +# 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. + +mapdl.cp(1, "UY", 5, 4, 6) +mapdl.d(1, "ALL", "", "", 3) +mapdl.f(5, "FY", -4000) +mapdl.bfunif("TEMP", 80) +mapdl.finish() + + +############################################################################### +# Solve +# ~~~~~ +# - Enter solution mode +# - Specify a timestep of 1 to be used for this load step +# - Solve the system. +# + +mapdl.run("/SOLU") +mapdl.nsubst(1) +mapdl.solve() + +############################################################################### +# 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 +# + +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") + +############################################################################### +# Check results +# ~~~~~~~~~~~~~ +# Now that we have the response we can compare the values to the +# expected stresses of 19695 and 10152 respectively. +# + +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) + + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/925137a65695b2816a48e4ac220b39ac/vm-021.py b/_downloads/925137a65695b2816a48e4ac220b39ac/vm-021.py new file mode 100644 index 00000000..f9762d60 --- /dev/null +++ b/_downloads/925137a65695b2816a48e4ac220b39ac/vm-021.py @@ -0,0 +1,352 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm21: + +Tie Rod with Lateral Loading +---------------------------- +Problem description: + - A tie rod is subjected to the action of a tensile force F and a uniform lateral load p. + Determine the maximum deflection :math:`z_{max}`, the slope :math:`\theta` at the left-hand end, + and the maximum bending moment :math:`M_{max}`. In addition, determine the same three quantities + for the unstiffened tie rod (F = 0). + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 42, article 6. + +Analysis type(s): + - Static, Stress Stiffening Analysis ``ANTYPE=0`` + +Element type(s): + - 3-D 2 node beam (BEAM188) + +.. image:: ../_static/vm21_setup.png + :width: 400 + :alt: VM21 Tie Rod Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + +Geometric properties: + - :math:`l = 200 in` + - :math:`b = h = 2.5 in` + +Loading: + - :math:`F = 21,972.6 lb` + - :math:`p = 1.79253 lb/in` + +Analysis Assumptions and Modeling Notes: + - Due to symmetry, only one-half of the beam is modeled. The full load is applied for each + iteration. The first solution represents the unstiffened case. The second solution represents + the stiffened case. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm21_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear the current database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command for VM21 +mapdl.run("/VERIFY,VM21") + +# Set the title of the analysis +mapdl.title("VM21 TIE ROD WITH LATERAL LOADING NO STREES STIFFENING") + +# Enter the model creation /Prep7 preprocessor +mapdl.prep7() + +############################################################################### +# Define element type and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 3-D 2-Node Beam Element and specify cubic shape function via setting Keyopt(3)=3. + +mapdl.et(1, "BEAM188") + +mapdl.keyopt(1, 3, 3) # Set KEYOPT(3) to 3 cubic shape function +mapdl.sectype(1, "BEAM", "RECT") # Specify section properties for the beam element +mapdl.secdata(2.5, 2.5) # Define section data + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio PRXY of 0.3 is specified. + +mapdl.mp("EX", 1, 30e6) +mapdl.mp("PRXY", "", 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1) # define nodes +mapdl.n(5, 100) + +# Generate additional nodes +mapdl.fill() + +# Define elements +mapdl.e(1, 2) + +# Generate additional elements from an existing pattern +mapdl.egen(4, 1, 1) + +############################################################################### +# Define boundary conditions and loading +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply a displacement boundary condition in the UY, ROTX and ROTZ directions to all nodes. +# Specify symmetry degree-of-freedom constraints on nodes, surface normal to X-dir (default). +# Apply a tensile force in X-dir, F = -21972.6 lb and a uniform lateral load, p = 1.79253 lb/in. +# Then exit prep7 processor. + +mapdl.d("ALL", "UY", "", "", "", "", "ROTX", "ROTZ") +mapdl.d(1, "UZ") + +# Select nodes for symmetry boundary +mapdl.nsel("S", "", "", 5) +mapdl.dsym("SYMM", "X") + +# Select all nodes +mapdl.nsel("ALL") + +# Apply nodal force along x-direction +mapdl.f(1, "FX", -21972.6) +# Specifies surface loads on beam and pipe elements. +mapdl.sfbeam("ALL", 1, "PRES", 1.79253) + +# Selects all entities +mapdl.allsel() +# Element plot +mapdl.eplot() + +# Finish pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Set the analysis type to STATIC +mapdl.antype("STATIC") +# Perform the solution +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute displacement and rotation quantities. +mapdl.post1() + +# Select nodes for results output +mapdl.nsel("S", "", "", 1, 5, 4) + +# Print displacement quantities in Z direction +mapdl.prnsol("U", "Z") + +# Print rotation quantities in Y direction +mapdl.prnsol("ROT", "Y") + +# Select all nodes +mapdl.nsel("ALL") + +# Print results solution +mapdl.prrsol() + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +RGHT_END = q.node(200, 0, 0) # store node number to 'RGHT_END' with coordinate (4,0,0) +LFT_END = q.node(0, 0, 0) # store node number to 'LFT_END' with coordinate (4,0,0) + +############################################################################### +# Retrieve nodal deflection and rotation +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Get results at node RGHT_END +uz_mx_c2 = mapdl.get("UZ_MX_C2", "NODE", RGHT_END, "U", "Z") + +# Get results at node LFT_END +slope_c2 = mapdl.get("SLOPE_C2", "NODE", LFT_END, "ROT", "Y") + +# exists post-processing processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter /post26 time-history post-processing processor. +mapdl.post26() + +# Specifies the total reaction force data to be stored at nodes associated to RGHT_END +mapdl.rforce(2, RGHT_END, "M", "Y") + +# Store results +mapdl.store() +# Get maximum moment at node RGHT_END +m_mx_c2 = mapdl.get("M_MX_C2", "VARI", 2, "EXTREM", "VMAX") + +# exists post-processing processor +mapdl.finish() + +############################################################################### +# Set a new title for the analysis +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.title("VM21 TIE ROD WITH LATERAL LOADING STRESS STIFFENING PRESENT") + +############################################################################### +# Solve +# ~~~~~ +# Enter new solution mode and solve the nonlinear system including stress stiffening. +mapdl.slashsolu() + +# Set number of substeps to 5 +mapdl.nsubst(5) +# Activate auto time stepping +mapdl.autots("ON") +# Activate nonlinear geometry +mapdl.nlgeom("ON") +# Set a smaller convergence tolerance +mapdl.cnvtol("F", "", 0.0001, "", 1) +# Perform the solution +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute displacement and rotation quantities. +mapdl.post1() + +# Select nodes for results output +mapdl.nsel("S", "", "", 1, 5, 4) +# Print displacement quantities in Z direction +mapdl.prnsol("U", "Z") +# Print rotation quantities in Y direction +mapdl.prnsol("ROT", "Y") +# Print results solution +mapdl.prrsol() + +# Get results at node RGHT_END +uz_mx_c1 = mapdl.get("UZ_MX_C1", "NODE", RGHT_END, "U", "Z") + +# Get results at node LFT_END +slope_c1 = mapdl.get("SLOPE_C1", "NODE", LFT_END, "ROT", "Y") + +# exists post-processing processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter /post26 time-history post-processing processor. +mapdl.post26() + +# Specifies the total reaction force data to be stored at nodes associated to RGHT_END +mapdl.rforce(2, RGHT_END, "M", "Y") + +# Store results +mapdl.store() + +# Get maximum moment at node RGHT_END +m_mx_c1 = mapdl.get("M_MX_C1", "VARI", 2, "EXTREM", "VMAX") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_res = [-0.19945, 0.0032352, -4580.1] +target_res_strss = [-0.38241, 0.0061185, -8962.7] + +# Fill result values +sim_res = [uz_mx_c1, slope_c1, m_mx_c1] +sim_res_strss = [uz_mx_c2, slope_c2, m_mx_c2] + +title = f""" + +------------------- VM21 RESULTS COMPARISON --------------------- + +F neq 0 (stiffened): +-------------------- + +""" + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Z_max, in", "Slope, rad", "M_max , in-lb"] + +data = [target_res, sim_res, np.abs(target_res) / np.abs(sim_res)] + +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +title = f""" + + +F = 0 (unstiffened): +-------------------- + +""" + +row_headers = ["Z_max, in", "Slope, rad", "M_max , in-lb"] +data = [ + target_res_strss, + sim_res_strss, + np.abs(target_res_strss) / np.abs(sim_res_strss), +] + +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/92fabf9105b8116d3c5f05c80448d73f/vm-016.ipynb b/_downloads/92fabf9105b8116d3c5f05c80448d73f/vm-016.ipynb new file mode 100644 index 00000000..b57ebcad --- /dev/null +++ b/_downloads/92fabf9105b8116d3c5f05c80448d73f/vm-016.ipynb @@ -0,0 +1,493 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Bending of a Solid Beam (Plane Elements) {#ref_vm16}\n========================================\n\nProblem description:\n\n: - A beam of length $l$ and height $h$ is built-in at one end and\n loaded at the free end with:\n\n - Case 1: a moment $M$.\n - Case 2: a shear force $F$.\n\n For each case, determine the deflection $\\delta$ at the free end\n and the bending stress $\\sigma_{Bend}$ a distance d from the\n wall at the outside fiber.\n\nReference:\n\n: - Formulas for Stress and Strain, R. J. Roark, 4th Edition,\n McGraw-Hill Book Co., Inc., New York, NY, 1965, pp. 104, 106.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2-D Structural Solid Elements (PLANE42)\n - 2-D 4 Node structural elements(PLANE182)\n\n![VM16 Bending of a Solid Beam with Plane Elements Problem Sketch](../_static/vm16_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.0$\n\nGeometric properties:\n\n: - $l = 10 in$\n - $h = 2.0 in$\n - $d = 1.0 in$\n\nLoading:\n\n: - Case 1, $M = 2000 in-lb$\n - Case 2, $F = 300 lb$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - The stiffness matrix formed in the first load step is also used\n in the second load step (automatically determined by Mechanical\n APDL). The end moment is represented by equal and opposite\n forces separated by a distance h. The bending stress is obtained\n from face stresses on element 1.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm16_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport pandas as pd\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear the existing database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Run a /VERIFY command to verify the installation\nmapdl.run(\"/VERIFY,VM16\")\n\n# Set the ANSYS version and reference verification manual\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Set the analysis title\nmapdl.title(\"VM16 BENDING OF A SOLID BEAM (PLANE ELEMENTS)\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Case 1: Solve Using PLANE42 Element Model.\n==========================================\n\nEnter the model creation prep7 preprocessor\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.prep7(mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2-D Structural Solid (PLANE42) and include Surface solution for both\nfaces, via Keyopt(6)=2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(\n 1, \"PLANE42\", \"\", \"\", \"\", \"\", \"\", 2\n) # PLANE42 WITH SURFACE PRINTOUT FOR FACES 1 AND 3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio of 0.0 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6) # Elastic modulus\nmapdl.mp(\"NUXY\", 1, 0.0) # Poisson's ratio" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1)\nmapdl.n(6, 10)\n\n# Generate additional nodes\nmapdl.fill()\n\n# Generates nodes from an existing pattern\nmapdl.ngen(2, 10, 1, 6, 1, \"\", 2)\n\n# Define elements\nmapdl.e(1, 2, 12, 11)\n\n# Generate additional elements from an existing pattern\nmapdl.egen(5, 1, 1)\n\n# select all entities\nmapdl.allsel()\n# element plot\nmapdl.eplot(background=\"w\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loadings\n=======================================\n\nFix all degrees of freedom (dof) at nodes 10 & 11. For load case 1,\napply end moment and then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set boundary conditions for case 1 (end moment)\nmapdl.d(1, \"ALL\", \"\", \"\", 11, 10) # Displacement constraint\nmapdl.f(6, \"FX\", 1000) # Applied force\nmapdl.f(16, \"FX\", -1000) # Applied force\n\n# Finish the pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system for the 1st load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set analysis type to static\nmapdl.antype(\"STATIC\")\n\n# start solve for 1st load case\nmapdl.solve()\n\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components for load\ncase 1.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set \"last\" load case to be read from result file for post-processing\nmapdl.set(\"LAST\")\n\n# Get displacement at node 16 in the Y-direction\nu1 = mapdl.get(\"U1\", \"NODE\", 16, \"U\", \"Y\")\n\nmapdl.graphics(\"POWER\") # Activates the graphics mode for power graphics\nmapdl.eshape(1) # Display element shape\nmapdl.view(1, 1, 1, 1) # Set the viewing options\n\n# for graphics displays\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plnsol(\"S\", \"X\") # Plot bending stress along the X-axis\n\n# Get maximum bending stress for case 1\nbend_stress1 = mapdl.get(\"BEND_STRESS1\", \"PLNSOL\", 0, \"MAX\")\nmapdl.show(\"close\")\n# exists solution processor for case 1\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system for the 2nd load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loadings\n=======================================\n\nFor load case 2, apply end load and then solve for 2nd load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.f(6, \"FX\", \"\", \"\", 16, 10) # Applied force in the X-direction\nmapdl.f(6, \"FY\", 150, \"\", 16, 10) # Applied force in the Y-direction\n\n# start solve for 2nd load case\nmapdl.solve()\n# exists solution processor for case 2\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components for load\ncase 2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set \"last\" load case to be read from result file for post-processing\nmapdl.set(\"LAST\")\n\n# Retrieves the displacement \"U2\" of node 16 in the Y direction\nu2 = mapdl.get(\"U2\", \"NODE\", 16, \"U\", \"Y\")\n\nmapdl.graphics(\"POWER\") # Activates the graphics mode for power graphics\nmapdl.eshape(1) # Display element shape\nmapdl.view(1, 1, 1, 1) # Set the viewing options\n\n# for graphics displays\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plnsol(\"S\", \"X\") # Plot bending stress along the X-axis\n\n# Retrieves the maximum bending stress from the plane stress plot\nbend_stress2 = mapdl.get(\"BEND_STRESS2\", \"PLNSOL\", 0, \"MAX\")\nmapdl.show(\"close\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_def = [0.00500, 0.00500]\ntarget_strss = [3000, 4050]\n\n# Fill result values\nres_def = [u1, u2]\nres_strss = [bend_stress1, bend_stress2]\n\ntitle = f\"\"\"\n\n------------------- VM16 RESULTS COMPARISON ---------------------\n\nPLANE42\n=======\n\"\"\"\nprint(title)\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Deflection (in)\", \"Bending Stress (psi)\"]\n\nfor lc in range(len(res_def)):\n data = [\n [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])],\n [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])],\n ]\n\n title = f\"\"\"\n\nRESULTS FOR CASE {lc+1:1d}:\n-------------------\n\n \"\"\"\n print(title)\n print(pd.DataFrame(data, row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Clears the database without restarting.\n=======================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.run(\"/CLEAR,NOSTART\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Case 2: Solve Using PLANE182 Element Model\n==========================================\n\nSwitches to the preprocessor (PREP7)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2-D 4 Node structural elements (PLANE182) and include simplified\nenhanced strain formulation, via Keyopt(1)=3.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Defines an element type as PLANE182\nmapdl.et(1, \"PLANE182\")\n# Sets a key option for the element type\nmapdl.keyopt(1, 1, 3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio of 0.0 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Defines nodes\nmapdl.n(1)\nmapdl.n(6, 10)\n\n# Generate additional nodes\nmapdl.fill()\n\n# Generates additional nodes from an existing pattern\nmapdl.ngen(2, 10, 1, 6, 1, \"\", 2)\n\n# Defines elements\nmapdl.e(1, 2, 12, 11)\n\n# Generates additional elements from an existing pattern\nmapdl.egen(5, 1, 1)\n\n# select all entities\nmapdl.allsel()\n# element plot\nmapdl.eplot(background=\"w\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loadings\n=======================================\n\nFix all degrees of freedom (dof) at nodes 10 & 11. For load case 1,\napply end moment and then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(1, \"ALL\", \"\", \"\", 11, 10)\n# Applies nodal forces\nmapdl.f(6, \"FX\", 1000)\nmapdl.f(16, \"FX\", -1000)\n\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system for the 1st load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set analysis type to static\nmapdl.antype(\"STATIC\")\n\n# start solve for 1st load case\nmapdl.solve()\n\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components for load\ncase 1.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Sets the LAST result as the active result set\nmapdl.set(\"LAST\")\n\n# Retrieves the displacement \"U1\" of node 16 in the Y direction\nu1 = mapdl.get(\"U1\", \"NODE\", 16, \"U\", \"Y\")\n\nmapdl.graphics(\"POWER\") # Activates the graphics mode for power graphics\nmapdl.eshape(1) # Display element shape\nmapdl.view(1, 1, 1, 1) # Set the viewing options\n\n# for graphics displays\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plnsol(\"S\", \"X\") # Plot bending stress along the X-axis\n\n# Retrieves the maximum bending stress from the plane stress plot\nbend_stress1 = mapdl.get(\"BEND_STRESS1\", \"PLNSOL\", 0, \"MAX\")\nmapdl.show(\"close\")\n\n# exists solution processor for case 1\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system for the 2nd load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loadings\n=======================================\n\nFor load case 2, apply end load and then solve for 2nd load case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.f(6, \"FX\", \"\", \"\", 16, 10)\nmapdl.f(6, \"FY\", 150, \"\", 16, 10)\n\n# start solve for 2nd load case\nmapdl.solve()\n# exists solution processor for case 2\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress components for load\ncase 2.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Sets the LAST result as the active result set\nmapdl.set(\"LAST\")\n\n# Retrieves the displacement \"U2\" of node 16 in the Y direction\nu2 = mapdl.get(\"U2\", \"NODE\", 16, \"U\", \"Y\")\n\nmapdl.graphics(\"POWER\") # Activates the graphics mode for power graphics\nmapdl.eshape(1) # Display element shape\nmapdl.view(1, 1, 1, 1) # Set the viewing options\n\n# for graphics displays\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plnsol(\"S\", \"X\") # Plot bending stress along the X-axis\n\n# Retrieves the maximum bending stress from the plane stress plot\nbend_stress2 = mapdl.get(\"BEND_STRESS2\", \"PLNSOL\", 0, \"MAX\")\nmapdl.show(\"close\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_def = [0.00500, 0.00500]\ntarget_strss = [3000, 4050]\n\n# Fill result values\nres_def = [u1, u2]\nres_strss = [bend_stress1, bend_stress2]\n\ntitle = f\"\"\"\n\nPLANE182\n========\n\"\"\"\nprint(title)\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Deflection (in)\", \"Bending Stress (psi)\"]\n\nfor lc in range(len(res_def)):\n data = [\n [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])],\n [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])],\n ]\n\n title = f\"\"\"\n\nRESULTS FOR CASE {lc+1:1d}:\n-------------------\n\n \"\"\"\n print(title)\n print(pd.DataFrame(data, row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()\n\n# Exit MAPDL session\nmapdl.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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/98ba5540f3a8e22e8210d5922bffeb7a/vm-001-statically_indeterminate_reaction_force_analysis.ipynb b/_downloads/98ba5540f3a8e22e8210d5922bffeb7a/vm-001-statically_indeterminate_reaction_force_analysis.ipynb new file mode 100644 index 00000000..72cc6853 --- /dev/null +++ b/_downloads/98ba5540f3a8e22e8210d5922bffeb7a/vm-001-statically_indeterminate_reaction_force_analysis.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Statically indeterminate reaction force analysis {#ref_statically_indeterminate_example}\n================================================\n\nProblem description:\n\n: - A prismatical bar with built-in ends is loaded axially at two\n intermediate cross sections. Determine the reactions $R_1$ and\n $R_2$.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 26, problem 10.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 3-D Spar (or Truss) Elements (LINK180)\n\n![VM1 Problem Sketch](../_static/vm1_setup.png){width=\"400px\"}\n\nMaterial properties\n\n: - $E = 30 \\cdot 10^6 psi$\n\nGeometric properties:\n\n: - $a = b = 0.3$\n - $l = 10 in$\n\nLoading:\n\n: - $F_1 = 2*F_2 = 1000 lb$\n\nAnalytical equations:\n\n: - $P = R_1 + R_2$ where $P$ is load.\n - $\\frac{R_2}{R_1} = \\frac{a}{b}$ Where $a$ and $b$ are the ratios\n of distances between 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\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\n===============\n\nSet up the material and its type (a single material, with a linking-type\nsection and a Young\\'s modulus of 30e6).\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(1)\nmapdl.mp(\"EX\", 1, 30e6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1, 0, 0)\nmapdl.n(2, 0, 4)\nmapdl.n(3, 0, 7)\nmapdl.n(4, 0, 10)\nmapdl.e(1, 2)\nmapdl.egen(3, 1, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nFull constrain nodes 1 and 4, by incrementing from node 1 to node 4 in\nsteps of 3. Apply y-direction forces to nodes 2 and 3, with values of\n-500 lb and -1000 lb respectively. Then exit prep7.\n\nEffectiely, this sets: - $F_1 = 2*F_2 = 1000 lb$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(1, \"ALL\", \"\", \"\", 4, 3)\nmapdl.f(2, \"FY\", -500)\nmapdl.f(3, \"FY\", -1000)\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\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\n===============\n\nEnter post-processing. Select the nodes at `y=10` and `y=0`, and sum the\nforces there. Then store the y-components in two variables: `reaction_1`\nand `reaction_2`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\nmapdl.nsel(\"S\", \"LOC\", \"Y\", 10)\nmapdl.fsum()\nreaction_1 = mapdl.get(\"REAC_1\", \"FSUM\", \"\", \"ITEM\", \"FY\")\nmapdl.nsel(\"S\", \"LOC\", \"Y\", 0)\nmapdl.fsum()\nreaction_2 = mapdl.get(\"REAC_2\", \"FSUM\", \"\", \"ITEM\", \"FY\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check results\n=============\n\nNow that we have the reaction forces we can compare them to the expected\nvalues of 900 lbs and 600 lbs for reactions 1 and 2 respectively.\n\nAnalytical results obtained from: - $P = R_1 + R_2$ where $P$ is load of\n1500 lbs - $\\frac{R_2}{R_1} = \\frac{a}{b}$\n\nHint: Solve for each reaction force independently.\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 \"\"\"\nprint(results)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Stop MAPDL.\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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/9bf1111808f0ca5db1bf582af03872be/vm-002-beam_stresses_and_deflections.py b/_downloads/9bf1111808f0ca5db1bf582af03872be/vm-002-beam_stresses_and_deflections.py new file mode 100644 index 00000000..78d75997 --- /dev/null +++ b/_downloads/9bf1111808f0ca5db1bf582af03872be/vm-002-beam_stresses_and_deflections.py @@ -0,0 +1,262 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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` + +""" +# sphinx_gallery_thumbnail_path = '_static/vm2_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ + +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() + + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element type (a beam-type). + +# 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) + + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material. + +mapdl.mp("EX", 1, 30e6) +mapdl.mp("PRXY", 1, 0.3) +print(mapdl.mplist()) + + +############################################################################### +# Define section +# ~~~~~~~~~~~~~~ +# Set up the cross-section properties for a beam element. + +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) + + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. Create nodes then create elements +# between nodes. + +# 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()) + +############################################################################### +# Define elements + +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) + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Application of boundary conditions (BC). + +# 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") + +############################################################################### +# Define distributed loads +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply a distributed force of :math:`w = (10000/12) lb/in` +# in the y-direction. + +# 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() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. Print the solver output. + +mapdl.run("/SOLU") +out = mapdl.solve() +mapdl.finish() +print(out) + + +############################################################################### +# 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 `. + +# 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") + + +############################################################################### +# 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. + +# 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) + + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/9c3a873c3268a40f84cdecc62827cbaf/vm-013.py b/_downloads/9c3a873c3268a40f84cdecc62827cbaf/vm-013.py new file mode 100644 index 00000000..14ec48f9 --- /dev/null +++ b/_downloads/9c3a873c3268a40f84cdecc62827cbaf/vm-013.py @@ -0,0 +1,204 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm13: + +Cylindrical Shell Under Pressure +--------------------------------- +Problem description: + - A long cylindrical pressure vessel of mean diameter d and wall thickness t has closed + ends and is subjected to an internal pressure P. Determine the axial stress + :math:`\sigma_y` and the hoop stress :math:`\sigma_z` in the vessel at the + midthickness of the wall. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 45, article 11. + - UGURAL AND FENSTER, ADV. STRENGTH AND APPL. ELAS., 1981. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-Node Finite Strain Axisymmetric Shell (SHELL208) + +.. image:: ../_static/vm13_setup.png + :width: 400 + :alt: VM13 Cylindrical Shell Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`t = 1 in` + - :math:`d = 120 in` + +Loading: + - :math:`P = 500 psi` + +Analysis Assumptions and Modeling Notes: + - An arbitrary axial length of 10 inches is selected. + Nodal coupling is used in the radial direction. An axial + force of 5654866.8 lb (:math:`(Pπd^2)/4`) is applied to + simulate the closed-end effect. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm13_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np + +# Launch MAPDL with specified settings +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear any existing database +mapdl.clear() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Run the /VERIFY command for VM13 +mapdl.verify("vm13") + +# Set the title of the analysis +mapdl.title("VM13 CYLINDRICAL SHELL UNDER PRESSURE") + +# Enter the model creation preprocessor +mapdl.prep7(mute=True) + +############################################################################### +# Define element type and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2-Node Axisymmetric Shell element (SHELL208) and "SHELL" as section type. + +mapdl.et(1, "SHELL208") # Element type SHELL208 +mapdl.sectype(1, "SHELL") # Section type SHELL +mapdl.secdata(1) # Define section data +mapdl.secnum(1) # Assign section number + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio of 0.3 is specified. + +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1, 60) # Node 1, 60 degrees +mapdl.n(2, 60, 10) # Node 2, 60 degrees and 10 units in Z-direction + +# Define element connectivity +mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + +############################################################################### +# Define coupling and boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Couple the nodes #1 and 2 in radial direction (rotation around Z-axis). +# Fix UY displacement for node 1. Fix ROTZ (rotation around Z-axis) for node 2. +# Apply a concentrated force value of 5654866.8 lb in FY direction at node 2. +# Internal pressure of 500 psi is applied. Then exit prep7 processor. +# +# Effectively, this sets: +# :math:`P = 500 psi` + +mapdl.cp(1, "UX", 1, 2) # Couple radial direction (rotation around Z-axis) +mapdl.d(1, "UY", "", "", "", "", "ROTZ") # Fix UY displacement for node 1 +mapdl.d(2, "ROTZ") # Fix ROTZ (rotation around Z-axis) for node 2 + +mapdl.f(2, "FY", 5654866.8) # Apply a concentrated force FY to node 2 +mapdl.sfe(1, 1, "PRES", "", 500) # Apply internal pressure of 500 psi to element 1 + +# Selects all entities +mapdl.allsel() +mapdl.eplot() + +# Finish the pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.slashsolu() +# Set the analysis type to STATIC +mapdl.antype("STATIC") +# Controls the solution printout +mapdl.outpr("ALL", 1) +# Solve the analysis +mapdl.solve() +# Finish the solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing and compute stress components. + +mapdl.post1() + +# Create element tables for stress components +mapdl.etable("STRS_Y", "S", "Y") +mapdl.etable("STRS_Z", "S", "Z") + +# Retrieve element stresses from the element tables using *Get +stress_y = mapdl.get("STRSS_Y", "ELEM", 1, "ETAB", "STRS_Y") +stress_z = mapdl.get("STRSS_Z", "ELEM", 1, "ETAB", "STRS_Z") + +# Fill the array with target values +Target_values = np.array([15000, 29749]) + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +results = f""" +------------------- VM13 RESULTS COMPARISON --------------------- + RESULT | TARGET | Mechanical APDL | RATIO +Stress, Y (psi) {Target_values[0]:.5f} {stress_y:.5f} {abs(stress_y/Target_values[0]):.5f} +Stress, Z (psi) {Target_values[1]:.5f} {stress_z:.5f} {abs(stress_z/Target_values[1]):.5f} +----------------------------------------------------------------- +""" +print(results) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/9c9ba9f3ccffa3e07dd8586c658a4153/vm-003-thermally_loaded_support_structure.ipynb b/_downloads/9c9ba9f3ccffa3e07dd8586c658a4153/vm-003-thermally_loaded_support_structure.ipynb new file mode 100644 index 00000000..d6234dba --- /dev/null +++ b/_downloads/9c9ba9f3ccffa3e07dd8586c658a4153/vm-003-thermally_loaded_support_structure.ipynb @@ -0,0 +1,187 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermally loaded support structure {#ref_thermally_loaded_support_structure}\n==================================\n\nProblem description:\n\n: - Find the stresses in the copper and steel wire structure shown\n below. The wires have a cross-sectional area of\n math:[A]{.title-ref}. The structure is subjected to a load\n math:[Q]{.title-ref} and a temperature rise of math:[Delta\n T]{.title-ref} after assembly.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 30, problem 9.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 3-D Spar (or Truss) Elements (LINK180)\n\n![VM3 Problem Sketch](../_static/vm3_setup.png){width=\"400px\"}\n\nMaterial properties\n\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\n: - $A = 0.1 in^2$\n\nLoading:\n\n: - $Q = 4000 lb$\n - $\\Delta T = 10 ^\\circ F$\n\nAnalytical equations:\n\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\n: - Length of wires (20 in.), spacing between wires (10 in.), and\n the reference temperature (70\u00b0F) are arbitrarily selected. The\n rigid lower beam is modeled 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\n===============\n\nSet up the materials and their properties. We are using copper and steel\nhere. - [EX]{.title-ref} - X-direction elastic modulus -\n[ALPX]{.title-ref} - Secant x - coefficient of thermal expansion\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\n======================\n\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]{.title-ref} to\nadd mid-point nodes to two opposite sides.\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\n=========================\n\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" + ] + }, + { + "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==========================\n\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" + ] + }, + { + "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=====\n\n- Enter solution mode\n- Specify a timestep of 1 to be used for this load step\n- Solve the system.\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===============\n\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" + ] + }, + { + "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\n=============\n\nNow that we have the response we can compare the values to the expected\nstresses of 19695 and 10152 respectively.\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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/9de3f38b57dcca3828ce0e4ec5691319/vm-018.ipynb b/_downloads/9de3f38b57dcca3828ce0e4ec5691319/vm-018.ipynb new file mode 100644 index 00000000..7a5c4f85 --- /dev/null +++ b/_downloads/9de3f38b57dcca3828ce0e4ec5691319/vm-018.ipynb @@ -0,0 +1,403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Out-of-Plane Bending of a Curved Bar {#ref_vm18}\n====================================\n\nProblem description:\n\n: - A portion of a horizontal circular ring, built-in at A, is\n loaded by a vertical (Z) load F applied at the end B. The ring\n has a solid circular cross-section of diameter d. Determine the\n deflection $\\delta$ at end B, the maximum bending stress\n $\\sigma_{Bend}$ , and the maximum torsional shear stress \u03c4.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 412, eq. 241.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - Elastic Curved Pipe Element (PIPE18)\n - 3-D 3 Node Pipe Element (PIPE289)\n\n![](../_static/vm18_setup1.png){.align-center width=\"400px\"}\n\n![](../_static/vm18_setup2.png){.align-center width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n\nGeometric properties:\n\n: - $r = 100 in$\n - $d = 2 in$\n - $\\theta = 90\u00b0$\n\nLoading:\n\n: - $F = 50 lb$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - Node 10 is arbitrarily located on the radius of curvature side\n of the element to define the plane of the elbow when PIPE18\n elements are used. The wall thickness is set to half the\n diameter for a solid bar. Since the section has no hole in the\n middle, ovalization cannot occur and PIPE289 elements can be\n used to determine the deflection and stresses.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm18_setup1.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Launch MAPDL with specified settings\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear the existing database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command\nmapdl.run(\"/VERIFY,VM18\")\n\n# Set the title of the analysis\nmapdl.title(\"VM18 OUT-OF-PLANE BENDING OF A CURVED BAR\")\n\n# Enter the model creation /Prep7 preprocessor\nmapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and real properties\n=======================================\n\nUse Elastic Curved Pipe element (PIPE18) and set KEYOPT(6)=2 for\nprinting member forces.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"PIPE18\", \"\", \"\", \"\", \"\", \"\", 2)\n\n# Define geometry parameters (OD, wall thickness, radius) using \"r\" command (real constant)\nmapdl.r(1, 2, 1, 100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio NUXY of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Define nodes\nmapdl.n(1, 100)\nmapdl.n(2, \"\", 100)\nmapdl.n(10)\n\n# Define element\nmapdl.e(1, 2, 10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and load\n===================================\n\nFix all dofs at node 1. Specify nodal force F = -50 lb along Z direction\nat node 2. Then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(1, \"ALL\") # Define boundary conditions\nmapdl.f(2, \"FZ\", -50) # Define load\n\n# Selects all entities\nmapdl.allsel()\n# Element plot\nmapdl.eplot(vtk=False)\n\n# Finish preprocessing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n\n# Set output options\nmapdl.outpr(\"BASIC\", 1)\n\n# Perform the solution\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress quantities.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set the current results set to the last set to be read from result file\nmapdl.set(\"LAST\")\n\n# Get displacement results at node 2 in the Z direction\ndef_z = mapdl.get(\"DEF\", \"NODE\", 2, \"U\", \"Z\")\n\n# Create an element table for bending stresses using ETABLE command\nstrs_ben = mapdl.etable(\"STRS_BEN\", \"NMISC\", 91)\n\n# Create an element table for shear stresses using ETABLE command\nstrs_shr = mapdl.etable(\"STRS_SHR\", \"LS\", 4)\n\n# Get bending stresses (ETAB: STRS_BEN) for element 1\nstrss_b = mapdl.get(\"STRSS_B\", \"ELEM\", 1, \"ETAB\", \"STRS_BEN\")\n\n# Get shear stresses (ETAB: STRS_SHR) for element 1\nstrss_t = mapdl.get(\"STRSS_T\", \"ELEM\", 1, \"ETAB\", \"STRS_SHR\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_val = [-2.648, 6366, -3183]\n\n# Fill result values\nsim_res = [def_z, strss_b, strss_t]\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Deflection (in)\", \"Stress_Bend (psi)\", \"Shear Stress (psi)\"]\n\ndata = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)]\n\ntitle = f\"\"\"\n\n------------------- VM18 RESULTS COMPARISON ---------------------\n\nPIPE18:\n-------\n\"\"\"\n\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Clears the database without restarting.\n=======================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.run(\"/CLEAR,NOSTART\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set a new title for the analysis\n================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.title(\"VM18 OUT-OF-PLANE BENDING OF A CURVED BAR Using PIPE289 ELEMENT MODEL\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Switches to the preprocessor (PREP7)\n====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and section properties\n==========================================\n\nUse 3-D 3-Node Pipe element (PIPE289) and set KEYOPT(4)= 2 Thick pipe\ntheory.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"PIPE289\", \"\", \"\", \"\", 2)\nmapdl.sectype(1, \"PIPE\") # Set section type PIPE\nmapdl.secdata(2, 1, 16) # Set section data (OD, wall thickness)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio NUXY of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.csys(1) # Set coordinate system to 1\n\nmapdl.n(1, 100) # Define nodes\n\n# Generate additional nodes\nmapdl.ngen(19, 1, 1, \"\", \"\", \"\", 5)\n\n# Define element\nmapdl.e(1, 3, 2)\n\n# Generate additional elements from an existing pattern\nmapdl.egen(9, 2, -1)\n\n# Reset coordinate system to global\nmapdl.csys(0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and load\n===================================\n\nFix all dofs at node 1. Specify nodal force F = -50 lb along Z direction\nat node 19. Then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(1, \"ALL\")\nmapdl.f(19, \"FZ\", -50)\n\n# Selects all entities\nmapdl.allsel()\n# Element plot\nmapdl.eplot(vtk=False)\n\n# exists pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n\n# Set output options\nmapdl.outpr(\"BASIC\", 1)\n\n# Perform the solution\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflection and stress quantities.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set the current results set to the last set\nmapdl.set(\"LAST\")\nmapdl.graphics(\"POWER\") # Set graphics mode to POWER\nmapdl.eshape(1) # Set element shape\nmapdl.view(1, 1, 1, 1) # Set view\n\n# Get displacement results at node 19 in the Z direction\ndef_z = mapdl.get(\"DEF\", \"NODE\", 19, \"U\", \"Z\")\n\n# Create an element table for bending stresses using ETABLE command\nstrs_ben = mapdl.etable(\"STRS_BEN\", \"SMISC\", 35)\n\n# Get bending stresses (ETAB: STRS_BEN) for element 1 using ETABLE command\nstrss_b = mapdl.get(\"STRSS_B\", \"ELEM\", 1, \"ETAB\", \"STRS_BEN\")\n\n# for graphics displays\nmapdl.show(option=\"REV\")\n# Plot elemtal solution values for SXY component\nmapdl.plesol(\"S\", \"XY\")\n# Get minimum shear stress\nshear_sxy = mapdl.get(\"SHEAR\", \"PLNSOL\", 0, \"MIN\")\nmapdl.show(\"close\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_val = [-2.648, 6366, -3183]\n\n# Fill result values\nsim_res = [def_z, strss_b, shear_sxy]\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Deflection (in)\", \"Stress_Bend (psi)\", \"Shear Stress (psi)\"]\n\ndata = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)]\n\ntitle = f\"\"\"\n\nPIPE289:\n--------\n\"\"\"\n\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/9ee72e079b61485fed043f960b9fde3f/vm-012-combined-bending-and-torsion.ipynb b/_downloads/9ee72e079b61485fed043f960b9fde3f/vm-012-combined-bending-and-torsion.ipynb new file mode 100644 index 00000000..7a506548 --- /dev/null +++ b/_downloads/9ee72e079b61485fed043f960b9fde3f/vm-012-combined-bending-and-torsion.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Combined bending and torsion {#ref_vm12_example}\n============================\n\nProblem description:\n\n: - A vertical bar of length $l$ is subjected to the action of a\n horizontal force F acting at a distance d from the axis of the\n bar. Determine the maximum principal stress $\\sigma _{max}$ and\n the maximum shear stress $\\tau _ {max}$ in the bar.\n\nReference:\n\n: - Timoshenko, Strength of Materials, Part I, Elementary Theory and\n Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY,\n 1955, pg. 299, problem 2.\n\nAnalysis type(s):\n\n: - Static analysis `ANTYPE=0`\n\nElement type(s):\n\n: - Elastic straight pipe element (`PIPE16`)\n - 3D 2 Node pipe element (`PIPE288`)\n\n![VM12 Problem Sketch](../_static/vm12_setup.png){width=\"400px\"}\n\nMaterial properties\n\n: - $E = 30 \\cdot 10^6 psi$\n - $u=0.3$\n\nGeometric properties:\n\n: - $l = 25 l$\n - $d = 3 ft$\n - Section modulus $(l/c) = 10 in^3$\n - Outer Diameter $= 4.67017 in$\n - Wall Thickness $= 2.33508 in$\n\nLoading:\n\n: - $F = 250 lb$\n - $M = Fd = 9000 in-lb$\n\nAnalysis assumptions and modeling notes:\n\n: - Use consistent length units of inches. Real constants for PIPE16\n and section properties for PIPE288 are used to define the pipe\n Outer Diameter and Wall Thickness. These values are calculated\n for a solid cross-section from the given section modulus. The\n offset load is applied as a centroidal force and a moment.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm12_setup.png'\n\nfrom ansys.mapdl.core import launch_mapdl\nimport pandas" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True)\nmapdl.clear() # optional as MAPDL just started" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing with ET PIPE16\n=============================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.verify(\"vm12\")\nmapdl.prep7()\n\nmapdl.antype(\"STATIC\")\nmapdl.et(1, \"PIPE16\")\nmapdl.r(1, 4.67017, 2.33508) # REAL CONSTANTS FOR SOLID CROSS SECTION\nmapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.3)\nmapdl.n(1)\nmapdl.n(2, \"\", \"\", 300)\nmapdl.e(1, 2)\nmapdl.d(1, \"ALL\")\nmapdl.f(2, \"MZ\", 9000)\nmapdl.f(2, \"FX\", -250)\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\nmapdl.outpr(\"BASIC\", 1)\n\nmapdl.solve()\nmapdl.finish()\nmapdl.post1()\nmapdl.etable(\"P_STRS\", \"NMISC\", 86)\nmapdl.etable(\"SHR\", \"NMISC\", 88)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "p_stress = mapdl.get(\"P_STRESS\", \"ELEM\", 1, \"ETAB\", \"P_STRS\")\nshear = mapdl.get(\"SHEAR\", \"ELEM\", 1, \"ETAB\", \"SHR\")\np_trs = shear / 2\n\n# Fill the array with target values\ntarget_p_stress = 7527\ntarget_p_trs = 3777\n\ndata = [\n [target_p_stress, p_stress, abs(p_stress / target_p_stress)],\n [target_p_trs, p_trs, abs(p_trs / target_p_trs)],\n]\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"MAX PRINSTRS psi\", \"MAX SH STRS psi\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(pandas.DataFrame(data, row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing with ET PIPE288\n==============================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.clear(\"nostart\")\nmapdl.prep7()\nmapdl.run(\"C*** USING PIPE288\")\nmapdl.antype(\"STATIC\")\nmapdl.et(1, \"PIPE288\", \"\", \"\", \"\", 2)\nmapdl.sectype(1, \"PIPE\")\nmapdl.secdata(4.67017, 2.33508)\nmapdl.keyopt(1, 3, 3) # CUBIC SHAPE FUNCTION\nmapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.3)\nmapdl.n(1)\nmapdl.n(2, \"\", \"\", 300)\nmapdl.e(1, 2)\nmapdl.d(1, \"ALL\")\nmapdl.f(2, \"MZ\", 9000)\nmapdl.f(2, \"FX\", -250)\nmapdl.finish()\n\nmapdl.allsel()\nmapdl.eplot()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\nmapdl.outpr(\"BASIC\", 1)\nmapdl.solve()\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\nmapdl.set(\"LAST\")\nmapdl.graphics(\"POWER\")\nmapdl.eshape(1)\nmapdl.view(1, 1, 1, 1)\n\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plesol(\"S\", 1)\nmapdl.show(\"close\")\n\np_stress = mapdl.get(\"P_STRESS\", \"PLNSOL\", 0, \"MAX\")\n\nmapdl.show(option=\"REV\", fname=\"png\")\nmapdl.plesol(\"S\", \"INT\")\nmapdl.show(\"close\")\n\nshear = mapdl.get(\"SHEAR\", \"PLNSOL\", 0, \"MAX\")\np_trs = shear / 2\n\n\n# Fill the array with target values\ntarget_p_stress = 7527.0\ntarget_p_trs = 3777.0\n\ndata = [\n [target_p_stress, p_stress, abs(p_stress / target_p_stress)],\n [target_p_trs, p_trs, abs(p_trs / target_p_trs)],\n]\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"MAX PRINSTRS psi\", \"MAX SH STRS psi\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(pandas.DataFrame(data, row_headers, col_headers))\n\nmapdl.finish()\nmapdl.starlist(\"vm12\", \"vrt\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Stop MAPDL.\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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/a3fffb8f5505318a894dbf2a0b85ea37/vm-006-pinched_cylinder.py b/_downloads/a3fffb8f5505318a894dbf2a0b85ea37/vm-006-pinched_cylinder.py new file mode 100644 index 00000000..0d3e6de8 --- /dev/null +++ b/_downloads/a3fffb8f5505318a894dbf2a0b85ea37/vm-006-pinched_cylinder.py @@ -0,0 +1,466 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm6_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ + +from ansys.mapdl.core import launch_mapdl + +# Start mapdl. +mapdl = launch_mapdl() + + +############################################################################### +# Initiate pre-processing +# ~~~~~~~~~~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + + +def start_prep7(): + mapdl.clear() + mapdl.verify() + mapdl.prep7() + + +start_prep7() + + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element type (a shell-type). + +# 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}" +) + + +############################################################################### +# 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`. + +# 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) + + +############################################################################### +# Define section +# ~~~~~~~~~~~~~~ +# Set up the cross-section properties for a shell element. + +# 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) + + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the keypoints and create the area through the keypoints. + +# 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}") + + +############################################################################### +# Meshing +# ~~~~~~~ +# Define line division of the lines, then mesh the area with shell elements. + +# 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() + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Application of symmetric boundary conditions for simplified model. + +# 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() + + +############################################################################### +# Define distributed loads +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply the force of :math:`F = (100/4) lb` in the y-direction. + +# 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() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. Print the solver output. + + +def solve_procedure(): + mapdl.run("/solu") + out = mapdl.solve() + mapdl.finish() + return out + + +simulation_info = solve_procedure() +print(simulation_info) + +############################################################################### +# 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. + +# Start post-processing mode. +def post_processing(): + mapdl.post1() + mapdl.set(1) + + +post_processing() + + +############################################################################### +# Plotting +# ~~~~~~~~ +# Plot nodal displacement using PyVista. + + +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() + + +############################################################################### +# 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 `. + + +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))}" +) + + +############################################################################### +# Rerun model with SHELL281 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Perform the simulation again using the element type SHELL281. + +# Restart pre-processing routine. +start_prep7() +elem_type = define_element(elem_type="SHELL281") +define_material() +define_section() +define_geometry() +meshing() +define_bc() +define_loads() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. Print the solver output. + +solve_procedure() + + +############################################################################### +# 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. + +post_processing() +plot_nodal_disp() +top_node_281, deflect_shell_281 = get_displacements() + + +############################################################################### +# 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. + +# 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) + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/a9b2a6c7b75082d2e5361a0a97ece302/vm-291.ipynb b/_downloads/a9b2a6c7b75082d2e5361a0a97ece302/vm-291.ipynb new file mode 100644 index 00000000..c7598556 --- /dev/null +++ b/_downloads/a9b2a6c7b75082d2e5361a0a97ece302/vm-291.ipynb @@ -0,0 +1,385 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Force on the Boundary of a Semi-Infinite Body (Boussinesq Problem) {#ref_vm291}\n==================================================================\n\nProblem description:\n\n: - A point force is applied at the origin of a half-space 2D\n axisymmetric solid modeled with far-field domain. Determine the\n displacement in the Y-direction on nodes along the radial\n direction (at location Y = 0) and vertical direction (at\n location X = 0).\n\nReference:\n\n: - TIMOSHENKO,S.P.,AND J.N.GOODIER,THEORY OF ELASTICITY\n MCGRAW-HILL,NEW YORK, PP 398-402, 1970.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - Structural Infinite Solid (INFIN257)\n - 2-D 4-Node Structural Solid (PLANE182)\n - 2-D 8-Node Structural Solid (PLANE183)\n\n![**PLANE182 and INFIN257**](../_static/vm291_setup1.png){.align-center\nwidth=\"400px\"}\n\n![**PLANE183 and INFIN257**](../_static/vm291_setup2.png){.align-center\nwidth=\"400px\"}\n\nMaterial properties:\n\n: - Youngs modulus, $E = 1.0$\n - Poissons ratio, $\\mu = 0.3$\n\nGeometric properties:\n\n: - Radius of finite mesh $= 4.0$\n - Radius of infinite mesh $= 4.0$\n\nLoading:\n\n: - Point Load $= 1.0$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - The problem is solved for two cases:\n - Case 1: Using PLANE182 and INFIN257 elements\n - Case 2: Using PLANE183 and INFIN257 elements\n - The problem is composed with 12 axisymmetric finite element mesh\n (PLANE182 or PLANE183) with a radius of 4 from the origin, and 4\n infinite element mesh (INFIN257) modeling the far-field domain\n with a radius of 4 extending from the finite element domain. The\n infinite element mesh is modeled using the EINFIN command. The\n UX degrees of freedom are constrained at location X = 0. The UY\n results are computed along the radial and vertical direction on\n the nodes belonging to the finite element mesh and then compared\n to the analytical results.\n - The analytic solution to compute vertical displacement for the\n problem of a point load on a half space is:\n $\\omega = \\frac{P}{2 \\pi E} \\bigg [ \\frac{(1+\\nu)z^2}{(r^2+z^2)^{3/2}} + \\frac{2(1-\\nu ^2)}{(r^2 + z^2)^{1/2}} \\bigg]$\n Where $P$ is the point load, $E$ is the Young's modulus, $\\nu$\n is the Poisson's ratio, and $r$ and $z$ are the radial and\n vertical distance from the point load. The above equation\n clearly shows the $\\frac {1}{r}$ singularity at the point of\n application of the load ($r=0$ and $z=0$), which indicates that\n the finite element results may not be close to the analytical\n solution a points close to the origin.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm291_setup1.png'\n\nimport math\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear the current database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command for VM291\nmapdl.run(\"/VERIFY,VM291\")\n\n# Set the title of the analysis\nmapdl.title(\"VM291 FORCE ON BOUNDARY OF A SEMI-INFINITE BODY (BOUSSINESQ PROBLEM)\")\n\n# Entering the PREP7 environment in MAPDL\nmapdl.prep7(mute=True)\n\n# Constant value of PI\npi = math.pi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2D 4-Node structural solid element (PLANE182) and set Keyopt(3)=1,\nAxisymmetric.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"PLANE182\")\nmapdl.keyopt(1, 3, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'S ratio of 0.1 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "exx = 1.0\nmapdl.mp(\"EX\", 1, exx)\nnuxy = 0.1\nmapdl.mp(\"PRXY\", 1, nuxy)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1, 0, 0)\nmapdl.n(2, 1, 0)\nmapdl.n(3, 0.75, -0.75)\nmapdl.n(4, 0, -1)\nmapdl.n(5, 2, 0)\nmapdl.n(6, 1.75, -0.75)\nmapdl.n(7, 1.5, -1.5)\nmapdl.n(8, 0.75, -1.75)\nmapdl.n(9, 0, -2)\nmapdl.n(10, 3, 0)\nmapdl.n(11, 2.5833, -1.0833)\nmapdl.n(12, 2.1667, -2.1667)\nmapdl.n(13, 1.0833, -2.5833)\nmapdl.n(14, 0, -3)\nmapdl.n(15, 4, 0)\nmapdl.n(16, 3.4167, -1.4167)\nmapdl.n(17, 2.8333, -2.8333)\nmapdl.n(18, 1.4167, -3.4167)\nmapdl.n(19, 0, -4)\n\n# Define Mat =1 and Type = 1\nmapdl.mat(1)\nmapdl.type(1)\n\n# FORM 2D 4 NODE STRUCTURAL SOLID ELEMENTS\nmapdl.e(4, 3, 2, 1)\nmapdl.e(6, 5, 2, 3)\nmapdl.e(7, 6, 3, 8)\nmapdl.e(9, 8, 3, 4)\nmapdl.e(11, 10, 5, 6)\nmapdl.e(12, 11, 6, 7)\nmapdl.e(13, 12, 7, 8)\nmapdl.e(14, 13, 8, 9)\nmapdl.e(16, 15, 10, 11)\nmapdl.e(17, 16, 11, 12)\nmapdl.e(18, 17, 12, 13)\nmapdl.e(19, 18, 13, 14)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n\nSelect node located at (0,0,0) and assign it to variable \\\"NPOLE\\\".\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nNPOLE = q.node(0, 0, 0)\n\n# selects nodes\nmapdl.nsel(\"S\", \"\", \"\", 15, 19)\n\n# GENERATE SEMI-INFINITE SOLID ELEMENTS\nmapdl.einfin(\"\", NPOLE)\n\n# Selects all entities\nmapdl.allsel()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nFix UX degrees of freedom at node location X=0. Apply a negative force\n1.0 lb along FY direction at node 1. Then exit prep7 processor.\n\nEffectiely, this sets: - $Point Load = 1.0$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Selects nodes using location x=0\nmapdl.nsel(\"S\", \"LOC\", \"X\", 0)\n# CONSTRAINT UX DOF AT LOCATION X=0\nmapdl.d(\"ALL\", \"UX\", 0)\n\n# Selects all entities\nmapdl.allsel()\nmapdl.eplot()\n\n# FORCE magnitude\np = -1\n# APPLY FORCE ALONG Y DIRECTION AT NODE1 having magnitude \"p\"\nmapdl.f(1, \"FY\", p)\n\n# Finish pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Performing static analysis\nmapdl.antype(\"STATIC\")\n# Controls the solution data written to the database.\nmapdl.outres(\"ALL\", \"ALL\")\n# Sets the time for a load step, time=1\nmapdl.time(1)\n# SOLVE STATIC ANALYSIS\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflections.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set the current results set to the last set to be read from result file\nmapdl.set(\"LAST\")\n# redirects output to the default system output file\nmapdl.run(\"/OUT\")\n# reactivates suppressed printout\nmapdl.gopr()\n\n# Set constant parameters\nr1 = 1\nz1 = 1\n\n# UY AT NODE (1,0,0)\nuy1 = p * (1 - nuxy**2) / (pi * exx * r1)\n# UY AT NODE (0,1,0)\nup1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(1,0,0)\nuya1 = mapdl.get(\"UYA1\", \"NODE\", 2, \"U\", \"Y\")\n# MADPL UY AT NODE(0,1,0)\nupa1 = mapdl.get(\"UPA1\", \"NODE\", 4, \"U\", \"Y\")\n\n# Set constant parameters\nr2 = 2\nz2 = 2\n\n# UY AT NODE (2,0,0)\nuy2 = p * (1 - nuxy**2) / (pi * exx * r2)\n# UY AT NODE (0,2,0)\nup2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(2,0,0)\nuya2 = mapdl.get(\"UYA2\", \"NODE\", 5, \"U\", \"Y\")\n# MADPL UY AT NODE(0,2,0)\nupa2 = mapdl.get(\"UPA2\", \"NODE\", 9, \"U\", \"Y\")\n\n# Set constant parameters, R3=3 and Z3=3\nr3 = 3\nz3 = 3\n\n# UY AT NODE (3,0,0)\nuy3 = p * (1 - nuxy**2) / (pi * exx * r3)\n# UY AT NODE (0,3,0)\nup3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(3,0,0)\nuya3 = mapdl.get(\"UYA3\", \"NODE\", 10, \"U\", \"Y\")\n# MADPL UY AT NODE(0,3,0)\nupa3 = mapdl.get(\"UPA3\", \"NODE\", 14, \"U\", \"Y\")\n\n# Set constant parameters, R4=4 and Z4=4\nr4 = 4\nz4 = 4\n\n# UY AT NODE (4,0,0)\nuy4 = p * (1 - nuxy**2) / (pi * exx * r4)\n# UY AT NODE (0,4,0)\nup4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(4,0,0)\nuya4 = mapdl.get(\"UYA4\", \"NODE\", 15, \"U\", \"Y\")\n# MADPL UY AT NODE(0,4,0)\nupa4 = mapdl.get(\"UPA4\", \"NODE\", 19, \"U\", \"Y\")\n\n# assign labels for nodes\nlabel1 = np.array([\"NODE5\", \"NODE10\", \"NODE15\"])\nlabel2 = np.array([\"NODE9\", \"NODE14\", \"NODE19\"])\n\n# create results arrays for printout\nvalue1 = np.array([uy2, uy3, uy4])\nvalue_ana1 = np.array([uya2, uya3, uya4])\nvalue_ratio1 = []\nfor i in range(len(value_ana1)):\n a = value1[i] / value_ana1[i]\n value_ratio1.append(a)\n\n# create results arrays for printout\nvalue2 = np.array([up2, up3, up4])\nvalue_ana2 = np.array([upa2, upa3, upa4])\nvalue_ratio2 = []\nfor i in range(len(value_ana2)):\n a = value2[i] / value_ana2[i]\n value_ratio2.append(a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "results = f\"\"\"\n--------------------------VM291 RESULTS COMPARISON--------------------------\n\nUSING PLANE182 AND INFIN257 ELEMENTS\n-------------------------------------\n\nVERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0)\n----------------------------------------------\n\n | NODES | TARGET | Mechanical APDL | RATIO\n\n\"\"\"\nprint(results)\n\nfor i in range(len(value1)):\n message = f\"\"\"\n {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f}\n \"\"\"\n print(message)\n\nresults = f\"\"\"\n\nVERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0)\n----------------------------------------------------\n\n\"\"\"\nprint(results)\n\nfor i in range(len(value2)):\n message = f\"\"\"\n {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f}\n \"\"\"\n print(message)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Clears the database without restarting.\n=======================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.run(\"/CLEAR,NOSTART\")\n# redirects output to the default system output file\nmapdl.run(\"/OUT\")\n\n# Enter PREP7 module for the new analysis\nmapdl.prep7(mute=True)\n\n# Constant value of PI\npi = math.pi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'S ratio of 0.1 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "exx = 1.0\nmapdl.mp(\"EX\", 1, exx)\nnuxy = 0.1\nmapdl.mp(\"PRXY\", 1, nuxy)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2D 8-Node structural solid element (PLANE183) and set Keyopt(3)=1,\nAxisymmetric.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"PLANE183\")\nmapdl.keyopt(1, 3, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1, 0.0000, -1.0000, 0.0000)\nmapdl.n(2, 0.75000, -0.75000, 0.0000)\nmapdl.n(3, 0.37500, -0.87500, 0.0000)\nmapdl.n(4, 1.0000, 0.0000, 0.0000)\nmapdl.n(5, 0.87500, -0.37500, 0.0000)\nmapdl.n(6, 0.0000, 0.0000, 0.0000)\nmapdl.n(7, 0.50000, 0.0000, 0.0000)\nmapdl.n(8, 0.0000, -0.50000, 0.0000)\nmapdl.n(9, 1.7500, -0.75000, 0.0000)\nmapdl.n(10, 2.0000, 0.0000, 0.0000)\nmapdl.n(11, 1.8750, -0.37500, 0.0000)\nmapdl.n(12, 1.5000, 0.0000, 0.0000)\nmapdl.n(13, 1.2500, -0.75000, 0.0000)\nmapdl.n(14, 1.5000, -1.5000, 0.0000)\nmapdl.n(15, 1.6250, -1.1250, 0.0000)\nmapdl.n(16, 0.75000, -1.7500, 0.0000)\nmapdl.n(17, 0.75000, -1.2500, 0.0000)\nmapdl.n(18, 1.1250, -1.6250, 0.0000)\nmapdl.n(19, 0.0000, -2.0000, 0.0000)\nmapdl.n(20, 0.37500, -1.8750, 0.0000)\nmapdl.n(21, 0.0000, -1.5000, 0.0000)\nmapdl.n(22, 2.5833, -1.0833, 0.0000)\nmapdl.n(23, 3.0000, 0.0000, 0.0000)\nmapdl.n(24, 2.7917, -0.54165, 0.0000)\nmapdl.n(25, 2.5000, 0.0000, 0.0000)\nmapdl.n(26, 2.1667, -0.91665, 0.0000)\nmapdl.n(27, 2.1667, -2.1667, 0.0000)\nmapdl.n(28, 2.3750, -1.6250, 0.0000)\nmapdl.n(29, 1.8334, -1.8334, 0.0000)\nmapdl.n(30, 1.0833, -2.5833, 0.0000)\nmapdl.n(31, 1.6250, -2.3750, 0.0000)\nmapdl.n(32, 0.91665, -2.1667, 0.0000)\nmapdl.n(33, 0.0000, -3.0000, 0.0000)\nmapdl.n(34, 0.54165, -2.7917, 0.0000)\nmapdl.n(35, 0.0000, -2.5000, 0.0000)\nmapdl.n(36, 3.4167, -1.4167, 0.0000)\nmapdl.n(37, 4.0000, 0.0000, 0.0000)\nmapdl.n(38, 3.7083, -0.70835, 0.0000)\nmapdl.n(39, 3.5000, 0.0000, 0.0000)\nmapdl.n(40, 3.0000, -1.2500, 0.0000)\nmapdl.n(41, 2.8333, -2.8333, 0.0000)\nmapdl.n(42, 3.1250, -2.1250, 0.0000)\nmapdl.n(43, 2.5000, -2.5000, 0.0000)\nmapdl.n(44, 1.4167, -3.4167, 0.0000)\nmapdl.n(45, 2.1250, -3.1250, 0.0000)\nmapdl.n(46, 1.2500, -3.0000, 0.0000)\nmapdl.n(47, 0.0000, -4.0000, 0.0000)\nmapdl.n(48, 0.70835, -3.7083, 0.0000)\nmapdl.n(49, 0.0000, -3.5000, 0.0000)\n\n# Define Mat =1 and Type = 1\nmapdl.mat(1)\nmapdl.type(1)\n\n# DEFINE ELEMENTS\nmapdl.e(1, 2, 4, 6, 3, 5, 7, 8)\nmapdl.e(9, 10, 4, 2, 11, 12, 5, 13)\nmapdl.e(14, 9, 2, 16, 15, 13, 17, 18)\nmapdl.e(19, 16, 2, 1, 20, 17, 3, 21)\nmapdl.e(22, 23, 10, 9, 24, 25, 11, 26)\nmapdl.e(27, 22, 9, 14, 28, 26, 15, 29)\nmapdl.e(30, 27, 14, 16, 31, 29, 18, 32)\nmapdl.e(33, 30, 16, 19, 34, 32, 20, 35)\nmapdl.e(36, 37, 23, 22, 38, 39, 24, 40)\nmapdl.e(41, 36, 22, 27, 42, 40, 28, 43)\nmapdl.e(44, 41, 27, 30, 45, 43, 31, 46)\nmapdl.e(47, 44, 30, 33, 48, 46, 34, 49)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n\nSelect node located at (0,0,0) and assign it to variable \\\"NPOLE\\\".\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nNPOLE = q.node(0, 0, 0)\n\n# select nodes\nmapdl.nsel(\"S\", \"NODE\", \"\", 36, 38, 1)\nmapdl.nsel(\"A\", \"NODE\", \"\", 41, 42, 1)\nmapdl.nsel(\"A\", \"NODE\", \"\", 44, 45, 1)\nmapdl.nsel(\"A\", \"NODE\", \"\", 47, 48, 1)\n\n# GENERATE SEMI-INFINITE SOLID ELEMENTS\nmapdl.einfin(\"\", NPOLE)\n\n# Selects all entities\nmapdl.allsel()\nmapdl.eplot()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nFix UX degrees of freedom at node location X=0. Apply a negative force\n1.0 lb along FY direction at node 6. Then exit prep7 processor.\n\nEffectiely, this sets: - $Point Load = 1.0$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Selects nodes using location x=0\nmapdl.nsel(\"S\", \"LOC\", \"X\", 0)\n# CONSTRAINT UX DOF AT LOCATION X=0\nmapdl.d(\"ALL\", \"UX\", 0)\n# Selects all entities\nmapdl.allsel()\n\n# FORCE magnitude\np = -1\n# APPLY FORCE ALONG Y DIRECTION AT NODE6\nmapdl.f(6, \"FY\", p)\n\n# Finish pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Performing static analysis\nmapdl.antype(\"STATIC\")\n# Controls the solution data written to the database.\nmapdl.outres(\"ALL\", \"ALL\")\n# Sets the time for a load step, time=1\nmapdl.time(1)\n# SOLVE STATIC ANALYSIS\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute deflections.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set the current results set to the last set to be read from result file\nmapdl.set(\"LAST\")\n# redirects output to the default system output file\nmapdl.run(\"/OUT\")\n# reactivates suppressed printout\nmapdl.gopr()\n\n# Set constant parameters\nr1 = 1\nz1 = 1\n\n# UY AT NODE (1,0,0)\nuy1 = p * (1 - nuxy**2) / (pi * exx * r1)\n# UY AT NODE (0,1,0)\nup1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(1,0,0)\nuya1 = mapdl.get(\"UYA1\", \"NODE\", 4, \"U\", \"Y\")\n# MADPL UY AT NODE(0,1,0)\nupa1 = mapdl.get(\"UPA1\", \"NODE\", 1, \"U\", \"Y\")\n\n# Set constant parameters\nr2 = 2\nz2 = 2\n\n# UY AT NODE (2,0,0)\nuy2 = p * (1 - nuxy**2) / (pi * exx * r2)\n# UY AT NODE (0,2,0)\nup2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(2,0,0)\nuya2 = mapdl.get(\"UYA2\", \"NODE\", 10, \"U\", \"Y\")\n# MADPL UY AT NODE(0,2,0)\nupa2 = mapdl.get(\"UPA2\", \"NODE\", 19, \"U\", \"Y\")\n\n# Set constant parameters\nr3 = 3\nz3 = 3\n\n# UY AT NODE (3,0,0)\nuy3 = p * (1 - nuxy**2) / (pi * exx * r3)\n# UY AT NODE (0,3,0)\nup3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(3,0,0)\nuya3 = mapdl.get(\"UYA3\", \"NODE\", 23, \"U\", \"Y\")\n# MADPL UY AT NODE(0,3,0)\nupa3 = mapdl.get(\"UPA3\", \"NODE\", 33, \"U\", \"Y\")\n\n# Set constant parameters\nr4 = 4\nz4 = 4\n\n# UY AT NODE (4,0,0)\nuy4 = p * (1 - nuxy**2) / (pi * exx * r4)\n# UY AT NODE (0,4,0)\nup4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2)\n# MAPDL UY AT NODE(4,0,0)\nuya4 = mapdl.get(\"UYA4\", \"NODE\", 37, \"U\", \"Y\")\n# MADPL UY AT NODE(0,4,0)\nupa4 = mapdl.get(\"UPA4\", \"NODE\", 47, \"U\", \"Y\")\n\n# assign labels for nodes\nlabel1 = np.array([\"NODE10\", \"NODE23\", \"NODE37\"])\nlabel2 = np.array([\"NODE19\", \"NODE33\", \"NODE47\"])\n\n# create results arrays for printout\nvalue1 = np.array([uy2, uy3, uy4])\nvalue_ana1 = np.array([uya2, uya3, uya4])\nvalue_ratio1 = []\nfor i in range(len(value_ana1)):\n a = value1[i] / value_ana1[i]\n value_ratio1.append(a)\n\n# create results arrays for printout\nvalue2 = np.array([up2, up3, up4])\nvalue_ana2 = np.array([upa2, upa3, upa4])\nvalue_ratio2 = []\nfor i in range(len(value_ana2)):\n a = value2[i] / value_ana2[i]\n value_ratio2.append(a)\n\nmapdl.gopr()\nresults = f\"\"\"\n\nUSING PLANE183 AND INFIN257 ELEMENTS\n------------------------------------\n\nVERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0)\n----------------------------------------------\n\n\"\"\"\nprint(results)\n\n\nfor i in range(len(value1)):\n message = f\"\"\"\n {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f}\n \"\"\"\n print(message)\n\nresults = f\"\"\"\n\nVERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0)\n----------------------------------------------------\n\n\"\"\"\nprint(results)\n\nfor i in range(len(value2)):\n message = f\"\"\"\n {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f}\n \"\"\"\n print(message)\n\nmessage = f\"\"\"\n-----------------------------------------------------------------\n\"\"\"\nprint(message)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/aad604df9d29a546db5fc03362beecf2/vm-025.ipynb b/_downloads/aad604df9d29a546db5fc03362beecf2/vm-025.ipynb new file mode 100644 index 00000000..33ec129c --- /dev/null +++ b/_downloads/aad604df9d29a546db5fc03362beecf2/vm-025.ipynb @@ -0,0 +1,385 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Stresses in a Long Cylinder {#ref_vm25}\n===========================\n\nProblem description:\n\n: - A long thick-walled cylinder is initially subjected to an\n internal pressure p. Determine the radial displacement\n $\\delta_r$ at the inner surface, the radial stress $\\sigma_r$ ,\n and tangential stress $\\sigma_t$ , at the inner and outer\n surfaces and at the middle wall thickness. Internal pressure is\n then removed and the cylinder is subjected to a rotation \u03c9 about\n its center line. Determine the radial $\\sigma_r$ and tangential\n $\\sigma_t$ stresses at the inner wall and at an interior point\n located at r = Xi.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part II, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1956, pg. 213, problem 1 and pg. 213, article 42.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2-D 8-Node Structural Solid Elements (PLANE183)\n\n![VM25 Long Cylinder Problem Sketch](../_static/vm25_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n - $\\rho = 0.00073 lb-sec^2/in^4$\n\nGeometric properties:\n\n: - $a = 4 inches$\n - $b = 8 inches$\n - $X_i = 5.43 inches$\n\nLoading:\n\n: - $p = 30,000 psi$\n - $\\Omega = 1000 rad/sec$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - The axial length is arbitrarily selected. Elements are oriented\n such that surface stresses may be obtained at the inner and\n outer cylinder surfaces. POST1 is used to display linearized\n stresses through the thickness of the cylinder when it is\n subjected to an internal pressure.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm25_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Launching MAPDL with specified settings\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clearing the MAPDL database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command for VM25\nmapdl.run(\"/VERIFY,VM25\")\n\n# Set the title of the analysis\nmapdl.title(\"VM25 Stresses in a Long Cylinder\")\n\n# Enter the model creation /Prep7 preprocessor\nmapdl.prep7()\n\n# Deactivate automatic (smart) element sizing\nmapdl.smrtsize(sizlvl=\"OFF\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and properties\n==================================\n\nUse 2-D 8-Node or 6-Node Structural Solid and specify Axisymmetric\nelement behavior via setting Keyopt(3)=1.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"PLANE183\", \"\", \"\", 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6, Density, rho = 0.00073 and Poisson\\'s ratio NUXY of 0.3 is\nspecified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"DENS\", 1, 0.00073)\nmapdl.mp(\"NUXY\", 1, 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Defining node 1 with coordinates (4)\nmapdl.n(1, 4)\n# Defining node 2 with coordinates (4+4/14)\nmapdl.n(2, \"4+4/14\")\n# Defining node 3 with coordinates (4+4/14, 0.5)\nmapdl.n(3, \"4+4/14\", 0.5)\n# Defining node 4 with coordinates (4, 0.5)\nmapdl.n(4, 4, 0.5)\n# Defining node 5 with coordinates (4+4/28)\nmapdl.n(5, \"4+4/28\")\n# Defining node 6 with coordinates (4+4/14, 0.25)\nmapdl.n(6, \"4+4/14\", 0.25)\n# Defining node 7 with coordinates (4+4/28, 0.5)\nmapdl.n(7, \"4+4/28\", 0.5)\n# Defining node 8 with coordinates (4, 0.25)\nmapdl.n(8, 4, 0.25)\n# Creating element 1 with nodes 2, 3, 4, 5, 6, 7, and 8\nmapdl.e(1, 2, 3, 4, 5, 6, 7, 8)\n\n# Generating additional nodes along element 14 using the specified\n# parameters (from an existing pattern)\nmapdl.egen(14, 8, 1, \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"4/14\")\n# Merging nodes based on their coordinates\nmapdl.nummrg(\"NODE\")\n# Generate a mesh using EGEN command\nmapdl.egen(2, 111, 1, 14, \"\", \"\", \"\", \"\", \"\", \"\", \"\", 0.5)\n# Merge the nodes that share the same coordinates\nmapdl.nummrg(\"NODE\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define coupling and boundary conditions\n=======================================\n\nApply a displacement boundary condition in the vertical direction (UY)\nto all nodes. Couple the axial displacements at the unconstrained Y-dir.\nApply internal pressure of 30000 psi is applied on nodes. Also, apply\ndummy pressure for surface printout. Then exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.nsel(\"S\", \"LOC\", \"Y\", 0) # Select nodes located on the Y-axis\n# Apply a displacement boundary condition\nmapdl.d(\"ALL\", \"UY\")\nmapdl.nsel(\"S\", \"LOC\", \"Y\", 1) # Select nodes located on the positive Y-axis\n# Couple the axial displacements at the unconstrained Y-dir\nmapdl.cp(1, \"UY\", \"ALL\")\n\nmapdl.nsel(\n \"S\", \"LOC\", \"X\", 4\n) # Select nodes located on the X-axis at a specific coordinate\n# Apply internal pressure on nodes\nmapdl.sf(\"\", \"PRES\", 30000)\n\nmapdl.nsel(\n \"S\", \"LOC\", \"X\", 8\n) # Select nodes located on the X-axis at a different coordinate\n# Apply dummy pressure for surface printout\nmapdl.sf(\"\", \"PRES\", 1e-10)\n\n# Selects all entities\nmapdl.allsel()\n# Element plot\nmapdl.eplot(background=\"w\")\n\n# Finish the pre-processing processor\nmapdl.finish()\n\n# Save the finite element model\nmapdl.save(\"MODEL\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n# Output results for all nodes\nmapdl.outpr(\"\", \"ALL\")\n# Perform the solution for the load step 1, which is the internal pressure\nmapdl.solve()\n# exists solution processor for load case 1\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute displacement and stress components.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Set the load step 1 and substep to 1\nmapdl.set(1, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nLFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0)\nMID_NODE = q.node(6, 0, 0) # store node number to 'MID_NODE' with coordinate (6,0,0)\nRT_NODE = q.node(8, 0, 0) # store node number to 'RT_NODE' with coordinate (8,0,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Retrieve nodal deflection and section stresses\n==============================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Retrieves the displacement \"DEF_4\" of nodes associated to\n# \"LFT_NODE\" in the X direction\ndef_4 = mapdl.get(\"DEF_4\", \"NODE\", LFT_NODE, \"U\", \"X\")\n\n# Retrieves the stress and store it \"parm\" of nodes associated to a\n# variables 'LFT_NODE','MID_NODE' and 'RT_NODE'\nrst_4_c1 = mapdl.get(\"RST_4_C1\", \"NODE\", LFT_NODE, \"S\", \"X\")\nrst_6_c1 = mapdl.get(\"RST_6_C1\", \"NODE\", MID_NODE, \"S\", \"X\")\nrst_8_c1 = mapdl.get(\"RST_8_C1\", \"NODE\", RT_NODE, \"S\", \"X\")\ntst_4_c1 = mapdl.get(\"TST_4_C1\", \"NODE\", LFT_NODE, \"S\", \"Z\")\ntst_6_c1 = mapdl.get(\"TST_6_C1\", \"NODE\", MID_NODE, \"S\", \"Z\")\ntst_8_c1 = mapdl.get(\"TST_8_C1\", \"NODE\", RT_NODE, \"S\", \"Z\")\n\n# Print the nodal stress solution (COMP means all stress components)\nmapdl.prnsol(\"S\", \"COMP\")\n\n# Define a path with the name 'STRESS' and ID 2, no limits specified\nmapdl.path(\"STRESS\", 2, \"\", 48)\nmapdl.ppath(1, LFT_NODE) # Define the path points using the variable 'LFT_NODE'\nmapdl.ppath(2, RT_NODE) # Define the path points using the variable 'RT_NODE'\nmapdl.plsect(\"S\", \"Z\", -1) # Display the SZ stresses in a sectional plot\nmapdl.plsect(\"S\", \"X\", -1) # Display the SX stresses in a sectional plot\nmapdl.prsect(-1) # Print linearized stresses" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_def = 0.0078666\ntarget_strss = [-30000, -7778, 0]\ntarget_tst_strss = [50000, 27778, 20000]\n\n# Fill result values\nres_def = def_4\nres_strss = [rst_4_c1, rst_6_c1, rst_8_c1]\nres_tst_strss = [tst_4_c1, tst_6_c1, tst_8_c1]\n\ntitle = f\"\"\"\n\n------------------- VM25 RESULTS COMPARISON ---------------------\n\nRESULTS FOR CASE p = 30,000 psi:\n--------------------------------\n\n\"\"\"\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Displacement, in (r = 4 in)\"]\ndata = [\n [target_def, res_def, abs(target_def / res_def)],\n]\nprint(title)\nprint(pd.DataFrame(data, row_headers, col_headers))\n\n# Radial stress results comparison\nrow_headers = [\n \"Stress_r, psi (r = 4 in)\",\n \"Stress_r, psi (r = 6 in)\",\n \"Stress_r, psi (r = 8 in)\",\n]\n\ndata = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)]\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))\n\n# Tangential stress results comparison\nrow_headers = [\n \"Stress_t, psi (r = 4 in)\",\n \"Stress_t, psi (r = 6 in)\",\n \"Stress_t, psi (r = 8 in)\",\n]\ndata = [\n target_tst_strss,\n res_tst_strss,\n np.abs(target_tst_strss) / np.abs(res_tst_strss),\n]\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set a new title for the analysis\n================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.title(\"VM25 Stresses in a Long Cylinder - Rotation About Axis\")\n\n# Resume the Finite Element (FE) \"MODEL\" save previously\nmapdl.resume(\"MODEL\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Print all results\nmapdl.outpr(\"\", \"ALL\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions\n==========================\n\nApply a displacement boundary condition in the vertical direction (UY)\nto all nodes. Rotate the cylinder with an angular velocity of 1000\nrad/sec. Also, apply dummy pressure for surface printout. Then exit\nsolution processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.nsel(\n \"S\", \"LOC\", \"Y\", 0\n) # Select nodes located at Y=0 to prevent rigid body motion\nmapdl.nsel(\"R\", \"LOC\", \"X\", 4) # Select nodes located at X=4\n# Displace all nodes in the Y-direction\nmapdl.d(\"ALL\", \"UY\")\n\nmapdl.nsel(\"S\", \"LOC\", \"X\", 4) # Select nodes located at X=4\n# Apply a small pressure to allow stress printout\nmapdl.sf(\"\", \"PRES\", 1e-10)\n\nmapdl.nsel(\"ALL\") # Select all nodes\n# Rotate the cylinder with an angular velocity of 1000 RAD/SEC\nmapdl.omega(\"\", 1000)\n\n# Solve the problem in load step 2 - centrifugal loading\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute displacement and stress components.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nLFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0)\nXI_NODE = q.node(\n 5.43, 0, 0\n) # store node number to 'XI_NODE' with coordinate (5.43,0,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Retrieve nodal deflection and section stresses\n==============================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "rst_4_c2 = mapdl.get(\"RST_4_C2\", \"NODE\", LFT_NODE, \"S\", \"X\")\ntst_4_c2 = mapdl.get(\"TST_4_C2\", \"NODE\", LFT_NODE, \"S\", \"Z\")\nrst_x_c2 = mapdl.get(\"RST_X_C2\", \"NODE\", XI_NODE, \"S\", \"X\")\ntst_x_c2 = mapdl.get(\"TST_X_C2\", \"NODE\", XI_NODE, \"S\", \"Z\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_strss = [0, 4753]\ntarget_tst_strss = [40588, 29436]\n\n# Fill result values\nres_strss = [rst_4_c2, rst_x_c2]\nres_tst_strss = [tst_4_c2, tst_x_c2]\n\ntitle = f\"\"\"\n\nRESULTS FOR CASE Rotation = 1000 rad/sec:\n-----------------------------------------\n\n\"\"\"\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\n\n# Radial stress results comparison\nrow_headers = [\"Stress_r, psi (r = 4 in)\", \"Stress_r, psi (r = 5.43 in)\"]\n\ndata = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)]\n\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))\n\n# Tangential stress results comparison\nrow_headers = [\"Stress_t, psi (r = 4 in)\", \"Stress_t, psi (r = 5.43 in)\"]\n\ndata = [\n target_tst_strss,\n res_tst_strss,\n np.abs(target_tst_strss) / np.abs(res_tst_strss),\n]\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/afbb5939dea7c3d1de870e19fa8972a5/vm-011-residual-stress-problem.py b/_downloads/afbb5939dea7c3d1de870e19fa8972a5/vm-011-residual-stress-problem.py new file mode 100644 index 00000000..d820f9b6 --- /dev/null +++ b/_downloads/afbb5939dea7c3d1de870e19fa8972a5/vm-011-residual-stress-problem.py @@ -0,0 +1,197 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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). + +""" +# sphinx_gallery_thumbnail_path = '_static/vm11_setup_1.png' + +import math + +from ansys.mapdl.core import launch_mapdl + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL. + +mapdl = launch_mapdl() +mapdl.clear() # optional as MAPDL just started + +############################################################################### +# Pre-processing +# ~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + +mapdl.verify("vm11") +mapdl.prep7() +mapdl.title("VM11 RESIDUAL STRESS PROBLEM", mute=True) + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element type ``LINK180``. + +# 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()) + +############################################################################### +# Define model geometry +# ~~~~~~~~~~~~~~~~~~~~~ +# Set up parameters and geometry. + +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) + +############################################################################### +# Define elements +# ~~~~~~~~~~~~~~~ +# Create elements. +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() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and run the simulation. +mapdl.slashsolu() +mapdl.solve() +mapdl.finish(mute=True) + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. + +# 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() + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/b75ab79f31de431640620ce95e3fda97/vm-291.py b/_downloads/b75ab79f31de431640620ce95e3fda97/vm-291.py new file mode 100644 index 00000000..80b08d14 --- /dev/null +++ b/_downloads/b75ab79f31de431640620ce95e3fda97/vm-291.py @@ -0,0 +1,676 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm291: + +Force on the Boundary of a Semi-Infinite Body (Boussinesq Problem) +------------------------------------------------------------------ +Problem description: + - A point force is applied at the origin of a half-space 2D axisymmetric solid modeled with + far-field domain. Determine the displacement in the Y-direction on nodes along the radial + direction (at location Y = 0) and vertical direction (at location X = 0). + +Reference: + - TIMOSHENKO,S.P.,AND J.N.GOODIER,THEORY OF ELASTICITY + MCGRAW-HILL,NEW YORK, PP 398-402, 1970. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - Structural Infinite Solid (INFIN257) + - 2-D 4-Node Structural Solid (PLANE182) + - 2-D 8-Node Structural Solid (PLANE183) + +.. figure:: ../_static/vm291_setup1.png + :align: center + :width: 400 + :alt: VM291 Finite and Infinite Element Mesh of the Problem (PLANE182 and INFIN257) + + **PLANE182 and INFIN257** + +.. figure:: ../_static/vm291_setup2.png + :align: center + :width: 400 + :alt: VM291 Finite and Infinite Element Mesh of the Problem (PLANE183 and INFIN257) + + **PLANE183 and INFIN257** + +Material properties: + - Youngs modulus, :math:`E = 1.0` + - Poissons ratio, :math:`\mu = 0.3` + +Geometric properties: + - Radius of finite mesh :math:`= 4.0` + - Radius of infinite mesh :math:`= 4.0` + +Loading: + - Point Load :math:`= 1.0` + +Analysis Assumptions and Modeling Notes: + - The problem is solved for two cases: + - Case 1: Using PLANE182 and INFIN257 elements + - Case 2: Using PLANE183 and INFIN257 elements + + - The problem is composed with 12 axisymmetric finite element mesh + (PLANE182 or PLANE183) with a radius of 4 from the origin, and 4 + infinite element mesh (INFIN257) modeling the far-field domain with + a radius of 4 extending from the finite element domain. The infinite + element mesh is modeled using the EINFIN command. The UX degrees of + freedom are constrained at location X = 0. The UY results are computed + along the radial and vertical direction on the nodes belonging to the + finite element mesh and then compared to the analytical results. + + - The analytic solution to compute vertical displacement for the problem + of a point load on a half space is: + :math:`\omega = \frac{P}{2 \pi E} \bigg [ \frac{(1+\nu)z^2}{(r^2+z^2)^{3/2}} + \frac{2(1-\nu ^2)}{(r^2 + z^2)^{1/2}} \bigg]` + Where :math:`P` is the point load, :math:`E` is the Young’s modulus, + :math:`\nu` is the Poisson’s ratio, and :math:`r` and :math:`z` are + the radial and vertical distance from the point load. + The above equation clearly shows the :math:`\frac {1}{r}` singularity + at the point of application of the load (:math:`r=0` and :math:`z=0`), + which indicates that the finite element results may not be close to + the analytical solution a points close to the origin. +""" # noqa:E501 + +# sphinx_gallery_thumbnail_path = '_static/vm291_setup1.png' + +import math + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear the current database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command for VM291 +mapdl.run("/VERIFY,VM291") + +# Set the title of the analysis +mapdl.title("VM291 FORCE ON BOUNDARY OF A SEMI-INFINITE BODY (BOUSSINESQ PROBLEM)") + +# Entering the PREP7 environment in MAPDL +mapdl.prep7(mute=True) + +# Constant value of PI +pi = math.pi + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2D 4-Node structural solid element (PLANE182) and set Keyopt(3)=1, Axisymmetric. +mapdl.et(1, "PLANE182") +mapdl.keyopt(1, 3, 1) + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson'S ratio of 0.1 is specified. +exx = 1.0 +mapdl.mp("EX", 1, exx) +nuxy = 0.1 +mapdl.mp("PRXY", 1, nuxy) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1, 0, 0) +mapdl.n(2, 1, 0) +mapdl.n(3, 0.75, -0.75) +mapdl.n(4, 0, -1) +mapdl.n(5, 2, 0) +mapdl.n(6, 1.75, -0.75) +mapdl.n(7, 1.5, -1.5) +mapdl.n(8, 0.75, -1.75) +mapdl.n(9, 0, -2) +mapdl.n(10, 3, 0) +mapdl.n(11, 2.5833, -1.0833) +mapdl.n(12, 2.1667, -2.1667) +mapdl.n(13, 1.0833, -2.5833) +mapdl.n(14, 0, -3) +mapdl.n(15, 4, 0) +mapdl.n(16, 3.4167, -1.4167) +mapdl.n(17, 2.8333, -2.8333) +mapdl.n(18, 1.4167, -3.4167) +mapdl.n(19, 0, -4) + +# Define Mat =1 and Type = 1 +mapdl.mat(1) +mapdl.type(1) + +# FORM 2D 4 NODE STRUCTURAL SOLID ELEMENTS +mapdl.e(4, 3, 2, 1) +mapdl.e(6, 5, 2, 3) +mapdl.e(7, 6, 3, 8) +mapdl.e(9, 8, 3, 4) +mapdl.e(11, 10, 5, 6) +mapdl.e(12, 11, 6, 7) +mapdl.e(13, 12, 7, 8) +mapdl.e(14, 13, 8, 9) +mapdl.e(16, 15, 10, 11) +mapdl.e(17, 16, 11, 12) +mapdl.e(18, 17, 12, 13) +mapdl.e(19, 18, 13, 14) + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Select node located at (0,0,0) and assign it to variable "NPOLE". +q = mapdl.queries +NPOLE = q.node(0, 0, 0) + +# selects nodes +mapdl.nsel("S", "", "", 15, 19) + +# GENERATE SEMI-INFINITE SOLID ELEMENTS +mapdl.einfin("", NPOLE) + +# Selects all entities +mapdl.allsel() + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix UX degrees of freedom at node location X=0. Apply a negative force 1.0 lb +# along FY direction at node 1. Then exit prep7 processor. +# +# Effectiely, this sets: +# - :math:`Point Load = 1.0` + +# Selects nodes using location x=0 +mapdl.nsel("S", "LOC", "X", 0) +# CONSTRAINT UX DOF AT LOCATION X=0 +mapdl.d("ALL", "UX", 0) + +# Selects all entities +mapdl.allsel() +mapdl.eplot() + +# FORCE magnitude +p = -1 +# APPLY FORCE ALONG Y DIRECTION AT NODE1 having magnitude "p" +mapdl.f(1, "FY", p) + +# Finish pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.slashsolu() + +# Performing static analysis +mapdl.antype("STATIC") +# Controls the solution data written to the database. +mapdl.outres("ALL", "ALL") +# Sets the time for a load step, time=1 +mapdl.time(1) +# SOLVE STATIC ANALYSIS +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflections. + +mapdl.post1() + +# Set the current results set to the last set to be read from result file +mapdl.set("LAST") +# redirects output to the default system output file +mapdl.run("/OUT") +# reactivates suppressed printout +mapdl.gopr() + +# Set constant parameters +r1 = 1 +z1 = 1 + +# UY AT NODE (1,0,0) +uy1 = p * (1 - nuxy**2) / (pi * exx * r1) +# UY AT NODE (0,1,0) +up1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(1,0,0) +uya1 = mapdl.get("UYA1", "NODE", 2, "U", "Y") +# MADPL UY AT NODE(0,1,0) +upa1 = mapdl.get("UPA1", "NODE", 4, "U", "Y") + +# Set constant parameters +r2 = 2 +z2 = 2 + +# UY AT NODE (2,0,0) +uy2 = p * (1 - nuxy**2) / (pi * exx * r2) +# UY AT NODE (0,2,0) +up2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(2,0,0) +uya2 = mapdl.get("UYA2", "NODE", 5, "U", "Y") +# MADPL UY AT NODE(0,2,0) +upa2 = mapdl.get("UPA2", "NODE", 9, "U", "Y") + +# Set constant parameters, R3=3 and Z3=3 +r3 = 3 +z3 = 3 + +# UY AT NODE (3,0,0) +uy3 = p * (1 - nuxy**2) / (pi * exx * r3) +# UY AT NODE (0,3,0) +up3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(3,0,0) +uya3 = mapdl.get("UYA3", "NODE", 10, "U", "Y") +# MADPL UY AT NODE(0,3,0) +upa3 = mapdl.get("UPA3", "NODE", 14, "U", "Y") + +# Set constant parameters, R4=4 and Z4=4 +r4 = 4 +z4 = 4 + +# UY AT NODE (4,0,0) +uy4 = p * (1 - nuxy**2) / (pi * exx * r4) +# UY AT NODE (0,4,0) +up4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(4,0,0) +uya4 = mapdl.get("UYA4", "NODE", 15, "U", "Y") +# MADPL UY AT NODE(0,4,0) +upa4 = mapdl.get("UPA4", "NODE", 19, "U", "Y") + +# assign labels for nodes +label1 = np.array(["NODE5", "NODE10", "NODE15"]) +label2 = np.array(["NODE9", "NODE14", "NODE19"]) + +# create results arrays for printout +value1 = np.array([uy2, uy3, uy4]) +value_ana1 = np.array([uya2, uya3, uya4]) +value_ratio1 = [] +for i in range(len(value_ana1)): + a = value1[i] / value_ana1[i] + value_ratio1.append(a) + +# create results arrays for printout +value2 = np.array([up2, up3, up4]) +value_ana2 = np.array([upa2, upa3, upa4]) +value_ratio2 = [] +for i in range(len(value_ana2)): + a = value2[i] / value_ana2[i] + value_ratio2.append(a) + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +results = f""" +--------------------------VM291 RESULTS COMPARISON-------------------------- + +USING PLANE182 AND INFIN257 ELEMENTS +------------------------------------- + +VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) +---------------------------------------------- + + | NODES | TARGET | Mechanical APDL | RATIO + +""" +print(results) + +for i in range(len(value1)): + message = f""" + {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f} + """ + print(message) + +results = f""" + +VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) +---------------------------------------------------- + +""" +print(results) + +for i in range(len(value2)): + message = f""" + {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f} + """ + print(message) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Clears the database without restarting. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +mapdl.run("/CLEAR,NOSTART") +# redirects output to the default system output file +mapdl.run("/OUT") + +# Enter PREP7 module for the new analysis +mapdl.prep7(mute=True) + +# Constant value of PI +pi = math.pi + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson'S ratio of 0.1 is specified. +exx = 1.0 +mapdl.mp("EX", 1, exx) +nuxy = 0.1 +mapdl.mp("PRXY", 1, nuxy) + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2D 8-Node structural solid element (PLANE183) and set Keyopt(3)=1, Axisymmetric. +mapdl.et(1, "PLANE183") +mapdl.keyopt(1, 3, 1) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1, 0.0000, -1.0000, 0.0000) +mapdl.n(2, 0.75000, -0.75000, 0.0000) +mapdl.n(3, 0.37500, -0.87500, 0.0000) +mapdl.n(4, 1.0000, 0.0000, 0.0000) +mapdl.n(5, 0.87500, -0.37500, 0.0000) +mapdl.n(6, 0.0000, 0.0000, 0.0000) +mapdl.n(7, 0.50000, 0.0000, 0.0000) +mapdl.n(8, 0.0000, -0.50000, 0.0000) +mapdl.n(9, 1.7500, -0.75000, 0.0000) +mapdl.n(10, 2.0000, 0.0000, 0.0000) +mapdl.n(11, 1.8750, -0.37500, 0.0000) +mapdl.n(12, 1.5000, 0.0000, 0.0000) +mapdl.n(13, 1.2500, -0.75000, 0.0000) +mapdl.n(14, 1.5000, -1.5000, 0.0000) +mapdl.n(15, 1.6250, -1.1250, 0.0000) +mapdl.n(16, 0.75000, -1.7500, 0.0000) +mapdl.n(17, 0.75000, -1.2500, 0.0000) +mapdl.n(18, 1.1250, -1.6250, 0.0000) +mapdl.n(19, 0.0000, -2.0000, 0.0000) +mapdl.n(20, 0.37500, -1.8750, 0.0000) +mapdl.n(21, 0.0000, -1.5000, 0.0000) +mapdl.n(22, 2.5833, -1.0833, 0.0000) +mapdl.n(23, 3.0000, 0.0000, 0.0000) +mapdl.n(24, 2.7917, -0.54165, 0.0000) +mapdl.n(25, 2.5000, 0.0000, 0.0000) +mapdl.n(26, 2.1667, -0.91665, 0.0000) +mapdl.n(27, 2.1667, -2.1667, 0.0000) +mapdl.n(28, 2.3750, -1.6250, 0.0000) +mapdl.n(29, 1.8334, -1.8334, 0.0000) +mapdl.n(30, 1.0833, -2.5833, 0.0000) +mapdl.n(31, 1.6250, -2.3750, 0.0000) +mapdl.n(32, 0.91665, -2.1667, 0.0000) +mapdl.n(33, 0.0000, -3.0000, 0.0000) +mapdl.n(34, 0.54165, -2.7917, 0.0000) +mapdl.n(35, 0.0000, -2.5000, 0.0000) +mapdl.n(36, 3.4167, -1.4167, 0.0000) +mapdl.n(37, 4.0000, 0.0000, 0.0000) +mapdl.n(38, 3.7083, -0.70835, 0.0000) +mapdl.n(39, 3.5000, 0.0000, 0.0000) +mapdl.n(40, 3.0000, -1.2500, 0.0000) +mapdl.n(41, 2.8333, -2.8333, 0.0000) +mapdl.n(42, 3.1250, -2.1250, 0.0000) +mapdl.n(43, 2.5000, -2.5000, 0.0000) +mapdl.n(44, 1.4167, -3.4167, 0.0000) +mapdl.n(45, 2.1250, -3.1250, 0.0000) +mapdl.n(46, 1.2500, -3.0000, 0.0000) +mapdl.n(47, 0.0000, -4.0000, 0.0000) +mapdl.n(48, 0.70835, -3.7083, 0.0000) +mapdl.n(49, 0.0000, -3.5000, 0.0000) + +# Define Mat =1 and Type = 1 +mapdl.mat(1) +mapdl.type(1) + +# DEFINE ELEMENTS +mapdl.e(1, 2, 4, 6, 3, 5, 7, 8) +mapdl.e(9, 10, 4, 2, 11, 12, 5, 13) +mapdl.e(14, 9, 2, 16, 15, 13, 17, 18) +mapdl.e(19, 16, 2, 1, 20, 17, 3, 21) +mapdl.e(22, 23, 10, 9, 24, 25, 11, 26) +mapdl.e(27, 22, 9, 14, 28, 26, 15, 29) +mapdl.e(30, 27, 14, 16, 31, 29, 18, 32) +mapdl.e(33, 30, 16, 19, 34, 32, 20, 35) +mapdl.e(36, 37, 23, 22, 38, 39, 24, 40) +mapdl.e(41, 36, 22, 27, 42, 40, 28, 43) +mapdl.e(44, 41, 27, 30, 45, 43, 31, 46) +mapdl.e(47, 44, 30, 33, 48, 46, 34, 49) + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Select node located at (0,0,0) and assign it to variable "NPOLE". +q = mapdl.queries +NPOLE = q.node(0, 0, 0) + +# select nodes +mapdl.nsel("S", "NODE", "", 36, 38, 1) +mapdl.nsel("A", "NODE", "", 41, 42, 1) +mapdl.nsel("A", "NODE", "", 44, 45, 1) +mapdl.nsel("A", "NODE", "", 47, 48, 1) + +# GENERATE SEMI-INFINITE SOLID ELEMENTS +mapdl.einfin("", NPOLE) + +# Selects all entities +mapdl.allsel() +mapdl.eplot() + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix UX degrees of freedom at node location X=0. Apply a negative force 1.0 lb +# along FY direction at node 6. Then exit prep7 processor. +# +# Effectiely, this sets: +# - :math:`Point Load = 1.0` + +# Selects nodes using location x=0 +mapdl.nsel("S", "LOC", "X", 0) +# CONSTRAINT UX DOF AT LOCATION X=0 +mapdl.d("ALL", "UX", 0) +# Selects all entities +mapdl.allsel() + +# FORCE magnitude +p = -1 +# APPLY FORCE ALONG Y DIRECTION AT NODE6 +mapdl.f(6, "FY", p) + +# Finish pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.slashsolu() + +# Performing static analysis +mapdl.antype("STATIC") +# Controls the solution data written to the database. +mapdl.outres("ALL", "ALL") +# Sets the time for a load step, time=1 +mapdl.time(1) +# SOLVE STATIC ANALYSIS +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflections. + +mapdl.post1() + +# Set the current results set to the last set to be read from result file +mapdl.set("LAST") +# redirects output to the default system output file +mapdl.run("/OUT") +# reactivates suppressed printout +mapdl.gopr() + +# Set constant parameters +r1 = 1 +z1 = 1 + +# UY AT NODE (1,0,0) +uy1 = p * (1 - nuxy**2) / (pi * exx * r1) +# UY AT NODE (0,1,0) +up1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(1,0,0) +uya1 = mapdl.get("UYA1", "NODE", 4, "U", "Y") +# MADPL UY AT NODE(0,1,0) +upa1 = mapdl.get("UPA1", "NODE", 1, "U", "Y") + +# Set constant parameters +r2 = 2 +z2 = 2 + +# UY AT NODE (2,0,0) +uy2 = p * (1 - nuxy**2) / (pi * exx * r2) +# UY AT NODE (0,2,0) +up2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(2,0,0) +uya2 = mapdl.get("UYA2", "NODE", 10, "U", "Y") +# MADPL UY AT NODE(0,2,0) +upa2 = mapdl.get("UPA2", "NODE", 19, "U", "Y") + +# Set constant parameters +r3 = 3 +z3 = 3 + +# UY AT NODE (3,0,0) +uy3 = p * (1 - nuxy**2) / (pi * exx * r3) +# UY AT NODE (0,3,0) +up3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(3,0,0) +uya3 = mapdl.get("UYA3", "NODE", 23, "U", "Y") +# MADPL UY AT NODE(0,3,0) +upa3 = mapdl.get("UPA3", "NODE", 33, "U", "Y") + +# Set constant parameters +r4 = 4 +z4 = 4 + +# UY AT NODE (4,0,0) +uy4 = p * (1 - nuxy**2) / (pi * exx * r4) +# UY AT NODE (0,4,0) +up4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2) +# MAPDL UY AT NODE(4,0,0) +uya4 = mapdl.get("UYA4", "NODE", 37, "U", "Y") +# MADPL UY AT NODE(0,4,0) +upa4 = mapdl.get("UPA4", "NODE", 47, "U", "Y") + +# assign labels for nodes +label1 = np.array(["NODE10", "NODE23", "NODE37"]) +label2 = np.array(["NODE19", "NODE33", "NODE47"]) + +# create results arrays for printout +value1 = np.array([uy2, uy3, uy4]) +value_ana1 = np.array([uya2, uya3, uya4]) +value_ratio1 = [] +for i in range(len(value_ana1)): + a = value1[i] / value_ana1[i] + value_ratio1.append(a) + +# create results arrays for printout +value2 = np.array([up2, up3, up4]) +value_ana2 = np.array([upa2, upa3, upa4]) +value_ratio2 = [] +for i in range(len(value_ana2)): + a = value2[i] / value_ana2[i] + value_ratio2.append(a) + +mapdl.gopr() +results = f""" + +USING PLANE183 AND INFIN257 ELEMENTS +------------------------------------ + +VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) +---------------------------------------------- + +""" +print(results) + + +for i in range(len(value1)): + message = f""" + {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f} + """ + print(message) + +results = f""" + +VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) +---------------------------------------------------- + +""" +print(results) + +for i in range(len(value2)): + message = f""" + {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f} + """ + print(message) + +message = f""" +----------------------------------------------------------------- +""" +print(message) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/bbfe574e8ca7b5f79a87b9f214259600/vm-015.py b/_downloads/bbfe574e8ca7b5f79a87b9f214259600/vm-015.py new file mode 100644 index 00000000..f2f9d389 --- /dev/null +++ b/_downloads/bbfe574e8ca7b5f79a87b9f214259600/vm-015.py @@ -0,0 +1,315 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm15: + +Bending of a Circular Plate Using Axisymmetric Shell Elements +------------------------------------------------------------- +Problem description: + - A flat circular plate of radius r and thickness t is subject to + various edge constraints and surface loadings. Determine the + deflection :math:`\delta` at the middle and the maximum stress :math:`\sigma_{max}` + for each case. + + * Case 1: Uniform loading :math:`P`, clamped edge. + * Case 2: Concentrated center loading :math:`F`, clamped edge. + * Case 3: Uniform loading :math:`\frac{P}{4}`, simply supported edge. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 96,97, and 103. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-Node Finite Strain Axisymmetric Shell (SHELL208) + +.. image:: ../_static/vm15_setup.png + :width: 400 + :alt: VM15 Flat Circular Plate Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`r = 40.0 in` + - :math:`t = 1.0 in` + +Loading: + - :math:`P = 6.0 psi` + - :math:`F = 7,539.82 lb` + +Analysis Assumptions and Modeling Notes: + - The stiffness matrix formed in the first load step is automatically reused + in the second load step. A new stiffness matrix is automatically formed in + the third load step because of changed boundary constraints. The mesh density + is biased near the centerline and outer edge to recover stress values near + those points. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm15_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import pandas as pd + +# Launch MAPDL with specified settings +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear any existing database +mapdl.clear() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Run the /VERIFY command for VM15 +mapdl.run("/VERIFY,VM15") + +# Set the title of the analysis +mapdl.title("VM15 BENDING OF A CIRCULAR PLATE USING AXISYMMETRIC SHELL ELEMENTS") + +# Enter the model creation prep7 preprocessor +mapdl.prep7(mute=True) + +############################################################################### +# Define element type and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2-Node Axisymmetric Shell (SHELL208) and include extra internal node, +# via Keyopt(3)=2. + +mapdl.et(1, "SHELL208", "", "", 2) # Element type SHELL208 +mapdl.sectype(1, "SHELL") # Section type SHELL +mapdl.secdata(1, 1) # Section data +mapdl.secnum(1) # Section number + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio of 0.3 is specified. + +mapdl.mp("EX", 1, 30e6) # Young's modulus +mapdl.mp("NUXY", 1, 0.3) # Poisson's ratio + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1) # Node 1 +mapdl.n(11, 40) # Node 11 at 40 degrees +mapdl.n(6, 20) # Node 6 at 20 degrees + +# Generate mesh with biased elements +mapdl.fill(1, 6, 4, "", "", "", "", 20) # BIAS THE MESH TO ALLOW STRESS RECOVERY NEAR +mapdl.fill(6, 11, 4, "", "", "", "", 0.05) # THE CENTERLINE AND EDGE CONSTRAINTS + +# Define element connectivity +mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + +# Generates elements from an existing pattern +mapdl.egen(10, 1, -1) + +# select all entities +mapdl.allsel() +# element plot +mapdl.eplot() + +# Finish the pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system for three load steps. + +mapdl.slashsolu() + +# Set analysis type to static +mapdl.antype("STATIC") + +# Controls the solution printout +mapdl.outpr("", 1) + +############################################################################### +# Define boundary conditions and loadings +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all degrees of freedom (dof) at node 11 and fix UX & ROTZ dofs at node 1. +# Solve for three load case scenarios as defined. +# +# Case 1: Apply uniform pressure loading, P = 6 psi near clamped edge. +# Case 2: Concentrated center loading F = 7,539.82 lb, clamped edge. +# Case 3: Uniform loading P/4, simply supported edge. +# Then exit prep7 processor. + +# Apply boundary conditions and loads for CASE 1 +mapdl.d(1, "UX", "", "", "", "ROTZ") # Fix UX and ROTZ for node 1 +mapdl.d(11, "ALL") # Fix all degrees of freedom for node 11 +mapdl.sfe("ALL", 1, "PRES", "", 6) # Surface Pressure load = 6 PSI on all elements + +# start solve for 1st load case +mapdl.solve() + +# Apply boundary conditions and loads for Load Case 2 +# Load Case 2: Concentrated Center Loading - Clamped Edge +mapdl.f(1, "FY", -7539.82) # apply concentrated force FY on node 1 +mapdl.sfe( + "ALL", 1, "PRES", "", 0 +) # apply elemental surface pressure load of magnitude "0" + +# start solve for 2nd load case +mapdl.solve() + +# Apply boundary conditions and loads for Load Case 3 +# Load Case 3: Uniform Loading - Simply Supported Edge +mapdl.ddele(11, "ROTZ") # Delete clamped boundary condition constraint +mapdl.f(1, "FY") # apply nodal force of magnitude "0" +mapdl.sfe("ALL", 1, "PRES", "", 1.5) # elemental surface pressure load = 1.5 PSI + +# start solve for 3rd load case +mapdl.solve() + +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components. + +mapdl.post1() + +# Set displacement scaling for post-processing +# mapdl.dscale(1, 35) + +# Set up and activate window 1 +mapdl.window(1, -1, 1, -1, -0.333) + +# reactivates suppressed printout +mapdl.gopr() + +# Set 1st load case to be read from result file for post-processing +mapdl.set(1, 1) + +mapdl.pldisp(1) # Displays the displaced structure +mapdl.window(1, "OFF") # Turn off window 1 +mapdl.window(2, -1, 1, -0.333, 0.333, 1) # Turn on window 2 + +# Don't erase existing displays +mapdl.run("/NOERASE") + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +# Grab node using coordinates and assign it variable to "MID_NODE" +MID_NODE = q.node(0, 0, 0) + +############################################################################### +# Retrieve nodal deflection and elemental stresses for each load cases +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# 1st load case, retrieve nodal defection UY for a node assigned to "DEF_C1" +def_c1 = mapdl.get("DEF_C1", "NODE", MID_NODE, "U", "Y") +# Define etable for elemental component stress (X) +mapdl.etable("STRS", "S", "X") +# using *get command extracting elemental stress via ETAB +strss_c1 = mapdl.get("STRSS_C1", "ELEM", 10, "ETAB", "STRS") + +# Set 2nd load case to be read from result file for post-processing +mapdl.set(2, 1) + +mapdl.pldisp() # Displays the displaced structure +mapdl.window(2, "OFF") # Turn off window 2 +mapdl.window(3, -1, 1, 0.333, 1, 1) # Turn on window 3 + +# retrieve nodal defection UY for a node assigned to "DEF_C2" +def_c2 = mapdl.get("DEF_C2", "NODE", MID_NODE, "U", "Y") +# Define etable for elemental component stress (X) +mapdl.etable("STRS", "S", "X") +# using *get command extracting elemental stress via ETAB +strss_c2 = mapdl.get("STRSS_C2", "ELEM", 10, "ETAB", "STRS") + +# Set 2nd load case to be read from result file for post-processing +mapdl.set(3, 1) + +mapdl.pldisp() # Displays the displaced structure +# retrieve nodal defection UY for a node assigned to "DEF_C3" +def_c3 = mapdl.get("DEF_C3", "NODE", MID_NODE, "U", "Y") +# Define etable for elemental component stress (X) +mapdl.etable("STRS", "S", "X") +# using *get command extracting elemental stress via ETAB +strss_c3 = mapdl.get("STRSS_C3", "ELEM", 1, "ETAB", "STRS") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_def = [-0.08736, -0.08736, -0.08904] +target_strss = [7200, 3600, 2970] + +# Fill result values +res_def = [def_c1, def_c2, def_c3] +res_strss = [strss_c1, strss_c2, strss_c3] + +title = f""" + +------------------- VM15 RESULTS COMPARISON --------------------- +""" +print(title) + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["DEFLECTION (in)", "MAX STRESS (psi)"] + +for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + +RESULTS FOR CASE {lc+1:1d}: +------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/bc4e59b49c93c983a8346b0e14f599d9/vm-008-parametric_calculation.ipynb b/_downloads/bc4e59b49c93c983a8346b0e14f599d9/vm-008-parametric_calculation.ipynb new file mode 100644 index 00000000..caf2844c --- /dev/null +++ b/_downloads/bc4e59b49c93c983a8346b0e14f599d9/vm-008-parametric_calculation.ipynb @@ -0,0 +1,169 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Parametric calculation {#ref_vm8_example}\n======================\n\nProblem description:\n\n: - Write a user file macro to calculate the distance `d` between\n either nodes or keypoints in `PREP7`. Define abbreviations for\n calling the macro and verify the parametric expressions by using\n the macro to calculate the distance between nodes $N_1$ and\n $N_2$ and between keypoints $K_3$ and $K_4$.\n\nReference:\n\n: - None.\n\nAnalysis type(s):\n\n: - Parametric arithmetic.\n\nElement type:\n\n: - None.\n\nGeometric properties (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 - $K_{\\mathrm{3(x,y,z)}} = 100, 0, 30$\n - $K_{\\mathrm{4(x,y,z)}} = -200,25,80$\n\n![VM8 Problem Sketch](../_static/vm8_setup.png){width=\"300px\"}\n\nAnalysis assumptions and modeling notes:\n\n: - Instead of `*CREATE`, `*USE`, etc., we have created a class\n `Create` with methods that correspond to each type of\n simulation. This class gives a possibility to change coordinates\n and reuse it. The simulation can be checked not just by target\n values, but also with the simple distances\\' formula between\n keypoints as:\n - \n\n Calculate distance between two keypoints in the Cartesian coordinate system:\n\n : $D = \\sqrt[2]{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$\n\n - \n\n Python representation of the distance formula:\n\n : ::: {.doctest}\n import math \\# Define coordinates for keypoints K3 and\n K4. x1, y1, z1 = 100, 0, 30 x2, y2, z2 = -200, 25, 80\n dist\\_kp = math.sqrt((x2 - x1)**2 + (y2 - y1)**2 + (z2 -\n z1)\\*\\*2) print(dist\\_kp)\n :::\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm8_setup.png'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL and import Numpy and Pandas libraries.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Start MAPDL.\nmapdl = launch_mapdl()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing\n==============\n\nEnter verification example mode and the pre-processing routine.\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\n============\n\nIdentifying the class `create` with methods `create_kp_method` and\n`create_node_method` to calculate and plot the distances between\nkeypoints and nodes.\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\n==========================\n\nUsing already created method for keypoints to get the distance between\nthem and 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" + ] + }, + { + "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.\n=======================\n\nUsing already created method for nodes to get the distance between them\nand print 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" + ] + }, + { + "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\n=============\n\nFinally we have the results of the distances for both simulations, which\ncan be compared with expected target values:\n\n- 1st simulation to get the distance between keypoints $K_3$ and\n $K_4$, where $LEN_1 = 305.16\\,(in)$\n- 2nd simulation to get the distance between nodes $N_1$ and $N_2$,\n where $LEN_2 = 8.58\\,(in)$\n\nFor better representation of the results we can use `pandas` dataframe\nwith following settings below:\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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/cb7882b50293825f0fdc1f1412cb1e30/vm-295.py b/_downloads/cb7882b50293825f0fdc1f1412cb1e30/vm-295.py new file mode 100644 index 00000000..56422657 --- /dev/null +++ b/_downloads/cb7882b50293825f0fdc1f1412cb1e30/vm-295.py @@ -0,0 +1,355 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm295: + +One Dimensional Terzaghi's Consolidation Problem with Permeability as Function of Depth +--------------------------------------------------------------------------------------- +Problem description: + - The test case is to simulate a one-dimensional Terzaghi's problem with permeability as a function + of the soil depth. A pressure P is applied on the top surface of the soil with depth H and + width W. The top surface of the soil is fully permeable and the permeability decreases linearly + with depth. The excess pore water pressure for 0.1, 0.2, 0.3, 0.4, and 0.5 day is calculated and + compared against the reference results obtained using the PIM method (Figure 5, pg. 5916). + +Reference: + - A POINT INTERPOLATION METHOD FOR SIMULATING DISSIPATION PROCESS + OF CONSOLIDATION, J.G.WANG, G.R.LIU, Y.G.WU, COMPUTER METHODS + IN APPLIED MECHANICS AND ENGINEERING 190 (2001),PG: 5907-5922 + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2D 4-Node Coupled Pore-Pressure Element (CPT212) + +.. image:: ../_static/vm295_setup.png + :width: 100 + :alt: VM295 Problem Sketch + +Material properties: + - Youngs modulus, :math:`E = 4 \cdot 10^7 Pa` + - Poissons ratio, :math:`\mu = 0.3` + - Permeability value at bottom of the soil, :math:`fpx = 1.728 \cdot 10^-3 m/day` + - Permeability value at the top of the soil = :math:`100 * fpx` + +Geometric properties: + - Height, :math:`H = 16 m` + - Width, :math:`W = 1 m` + +Loading: + - Pressure, :math:`P = 1 \cdot 10^4 Pa` + +Analysis Assumptions and Modeling Notes: + - The soil is modeled using 2D CPT212 elements with plane strain element behavior. + The UX degree of freedom for all nodes is constrained and the UY degree of freedom at the bottom + of the soil is constrained. The pressure degree of freedom at the top edge is constrained to + make it fully permeable. Linearly varying permeability of the soil is defined using the TB,PM + material model. Static analysis is performed with an end time of 86400 seconds (1 day) and with + stepped pressure loading P on the top edge of the soil. The excess water pore pressure at depth + H = 6 m is computed for 0.1 (8640 s), 0.2 (17280 s), 0.3 (25920 s), 0.4 (34560 s), and + 0.5 days (43200 s) by interpolating the solution obtained at the nearest time points. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm295_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) +# Clear the current database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command for VM295 +mapdl.run("/VERIFY,VM295") + +# Set the title of the analysis +mapdl.title( + "VM295 1D TERZAGHI'S CONSOLIDATION PROBLEM WITH PERMEABILITY AS FUNCTION OF DEPTH" +) + +# Entering the PREP7 environment in MAPDL +mapdl.prep7(mute=True) + +# Set Parameters +day = 24 * 3600 # SECONDS IN ONE DAY +h = 16 # TOTAL DEPTH OF SOIL IN METERS +w = 1 # WIDTH OF SOIL IN METERS +pres = 1e4 # PRESSURE IN PA +ex = 4e7 # YOUNG'S MODULUS IN PA +tt = 1 * day + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2D 4 NOode Coupled Pore Pressure Element (CPT212) and +# set PLANE STRAIN Formulation Keyopt(3)=2. + +mapdl.et(1, "CPT212") +mapdl.keyopt(1, 12, 1) +mapdl.keyopt(1, 3, 2) + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 4e7 +# and Poisson's ratio of 0.3 is specified. + +mapdl.mp("EX", 1, ex) +mapdl.mp("NUXY", 1, 0.3) + +# Set parameters +fpx = 1.728e-3 / day / 1e4 # PERMEABILITY FROM REFERENCE +one = 1.0 + +# Define TB material properties +mapdl.tb("PM", 1, "", "", "PERM") # DEFINING PERMEABILITY FOR THE SOIL +mapdl.tbfield("YCOR", 0) # LOCATION Y = 0 +mapdl.tbdata(1, fpx, fpx, fpx) # PERMEABILITY VALUES AT LOCATION Y=0 +mapdl.tbfield("YCOR", h) # LOCATION Y=16 +# PERMEABILITY VALUES AT LOCATION Y=16, LINEAR VARIABLE PERMEABILITY +mapdl.tbdata(1, fpx * 100, fpx * 100, fpx * 100) +mapdl.tb("PM", 1, "", "", "BIOT") # DEFINING BIOT COEFFICINET FOR SOIL +mapdl.tbdata(1, one) # BIOT COEFFICIENT + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.rectng(0, w, 0, h) # Generate rectangle +# Specifies the divisions and spacing ratio on unmeshed lines +mapdl.lesize(4, "", "", 16) +mapdl.lesize(3, "", "", 1) +# For elements that support multiple shapes, specifies the element shape, set mshape=2D +mapdl.mshape(0, "2D") +mapdl.mshkey(1) # Key(1) = Specifies mapped meshing should be used to mesh +mapdl.amesh(1) # CREATING CPT212 ELEMENTS + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix UX degrees of freedom. Constraining UY DOF AT Location Y=0. +# Defining the top portion of the soil as permeable. +# Then exit prep7 processor. + +mapdl.d("ALL", "UX", 0) # CONSTRAINING ALL UX DOF + +mapdl.nsel("S", "LOC", "Y", 0) +mapdl.d("ALL", "UY", 0) # CONSTRAINING UY DOF AT LOCATION Y=0 +mapdl.nsel("ALL") + +mapdl.nsel("S", "LOC", "Y", h) +mapdl.d("ALL", "PRES", 0) # DEFINING THE TOP PORTION OF SOIL AS PERMEABLE +# selects all nodes +mapdl.nsel("ALL") +# selects all element +mapdl.esel("ALL") +mapdl.aplot() + +# Finish pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +mapdl.antype("STATIC") # Performing static analysis +mapdl.nropt("UNSYM") # UNSYMMETRIC NEWTON RAPHSON OPTION +mapdl.time(tt) # END TIME + +mapdl.nsel("S", "LOC", "Y", h) +# APPLYING Surface PRESSURE LOAD AT TOP OF THE SOIL +mapdl.sf("ALL", "PRES", pres) +# selects all nodes +mapdl.nsel("ALL") + +# Specify number of SUBSTEPS +mapdl.nsubst(nsbstp=350, nsbmx=1000, nsbmn=150) + +# Controls the solution data written to the database. +mapdl.outres("ALL", "ALL") +mapdl.kbc(1) # STEPPED LOADING + +# SOLVE STATIC ANALYSIS +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. + +mapdl.post1() +# Set the current results set to the last set to be read from result file +mapdl.set("LAST") +# redirects output to the default system output file +mapdl.run("/OUT") +# reactivates suppressed printout +mapdl.gopr() + +############################################################################### +# Specify Reference Solution +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.com("") +mapdl.com("EXCESS PORE PRESSURE IN KILOPASCALS AT LOCATION X=1,Y=6") +mapdl.com("FOR 0.1 DAY (8640 SECONDS),0.2 DAY (17280 SECONDS)") +mapdl.com("0.3 DAY (25920 SECONDS), 0.4 DAY (34560 SECONDS)") +mapdl.com("AND 0.5 DAY (43200 SECONDS) ARE COMPUTED AND COMPARED") +mapdl.com("AGAINST REFERENCE SOLUTION") +mapdl.com("") + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +nd1 = q.node(1.0, 6.0, 0.0) + +############################################################################### +# Post-processing: Compute pore pressure +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# redirects solver output to a file named "SCRATCH" +mapdl.run("/OUT,SCRATCH") +# Specify load set to read from the result file, load step =1, sub-step=16 +mapdl.set(1, 16) +p11 = mapdl.get("P11", "NODE", nd1, "PRES") +t11 = mapdl.get("T11", "ACTIVE", 0, "SET", "TIME") +# Specify load set to read from the result file, load step =1, sub-step=17 +mapdl.set(1, 17) +p12 = mapdl.get("P12", "NODE", nd1, "PRES") +t12 = mapdl.get("T12", "ACTIVE", 0, "SET", "TIME") +t1 = day * 0.1 +mapdl.com("") +mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.1DAY") +mapdl.com("") +pt1 = (p11 + (t1 - t11) / (t12 - t11) * (p12 - p11)) / 1e3 +# Specify load set to read from the result file, load step =1, sub-step=31 +mapdl.set(1, 31) +p21 = mapdl.get("P21", "NODE", nd1, "PRES") +t21 = mapdl.get("T21", "ACTIVE", 0, "SET", "TIME") +# Specify load set to read from the result file, load step =1, sub-step=32 +mapdl.set(1, 32) +p22 = mapdl.get("P22", "NODE", nd1, "PRES") +t22 = mapdl.get("T22", "ACTIVE", 0, "SET", "TIME") +t2 = day * 0.2 +mapdl.com("") +mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.2DAY") +mapdl.com("") +pt2 = (p21 + (t2 - t21) / (t22 - t21) * (p22 - p21)) / 1e3 +# Specify load set to read from the result file, load step =1, sub-step=46 +mapdl.set(1, 46) +p31 = mapdl.get("P31", "NODE", nd1, "PRES") +t31 = mapdl.get("T31", "ACTIVE", 0, "SET", "TIME") +# Specify load set to read from the result file, load step =1, sub-step=47 +mapdl.set(1, 47) +p32 = mapdl.get("P32", "NODE", nd1, "PRES") +t32 = mapdl.get("T32", "ACTIVE", 0, "SET", "TIME") +t3 = day * 0.3 +mapdl.com("") +mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.3DAY") +mapdl.com("") +pt3 = (p31 + (t3 - t31) / (t32 - t31) * (p32 - p31)) / 1e3 +# Specify load set to read from the result file, load step =1, sub-step=61 +mapdl.set(1, 61) +p41 = mapdl.get("P41", "NODE", nd1, "PRES") +t41 = mapdl.get("T41", "ACTIVE", 0, "SET", "TIME") +# Specify load set to read from the result file, load step =1, sub-step=62 +mapdl.set(1, 62) +p42 = mapdl.get("P42", "NODE", nd1, "PRES") +t42 = mapdl.get("T42", "ACTIVE", 0, "SET", "TIME") +t4 = day * 0.4 +mapdl.com("") +mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.4DAY") +mapdl.com("") +pt4 = (p41 + (t4 - t41) / (t42 - t41) * (p42 - p41)) / 1e3 +# Specify load set to read from the result file, load step =1, sub-step=76 +mapdl.set(1, 76) +p51 = mapdl.get("P51", "NODE", nd1, "PRES") +t51 = mapdl.get("T51", "ACTIVE", 0, "SET", "TIME") +# Specify load set to read from the result file, load step =1, sub-step=77 +mapdl.set(1, 77) +p52 = mapdl.get("P52", "NODE", nd1, "PRES") +t52 = mapdl.get("T52", "ACTIVE", 0, "SET", "TIME") +t5 = day * 0.5 +mapdl.com("") +mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.5DAY") +mapdl.com("") +pt5 = (p51 + (t5 - t51) / (t52 - t51) * (p52 - p51)) / 1e3 +# Store result values in array +P = np.array([pt1, pt2, pt3, pt4, pt5]) + +# REFERENCE RESULTS, FIGURE 5, PG 5916 +# Fill the Target Result Values in array +Target_CP = np.array([5.230, 2.970, 1.769, 1.043, 0.632]) + +# store ratio +RT = [] +for i in range(len(Target_CP)): + a = P[i] / Target_CP[i] + RT.append(a) + +# assign labels for days +label = np.array([0.1, 0.2, 0.3, 0.4, 0.5]) + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +message = f""" +------------------- VM295 RESULTS COMPARISON --------------------- + Time (day) | TARGET (kPa) | Mechanical APDL | RATIO +----------------------------------------------------------------- +""" +print(message) + +for i in range(len(Target_CP)): + message = f""" + {label[i]:.5f} {Target_CP[i]:.5f} {P[i]:.5f} {RT[i]:.5f} + """ + print(message) + +message = f""" +----------------------------------------------------------------- +""" +print(message) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/cfed15b245a913fb145d83f32b33b52b/vm-016.py b/_downloads/cfed15b245a913fb145d83f32b33b52b/vm-016.py new file mode 100644 index 00000000..34f4725d --- /dev/null +++ b/_downloads/cfed15b245a913fb145d83f32b33b52b/vm-016.py @@ -0,0 +1,490 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm16: + +Bending of a Solid Beam (Plane Elements) +---------------------------------------- +Problem description: + - A beam of length :math:`l` and height :math:`h` is built-in at one end and loaded at the + free end with: + + * Case 1: a moment :math:`M`. + * Case 2: a shear force :math:`F`. + + For each case, determine the deflection :math:`\delta` at the free end and the bending + stress :math:`\sigma_{Bend}` a distance d from the wall at the outside fiber. + +Reference: + - Formulas for Stress and Strain, R. J. Roark, 4th Edition, McGraw-Hill Book Co., Inc., + New York, NY, 1965, pp. 104, 106. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-D Structural Solid Elements (PLANE42) + - 2-D 4 Node structural elements(PLANE182) + +.. image:: ../_static/vm16_setup.png + :width: 400 + :alt: VM16 Bending of a Solid Beam with Plane Elements Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.0` + +Geometric properties: + - :math:`l = 10 in` + - :math:`h = 2.0 in` + - :math:`d = 1.0 in` + +Loading: + - Case 1, :math:`M = 2000 in-lb` + - Case 2, :math:`F = 300 lb` + +Analysis Assumptions and Modeling Notes: + - The stiffness matrix formed in the first load step is also used in the second + load step (automatically determined by Mechanical APDL). The end moment is + represented by equal and opposite forces separated by a distance h. The bending + stress is obtained from face stresses on element 1. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm16_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import pandas as pd + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear the existing database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Run a /VERIFY command to verify the installation +mapdl.run("/VERIFY,VM16") + +# Set the ANSYS version and reference verification manual +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Set the analysis title +mapdl.title("VM16 BENDING OF A SOLID BEAM (PLANE ELEMENTS)") + +############################################################################### +# Case 1: Solve Using PLANE42 Element Model. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Enter the model creation prep7 preprocessor +mapdl.prep7(mute=True) + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2-D Structural Solid (PLANE42) and include Surface solution for both faces, +# via Keyopt(6)=2. + +mapdl.et( + 1, "PLANE42", "", "", "", "", "", 2 +) # PLANE42 WITH SURFACE PRINTOUT FOR FACES 1 AND 3 + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio of 0.0 is specified. + +mapdl.mp("EX", 1, 30e6) # Elastic modulus +mapdl.mp("NUXY", 1, 0.0) # Poisson's ratio + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.n(1) +mapdl.n(6, 10) + +# Generate additional nodes +mapdl.fill() + +# Generates nodes from an existing pattern +mapdl.ngen(2, 10, 1, 6, 1, "", 2) + +# Define elements +mapdl.e(1, 2, 12, 11) + +# Generate additional elements from an existing pattern +mapdl.egen(5, 1, 1) + +# select all entities +mapdl.allsel() +# element plot +mapdl.eplot(background="w") + +############################################################################### +# Define boundary conditions and loadings +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all degrees of freedom (dof) at nodes 10 & 11. +# For load case 1, apply end moment and then exit prep7 processor. + +# Set boundary conditions for case 1 (end moment) +mapdl.d(1, "ALL", "", "", 11, 10) # Displacement constraint +mapdl.f(6, "FX", 1000) # Applied force +mapdl.f(16, "FX", -1000) # Applied force + +# Finish the pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system for the 1st load case. +mapdl.slashsolu() + +# Set analysis type to static +mapdl.antype("STATIC") + +# start solve for 1st load case +mapdl.solve() + +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components for load case 1. +mapdl.post1() + +# Set "last" load case to be read from result file for post-processing +mapdl.set("LAST") + +# Get displacement at node 16 in the Y-direction +u1 = mapdl.get("U1", "NODE", 16, "U", "Y") + +mapdl.graphics("POWER") # Activates the graphics mode for power graphics +mapdl.eshape(1) # Display element shape +mapdl.view(1, 1, 1, 1) # Set the viewing options + +# for graphics displays +mapdl.show(option="REV", fname="png") +mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + +# Get maximum bending stress for case 1 +bend_stress1 = mapdl.get("BEND_STRESS1", "PLNSOL", 0, "MAX") +mapdl.show("close") +# exists solution processor for case 1 +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system for the 2nd load case. +mapdl.slashsolu() + +############################################################################### +# Define boundary conditions and loadings +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# For load case 2, apply end load and then solve for 2nd load case. + +mapdl.f(6, "FX", "", "", 16, 10) # Applied force in the X-direction +mapdl.f(6, "FY", 150, "", 16, 10) # Applied force in the Y-direction + +# start solve for 2nd load case +mapdl.solve() +# exists solution processor for case 2 +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components for load case 2. +mapdl.post1() + +# Set "last" load case to be read from result file for post-processing +mapdl.set("LAST") + +# Retrieves the displacement "U2" of node 16 in the Y direction +u2 = mapdl.get("U2", "NODE", 16, "U", "Y") + +mapdl.graphics("POWER") # Activates the graphics mode for power graphics +mapdl.eshape(1) # Display element shape +mapdl.view(1, 1, 1, 1) # Set the viewing options + +# for graphics displays +mapdl.show(option="REV", fname="png") +mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + +# Retrieves the maximum bending stress from the plane stress plot +bend_stress2 = mapdl.get("BEND_STRESS2", "PLNSOL", 0, "MAX") +mapdl.show("close") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_def = [0.00500, 0.00500] +target_strss = [3000, 4050] + +# Fill result values +res_def = [u1, u2] +res_strss = [bend_stress1, bend_stress2] + +title = f""" + +------------------- VM16 RESULTS COMPARISON --------------------- + +PLANE42 +======= +""" +print(title) + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Deflection (in)", "Bending Stress (psi)"] + +for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + +RESULTS FOR CASE {lc+1:1d}: +------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Clears the database without restarting. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.run("/CLEAR,NOSTART") + +############################################################################### +# Case 2: Solve Using PLANE182 Element Model +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Switches to the preprocessor (PREP7) +mapdl.prep7() + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2-D 4 Node structural elements (PLANE182) and include simplified enhanced +# strain formulation, via Keyopt(1)=3. + +# Defines an element type as PLANE182 +mapdl.et(1, "PLANE182") +# Sets a key option for the element type +mapdl.keyopt(1, 1, 3) + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio of 0.0 is specified. + +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.0) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +# Defines nodes +mapdl.n(1) +mapdl.n(6, 10) + +# Generate additional nodes +mapdl.fill() + +# Generates additional nodes from an existing pattern +mapdl.ngen(2, 10, 1, 6, 1, "", 2) + +# Defines elements +mapdl.e(1, 2, 12, 11) + +# Generates additional elements from an existing pattern +mapdl.egen(5, 1, 1) + +# select all entities +mapdl.allsel() +# element plot +mapdl.eplot(background="w") + +############################################################################### +# Define boundary conditions and loadings +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all degrees of freedom (dof) at nodes 10 & 11. +# For load case 1, apply end moment and then exit prep7 processor. + +mapdl.d(1, "ALL", "", "", 11, 10) +# Applies nodal forces +mapdl.f(6, "FX", 1000) +mapdl.f(16, "FX", -1000) + +# exists solution processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system for the 1st load case. +mapdl.slashsolu() + +# Set analysis type to static +mapdl.antype("STATIC") + +# start solve for 1st load case +mapdl.solve() + +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components for load case 1. +mapdl.post1() + +# Sets the LAST result as the active result set +mapdl.set("LAST") + +# Retrieves the displacement "U1" of node 16 in the Y direction +u1 = mapdl.get("U1", "NODE", 16, "U", "Y") + +mapdl.graphics("POWER") # Activates the graphics mode for power graphics +mapdl.eshape(1) # Display element shape +mapdl.view(1, 1, 1, 1) # Set the viewing options + +# for graphics displays +mapdl.show(option="REV", fname="png") +mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + +# Retrieves the maximum bending stress from the plane stress plot +bend_stress1 = mapdl.get("BEND_STRESS1", "PLNSOL", 0, "MAX") +mapdl.show("close") + +# exists solution processor for case 1 +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system for the 2nd load case. +mapdl.slashsolu() + +############################################################################### +# Define boundary conditions and loadings +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# For load case 2, apply end load and then solve for 2nd load case. + +mapdl.f(6, "FX", "", "", 16, 10) +mapdl.f(6, "FY", 150, "", 16, 10) + +# start solve for 2nd load case +mapdl.solve() +# exists solution processor for case 2 +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress components for load case 2. +mapdl.post1() + +# Sets the LAST result as the active result set +mapdl.set("LAST") + +# Retrieves the displacement "U2" of node 16 in the Y direction +u2 = mapdl.get("U2", "NODE", 16, "U", "Y") + +mapdl.graphics("POWER") # Activates the graphics mode for power graphics +mapdl.eshape(1) # Display element shape +mapdl.view(1, 1, 1, 1) # Set the viewing options + +# for graphics displays +mapdl.show(option="REV", fname="png") +mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + +# Retrieves the maximum bending stress from the plane stress plot +bend_stress2 = mapdl.get("BEND_STRESS2", "PLNSOL", 0, "MAX") +mapdl.show("close") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_def = [0.00500, 0.00500] +target_strss = [3000, 4050] + +# Fill result values +res_def = [u1, u2] +res_strss = [bend_stress1, bend_stress2] + +title = f""" + +PLANE182 +======== +""" +print(title) + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Deflection (in)", "Bending Stress (psi)"] + +for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + +RESULTS FOR CASE {lc+1:1d}: +------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +# Exit MAPDL session +mapdl.exit() diff --git a/_downloads/d022a4413e1305d3d2c34c64bf602539/vm-005-laterally_loaded_tapered_support_structure.ipynb b/_downloads/d022a4413e1305d3d2c34c64bf602539/vm-005-laterally_loaded_tapered_support_structure.ipynb new file mode 100644 index 00000000..15d2ab69 --- /dev/null +++ b/_downloads/d022a4413e1305d3d2c34c64bf602539/vm-005-laterally_loaded_tapered_support_structure.ipynb @@ -0,0 +1,223 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Laterally Loaded Tapered Support Structure {#ref_vm5_example}\n==========================================\n\nProblem description:\n\n: - A cantilever beam of thickness $t$ and length $l$ has a depth\n which tapers uniformly from $d$ at the tip to $3d$ at the wall.\n It is loaded by a force $F$ at the tip, as shown. Find the\n maximum bending stress at the mid-length ($X = l$) and the fixed\n end of the beam.\n\nReference:\n\n: - S. H. Crandall, N. C. Dahl, An Introduction to the Mechanics of\n Solids, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg. 342,\n problem 7.18.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2-D 4-Node Sructural Solid Elements (PLANE182)\n - 2-D 8-Node Structural Solid Elements (PLANE183)\n\n![VM5 Problem Sketch](../_static/vm5_setup.png){width=\"400px\"}\n\nMaterial properties\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\nu = 0.0$\n - $d = 3in$\n - $t = 2in$\n\nGeometric properties:\n\n: - $l = 50 in$\n - $d = 3 in$\n - $t = 2 in$\n\nLoading:\n\n: - $F = 4000 lb$\n\nNotes:\n\n: - Two different solutions are obtained. The first solution uses\n lower order PLANE182 elements and the second solution uses\n higher order PLANE82 elements. The 2 inch thickness is\n incorporated by using the plane stress with thickness option.\n Poisson\\'s 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\n===============\n\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, and a\npoisson\\'s ratio of 0.0 to agree with beam theory.\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\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\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\n==========================\n\nFix the nodes at the larger end (the \\\"wall\\\" end) and apply a vertical\nforce to the whole structure.\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\n=====\n\nEnter solution mode and solve the system.\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\n===============\n\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\nlocations. We\\'ve gathered the code into a function because we\\'ll have\nuse for it later.\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\n========\n\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" + ] + }, + { + "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\n===================\n\nNow we need to perform the simulation again but this time using the\nPLANE183 element type. We additionally remove midside nodes with `emid`.\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\n=============\n\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" + ] + }, + { + "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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/d10cf51c41cd5329c3697fec09c5f9df/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb b/_downloads/d10cf51c41cd5329c3697fec09c5f9df/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb new file mode 100644 index 00000000..d2872f8a --- /dev/null +++ b/_downloads/d10cf51c41cd5329c3697fec09c5f9df/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb @@ -0,0 +1,295 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Large lateral deflection of unequal stiffness springs {#ref_vm9_example}\n=====================================================\n\nProblem description:\n\n: - A two-spring system is subjected to a force $F$ as shown below.\n Determine the strain energy of the system and the displacements\n $\\delta_x$ and $\\delta_y$.\n\nReference:\n\n: - G. N. Vanderplaats, *Numerical Optimization Techniques for\n Engineering Design with Applications*, McGraw-Hill Book Co.,\n Inc., New York, NY,1984, pp. 72-73, ex. 3-1.\n\nAnalysis type(s):\n\n: - Nonlinear Transient Dynamic Analysis (`ANTYPE = 4`)\n\nElement type(s):\n\n: - Spring-damper elements (COMBIN14)\n - Spring-damper elements (COMBIN40)\n\n![Geometry of COMBIN14 and COMBIN40](../_static/vm9_setup_2.png){width=\"400px\"}\n\nMaterial properties\n\n: - $k_1 = 8\\,N/cm$\n - $k_2 = 1\\,N/cm$\n - $m = 1$\n\nGeometric properties:\n\n: - $l = 10\\,cm$\n\nLoading:\n\n: - $F = 5{\\sqrt[2]{2}}\\,N$\n - $\\alpha = 45\\,\u00ba$\n\n![VM9 Problem Sketch](../_static/vm9_setup.png){width=\"400px\"}\n\nAnalysis assumptions and modeling notes:\n\n: - The solution to this problem is best obtained by adding mass and\n using the \\\"slow dynamics\\\" technique with approximately\n critical damping. Combination elements `COMBIN40` are used to\n provide damping in the $X$ and $Y$ directions. Approximate\n damping coefficients $c_x$ and $c_y$, in the $X$ and $Y$\n directions respectively, 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\n approximated by $k_y = k_2 = 1\\,N/cm$ and\n $k_x = k_y/2 = 0.5\\,N/cm$, hence $c_x = 1.41$ and $c_y = 2.0$.\n Large deflection analysis is performed due to the fact that the\n resistance to the load is a function of the deformed position.\n `POST1` is used to extract results from the solution phase.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm9_setup.png'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL and import Numpy and Pandas libraries.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Start MAPDL.\nmapdl = launch_mapdl()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing\n==============\n\nEnter verification example mode and the pre-processing routine.\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\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" + ] + }, + { + "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\n===================\n\nSet up the element types.\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\n=====================\n\nDefine damping coefficients $c_x = 1.41$, $c_y = 2.0$ and stiffness\nvalues $k_1 = 8\\,N/cm$, $k_2 = 1\\,N/cm$ for the spring elements.\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\n============\n\nSet up the nodes coordinates using python `for` loop.\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\n===============\n\nCreate the elements through the nodes.\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\n==========================\n\nApplication of boundary conditions (BC) for the spring model.\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\n=================\n\nEnter solution mode and apply settings for *Transient Dynamic Analysis*.\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\n=====\n\nSolve the system , avoiding the printing output.\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\n===============\n\nEnter post-processing, avoiding the printing output.\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\n=====================\n\nEnter post-processing. To get results of the strain energy and\ndisplacements in X and Y directions from the node where the force is\napplied using\n`Mapdl.get_value `{.interpreted-text\nrole=\"meth\"}.\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\n=============\n\nFinally we have the results of the strain energy and displacements in\n$X$ and $Y$ directions, which can be compared with expected target\nvalues:\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" + ] + }, + { + "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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/d446788db8d1a004dc734e217c44e9bb/vm-011-residual-stress-problem.ipynb b/_downloads/d446788db8d1a004dc734e217c44e9bb/vm-011-residual-stress-problem.ipynb new file mode 100644 index 00000000..297d6a21 --- /dev/null +++ b/_downloads/d446788db8d1a004dc734e217c44e9bb/vm-011-residual-stress-problem.ipynb @@ -0,0 +1,187 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Residual Stress Problem {#ref_vm11_example}\n=======================\n\nProblem description:\n\n: - A chain hoist is attached to the ceiling through three tie rods\n as shown below. The tie rods are made of cold-rolled steel with\n yield strength $\\sigma_{yp}$ and each has an area A. Find the\n deflection $\\delta$ at load $F_1$ when the deflections are\n elastic in all three rods. When the frame is loaded to $F_2$\n (where all three rods become fully plastic), and then unloaded,\n find the residual stress $\\sigma_r$ in the central rod.\n\nReference:\n\n: - S. H. Crandall, N. C. Dahl, *An Introduction to the Mechanics of\n Solids*, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg.\n 234, problem 5.31.\n\nAnalysis Type(s):\n\n: - Static Analysis (`ANTYPE = 0`)\n\nElement Type(s):\n\n: - 3-D Spar (or Truss) Elements (`LINK180`)\n\n![**VM11 Problem\nmodel**](../_static/vm11_setup_1.png){.align-centeralign-center\nwidth=\"400px\"}\n\nMaterial properties\n\n: - $\\sigma_{yp} = 30,000\\,psi$\n - $E = 30 \\cdot 10^6\\,psi$\n\n![**VM11 Material\nModel**](../_static/vm11_setup_2.png){.align-centeralign-center\nwidth=\"400px\"}\n\nGeometric Properties:\n\n: - $A = 1\\,in^2$\n - $l = 100\\,in$\n - $\\Theta = 30\u00b0$\n\nLoading:\n\n: - $F_1 = 51,961.5\\,lb$\n - $F_2 = 81,961.5\\,lb$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - Automatic load stepping (:meth: Mapl.autots\n \\,ON) is used to obtain the\n nonlinear plastic solution (load steps 2 and 3).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm11_setup_1.png'\n\nimport math\n\nfrom ansys.mapdl.core import launch_mapdl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl = launch_mapdl()\nmapdl.clear() # optional as MAPDL just started" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing\n==============\n\nEnter verification example mode and the pre-processing routine.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.verify(\"vm11\")\nmapdl.prep7()\nmapdl.title(\"VM11 RESIDUAL STRESS PROBLEM\", mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type\n===================\n\nSet up the element type `LINK180`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Type of analysis: Static.\nmapdl.antype(\"STATIC\")\n\n# Element type: LINK180.\nmapdl.et(1, \"LINK180\")\nmapdl.sectype(1, \"LINK\")\nmapdl.secdata(1)\nmapdl.mp(\"EX\", 1, 30e6)\nmapdl.tb(\"PLAS\", 1, tbopt=\"BKIN\") # TABLE FOR BILINEAR KINEMATIC HARDENING\nmapdl.tbtemp(100)\nmapdl.tbdata(1, 30000) # YIELD STRESS\n\n# Print\nprint(mapdl.mplist())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define model geometry\n=====================\n\nSet up parameters and geometry.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "L = 100\ntheta = 30\nxloc = L * math.tan(math.radians(theta))\nmapdl.n(1, -xloc)\nmapdl.n(3, xloc)\nmapdl.fill()\nmapdl.n(4, y=-L, mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define elements\n===============\n\nCreate elements.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.e(1, 4)\nmapdl.e(2, 4)\nmapdl.e(3, 4)\nmapdl.outpr(freq=1)\nmapdl.d(1, \"ALL\", nend=3)\nmapdl.f(4, \"FY\", -51961.5) # APPLY LOAD F1\nmapdl.finish(mute=True)\nmapdl.eplot()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and run the simulation.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\nmapdl.solve()\nmapdl.finish(mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Enter the post-processing routine.\nmapdl.post1()\n\nq = mapdl.queries\nbot_node = q.node(0, -100, 0)\ndef_node = mapdl.get_value(\"NODE\", bot_node, \"U\", \"Y\")\nmapdl.finish()\nmapdl.slashsolu()\nmapdl.autots(\"ON\") # TURN ON AUTOMATIC LOAD STEPPING\nmapdl.nsubst(10)\nmapdl.outpr(freq=10)\nmapdl.f(4, \"FY\", -81961.5) # APPLY LOAD F2\nmapdl.solve()\nmapdl.nsubst(5)\nmapdl.outpr(freq=5)\nmapdl.fdele(4, \"FY\") # REMOVE LOAD F2\nmapdl.solve()\nmapdl.finish()\n\n\nmapdl.post1()\nmapdl.etable(\"STRS\", \"LS\", 1)\nstrss = mapdl.get_value(\"ELEM\", 2, \"ETAB\", \"STRS\")\nmessage = f\"\"\"\n------------------- VM11 RESULTS COMPARISON ---------------------\n TARGET | TARGET | ANSYS | RATIO\nDef at F1 (in) {-0.07533:.5f} {def_node:.5f} {abs(def_node/0.07533):.5f}\nStress (psi) {-5650:.5f} {strss:.5f} {abs(strss/-5650):.5f}\n-----------------------------------------------------------------\n\"\"\"\nprint(message)\n\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Stop MAPDL.\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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/de96a4de35c2c08c17fc13a4d3bd50ca/vm-020.py b/_downloads/de96a4de35c2c08c17fc13a4d3bd50ca/vm-020.py new file mode 100644 index 00000000..c21ae475 --- /dev/null +++ b/_downloads/de96a4de35c2c08c17fc13a4d3bd50ca/vm-020.py @@ -0,0 +1,222 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm20: + +Cylindrical Membrane Under Pressure +----------------------------------- +Problem description: + - A long cylindrical membrane container of diameter d and wall thickness t is subjected to a + uniform internal pressure P. Determine the axial stress :math:`\sigma_1` and the + hoop stress :math:`\sigma_2` in the container. See VM13 for the problem sketch. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 121, article 25. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 4-Node Finite Strain Shell Elements (SHELL181) + +.. image:: ../_static/vm20_setup.png + :width: 400 + :alt: VM20 Cylindrical Membrane Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`d = 120 in` + - :math:`t = 1 in` + +Loading: + - :math:`p = 500 psi` + +Analysis Assumptions and Modeling Notes: + - An arbitrary axial length is selected. Since the problem is axisymmetric, only a one element + sector is needed. A small angle :math:`\theta` = 10° is used for approximating the circular + boundary with a straight-sided element. Nodal coupling is used at the boundaries. An axial + traction of 15,000 psi is applied to the edge of the element to simulate the closed-end effect. + The internal pressure is applied as an equivalent negative pressure on the exterior (face 1) + of the element. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm20_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Launch MAPDL with specified options +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear the existing database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the VM20 verification +mapdl.run("/VERIFY,VM20") + +# Set the analysis title +mapdl.title("VM20 CYLINDRICAL MEMBRANE UNDER PRESSURE") + +# Enter the model creation /Prep7 preprocessor +mapdl.prep7() + +############################################################################### +# Define element type and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 4-Node Structural Shell element (SHELL181) for finite strain membrane. Specify +# key option for membrane stiffness only via setting Keyopt(1)=1. Include full integration +# via setting Keyopt(3)=2. + +mapdl.et(1, "SHELL181") # Define element type as SHELL181 +mapdl.keyopt(1, 1, 1) # Set key option for membrane stiffness only +mapdl.keyopt(1, 3, 2) # Set key option for full integration +mapdl.sectype(1, "SHELL") # Section type SHELL +mapdl.secdata(1, 1) # Define section data + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio NUXY of 0.3 is specified. + +mapdl.mp("EX", 1, 30e6) # Define modulus of elasticity +mapdl.mp("NUXY", 1, 0.3) # Define Poisson's ratio + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.csys(1) # Define cylindrical coordinate system + +mapdl.n(1, 60) # Define nodes + +# Define additional node with translation +mapdl.n(2, 60, "", 10) + +# Generate additional nodes from an existing pattern +mapdl.ngen(2, 2, 1, 2, 1, "", 10) + +# Rotate nodal coordinate system to cylindrical +mapdl.nrotat("ALL") + +# Define elements +mapdl.e(1, 2, 4, 3) + +############################################################################### +# Define coupling and boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply couplings and fix UZ displacement at specific node and UY displacement for all nodes. +# Specify axial traction= -15000 psi and internal pressure= -500 psi on elements uaing SFE command. +# Then exit prep7 processor. + +mapdl.cp(1, "UX", 1, 2, 3, 4) # Couple radial displacements +mapdl.cp(2, "UZ", 2, 4) # Couple UZ displacements + +mapdl.d(1, "UZ", "", "", 3, 2) # Fix UZ displacement at specific node +mapdl.d("ALL", "UY") # Fix UY displacement for all nodes + +mapdl.sfe(1, 4, "PRES", "", -15000) # Apply axial traction on elements +mapdl.sfe(1, 1, "PRES", "", -500) # Apply internal pressure on elements + +# Selects all entities +mapdl.allsel() +# Element plot +mapdl.eplot(background="w") + +# Finish the preprocessing steps +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Set the analysis type to STATIC +mapdl.antype("STATIC") + +mapdl.outpr("NSOL", 1) # Output the nodal solution +mapdl.outpr("RSOL", 1) # Output the result summary + +# Perform the solution +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute stress quantities. +mapdl.post1() + +# Get hoop stresses at node 1 +strs_hop = mapdl.get("STRS_HOP", "NODE", 1, "S", 2) +# Get axial stresses at node 1 +strs_ax = mapdl.get("STRS_AX", "NODE", 1, "S", 1) + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_stress = [15000, 29749] + +# Fill result values +sim_res = [strs_hop, strs_ax] + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Stress_1 (psi)", "Stress_2 (psi)"] + +data = [target_stress, sim_res, np.abs(target_stress) / np.abs(sim_res)] + +title = f""" + +------------------- VM20 RESULTS COMPARISON --------------------- + +""" +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/e8706bedb729a415174b11028f69738d/vm-013.ipynb b/_downloads/e8706bedb729a415174b11028f69738d/vm-013.ipynb new file mode 100644 index 00000000..bebbd1e4 --- /dev/null +++ b/_downloads/e8706bedb729a415174b11028f69738d/vm-013.ipynb @@ -0,0 +1,205 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Cylindrical Shell Under Pressure {#ref_vm13}\n================================\n\nProblem description:\n\n: - A long cylindrical pressure vessel of mean diameter d and wall\n thickness t has closed ends and is subjected to an internal\n pressure P. Determine the axial stress $\\sigma_y$ and the hoop\n stress $\\sigma_z$ in the vessel at the midthickness of the wall.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 45, article 11.\n - UGURAL AND FENSTER, ADV. STRENGTH AND APPL. ELAS., 1981.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 2-Node Finite Strain Axisymmetric Shell (SHELL208)\n\n![VM13 Cylindrical Shell Problem Sketch](../_static/vm13_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\mu = 0.3$\n\nGeometric properties:\n\n: - $t = 1 in$\n - $d = 120 in$\n\nLoading:\n\n: - $P = 500 psi$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - An arbitrary axial length of 10 inches is selected. Nodal\n coupling is used in the radial direction. An axial force of\n 5654866.8 lb ($(P\u03c0d^2)/4$) is applied to simulate the closed-end\n effect.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm13_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\n\n# Launch MAPDL with specified settings\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear any existing database\nmapdl.clear()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Run the /VERIFY command for VM13\nmapdl.verify(\"vm13\")\n\n# Set the title of the analysis\nmapdl.title(\"VM13 CYLINDRICAL SHELL UNDER PRESSURE\")\n\n# Enter the model creation preprocessor\nmapdl.prep7(mute=True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and section properties\n==========================================\n\nUse 2-Node Axisymmetric Shell element (SHELL208) and \\\"SHELL\\\" as\nsection type.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"SHELL208\") # Element type SHELL208\nmapdl.sectype(1, \"SHELL\") # Section type SHELL\nmapdl.secdata(1) # Define section data\nmapdl.secnum(1) # Assign section number" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"NUXY\", 1, 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1, 60) # Node 1, 60 degrees\nmapdl.n(2, 60, 10) # Node 2, 60 degrees and 10 units in Z-direction\n\n# Define element connectivity\nmapdl.e(1, 2) # Element 1 with nodes 1 and 2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define coupling and boundary conditions\n=======================================\n\nCouple the nodes \\#1 and 2 in radial direction (rotation around Z-axis).\nFix UY displacement for node 1. Fix ROTZ (rotation around Z-axis) for\nnode 2. Apply a concentrated force value of 5654866.8 lb in FY direction\nat node 2. Internal pressure of 500 psi is applied. Then exit prep7\nprocessor.\n\nEffectively, this sets:\n\n: $P = 500 psi$\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.cp(1, \"UX\", 1, 2) # Couple radial direction (rotation around Z-axis)\nmapdl.d(1, \"UY\", \"\", \"\", \"\", \"\", \"ROTZ\") # Fix UY displacement for node 1\nmapdl.d(2, \"ROTZ\") # Fix ROTZ (rotation around Z-axis) for node 2\n\nmapdl.f(2, \"FY\", 5654866.8) # Apply a concentrated force FY to node 2\nmapdl.sfe(1, 1, \"PRES\", \"\", 500) # Apply internal pressure of 500 psi to element 1\n\n# Selects all entities\nmapdl.allsel()\nmapdl.eplot()\n\n# Finish the pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n# Controls the solution printout\nmapdl.outpr(\"ALL\", 1)\n# Solve the analysis\nmapdl.solve()\n# Finish the solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing and compute stress components.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Create element tables for stress components\nmapdl.etable(\"STRS_Y\", \"S\", \"Y\")\nmapdl.etable(\"STRS_Z\", \"S\", \"Z\")\n\n# Retrieve element stresses from the element tables using *Get\nstress_y = mapdl.get(\"STRSS_Y\", \"ELEM\", 1, \"ETAB\", \"STRS_Y\")\nstress_z = mapdl.get(\"STRSS_Z\", \"ELEM\", 1, \"ETAB\", \"STRS_Z\")\n\n# Fill the array with target values\nTarget_values = np.array([15000, 29749])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "results = f\"\"\"\n------------------- VM13 RESULTS COMPARISON ---------------------\n RESULT | TARGET | Mechanical APDL | RATIO\nStress, Y (psi) {Target_values[0]:.5f} {stress_y:.5f} {abs(stress_y/Target_values[0]):.5f}\nStress, Z (psi) {Target_values[1]:.5f} {stress_z:.5f} {abs(stress_z/Target_values[1]):.5f}\n-----------------------------------------------------------------\n\"\"\"\nprint(results)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/e8c75358b109cb33268ce9e5fc4a1c87/vm-012-combined-bending-and-torsion.py b/_downloads/e8c75358b109cb33268ce9e5fc4a1c87/vm-012-combined-bending-and-torsion.py new file mode 100644 index 00000000..963dae87 --- /dev/null +++ b/_downloads/e8c75358b109cb33268ce9e5fc4a1c87/vm-012-combined-bending-and-torsion.py @@ -0,0 +1,225 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +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 +import pandas + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL. +mapdl = launch_mapdl(loglevel="WARNING", print_com=True) +mapdl.clear() # optional as MAPDL just started + +############################################################################### +# Pre-processing with ET PIPE16 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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() + +############################################################################### +# Solve +# ~~~~~ + +mapdl.slashsolu() +mapdl.outpr("BASIC", 1) + +mapdl.solve() +mapdl.finish() +mapdl.post1() +mapdl.etable("P_STRS", "NMISC", 86) +mapdl.etable("SHR", "NMISC", 88) + + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ + +p_stress = mapdl.get("P_STRESS", "ELEM", 1, "ETAB", "P_STRS") +shear = mapdl.get("SHEAR", "ELEM", 1, "ETAB", "SHR") +p_trs = shear / 2 + +# Fill the array with target values +target_p_stress = 7527 +target_p_trs = 3777 + +data = [ + [target_p_stress, p_stress, abs(p_stress / target_p_stress)], + [target_p_trs, p_trs, abs(p_trs / target_p_trs)], +] +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["MAX PRINSTRS psi", "MAX SH STRS psi"] + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +print(pandas.DataFrame(data, row_headers, col_headers)) + + +############################################################################### +# Pre-processing with ET PIPE288 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +mapdl.clear("nostart") +mapdl.prep7() +mapdl.run("C*** USING PIPE288") +mapdl.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.allsel() +mapdl.eplot() + + +############################################################################### +# Solve +# ~~~~~ + +mapdl.slashsolu() +mapdl.outpr("BASIC", 1) +mapdl.solve() +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ + +mapdl.post1() +mapdl.set("LAST") +mapdl.graphics("POWER") +mapdl.eshape(1) +mapdl.view(1, 1, 1, 1) + +mapdl.show(option="REV", fname="png") +mapdl.plesol("S", 1) +mapdl.show("close") + +p_stress = mapdl.get("P_STRESS", "PLNSOL", 0, "MAX") + +mapdl.show(option="REV", fname="png") +mapdl.plesol("S", "INT") +mapdl.show("close") + +shear = mapdl.get("SHEAR", "PLNSOL", 0, "MAX") +p_trs = shear / 2 + + +# Fill the array with target values +target_p_stress = 7527.0 +target_p_trs = 3777.0 + +data = [ + [target_p_stress, p_stress, abs(p_stress / target_p_stress)], + [target_p_trs, p_trs, abs(p_trs / target_p_trs)], +] +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["MAX PRINSTRS psi", "MAX SH STRS psi"] + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +print(pandas.DataFrame(data, row_headers, col_headers)) + +mapdl.finish() +mapdl.starlist("vm12", "vrt") + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/e98043b9cf1f2e834ff59a952b45359f/vm-002-beam_stresses_and_deflections.ipynb b/_downloads/e98043b9cf1f2e834ff59a952b45359f/vm-002-beam_stresses_and_deflections.ipynb new file mode 100644 index 00000000..7f52ad4c --- /dev/null +++ b/_downloads/e98043b9cf1f2e834ff59a952b45359f/vm-002-beam_stresses_and_deflections.ipynb @@ -0,0 +1,259 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Beam stresses and deflections {#ref_vm2_example}\n=============================\n\nProblem description:\n\n> - A standard 30 inch WF beam, with a cross-sectional area $A$, is\n> supported as shown below and loaded on the overhangs by a\n> uniformly distributed load $w$. Determine the maximum bending\n> stress, $\\sigma_max$, in the middle portion of the beam and the\n> deflection, $\\delta$, at the middle of the beam.\n\nReference:\n\n> - S. Timoshenko, Strength of Material, Part I, Elementary Theory and\n> Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY,\n> 1955, pg. 98, problem 4.\n\nAnalysis type(s):\n\n> - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n> - 3-D 2 Node Beam (BEAM188)\n\n![VM2 Problem Sketch](../_static/vm2_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n> - $E = 30 \\cdot 10^6 psi$\n\nGeometric 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\nLoading:\n\n> - $w = (10000/12) lb/in$\n\nAnalytical 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\n beam is $\\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": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm2_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()\n\n# Enter verification example mode and the pre-processing routine.\nmapdl.verify()\nmapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type\n===================\n\nSet up the element type (a beam-type).\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\n===============\n\nSet up the material.\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\n==============\n\nSet up the cross-section properties for a beam element.\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\n===============\n\nSet up the nodes and elements. Create nodes then create elements between\nnodes.\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" + ] + }, + { + "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\n==========================\n\nApplication of boundary conditions (BC).\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\n========================\n\nApply a distributed force of $w = (10000/12) lb/in$ in the y-direction.\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\n=====\n\nEnter solution mode and solve the system. Print the solver output.\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\n===============\n\nEnter post-processing. To get the stress and deflection results from the\nmiddle node and cross-section of the beam we can use\n`Mapdl.get_value `{.interpreted-text\nrole=\"meth\"}.\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\n=============\n\nNow that we have the results we can compare the nodal displacement and\nstress experienced by middle node of the beam to the known stresses\n-11,400 psi and 0.182 inches of the deflection.\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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/f0e3e30877c92a9c24a1dd6bac2078ad/vm-010-bending_of_a_t-shaped_beam.ipynb b/_downloads/f0e3e30877c92a9c24a1dd6bac2078ad/vm-010-bending_of_a_t-shaped_beam.ipynb new file mode 100644 index 00000000..f561553e --- /dev/null +++ b/_downloads/f0e3e30877c92a9c24a1dd6bac2078ad/vm-010-bending_of_a_t-shaped_beam.ipynb @@ -0,0 +1,295 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Bending of a Tee-Shaped Beam {#ref_vm10_example}\n============================\n\nProblem description:\n\n: - Find the maximum tensile $\\sigma_{\\mathrm{(B,Bot)}}$ and\n compressive $\\sigma_{\\mathrm{(B,Top)}}$ bending stresses in an\n unsymmetrical [T-beam]{.title-ref} subjected to uniform bending\n $M_z$, with dimensions and geometric properties as shown below.\n\nReference:\n\n: - S. H. Crandall, N. C. Dahl, *An Introduction to the Mechanics of\n Solids*, McGraw-Hill Book Co., Inc., New York, NY, 1959, pg.\n 294, ex. 7.2.\n\nAnalysis Type(s):\n\n: - Static Analysis (`ANTYPE = 0`)\n\nElement Type(s):\n\n: - 3-D 2 Node Beam (`BEAM188`)\n\n![**Figure 1: VM10 Geometry of Beam188 and Element\nModel**](../_static/vm10_setup_1.png){.align-centeralign-center\nwidth=\"400px\"}\n\nMaterial properties\n\n: - $E = 30 \\cdot 10^6 psi$\n - $\\nu = 0.3$\n\nGeometric Properties:\n\n: - $l = 100\\,in$\n - $h = 1.5\\,in$\n - $b = 8\\,in$\n\nLoading:\n\n: - $M_z = 100,000\\,in\\,lb$\n\n![VM10 Problem Sketch](../_static/vm10_setup.png){width=\"400px\"}\n\nAnalysis Assumptions and Modeling Notes:\n\n: - A length $(l = 100 in)$ is arbitrarily selected since the\n bending moment is constant. A [T-section]{.title-ref} beam is\n modeled using flange width $(6b)$, flange thickness\n $(\\frac{h}{2})$, overall depth $(2h + \\frac{h}{2})$, and stem\n thickness $(b)$, input using\n `Mapdl.secdata `{.interpreted-text\n role=\"meth\"}.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm10_setup.png'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start MAPDL\n===========\n\nStart MAPDL and import Numpy and Pandas libraries.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Start MAPDL.\nmapdl = launch_mapdl()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Pre-processing\n==============\n\nEnter verification example mode and the pre-processing routine.\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\n===================\n\nSet up the element type `BEAM188`.\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\n===============\n\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" + ] + }, + { + "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\n==============\n\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" + ] + }, + { + "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\n===============\n\nSet up the nodes and elements. Create nodes between elements.\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\n===============\n\nCreate element between nodes 1 and 2 using node 3 as orientational node.\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\n==========================\n\nApplication of boundary conditions (BC).\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\n========================\n\nApply a bending moment $\\mathrm{M_{z}}= 100000\\,in\\,lb$.\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\n=====\n\nEnter solution mode and run the simulation.\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\n===============\n\nEnter post-processing.\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\n=====================\n\nUsing `Mapdl.etable `{.interpreted-text\nrole=\"meth\"} get the results of the the maximum tensile and compressive\nbending stresses in an unsymmetric [T-beam]{.title-ref} with\n`Mapdl.get_value `{.interpreted-text\nrole=\"meth\"}.\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\n=============\n\nFinally we have the results of the the maximum tensile and compressive\nbending stresses, which can be compared with expected target values:\n\n- maximum tensile bending stress\n $\\sigma_{\\mathrm{(B,Bot)}} = 300\\,psi$.\n- maximum compressive bending stress\n $\\sigma_{\\mathrm{(B,Top)}} = -700\\,psi$.\n\nFor better representation of the results we can use `pandas` dataframe\nwith following settings below:\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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/f9bd1257bf435033df9b9317fa42f043/vm-025.py b/_downloads/f9bd1257bf435033df9b9317fa42f043/vm-025.py new file mode 100644 index 00000000..21f68437 --- /dev/null +++ b/_downloads/f9bd1257bf435033df9b9317fa42f043/vm-025.py @@ -0,0 +1,427 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm25: + +Stresses in a Long Cylinder +--------------------------- +Problem description: + - A long thick-walled cylinder is initially subjected to an internal pressure p. + Determine the radial displacement :math:`\delta_r` at the inner surface, the + radial stress :math:`\sigma_r` , and tangential stress :math:`\sigma_t` , at the + inner and outer surfaces and at the middle wall thickness. Internal pressure is then + removed and the cylinder is subjected to a rotation ω about its center line. Determine + the radial :math:`\sigma_r` and tangential :math:`\sigma_t` stresses at the inner wall + and at an interior point located at r = Xi. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 213, problem 1 and pg. 213, article 42. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-D 8-Node Structural Solid Elements (PLANE183) + +.. image:: ../_static/vm25_setup.png + :width: 400 + :alt: VM25 Long Cylinder Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + - :math:`\rho = 0.00073 lb-sec^2/in^4` + +Geometric properties: + - :math:`a = 4 inches` + - :math:`b = 8 inches` + - :math:`X_i = 5.43 inches` + +Loading: + - :math:`p = 30,000 psi` + - :math:`\Omega = 1000 rad/sec` + +Analysis Assumptions and Modeling Notes: + - The axial length is arbitrarily selected. Elements are oriented such that surface stresses + may be obtained at the inner and outer cylinder surfaces. + POST1 is used to display linearized stresses through the thickness of the cylinder when it is + subjected to an internal pressure. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm25_setup.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Launching MAPDL with specified settings +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clearing the MAPDL database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command for VM25 +mapdl.run("/VERIFY,VM25") + +# Set the title of the analysis +mapdl.title("VM25 Stresses in a Long Cylinder") + +# Enter the model creation /Prep7 preprocessor +mapdl.prep7() + +# Deactivate automatic (smart) element sizing +mapdl.smrtsize(sizlvl="OFF") + +############################################################################### +# Define element type and properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 2-D 8-Node or 6-Node Structural Solid and specify Axisymmetric element behavior +# via setting Keyopt(3)=1. +mapdl.et(1, "PLANE183", "", "", 1) + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6, +# Density, rho = 0.00073 and Poisson's ratio NUXY of 0.3 is specified. +mapdl.mp("EX", 1, 30e6) +mapdl.mp("DENS", 1, 0.00073) +mapdl.mp("NUXY", 1, 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +# Defining node 1 with coordinates (4) +mapdl.n(1, 4) +# Defining node 2 with coordinates (4+4/14) +mapdl.n(2, "4+4/14") +# Defining node 3 with coordinates (4+4/14, 0.5) +mapdl.n(3, "4+4/14", 0.5) +# Defining node 4 with coordinates (4, 0.5) +mapdl.n(4, 4, 0.5) +# Defining node 5 with coordinates (4+4/28) +mapdl.n(5, "4+4/28") +# Defining node 6 with coordinates (4+4/14, 0.25) +mapdl.n(6, "4+4/14", 0.25) +# Defining node 7 with coordinates (4+4/28, 0.5) +mapdl.n(7, "4+4/28", 0.5) +# Defining node 8 with coordinates (4, 0.25) +mapdl.n(8, 4, 0.25) +# Creating element 1 with nodes 2, 3, 4, 5, 6, 7, and 8 +mapdl.e(1, 2, 3, 4, 5, 6, 7, 8) + +# Generating additional nodes along element 14 using the specified +# parameters (from an existing pattern) +mapdl.egen(14, 8, 1, "", "", "", "", "", "", "", "4/14") +# Merging nodes based on their coordinates +mapdl.nummrg("NODE") +# Generate a mesh using EGEN command +mapdl.egen(2, 111, 1, 14, "", "", "", "", "", "", "", 0.5) +# Merge the nodes that share the same coordinates +mapdl.nummrg("NODE") + +############################################################################### +# Define coupling and boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply a displacement boundary condition in the vertical direction (UY) to all nodes. +# Couple the axial displacements at the unconstrained Y-dir. Apply internal pressure of +# 30000 psi is applied on nodes. Also, apply dummy pressure for surface printout. +# Then exit prep7 processor. + +mapdl.nsel("S", "LOC", "Y", 0) # Select nodes located on the Y-axis +# Apply a displacement boundary condition +mapdl.d("ALL", "UY") +mapdl.nsel("S", "LOC", "Y", 1) # Select nodes located on the positive Y-axis +# Couple the axial displacements at the unconstrained Y-dir +mapdl.cp(1, "UY", "ALL") + +mapdl.nsel( + "S", "LOC", "X", 4 +) # Select nodes located on the X-axis at a specific coordinate +# Apply internal pressure on nodes +mapdl.sf("", "PRES", 30000) + +mapdl.nsel( + "S", "LOC", "X", 8 +) # Select nodes located on the X-axis at a different coordinate +# Apply dummy pressure for surface printout +mapdl.sf("", "PRES", 1e-10) + +# Selects all entities +mapdl.allsel() +# Element plot +mapdl.eplot(background="w") + +# Finish the pre-processing processor +mapdl.finish() + +# Save the finite element model +mapdl.save("MODEL") + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Set the analysis type to STATIC +mapdl.antype("STATIC") +# Output results for all nodes +mapdl.outpr("", "ALL") +# Perform the solution for the load step 1, which is the internal pressure +mapdl.solve() +# exists solution processor for load case 1 +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute displacement and stress components. +mapdl.post1() + +# Set the load step 1 and substep to 1 +mapdl.set(1, 1) + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +LFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0) +MID_NODE = q.node(6, 0, 0) # store node number to 'MID_NODE' with coordinate (6,0,0) +RT_NODE = q.node(8, 0, 0) # store node number to 'RT_NODE' with coordinate (8,0,0) + +############################################################################### +# Retrieve nodal deflection and section stresses +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Retrieves the displacement "DEF_4" of nodes associated to +# "LFT_NODE" in the X direction +def_4 = mapdl.get("DEF_4", "NODE", LFT_NODE, "U", "X") + +# Retrieves the stress and store it "parm" of nodes associated to a +# variables 'LFT_NODE','MID_NODE' and 'RT_NODE' +rst_4_c1 = mapdl.get("RST_4_C1", "NODE", LFT_NODE, "S", "X") +rst_6_c1 = mapdl.get("RST_6_C1", "NODE", MID_NODE, "S", "X") +rst_8_c1 = mapdl.get("RST_8_C1", "NODE", RT_NODE, "S", "X") +tst_4_c1 = mapdl.get("TST_4_C1", "NODE", LFT_NODE, "S", "Z") +tst_6_c1 = mapdl.get("TST_6_C1", "NODE", MID_NODE, "S", "Z") +tst_8_c1 = mapdl.get("TST_8_C1", "NODE", RT_NODE, "S", "Z") + +# Print the nodal stress solution (COMP means all stress components) +mapdl.prnsol("S", "COMP") + +# Define a path with the name 'STRESS' and ID 2, no limits specified +mapdl.path("STRESS", 2, "", 48) +mapdl.ppath(1, LFT_NODE) # Define the path points using the variable 'LFT_NODE' +mapdl.ppath(2, RT_NODE) # Define the path points using the variable 'RT_NODE' +mapdl.plsect("S", "Z", -1) # Display the SZ stresses in a sectional plot +mapdl.plsect("S", "X", -1) # Display the SX stresses in a sectional plot +mapdl.prsect(-1) # Print linearized stresses + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_def = 0.0078666 +target_strss = [-30000, -7778, 0] +target_tst_strss = [50000, 27778, 20000] + +# Fill result values +res_def = def_4 +res_strss = [rst_4_c1, rst_6_c1, rst_8_c1] +res_tst_strss = [tst_4_c1, tst_6_c1, tst_8_c1] + +title = f""" + +------------------- VM25 RESULTS COMPARISON --------------------- + +RESULTS FOR CASE p = 30,000 psi: +-------------------------------- + +""" + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Displacement, in (r = 4 in)"] +data = [ + [target_def, res_def, abs(target_def / res_def)], +] +print(title) +print(pd.DataFrame(data, row_headers, col_headers)) + +# Radial stress results comparison +row_headers = [ + "Stress_r, psi (r = 4 in)", + "Stress_r, psi (r = 6 in)", + "Stress_r, psi (r = 8 in)", +] + +data = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)] +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +# Tangential stress results comparison +row_headers = [ + "Stress_t, psi (r = 4 in)", + "Stress_t, psi (r = 6 in)", + "Stress_t, psi (r = 8 in)", +] +data = [ + target_tst_strss, + res_tst_strss, + np.abs(target_tst_strss) / np.abs(res_tst_strss), +] +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Set a new title for the analysis +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.title("VM25 Stresses in a Long Cylinder - Rotation About Axis") + +# Resume the Finite Element (FE) "MODEL" save previously +mapdl.resume("MODEL") + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Print all results +mapdl.outpr("", "ALL") + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Apply a displacement boundary condition in the vertical direction (UY) to all nodes. +# Rotate the cylinder with an angular velocity of 1000 rad/sec. Also, apply dummy +# pressure for surface printout. Then exit solution processor. + +mapdl.nsel( + "S", "LOC", "Y", 0 +) # Select nodes located at Y=0 to prevent rigid body motion +mapdl.nsel("R", "LOC", "X", 4) # Select nodes located at X=4 +# Displace all nodes in the Y-direction +mapdl.d("ALL", "UY") + +mapdl.nsel("S", "LOC", "X", 4) # Select nodes located at X=4 +# Apply a small pressure to allow stress printout +mapdl.sf("", "PRES", 1e-10) + +mapdl.nsel("ALL") # Select all nodes +# Rotate the cylinder with an angular velocity of 1000 RAD/SEC +mapdl.omega("", 1000) + +# Solve the problem in load step 2 - centrifugal loading +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute displacement and stress components. +mapdl.post1() + +############################################################################### +# Inline functions in PyMAPDL to query node +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +q = mapdl.queries +LFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0) +XI_NODE = q.node( + 5.43, 0, 0 +) # store node number to 'XI_NODE' with coordinate (5.43,0,0) + +############################################################################### +# Retrieve nodal deflection and section stresses +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +rst_4_c2 = mapdl.get("RST_4_C2", "NODE", LFT_NODE, "S", "X") +tst_4_c2 = mapdl.get("TST_4_C2", "NODE", LFT_NODE, "S", "Z") +rst_x_c2 = mapdl.get("RST_X_C2", "NODE", XI_NODE, "S", "X") +tst_x_c2 = mapdl.get("TST_X_C2", "NODE", XI_NODE, "S", "Z") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_strss = [0, 4753] +target_tst_strss = [40588, 29436] + +# Fill result values +res_strss = [rst_4_c2, rst_x_c2] +res_tst_strss = [tst_4_c2, tst_x_c2] + +title = f""" + +RESULTS FOR CASE Rotation = 1000 rad/sec: +----------------------------------------- + +""" + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + +# Radial stress results comparison +row_headers = ["Stress_r, psi (r = 4 in)", "Stress_r, psi (r = 5.43 in)"] + +data = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)] + +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +# Tangential stress results comparison +row_headers = ["Stress_t, psi (r = 4 in)", "Stress_t, psi (r = 5.43 in)"] + +data = [ + target_tst_strss, + res_tst_strss, + np.abs(target_tst_strss) / np.abs(res_tst_strss), +] +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/fa9f8e2ea40b338c6369153d79afe242/vm-018.py b/_downloads/fa9f8e2ea40b338c6369153d79afe242/vm-018.py new file mode 100644 index 00000000..9ca31c37 --- /dev/null +++ b/_downloads/fa9f8e2ea40b338c6369153d79afe242/vm-018.py @@ -0,0 +1,369 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _ref_vm18: + +Out-of-Plane Bending of a Curved Bar +------------------------------------ +Problem description: + - A portion of a horizontal circular ring, built-in at A, is loaded by a vertical (Z) + load F applied at the end B. The ring has a solid circular cross-section of diameter d. + Determine the deflection :math:`\delta` at end B, the maximum bending + stress :math:`\sigma_{Bend}` , and the maximum torsional shear stress τ. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 412, eq. 241. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - Elastic Curved Pipe Element (PIPE18) + - 3-D 3 Node Pipe Element (PIPE289) + +.. figure:: ../_static/vm18_setup1.png + :align: center + :width: 400 + :alt: VM18 Curved Bar Problem Sketch + +.. figure:: ../_static/vm18_setup2.png + :align: center + :width: 400 + :alt: VM18 Curved Bar Finite Element Model + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`r = 100 in` + - :math:`d = 2 in` + - :math:`\theta = 90°` + +Loading: + - :math:`F = 50 lb` + +Analysis Assumptions and Modeling Notes: + - Node 10 is arbitrarily located on the radius of curvature side of the element to define the + plane of the elbow when PIPE18 elements are used. The wall thickness is set to half the diameter + for a solid bar. Since the section has no hole in the middle, ovalization cannot occur and + PIPE289 elements can be used to determine the deflection and stresses. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm18_setup1.png' + +# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module +from ansys.mapdl.core import launch_mapdl +import numpy as np +import pandas as pd + +# Launch MAPDL with specified settings +mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + +# Clear the existing database +mapdl.clear() + +# Run the FINISH command to exists normally from a processor +mapdl.finish() + +# Set the ANSYS version +mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + +# Run the /VERIFY command +mapdl.run("/VERIFY,VM18") + +# Set the title of the analysis +mapdl.title("VM18 OUT-OF-PLANE BENDING OF A CURVED BAR") + +# Enter the model creation /Prep7 preprocessor +mapdl.prep7() + +############################################################################### +# Define element type and real properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use Elastic Curved Pipe element (PIPE18) and set KEYOPT(6)=2 for printing member forces. +mapdl.et(1, "PIPE18", "", "", "", "", "", 2) + +# Define geometry parameters (OD, wall thickness, radius) using "r" command (real constant) +mapdl.r(1, 2, 1, 100) + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio NUXY of 0.3 is specified. +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +# Define nodes +mapdl.n(1, 100) +mapdl.n(2, "", 100) +mapdl.n(10) + +# Define element +mapdl.e(1, 2, 10) + +############################################################################### +# Define boundary conditions and load +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all dofs at node 1. Specify nodal force F = -50 lb along Z direction at node 2. +# Then exit prep7 processor. + +mapdl.d(1, "ALL") # Define boundary conditions +mapdl.f(2, "FZ", -50) # Define load + +# Selects all entities +mapdl.allsel() +# Element plot +mapdl.eplot(vtk=False) + +# Finish preprocessing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Set the analysis type to STATIC +mapdl.antype("STATIC") + +# Set output options +mapdl.outpr("BASIC", 1) + +# Perform the solution +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress quantities. +mapdl.post1() + +# Set the current results set to the last set to be read from result file +mapdl.set("LAST") + +# Get displacement results at node 2 in the Z direction +def_z = mapdl.get("DEF", "NODE", 2, "U", "Z") + +# Create an element table for bending stresses using ETABLE command +strs_ben = mapdl.etable("STRS_BEN", "NMISC", 91) + +# Create an element table for shear stresses using ETABLE command +strs_shr = mapdl.etable("STRS_SHR", "LS", 4) + +# Get bending stresses (ETAB: STRS_BEN) for element 1 +strss_b = mapdl.get("STRSS_B", "ELEM", 1, "ETAB", "STRS_BEN") + +# Get shear stresses (ETAB: STRS_SHR) for element 1 +strss_t = mapdl.get("STRSS_T", "ELEM", 1, "ETAB", "STRS_SHR") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_val = [-2.648, 6366, -3183] + +# Fill result values +sim_res = [def_z, strss_b, strss_t] + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Deflection (in)", "Stress_Bend (psi)", "Shear Stress (psi)"] + +data = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)] + +title = f""" + +------------------- VM18 RESULTS COMPARISON --------------------- + +PIPE18: +------- +""" + +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Clears the database without restarting. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.run("/CLEAR,NOSTART") + +############################################################################### +# Set a new title for the analysis +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.title("VM18 OUT-OF-PLANE BENDING OF A CURVED BAR Using PIPE289 ELEMENT MODEL") + +############################################################################### +# Switches to the preprocessor (PREP7) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.prep7() + +############################################################################### +# Define element type and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use 3-D 3-Node Pipe element (PIPE289) and set KEYOPT(4)= 2 Thick pipe theory. +mapdl.et(1, "PIPE289", "", "", "", 2) +mapdl.sectype(1, "PIPE") # Set section type PIPE +mapdl.secdata(2, 1, 16) # Set section data (OD, wall thickness) + +################################################################################## +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material), Young's modulus of 30e6 +# and Poisson's ratio NUXY of 0.3 is specified. +mapdl.mp("EX", 1, 30e6) +mapdl.mp("NUXY", 1, 0.3) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +mapdl.csys(1) # Set coordinate system to 1 + +mapdl.n(1, 100) # Define nodes + +# Generate additional nodes +mapdl.ngen(19, 1, 1, "", "", "", 5) + +# Define element +mapdl.e(1, 3, 2) + +# Generate additional elements from an existing pattern +mapdl.egen(9, 2, -1) + +# Reset coordinate system to global +mapdl.csys(0) + +############################################################################### +# Define boundary conditions and load +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Fix all dofs at node 1. Specify nodal force F = -50 lb along Z direction at node 19. +# Then exit prep7 processor. +mapdl.d(1, "ALL") +mapdl.f(19, "FZ", -50) + +# Selects all entities +mapdl.allsel() +# Element plot +mapdl.eplot(vtk=False) + +# exists pre-processing processor +mapdl.finish() + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. +mapdl.slashsolu() + +# Set the analysis type to STATIC +mapdl.antype("STATIC") + +# Set output options +mapdl.outpr("BASIC", 1) + +# Perform the solution +mapdl.solve() +# exists solution processor +mapdl.finish() + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. Compute deflection and stress quantities. +mapdl.post1() + +# Set the current results set to the last set +mapdl.set("LAST") +mapdl.graphics("POWER") # Set graphics mode to POWER +mapdl.eshape(1) # Set element shape +mapdl.view(1, 1, 1, 1) # Set view + +# Get displacement results at node 19 in the Z direction +def_z = mapdl.get("DEF", "NODE", 19, "U", "Z") + +# Create an element table for bending stresses using ETABLE command +strs_ben = mapdl.etable("STRS_BEN", "SMISC", 35) + +# Get bending stresses (ETAB: STRS_BEN) for element 1 using ETABLE command +strss_b = mapdl.get("STRSS_B", "ELEM", 1, "ETAB", "STRS_BEN") + +# for graphics displays +mapdl.show(option="REV") +# Plot elemtal solution values for SXY component +mapdl.plesol("S", "XY") +# Get minimum shear stress +shear_sxy = mapdl.get("SHEAR", "PLNSOL", 0, "MIN") +mapdl.show("close") + +############################################################################### +# Verify the results. +# ~~~~~~~~~~~~~~~~~~~ + +# Set target values +target_val = [-2.648, 6366, -3183] + +# Fill result values +sim_res = [def_z, strss_b, shear_sxy] + +col_headers = ["TARGET", "Mechanical APDL", "RATIO"] +row_headers = ["Deflection (in)", "Stress_Bend (psi)", "Shear Stress (psi)"] + +data = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)] + +title = f""" + +PIPE289: +-------- +""" + +print(title) +print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + +############################################################################### +# Finish the post-processing processor. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mapdl.finish() + +############################################################################### +# Stop MAPDL. +# ~~~~~~~~~~~ +mapdl.exit() diff --git a/_downloads/fb1a9d4e3f34d2de7fe64e111b827c5f/vm-001-statically_indeterminate_reaction_force_analysis.py b/_downloads/fb1a9d4e3f34d2de7fe64e111b827c5f/vm-001-statically_indeterminate_reaction_force_analysis.py new file mode 100644 index 00000000..6ee30e1e --- /dev/null +++ b/_downloads/fb1a9d4e3f34d2de7fe64e111b827c5f/vm-001-statically_indeterminate_reaction_force_analysis.py @@ -0,0 +1,167 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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. + +""" +# 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() + +############################################################################### +# Define material +# ~~~~~~~~~~~~~~~ +# Set up the material and its type (a single material, with a linking-type +# section and a Young's modulus of 30e6). + +mapdl.antype("STATIC") +mapdl.et(1, "LINK180") +mapdl.sectype(1, "LINK") +mapdl.secdata(1) +mapdl.mp("EX", 1, 30e6) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and elements. This creates a mesh just like in the +# problem setup. + +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) + + +############################################################################### +# 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` + +mapdl.d(1, "ALL", "", "", 4, 3) +mapdl.f(2, "FY", -500) +mapdl.f(3, "FY", -1000) +mapdl.finish() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.run("/SOLU") +out = mapdl.solve() +mapdl.finish() + +############################################################################### +# 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``. + +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") + + +############################################################################### +# 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. +# +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) + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/fb1d73c2a62cdee200b2f72c384fdfe6/vm-007-plastic_compression_of_a_pipe_assembly.py b/_downloads/fb1d73c2a62cdee200b2f72c384fdfe6/vm-007-plastic_compression_of_a_pipe_assembly.py new file mode 100644 index 00000000..152108ad --- /dev/null +++ b/_downloads/fb1d73c2a62cdee200b2f72c384fdfe6/vm-007-plastic_compression_of_a_pipe_assembly.py @@ -0,0 +1,636 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm7_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ +# Start MAPDL and import Numpy and Pandas libraries. + +from ansys.mapdl.core import launch_mapdl +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd + +# Start MAPDL. +mapdl = launch_mapdl() + + +############################################################################### +# Pre-processing +# ~~~~~~~~~~~~~~ +# Enter verification example mode and the pre-processing routine. + +mapdl.clear() +mapdl.verify() +mapdl.prep7(mute=True) + + +############################################################################### +# Parameterization +# ~~~~~~~~~~~~~~~~ + +# Angle of the model sector. +theta = 6 + +# Deflection load steps. +defl_ls1 = -0.032 +defl_ls2 = -0.05 +defl_ls3 = -0.1 + + +############################################################################### +# Define element type +# ~~~~~~~~~~~~~~~~~~~ +# Set up the element types . + +# 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()) + + +############################################################################### +# 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` + +# 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()) + + +############################################################################### +# Plot stress - strain curve +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use Matplotlib library to plot material model curves of steel and aluminum. + +# 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() + + +############################################################################### +# Define section +# ~~~~~~~~~~~~~~ +# Set up the cross-section properties for a shell and pipe elements. + +# 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()) + + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# Set up the nodes and create the elements through the nodes. + +# 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 the inside (steel) tube. +mapdl.type(2) +mapdl.mat(1) +mapdl.e(101, 102, 112, 111, 105, 106, 116, 115) + +# Create elements for the 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) + + +############################################################################### +# Define boundary conditions +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Application of boundary conditions (BC) for simplified axisymmetric model. + +# 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 direction 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) + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +# 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) + + +############################################################################### +# Post-processing +# ~~~~~~~~~~~~~~~ +# Enter post-processing. + +# Enter the post-processing routine. +mapdl.post1(mute=True) + + +############################################################################### +# 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. + + +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)) + + +############################################################################### +# Getting loads for each load step +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Obtain the loads of the model using :func:`getload()` function. + +# 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() + + +############################################################################### +# 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)`. + +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}" +) + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_downloads/fb7a81403f70ea01a3c16bda84e508c5/vm-021.ipynb b/_downloads/fb7a81403f70ea01a3c16bda84e508c5/vm-021.ipynb new file mode 100644 index 00000000..94ca9e0a --- /dev/null +++ b/_downloads/fb7a81403f70ea01a3c16bda84e508c5/vm-021.ipynb @@ -0,0 +1,331 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tie Rod with Lateral Loading {#ref_vm21}\n============================\n\nProblem description:\n\n: - A tie rod is subjected to the action of a tensile force F and a\n uniform lateral load p. Determine the maximum deflection\n $z_{max}$, the slope $\\theta$ at the left-hand end, and the\n maximum bending moment $M_{max}$. In addition, determine the\n same three quantities for the unstiffened tie rod (F = 0).\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part II, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1956, pg. 42, article 6.\n\nAnalysis type(s):\n\n: - Static, Stress Stiffening Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 3-D 2 node beam (BEAM188)\n\n![VM21 Tie Rod Problem Sketch](../_static/vm21_setup.png){width=\"400px\"}\n\nMaterial properties:\n\n: - $E = 30 \\cdot 10^6 psi$\n\nGeometric properties:\n\n: - $l = 200 in$\n - $b = h = 2.5 in$\n\nLoading:\n\n: - $F = 21,972.6 lb$\n - $p = 1.79253 lb/in$\n\nAnalysis Assumptions and Modeling Notes:\n\n: - Due to symmetry, only one-half of the beam is modeled. The full\n load is applied for each iteration. The first solution\n represents the unstiffened case. The second solution represents\n the stiffened case.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# sphinx_gallery_thumbnail_path = '_static/vm21_setup.png'\n\n# Importing the `launch_mapdl` function from the `ansys.mapdl.core` module\nfrom ansys.mapdl.core import launch_mapdl\nimport numpy as np\nimport pandas as pd\n\n# Launch MAPDL with specified options\nmapdl = launch_mapdl(loglevel=\"WARNING\", print_com=True, remove_temp_dir_on_exit=True)\n\n# Clear the current database\nmapdl.clear()\n\n# Run the FINISH command to exists normally from a processor\nmapdl.finish()\n\n# Set the ANSYS version\nmapdl.com(\"ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2\")\n\n# Run the /VERIFY command for VM21\nmapdl.run(\"/VERIFY,VM21\")\n\n# Set the title of the analysis\nmapdl.title(\"VM21 TIE ROD WITH LATERAL LOADING NO STREES STIFFENING\")\n\n# Enter the model creation /Prep7 preprocessor\nmapdl.prep7()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define element type and section properties\n==========================================\n\nUse 3-D 2-Node Beam Element and specify cubic shape function via setting\nKeyopt(3)=3.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.et(1, \"BEAM188\")\n\nmapdl.keyopt(1, 3, 3) # Set KEYOPT(3) to 3 cubic shape function\nmapdl.sectype(1, \"BEAM\", \"RECT\") # Specify section properties for the beam element\nmapdl.secdata(2.5, 2.5) # Define section data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material\n===============\n\nSet up the material and its type (a single material), Young\\'s modulus\nof 30e6 and Poisson\\'s ratio PRXY of 0.3 is specified.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.mp(\"EX\", 1, 30e6)\nmapdl.mp(\"PRXY\", \"\", 0.3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define geometry\n===============\n\nSet up the nodes and elements. This creates a mesh just like in the\nproblem setup.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.n(1) # define nodes\nmapdl.n(5, 100)\n\n# Generate additional nodes\nmapdl.fill()\n\n# Define elements\nmapdl.e(1, 2)\n\n# Generate additional elements from an existing pattern\nmapdl.egen(4, 1, 1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define boundary conditions and loading\n======================================\n\nApply a displacement boundary condition in the UY, ROTX and ROTZ\ndirections to all nodes. Specify symmetry degree-of-freedom constraints\non nodes, surface normal to X-dir (default). Apply a tensile force in\nX-dir, F = -21972.6 lb and a uniform lateral load, p = 1.79253 lb/in.\nThen exit prep7 processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.d(\"ALL\", \"UY\", \"\", \"\", \"\", \"\", \"ROTX\", \"ROTZ\")\nmapdl.d(1, \"UZ\")\n\n# Select nodes for symmetry boundary\nmapdl.nsel(\"S\", \"\", \"\", 5)\nmapdl.dsym(\"SYMM\", \"X\")\n\n# Select all nodes\nmapdl.nsel(\"ALL\")\n\n# Apply nodal force along x-direction\nmapdl.f(1, \"FX\", -21972.6)\n# Specifies surface loads on beam and pipe elements.\nmapdl.sfbeam(\"ALL\", 1, \"PRES\", 1.79253)\n\n# Selects all entities\nmapdl.allsel()\n# Element plot\nmapdl.eplot()\n\n# Finish pre-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter solution mode and solve the system.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set the analysis type to STATIC\nmapdl.antype(\"STATIC\")\n# Perform the solution\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute displacement and rotation quantities.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Select nodes for results output\nmapdl.nsel(\"S\", \"\", \"\", 1, 5, 4)\n\n# Print displacement quantities in Z direction\nmapdl.prnsol(\"U\", \"Z\")\n\n# Print rotation quantities in Y direction\nmapdl.prnsol(\"ROT\", \"Y\")\n\n# Select all nodes\nmapdl.nsel(\"ALL\")\n\n# Print results solution\nmapdl.prrsol()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inline functions in PyMAPDL to query node\n=========================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "q = mapdl.queries\nRGHT_END = q.node(200, 0, 0) # store node number to 'RGHT_END' with coordinate (4,0,0)\nLFT_END = q.node(0, 0, 0) # store node number to 'LFT_END' with coordinate (4,0,0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Retrieve nodal deflection and rotation\n======================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Get results at node RGHT_END\nuz_mx_c2 = mapdl.get(\"UZ_MX_C2\", \"NODE\", RGHT_END, \"U\", \"Z\")\n\n# Get results at node LFT_END\nslope_c2 = mapdl.get(\"SLOPE_C2\", \"NODE\", LFT_END, \"ROT\", \"Y\")\n\n# exists post-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter /post26 time-history post-processing processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post26()\n\n# Specifies the total reaction force data to be stored at nodes associated to RGHT_END\nmapdl.rforce(2, RGHT_END, \"M\", \"Y\")\n\n# Store results\nmapdl.store()\n# Get maximum moment at node RGHT_END\nm_mx_c2 = mapdl.get(\"M_MX_C2\", \"VARI\", 2, \"EXTREM\", \"VMAX\")\n\n# exists post-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set a new title for the analysis\n================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.title(\"VM21 TIE ROD WITH LATERAL LOADING STRESS STIFFENING PRESENT\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve\n=====\n\nEnter new solution mode and solve the nonlinear system including stress\nstiffening.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.slashsolu()\n\n# Set number of substeps to 5\nmapdl.nsubst(5)\n# Activate auto time stepping\nmapdl.autots(\"ON\")\n# Activate nonlinear geometry\nmapdl.nlgeom(\"ON\")\n# Set a smaller convergence tolerance\nmapdl.cnvtol(\"F\", \"\", 0.0001, \"\", 1)\n# Perform the solution\nmapdl.solve()\n# exists solution processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter post-processing. Compute displacement and rotation quantities.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post1()\n\n# Select nodes for results output\nmapdl.nsel(\"S\", \"\", \"\", 1, 5, 4)\n# Print displacement quantities in Z direction\nmapdl.prnsol(\"U\", \"Z\")\n# Print rotation quantities in Y direction\nmapdl.prnsol(\"ROT\", \"Y\")\n# Print results solution\nmapdl.prrsol()\n\n# Get results at node RGHT_END\nuz_mx_c1 = mapdl.get(\"UZ_MX_C1\", \"NODE\", RGHT_END, \"U\", \"Z\")\n\n# Get results at node LFT_END\nslope_c1 = mapdl.get(\"SLOPE_C1\", \"NODE\", LFT_END, \"ROT\", \"Y\")\n\n# exists post-processing processor\nmapdl.finish()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Post-processing\n===============\n\nEnter /post26 time-history post-processing processor.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.post26()\n\n# Specifies the total reaction force data to be stored at nodes associated to RGHT_END\nmapdl.rforce(2, RGHT_END, \"M\", \"Y\")\n\n# Store results\nmapdl.store()\n\n# Get maximum moment at node RGHT_END\nm_mx_c1 = mapdl.get(\"M_MX_C1\", \"VARI\", 2, \"EXTREM\", \"VMAX\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Verify the results.\n===================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Set target values\ntarget_res = [-0.19945, 0.0032352, -4580.1]\ntarget_res_strss = [-0.38241, 0.0061185, -8962.7]\n\n# Fill result values\nsim_res = [uz_mx_c1, slope_c1, m_mx_c1]\nsim_res_strss = [uz_mx_c2, slope_c2, m_mx_c2]\n\ntitle = f\"\"\"\n\n------------------- VM21 RESULTS COMPARISON ---------------------\n\nF neq 0 (stiffened):\n--------------------\n\n\"\"\"\n\ncol_headers = [\"TARGET\", \"Mechanical APDL\", \"RATIO\"]\nrow_headers = [\"Z_max, in\", \"Slope, rad\", \"M_max , in-lb\"]\n\ndata = [target_res, sim_res, np.abs(target_res) / np.abs(sim_res)]\n\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))\n\ntitle = f\"\"\"\n\n\nF = 0 (unstiffened):\n--------------------\n\n\"\"\"\n\nrow_headers = [\"Z_max, in\", \"Slope, rad\", \"M_max , in-lb\"]\ndata = [\n target_res_strss,\n sim_res_strss,\n np.abs(target_res_strss) / np.abs(sim_res_strss),\n]\n\nprint(title)\nprint(pd.DataFrame(np.transpose(data), row_headers, col_headers))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finish the post-processing processor.\n=====================================\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mapdl.finish()" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/fb7e5ba72e33cb7a06969346c70a66bb/vm-004-deflection_of_a_hinged_support.ipynb b/_downloads/fb7e5ba72e33cb7a06969346c70a66bb/vm-004-deflection_of_a_hinged_support.ipynb new file mode 100644 index 00000000..12b4b6aa --- /dev/null +++ b/_downloads/fb7e5ba72e33cb7a06969346c70a66bb/vm-004-deflection_of_a_hinged_support.ipynb @@ -0,0 +1,205 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Deflection of a hinged support {#ref_deflection_of_a_hinged_support}\n==============================\n\nProblem description:\n\n: - A structure consisting of two equal steel bars, each of length\n $l$ and cross-sectional area $A$, with hinged ends is subjected\n to the action of a load $F$. Determine the stress, $\\sigma$, in\n the bars and the deflection, $\\delta$, of point 2. Neglect the\n weight of the bars as a small quantity in comparison with the\n load $F$.\n\nReference:\n\n: - S. Timoshenko, Strength of Materials, Part I, Elementary Theory\n and Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York,\n NY, 1955, pg. 10, problem 2.\n\nAnalysis type(s):\n\n: - Static Analysis `ANTYPE=0`\n\nElement type(s):\n\n: - 3-D Spar (or Truss) Elements (LINK180)\n\n![VM4 Problem Sketch](../_static/vm4_setup.png){width=\"400px\"}\n\nMaterial properties\n\n: - $E = 30 \\cdot 10^6 psi$\n\nGeometric properties:\n\n: - $l = 15 ft$\n - $A = 0.5 in^2$\n - $\\Theta = 30 ^\\circ$\n\nLoading:\n\n: - $F = 5000 lb$\n\nAnalytical equations:\n\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\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\n===============\n\nCreate a simple hinge geometry. We use the [LINK180]{.title-ref} element\ntype to model this and an elastic modulus of 30e6. We store the\nx-coordinate of node 3 and the y-coordinate of node 2 for ease of use\nlater on.\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\n===============\n\nWe create three nodes in an isosceles triangle shape, with elements\nalong the equal sides, forming a hinge.\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==========================\n\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" + ] + }, + { + "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\n=====\n\nEnter solution mode and solve the system.\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\n===============\n\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 using\ntwo perceptually linear colormaps to enhance display of the data.\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\n======================\n\nUse the `post_processing` attribute to get the principal nodal stress as\nan array.\n\n::: {.note}\n::: {.title}\nNote\n:::\n\nThis returns the same data as `prnsol\n`{.interpreted-text role=\"func\"}, except\ninstead of returning 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\n=============\n\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 -0.12\ninches. To do this we:\n\n- Find the mid-node from the coordinates using the `Query\n `{.interpreted-text\n role=\"class\"} 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" + ] + }, + { + "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" + ] + }, + { + "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.13" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/_downloads/fbbb079aa8e33624dae049464dfd17d7/vm-004-deflection_of_a_hinged_support.py b/_downloads/fbbb079aa8e33624dae049464dfd17d7/vm-004-deflection_of_a_hinged_support.py new file mode 100644 index 00000000..ff239037 --- /dev/null +++ b/_downloads/fbbb079aa8e33624dae049464dfd17d7/vm-004-deflection_of_a_hinged_support.py @@ -0,0 +1,225 @@ +# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +r""".. _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`. + +""" +# sphinx_gallery_thumbnail_path = '_static/vm4_setup.png' + +############################################################################### +# Start MAPDL +# ~~~~~~~~~~~ + +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() + +############################################################################### +# 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. + +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) + +############################################################################### +# Define geometry +# ~~~~~~~~~~~~~~~ +# We create three nodes in an isosceles triangle shape, with elements +# along the equal sides, forming a hinge. + +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") + +############################################################################### +# 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 + +mapdl.d(1, "ALL", "", "", 3, 2) +mapdl.f(2, "FY", -5000) +mapdl.finish() + + +############################################################################### +# Solve +# ~~~~~ +# Enter solution mode and solve the system. + +mapdl.run("/SOLU") +out = mapdl.solve() +mapdl.finish() + +############################################################################### +# 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. + +mapdl.post1() +mapdl.post_processing.plot_nodal_displacement( + "Y", + cmap="magma", + line_width=5, + cpos="xy", + scalar_bar_args={"title": "Displacement", "vertical": False}, +) + +############################################################################### +# 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. + + +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')) + +############################################################################### +# 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 + +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) + +############################################################################### +# Stop MAPDL. +mapdl.exit() diff --git a/_images/cont_slide.png b/_images/cont_slide.png new file mode 100644 index 00000000..6e513f21 Binary files /dev/null and b/_images/cont_slide.png differ diff --git a/_images/ex_20-tecPCB_001.png b/_images/ex_20-tecPCB_001.png new file mode 100644 index 00000000..4f90ce8c Binary files /dev/null and b/_images/ex_20-tecPCB_001.png differ diff --git a/_images/ex_20-tecPCB_002.png b/_images/ex_20-tecPCB_002.png new file mode 100644 index 00000000..ccf04188 Binary files /dev/null and b/_images/ex_20-tecPCB_002.png differ diff --git a/_images/ex_20-tecPCB_003.png b/_images/ex_20-tecPCB_003.png new file mode 100644 index 00000000..b9e2bcdb Binary files /dev/null and b/_images/ex_20-tecPCB_003.png differ diff --git a/_images/ex_20-tecPCB_004.png b/_images/ex_20-tecPCB_004.png new file mode 100644 index 00000000..804d1a99 Binary files /dev/null and b/_images/ex_20-tecPCB_004.png differ diff --git a/_images/ex_20-tecPCB_005.png b/_images/ex_20-tecPCB_005.png new file mode 100644 index 00000000..943f7b3f Binary files /dev/null and b/_images/ex_20-tecPCB_005.png differ diff --git a/_images/ex_20-tecPCB_006.png b/_images/ex_20-tecPCB_006.png new file mode 100644 index 00000000..960916cd Binary files /dev/null and b/_images/ex_20-tecPCB_006.png differ diff --git a/_images/ex_20-tecPCB_007.png b/_images/ex_20-tecPCB_007.png new file mode 100644 index 00000000..8581a5c4 Binary files /dev/null and b/_images/ex_20-tecPCB_007.png differ diff --git a/_images/gtec_calvalhyper_fig1.gif b/_images/gtec_calvalhyper_fig1.gif new file mode 100644 index 00000000..cb408586 Binary files /dev/null and b/_images/gtec_calvalhyper_fig1.gif differ diff --git a/_images/gtec_calvalhyper_fig10.gif b/_images/gtec_calvalhyper_fig10.gif new file mode 100644 index 00000000..a2434bfd Binary files /dev/null and b/_images/gtec_calvalhyper_fig10.gif differ diff --git a/_images/gtec_calvalhyper_fig2.gif b/_images/gtec_calvalhyper_fig2.gif new file mode 100644 index 00000000..9d27879a Binary files /dev/null and b/_images/gtec_calvalhyper_fig2.gif differ diff --git a/_images/gtec_calvalhyper_fig3.gif b/_images/gtec_calvalhyper_fig3.gif new file mode 100644 index 00000000..4eec05cb Binary files /dev/null and b/_images/gtec_calvalhyper_fig3.gif differ diff --git a/_images/gtec_calvalhyper_fig4.gif b/_images/gtec_calvalhyper_fig4.gif new file mode 100644 index 00000000..92148102 Binary files /dev/null and b/_images/gtec_calvalhyper_fig4.gif differ diff --git a/_images/gtec_calvalhyper_fig5.gif b/_images/gtec_calvalhyper_fig5.gif new file mode 100644 index 00000000..440197a2 Binary files /dev/null and b/_images/gtec_calvalhyper_fig5.gif differ diff --git a/_images/gtec_calvalhyper_fig6.gif b/_images/gtec_calvalhyper_fig6.gif new file mode 100644 index 00000000..26e824f9 Binary files /dev/null and b/_images/gtec_calvalhyper_fig6.gif differ diff --git a/_images/gtec_calvalhyper_fig7.gif b/_images/gtec_calvalhyper_fig7.gif new file mode 100644 index 00000000..27afc763 Binary files /dev/null and b/_images/gtec_calvalhyper_fig7.gif differ diff --git a/_images/gtec_calvalhyper_fig8.gif b/_images/gtec_calvalhyper_fig8.gif new file mode 100644 index 00000000..63135b3e Binary files /dev/null and b/_images/gtec_calvalhyper_fig8.gif differ diff --git a/_images/gtec_calvalhyper_fig9.gif b/_images/gtec_calvalhyper_fig9.gif new file mode 100644 index 00000000..33891dcf Binary files /dev/null and b/_images/gtec_calvalhyper_fig9.gif differ diff --git a/_images/gtecbrakesqueal_fig1.gif b/_images/gtecbrakesqueal_fig1.gif new file mode 100644 index 00000000..72144f38 Binary files /dev/null and b/_images/gtecbrakesqueal_fig1.gif differ diff --git a/_images/gtecbrakesqueal_fig5.gif b/_images/gtecbrakesqueal_fig5.gif new file mode 100644 index 00000000..60f5468c Binary files /dev/null and b/_images/gtecbrakesqueal_fig5.gif differ diff --git a/_images/gtecfricstir_fig17.png b/_images/gtecfricstir_fig17.png new file mode 100644 index 00000000..f317b723 Binary files /dev/null and b/_images/gtecfricstir_fig17.png differ diff --git a/_images/gtecfricstir_fig3.png b/_images/gtecfricstir_fig3.png new file mode 100644 index 00000000..36e4dd03 Binary files /dev/null and b/_images/gtecfricstir_fig3.png differ diff --git a/_images/gtecstent1.png b/_images/gtecstent1.png new file mode 100644 index 00000000..d351b1f3 Binary files /dev/null and b/_images/gtecstent1.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_000.png b/_images/sphx_glr_21-example-technology-showcase-buckling_000.png new file mode 100644 index 00000000..38baf901 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_000.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_001.png b/_images/sphx_glr_21-example-technology-showcase-buckling_001.png new file mode 100644 index 00000000..c202f9db Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_001.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_002.png b/_images/sphx_glr_21-example-technology-showcase-buckling_002.png new file mode 100644 index 00000000..11d11b03 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_002.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_003.png b/_images/sphx_glr_21-example-technology-showcase-buckling_003.png new file mode 100644 index 00000000..ea4b2878 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_003.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_004.png b/_images/sphx_glr_21-example-technology-showcase-buckling_004.png new file mode 100644 index 00000000..c15671ee Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_004.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_005.png b/_images/sphx_glr_21-example-technology-showcase-buckling_005.png new file mode 100644 index 00000000..97aeede6 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_005.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_006.png b/_images/sphx_glr_21-example-technology-showcase-buckling_006.png new file mode 100644 index 00000000..9b072d9c Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_006.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_007.png b/_images/sphx_glr_21-example-technology-showcase-buckling_007.png new file mode 100644 index 00000000..ecf9ef50 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_007.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_008.png b/_images/sphx_glr_21-example-technology-showcase-buckling_008.png new file mode 100644 index 00000000..c1ca1868 Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_008.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_009.png b/_images/sphx_glr_21-example-technology-showcase-buckling_009.png new file mode 100644 index 00000000..32caa0ea Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_009.png differ diff --git a/_images/sphx_glr_21-example-technology-showcase-buckling_010.png b/_images/sphx_glr_21-example-technology-showcase-buckling_010.png new file mode 100644 index 00000000..662c59dc Binary files /dev/null and b/_images/sphx_glr_21-example-technology-showcase-buckling_010.png differ diff --git a/_images/sphx_glr_tse-001-brake_squeal_thumb.png b/_images/sphx_glr_tse-001-brake_squeal_thumb.png new file mode 100644 index 00000000..ac626215 Binary files /dev/null and b/_images/sphx_glr_tse-001-brake_squeal_thumb.png differ diff --git a/_images/sphx_glr_tse-001-brake_squeal_thumb1.png b/_images/sphx_glr_tse-001-brake_squeal_thumb1.png new file mode 100644 index 00000000..ac626215 Binary files /dev/null and b/_images/sphx_glr_tse-001-brake_squeal_thumb1.png differ diff --git a/_images/sphx_glr_tse-015-calvalhyper_thumb.png b/_images/sphx_glr_tse-015-calvalhyper_thumb.png new file mode 100644 index 00000000..440197a2 Binary files /dev/null and b/_images/sphx_glr_tse-015-calvalhyper_thumb.png differ diff --git a/_images/sphx_glr_tse-015-calvalhyper_thumb1.png b/_images/sphx_glr_tse-015-calvalhyper_thumb1.png new file mode 100644 index 00000000..440197a2 Binary files /dev/null and b/_images/sphx_glr_tse-015-calvalhyper_thumb1.png differ diff --git a/_images/sphx_glr_tse-020-PCB_thumb.png b/_images/sphx_glr_tse-020-PCB_thumb.png new file mode 100644 index 00000000..a4bf15d7 Binary files /dev/null and b/_images/sphx_glr_tse-020-PCB_thumb.png differ diff --git a/_images/sphx_glr_tse-020-PCB_thumb1.png b/_images/sphx_glr_tse-020-PCB_thumb1.png new file mode 100644 index 00000000..a4bf15d7 Binary files /dev/null and b/_images/sphx_glr_tse-020-PCB_thumb1.png differ diff --git a/_images/sphx_glr_tse-021-buckling_thumb.png b/_images/sphx_glr_tse-021-buckling_thumb.png new file mode 100644 index 00000000..ea4b2878 Binary files /dev/null and b/_images/sphx_glr_tse-021-buckling_thumb.png differ diff --git a/_images/sphx_glr_tse-021-buckling_thumb1.png b/_images/sphx_glr_tse-021-buckling_thumb1.png new file mode 100644 index 00000000..ea4b2878 Binary files /dev/null and b/_images/sphx_glr_tse-021-buckling_thumb1.png differ diff --git a/_images/sphx_glr_tse-025-stent_thumb.png b/_images/sphx_glr_tse-025-stent_thumb.png new file mode 100644 index 00000000..6889df8d Binary files /dev/null and b/_images/sphx_glr_tse-025-stent_thumb.png differ diff --git a/_images/sphx_glr_tse-025-stent_thumb1.png b/_images/sphx_glr_tse-025-stent_thumb1.png new file mode 100644 index 00000000..6889df8d Binary files /dev/null and b/_images/sphx_glr_tse-025-stent_thumb1.png differ diff --git a/_images/sphx_glr_tse-028-fricstir_thumb.png b/_images/sphx_glr_tse-028-fricstir_thumb.png new file mode 100644 index 00000000..134af151 Binary files /dev/null and b/_images/sphx_glr_tse-028-fricstir_thumb.png differ diff --git a/_images/sphx_glr_tse-028-fricstir_thumb1.png b/_images/sphx_glr_tse-028-fricstir_thumb1.png new file mode 100644 index 00000000..134af151 Binary files /dev/null and b/_images/sphx_glr_tse-028-fricstir_thumb1.png differ diff --git a/_images/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png b/_images/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png new file mode 100644 index 00000000..fce2f7f4 Binary files /dev/null and b/_images/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png differ diff --git a/_images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png b/_images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png new file mode 100644 index 00000000..4cfd0c17 Binary files /dev/null and b/_images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png differ diff --git a/_images/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png b/_images/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png new file mode 100644 index 00000000..de305b5c Binary files /dev/null and b/_images/sphx_glr_vm-002-beam_stresses_and_deflections_thumb.png differ diff --git a/_images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png new file mode 100644 index 00000000..ae80c183 Binary files /dev/null and b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png differ diff --git a/_images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png new file mode 100644 index 00000000..75ecef75 Binary files /dev/null and b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png differ diff --git a/_images/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png new file mode 100644 index 00000000..29a51300 Binary files /dev/null and b/_images/sphx_glr_vm-003-thermally_loaded_support_structure_thumb.png differ diff --git a/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png new file mode 100644 index 00000000..9c43b854 Binary files /dev/null and b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png differ diff --git a/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png new file mode 100644 index 00000000..b41679a1 Binary files /dev/null and b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png differ diff --git a/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png new file mode 100644 index 00000000..9b86d461 Binary files /dev/null and b/_images/sphx_glr_vm-004-deflection_of_a_hinged_support_thumb.png differ diff --git a/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png new file mode 100644 index 00000000..9d19dc9a Binary files /dev/null and b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png differ diff --git a/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png new file mode 100644 index 00000000..d57acb9c Binary files /dev/null and b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png differ diff --git a/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png new file mode 100644 index 00000000..ea423fe7 Binary files /dev/null and b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png differ diff --git a/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png new file mode 100644 index 00000000..45213802 Binary files /dev/null and b/_images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_thumb.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_001.png b/_images/sphx_glr_vm-006-pinched_cylinder_001.png new file mode 100644 index 00000000..08e4f9e2 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_001.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_002.png b/_images/sphx_glr_vm-006-pinched_cylinder_002.png new file mode 100644 index 00000000..8abf6068 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_002.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_003.png b/_images/sphx_glr_vm-006-pinched_cylinder_003.png new file mode 100644 index 00000000..3a271d22 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_003.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_004.png b/_images/sphx_glr_vm-006-pinched_cylinder_004.png new file mode 100644 index 00000000..e8d56a0b Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_004.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_005.png b/_images/sphx_glr_vm-006-pinched_cylinder_005.png new file mode 100644 index 00000000..12f83f60 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_005.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_006.png b/_images/sphx_glr_vm-006-pinched_cylinder_006.png new file mode 100644 index 00000000..ec4acdc4 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_006.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_007.png b/_images/sphx_glr_vm-006-pinched_cylinder_007.png new file mode 100644 index 00000000..de7855d2 Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_007.png differ diff --git a/_images/sphx_glr_vm-006-pinched_cylinder_thumb.png b/_images/sphx_glr_vm-006-pinched_cylinder_thumb.png new file mode 100644 index 00000000..ba376aab Binary files /dev/null and b/_images/sphx_glr_vm-006-pinched_cylinder_thumb.png differ diff --git a/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png new file mode 100644 index 00000000..ac14c59b Binary files /dev/null and b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png differ diff --git a/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png new file mode 100644 index 00000000..44b068d5 Binary files /dev/null and b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png differ diff --git a/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png new file mode 100644 index 00000000..1593e5bb Binary files /dev/null and b/_images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_thumb.png differ diff --git a/_images/sphx_glr_vm-008-parametric_calculation_001.png b/_images/sphx_glr_vm-008-parametric_calculation_001.png new file mode 100644 index 00000000..999553da Binary files /dev/null and b/_images/sphx_glr_vm-008-parametric_calculation_001.png differ diff --git a/_images/sphx_glr_vm-008-parametric_calculation_002.png b/_images/sphx_glr_vm-008-parametric_calculation_002.png new file mode 100644 index 00000000..7b825b52 Binary files /dev/null and b/_images/sphx_glr_vm-008-parametric_calculation_002.png differ diff --git a/_images/sphx_glr_vm-008-parametric_calculation_thumb.png b/_images/sphx_glr_vm-008-parametric_calculation_thumb.png new file mode 100644 index 00000000..5c4451ef Binary files /dev/null and b/_images/sphx_glr_vm-008-parametric_calculation_thumb.png differ diff --git a/_images/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png b/_images/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png new file mode 100644 index 00000000..018faae3 Binary files /dev/null and b/_images/sphx_glr_vm-009-large_lateral_deflection_of_unequal_stiffness_springs_thumb.png differ diff --git a/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png b/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png new file mode 100644 index 00000000..a73d3017 Binary files /dev/null and b/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png differ diff --git a/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png b/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png new file mode 100644 index 00000000..fe0cedd8 Binary files /dev/null and b/_images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_thumb.png differ diff --git a/_images/sphx_glr_vm-011-residual-stress-problem_001.png b/_images/sphx_glr_vm-011-residual-stress-problem_001.png new file mode 100644 index 00000000..add9f062 Binary files /dev/null and b/_images/sphx_glr_vm-011-residual-stress-problem_001.png differ diff --git a/_images/sphx_glr_vm-011-residual-stress-problem_thumb.png b/_images/sphx_glr_vm-011-residual-stress-problem_thumb.png new file mode 100644 index 00000000..adb0d936 Binary files /dev/null and b/_images/sphx_glr_vm-011-residual-stress-problem_thumb.png differ diff --git a/_images/sphx_glr_vm-012-combined-bending-and-torsion_001.png b/_images/sphx_glr_vm-012-combined-bending-and-torsion_001.png new file mode 100644 index 00000000..1868968a Binary files /dev/null and b/_images/sphx_glr_vm-012-combined-bending-and-torsion_001.png differ diff --git a/_images/sphx_glr_vm-012-combined-bending-and-torsion_002.png b/_images/sphx_glr_vm-012-combined-bending-and-torsion_002.png new file mode 100644 index 00000000..5ed9deea Binary files /dev/null and b/_images/sphx_glr_vm-012-combined-bending-and-torsion_002.png differ diff --git a/_images/sphx_glr_vm-012-combined-bending-and-torsion_thumb.png b/_images/sphx_glr_vm-012-combined-bending-and-torsion_thumb.png new file mode 100644 index 00000000..6a7e97c8 Binary files /dev/null and b/_images/sphx_glr_vm-012-combined-bending-and-torsion_thumb.png differ diff --git a/_images/sphx_glr_vm-013_001.png b/_images/sphx_glr_vm-013_001.png new file mode 100644 index 00000000..6934b315 Binary files /dev/null and b/_images/sphx_glr_vm-013_001.png differ diff --git a/_images/sphx_glr_vm-013_thumb.png b/_images/sphx_glr_vm-013_thumb.png new file mode 100644 index 00000000..e373fa30 Binary files /dev/null and b/_images/sphx_glr_vm-013_thumb.png differ diff --git a/_images/sphx_glr_vm-014_001.png b/_images/sphx_glr_vm-014_001.png new file mode 100644 index 00000000..a0534b2c Binary files /dev/null and b/_images/sphx_glr_vm-014_001.png differ diff --git a/_images/sphx_glr_vm-014_thumb.png b/_images/sphx_glr_vm-014_thumb.png new file mode 100644 index 00000000..7e49fe69 Binary files /dev/null and b/_images/sphx_glr_vm-014_thumb.png differ diff --git a/_images/sphx_glr_vm-015_001.png b/_images/sphx_glr_vm-015_001.png new file mode 100644 index 00000000..935f7133 Binary files /dev/null and b/_images/sphx_glr_vm-015_001.png differ diff --git a/_images/sphx_glr_vm-015_thumb.png b/_images/sphx_glr_vm-015_thumb.png new file mode 100644 index 00000000..fec1e2a5 Binary files /dev/null and b/_images/sphx_glr_vm-015_thumb.png differ diff --git a/_images/sphx_glr_vm-016_001.png b/_images/sphx_glr_vm-016_001.png new file mode 100644 index 00000000..5bb9accd Binary files /dev/null and b/_images/sphx_glr_vm-016_001.png differ diff --git a/_images/sphx_glr_vm-016_002.png b/_images/sphx_glr_vm-016_002.png new file mode 100644 index 00000000..9c218dd9 Binary files /dev/null and b/_images/sphx_glr_vm-016_002.png differ diff --git a/_images/sphx_glr_vm-016_003.png b/_images/sphx_glr_vm-016_003.png new file mode 100644 index 00000000..a3a555eb Binary files /dev/null and b/_images/sphx_glr_vm-016_003.png differ diff --git a/_images/sphx_glr_vm-016_004.png b/_images/sphx_glr_vm-016_004.png new file mode 100644 index 00000000..5bb9accd Binary files /dev/null and b/_images/sphx_glr_vm-016_004.png differ diff --git a/_images/sphx_glr_vm-016_005.png b/_images/sphx_glr_vm-016_005.png new file mode 100644 index 00000000..aa4300c1 Binary files /dev/null and b/_images/sphx_glr_vm-016_005.png differ diff --git a/_images/sphx_glr_vm-016_006.png b/_images/sphx_glr_vm-016_006.png new file mode 100644 index 00000000..094f0922 Binary files /dev/null and b/_images/sphx_glr_vm-016_006.png differ diff --git a/_images/sphx_glr_vm-016_thumb.png b/_images/sphx_glr_vm-016_thumb.png new file mode 100644 index 00000000..5e52c368 Binary files /dev/null and b/_images/sphx_glr_vm-016_thumb.png differ diff --git a/_images/sphx_glr_vm-018_001.png b/_images/sphx_glr_vm-018_001.png new file mode 100644 index 00000000..42bf8d42 Binary files /dev/null and b/_images/sphx_glr_vm-018_001.png differ diff --git a/_images/sphx_glr_vm-018_002.png b/_images/sphx_glr_vm-018_002.png new file mode 100644 index 00000000..18adbc7e Binary files /dev/null and b/_images/sphx_glr_vm-018_002.png differ diff --git a/_images/sphx_glr_vm-018_003.png b/_images/sphx_glr_vm-018_003.png new file mode 100644 index 00000000..624b3683 Binary files /dev/null and b/_images/sphx_glr_vm-018_003.png differ diff --git a/_images/sphx_glr_vm-018_thumb.png b/_images/sphx_glr_vm-018_thumb.png new file mode 100644 index 00000000..b8fa921c Binary files /dev/null and b/_images/sphx_glr_vm-018_thumb.png differ diff --git a/_images/sphx_glr_vm-020_001.png b/_images/sphx_glr_vm-020_001.png new file mode 100644 index 00000000..1c8d4175 Binary files /dev/null and b/_images/sphx_glr_vm-020_001.png differ diff --git a/_images/sphx_glr_vm-020_thumb.png b/_images/sphx_glr_vm-020_thumb.png new file mode 100644 index 00000000..42d4df58 Binary files /dev/null and b/_images/sphx_glr_vm-020_thumb.png differ diff --git a/_images/sphx_glr_vm-021_001.png b/_images/sphx_glr_vm-021_001.png new file mode 100644 index 00000000..4e62a9de Binary files /dev/null and b/_images/sphx_glr_vm-021_001.png differ diff --git a/_images/sphx_glr_vm-021_thumb.png b/_images/sphx_glr_vm-021_thumb.png new file mode 100644 index 00000000..211f50c8 Binary files /dev/null and b/_images/sphx_glr_vm-021_thumb.png differ diff --git a/_images/sphx_glr_vm-025_001.png b/_images/sphx_glr_vm-025_001.png new file mode 100644 index 00000000..64c34f20 Binary files /dev/null and b/_images/sphx_glr_vm-025_001.png differ diff --git a/_images/sphx_glr_vm-025_thumb.png b/_images/sphx_glr_vm-025_thumb.png new file mode 100644 index 00000000..192e27a3 Binary files /dev/null and b/_images/sphx_glr_vm-025_thumb.png differ diff --git a/_images/sphx_glr_vm-291_001.png b/_images/sphx_glr_vm-291_001.png new file mode 100644 index 00000000..0be9e9ad Binary files /dev/null and b/_images/sphx_glr_vm-291_001.png differ diff --git a/_images/sphx_glr_vm-291_002.png b/_images/sphx_glr_vm-291_002.png new file mode 100644 index 00000000..0be9e9ad Binary files /dev/null and b/_images/sphx_glr_vm-291_002.png differ diff --git a/_images/sphx_glr_vm-291_thumb.png b/_images/sphx_glr_vm-291_thumb.png new file mode 100644 index 00000000..25e5ffc1 Binary files /dev/null and b/_images/sphx_glr_vm-291_thumb.png differ diff --git a/_images/sphx_glr_vm-295_001.png b/_images/sphx_glr_vm-295_001.png new file mode 100644 index 00000000..a5ba884e Binary files /dev/null and b/_images/sphx_glr_vm-295_001.png differ diff --git a/_images/sphx_glr_vm-295_thumb.png b/_images/sphx_glr_vm-295_thumb.png new file mode 100644 index 00000000..c7bf4280 Binary files /dev/null and b/_images/sphx_glr_vm-295_thumb.png differ diff --git a/_images/sphx_glr_vm-299_001.png b/_images/sphx_glr_vm-299_001.png new file mode 100644 index 00000000..7174df06 Binary files /dev/null and b/_images/sphx_glr_vm-299_001.png differ diff --git a/_images/sphx_glr_vm-299_thumb.png b/_images/sphx_glr_vm-299_thumb.png new file mode 100644 index 00000000..1a529eeb Binary files /dev/null and b/_images/sphx_glr_vm-299_thumb.png differ diff --git a/_images/vm10_setup.png b/_images/vm10_setup.png new file mode 100644 index 00000000..3bafea34 Binary files /dev/null and b/_images/vm10_setup.png differ diff --git a/_images/vm10_setup_1.png b/_images/vm10_setup_1.png new file mode 100644 index 00000000..0f5c0085 Binary files /dev/null and b/_images/vm10_setup_1.png differ diff --git a/_images/vm11_setup_1.png b/_images/vm11_setup_1.png new file mode 100644 index 00000000..8fd8470b Binary files /dev/null and b/_images/vm11_setup_1.png differ diff --git a/_images/vm11_setup_2.png b/_images/vm11_setup_2.png new file mode 100644 index 00000000..10eb178f Binary files /dev/null and b/_images/vm11_setup_2.png differ diff --git a/_images/vm12_setup.png b/_images/vm12_setup.png new file mode 100644 index 00000000..8126b319 Binary files /dev/null and b/_images/vm12_setup.png differ diff --git a/_images/vm13_setup.png b/_images/vm13_setup.png new file mode 100644 index 00000000..2764c9bc Binary files /dev/null and b/_images/vm13_setup.png differ diff --git a/_images/vm14_setup.png b/_images/vm14_setup.png new file mode 100644 index 00000000..b3a13bb9 Binary files /dev/null and b/_images/vm14_setup.png differ diff --git a/_images/vm15_setup.png b/_images/vm15_setup.png new file mode 100644 index 00000000..3ce88454 Binary files /dev/null and b/_images/vm15_setup.png differ diff --git a/_images/vm16_setup.png b/_images/vm16_setup.png new file mode 100644 index 00000000..473bf35d Binary files /dev/null and b/_images/vm16_setup.png differ diff --git a/_images/vm18_setup1.png b/_images/vm18_setup1.png new file mode 100644 index 00000000..d13639e1 Binary files /dev/null and b/_images/vm18_setup1.png differ diff --git a/_images/vm18_setup2.png b/_images/vm18_setup2.png new file mode 100644 index 00000000..43c166ff Binary files /dev/null and b/_images/vm18_setup2.png differ diff --git a/_images/vm1_setup.png b/_images/vm1_setup.png new file mode 100644 index 00000000..1bb514e3 Binary files /dev/null and b/_images/vm1_setup.png differ diff --git a/_images/vm20_setup.png b/_images/vm20_setup.png new file mode 100644 index 00000000..821811aa Binary files /dev/null and b/_images/vm20_setup.png differ diff --git a/_images/vm21_setup.png b/_images/vm21_setup.png new file mode 100644 index 00000000..40f7d23d Binary files /dev/null and b/_images/vm21_setup.png differ diff --git a/_images/vm25_setup.png b/_images/vm25_setup.png new file mode 100644 index 00000000..a8d465cb Binary files /dev/null and b/_images/vm25_setup.png differ diff --git a/_images/vm291_setup1.png b/_images/vm291_setup1.png new file mode 100644 index 00000000..b43534b9 Binary files /dev/null and b/_images/vm291_setup1.png differ diff --git a/_images/vm291_setup2.png b/_images/vm291_setup2.png new file mode 100644 index 00000000..93b7b69c Binary files /dev/null and b/_images/vm291_setup2.png differ diff --git a/_images/vm295_setup.png b/_images/vm295_setup.png new file mode 100644 index 00000000..ecfb757e Binary files /dev/null and b/_images/vm295_setup.png differ diff --git a/_images/vm299_setup.png b/_images/vm299_setup.png new file mode 100644 index 00000000..2ecd4b40 Binary files /dev/null and b/_images/vm299_setup.png differ diff --git a/_images/vm2_setup.png b/_images/vm2_setup.png new file mode 100644 index 00000000..482dc895 Binary files /dev/null and b/_images/vm2_setup.png differ diff --git a/_images/vm3_setup.png b/_images/vm3_setup.png new file mode 100644 index 00000000..669815ec Binary files /dev/null and b/_images/vm3_setup.png differ diff --git a/_images/vm4_setup.png b/_images/vm4_setup.png new file mode 100644 index 00000000..414fb96d Binary files /dev/null and b/_images/vm4_setup.png differ diff --git a/_images/vm5_setup.png b/_images/vm5_setup.png new file mode 100644 index 00000000..f2ddee28 Binary files /dev/null and b/_images/vm5_setup.png differ diff --git a/_images/vm6_setup.png b/_images/vm6_setup.png new file mode 100644 index 00000000..57bd466f Binary files /dev/null and b/_images/vm6_setup.png differ diff --git a/_images/vm7_setup.png b/_images/vm7_setup.png new file mode 100644 index 00000000..64e25c28 Binary files /dev/null and b/_images/vm7_setup.png differ diff --git a/_images/vm7_setup_1.png b/_images/vm7_setup_1.png new file mode 100644 index 00000000..e6d7cb51 Binary files /dev/null and b/_images/vm7_setup_1.png differ diff --git a/_images/vm7_setup_2.png b/_images/vm7_setup_2.png new file mode 100644 index 00000000..637fc216 Binary files /dev/null and b/_images/vm7_setup_2.png differ diff --git a/_images/vm8_setup.png b/_images/vm8_setup.png new file mode 100644 index 00000000..d3087b47 Binary files /dev/null and b/_images/vm8_setup.png differ diff --git a/_images/vm9_setup.png b/_images/vm9_setup.png new file mode 100644 index 00000000..62ad03c5 Binary files /dev/null and b/_images/vm9_setup.png differ diff --git a/_images/vm9_setup_2.png b/_images/vm9_setup_2.png new file mode 100644 index 00000000..d426a717 Binary files /dev/null and b/_images/vm9_setup_2.png differ diff --git a/_sources/contributing/index.rst.txt b/_sources/contributing/index.rst.txt new file mode 100644 index 00000000..7cedeca5 --- /dev/null +++ b/_sources/contributing/index.rst.txt @@ -0,0 +1,98 @@ +Contribute +========== + +Overall guidance on contributing to a PyAnsys library appears in the +`Contributing `_ topic +in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar +with this guide before attempting to contribute to PyMAPDL Examples. + +The following contribution information is specific to PyMAPDL Examples. + +Clone the repository +-------------------- + +Run this code to clone and install the latest version of PyMAPDL Examples in development mode:: + + git clone https://github.com/ansys/pymapdl-examples + cd pymapdl-examples + +Post issues +----------- + +Use the `PyMAPDL Examples Issues `_ page to submit questions, +report bugs, and request new features. When possible, use these issue +templates: + +* Bug report template +* Feature request template + +If your issue does not fit into one of these template categories, create your own issue. + +To reach the project support team, email `pyansys.core@ansys.com `_. + + +Python virtual environment +-------------------------- + +The use of a Python `virtual environment `_ is recommended. +To create one, run the following commands:: + + python -m venv .venv + .\.venv\Scripts\activate + + +To deactivate the virtual environment, run this command:: + + deactivate + + +Build documentation +------------------- + +To build the documentation for PyMAPDL Examples locally, in the root directory of the repository, +run these commands:: + + pip install -r .\requirements\requirements_doc.txt + .\doc\make.bat html + + +Adhere to code style +-------------------- + +PyMAPDL Examples follows the PEP8 standard as outlined in the `PyAnsys Development Guide +`_ and implements style checking using +`pre-commit `_. + +``pre-commit`` is a multi-language package manager for pre-commit hooks. To ensure +that your code meets minimum code styling standards, install ``pre-commit`` with +this command:: + + pip install pre-commit + +Once installed, you can run code style checks with this command:: + + pre-commit run --all-files + +You can also install this as a pre-commit hook by running this command:: + + pre-commit install + +This way, it is not possible for you to push code that fails the style checks:: + + $ pre-commit install + $ git commit -am "added my cool feature" + black....................................................................Passed + blacken-docs.............................................................Passed + isort....................................................................Passed + flake8...................................................................Passed + codespell................................................................Passed + check for merge conflicts................................................Passed + debug statements (python)................................................Passed + Validate GitHub Workflows................................................Passed + + +.. toctree:: + :hidden: + :includehidden: + + write_examples.rst \ No newline at end of file diff --git a/_sources/contributing/write_examples.rst.txt b/_sources/contributing/write_examples.rst.txt new file mode 100644 index 00000000..1c8f3115 --- /dev/null +++ b/_sources/contributing/write_examples.rst.txt @@ -0,0 +1,42 @@ +How to write a good example? +============================ + +Here are some tips for writing a good example. + +Use ``mapdl.convert_script`` +---------------------------- + +If you want to translate a MAPDL script into a PyMAPDL one, you can first +run these commands:: + + from ansys.mapdl.core import convert_script + convert_script(path_MAPDL_script) + +.. warning:: + + The ``mapdl.convert_script`` method is still in the beta state. You should check its output. + There may be easier ways to write some commands. + + For example, use ``mapdl.eplot()`` rather than ``mapdl.run("EPLOT")``. + + +Use Python packages as much as possible +--------------------------------------- +The aim of PyMAPDL is to make it possible to create workflows that combine +MAPDL and the Python environment. +Some MAPDL workflows can be very efficient, but mixing them with Python packages +can simplify the code and allow you to generate more visually effective plots. + +Do not hesitate to explore the `Python Package Index `_ +to discover new Python packages. + + +Graphics and plots +------------------ + +The more visual your example is, the better. +Python facilitates the creation of sophisticate graphics and plots: take advantage +of that. + +Packages like `Matplotlib `_, `Pandas `_ +or `PyVista `_ can help you create nice graphics, tables, or plots . diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 00000000..65a63c62 --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,56 @@ +.. _sphx_glr_pymapdl_examples: + +PyMAPDL Examples +================= + +The Technology Showcases and the Verification Manual examples for +`PyMAPDL `_ are contained in this repository. + + +.. === VERIFICATION MANUAL === + +Verification Manual +=================== + +These examples present how to use PyMAPDL in an academic modeling context. +They ensure the PyMAPDL accuracy. + +Summary of the exposed Verification Manual Examples +--------------------------------------------------- + +.. include:: ./verif-manual/index.rst + :start-line: 8 + :end-line: 416 + + +.. === TECHNOLOGY SHOWCASES === + +Technology Showcases +==================== + + +This documentation demonstrates the broad simulation capabilities of Ansys Mechanical +APDL. +The problems demonstrate how to use PyMAPDL to effectively and accurately +solve interdisciplinary problems from a variety of industries and engineering +fields. + +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 necessitate more resources. + +.. include:: ./technology_showcase_examples/index.rst + :start-line: 11 + :end-line: 130 + + +.. toctree:: + :hidden: + :includehidden: + + verif-manual/index + technology_showcase_examples/index + contributing/index diff --git a/_sources/sg_execution_times.rst.txt b/_sources/sg_execution_times.rst.txt new file mode 100644 index 00000000..ba64e271 --- /dev/null +++ b/_sources/sg_execution_times.rst.txt @@ -0,0 +1,103 @@ + +:orphan: + +.. _sphx_glr_sg_execution_times: + + +Computation times +================= +**00:00.000** total execution time for 23 files **from all galleries**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_verif-manual_vm-001-statically_indeterminate_reaction_force_analysis.py` (``../../examples/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-002-beam_stresses_and_deflections.py` (``../../examples/verif-manual/vm-002-beam_stresses_and_deflections.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-003-thermally_loaded_support_structure.py` (``../../examples/verif-manual/vm-003-thermally_loaded_support_structure.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-004-deflection_of_a_hinged_support.py` (``../../examples/verif-manual/vm-004-deflection_of_a_hinged_support.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-005-laterally_loaded_tapered_support_structure.py` (``../../examples/verif-manual/vm-005-laterally_loaded_tapered_support_structure.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-006-pinched_cylinder.py` (``../../examples/verif-manual/vm-006-pinched_cylinder.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-007-plastic_compression_of_a_pipe_assembly.py` (``../../examples/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-008-parametric_calculation.py` (``../../examples/verif-manual/vm-008-parametric_calculation.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py` (``../../examples/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-010-bending_of_a_t-shaped_beam.py` (``../../examples/verif-manual/vm-010-bending_of_a_t-shaped_beam.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-011-residual-stress-problem.py` (``../../examples/verif-manual/vm-011-residual-stress-problem.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-012-combined-bending-and-torsion.py` (``../../examples/verif-manual/vm-012-combined-bending-and-torsion.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-013.py` (``../../examples/verif-manual/vm-013.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-014.py` (``../../examples/verif-manual/vm-014.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-015.py` (``../../examples/verif-manual/vm-015.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-016.py` (``../../examples/verif-manual/vm-016.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-018.py` (``../../examples/verif-manual/vm-018.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-020.py` (``../../examples/verif-manual/vm-020.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-021.py` (``../../examples/verif-manual/vm-021.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-025.py` (``../../examples/verif-manual/vm-025.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-291.py` (``../../examples/verif-manual/vm-291.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-295.py` (``../../examples/verif-manual/vm-295.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-299.py` (``../../examples/verif-manual/vm-299.py``) + - 00:00.000 + - 0.0 diff --git a/_sources/technology_showcase_examples/index.rst.txt b/_sources/technology_showcase_examples/index.rst.txt new file mode 100644 index 00000000..cbe20437 --- /dev/null +++ b/_sources/technology_showcase_examples/index.rst.txt @@ -0,0 +1,147 @@ + +.. _sphx_glr_technology_showcase_examples: + +==================== +Technology Showcases +==================== + +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. + +.. raw:: html + +
+ + + +.. raw:: html + +
+ +.. only:: html + + .. image:: ./images/thumb/sphx_glr_tse-001-brake_squeal_thumb.png + :alt: Brake Squeal Analysis + + :ref:`sphx_glr_ex_01-tecbrakesqueal.py` + +.. raw:: html + +
Brake Squeal Analysis
+
+ + + +.. raw:: html + +
+ +.. only:: html + + .. image:: ./images/thumb/sphx_glr_tse-015-calvalhyper_thumb.png + :alt: Calibrating and validating a hyperelastic constitutive model + + :ref:`sphx_glr_ex_15-tecHyperConstlModel.py` + +.. raw:: html + +
Calibrating and validating a hyperelastic constitutive Model
+
+ + + +.. raw:: html + +
+ +.. only:: html + + .. image:: ./images/thumb/sphx_glr_tse-020-PCB_thumb.png + :alt: Dynamic simulation of a printed circuit board assembly + + :ref:`sphx_glr_ex_20-tecPCB.rst` + +.. raw:: html + +
Dynamic simulation of a printed circuit board assembly
+
+ + + +.. raw:: html + +
+ +.. only:: html + + .. image:: ./images/thumb/sphx_glr_tse-021-buckling_thumb.png + :alt: Buckling and post-buckling analysis + + :ref:`sphx_glr_ex_21-tecbuckling.rst` + +.. raw:: html + +
Buckling and post-buckling
+
+ + + +.. raw:: html + +
+ +.. only:: html + + .. image:: ./images/thumb/sphx_glr_tse-025-stent_thumb.png + :alt: Cardiovascular Stent Simulation + + :ref:`sphx_glr_ex_25-tecstent.rst` + +.. raw:: html + +
Cardiovascular Stent Simulation
+
+ + + +.. 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 + +
Friction Stir Welding (FSW) Simulation
+
+ + + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + :includehidden: + + techdemo-1/ex_01-tecbrakesqueal.rst + techdemo-15/ex_15-teccalvalhyper.rst + techdemo-20/ex_20-tecPCB.rst + techdemo-21/ex_21-tecbuckling.rst + techdemo-25/ex_25-tecstent.rst + techdemo-28/ex_28-tecfricstir.rst + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst.txt b/_sources/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst.txt new file mode 100644 index 00000000..05c16eb7 --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-1/ex_01-tecbrakesqueal.rst.txt @@ -0,0 +1,957 @@ +.. _sphx_glr_ex_01-tecbrakesqueal.py: + +.. _tech_demo_01: + +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 +eigensolvers to predict unstable modes. + +The following topics are available: + +* `1.1. Introduction`_ +* `1.2. Problem description`_ +* `1.3. Modeling`_ +* `1.4. Material properties`_ +* `1.5. Boundary conditions and loading`_ +* `1.6. Analysis and solution controls`_ +* `1.7. Results and discussion`_ +* `1.8. Recommendations`_ +* `1.9. References`_ +* `1.10. Input files`_ + +You can also perform this example analysis entirely in the Ansys +Mechanical Application. For more information, see Brake-Squeal Analysis in the +Workbench Technology Showcase: Example Problems. + +1.1. Introduction +----------------- + +Eliminating brake noise is a classic challenge in the automotive industry. Brake discs +develop large and sustained friction-induced oscillations, simple referred to as brake +squeal. + +Two common theories describe brake-squeal phenomena: + +* *Stick-Slip Theory* -- The self-excited + vibration of a brake system occurs when the static coefficient of friction is + greater than the sliding coefficient of friction. Variable friction forces + introduce energy into the system which is not properly dissipated during the + squealing event, resulting in large vibrations. +* *Mode-Coupling Theory* -- When two similar + characteristic modes couple with each other, instability is introduced to the + braking system. This instability is caused primarily by improperly selected + geometric parameters. + Both theories attribute brake squeal to variable friction forces at the disc-pad + interface. + +Brake noise is generally categorized as follows: + +* Low-frequency noise -- An example of a low-frequency noise is the + "groaning" noise which occurs in the frequency range between 100 and + 1000 Hz. Any noise having a frequency above 1000 Hz is considered a + squeal. +* Low-frequency squeal -- A result of mode coupling occurring between the + out-of-plane modes of the rotor and the bending modes of the brake pad. +* High-frequency squeal -- A result of mode coupling occurring between the + in-plane modes of the rotor. + Low- and high-frequency squealing can be determined via complex eigensolvers. The + presence of unstable modes suggests that the geometry parameters and material properties + of the braking system should be modified. + +For more information, see Brake-Squeal (Prestressed Modal) Analysis in the *Structural Analysis Guide*. + +1.2. Problem description +------------------------ + +The following model is a simple brake disc-pad assembly. The disc has a thickness of +10 mm and the brake pads have a thickness of 15 mm. The inner diameter of the disc is +250 mm and outer diameter is of 350 mm. A pre-stressed modal analysis is performed on +this model using various methods to determine the unstable modes. A parametric study is +then performed to examine the effect of the friction coefficient on the dynamic +stability of the model. + +.. figure:: images/gtecbrakesqueal_fig1.gif + :align: center + :alt: Brake Disc-Pad Assembly + :figclass: align-center + + **Figure 1.1: Brake Disc-Pad Assembly** + + + +1.3. Modeling +------------- + +The following modeling topics are available: + +* `1.3.1. Understanding the Advantages of Contact Element Technology`_ +* `1.3.2. Modeling Contact Pairs`_ +* `1.3.3. Generating Internal Sliding Motion`_ +* `1.3.4. Meshing the Brake Disc-Pad Model`_ + +1.3.1. Understanding the Advantages of Contact Element Technology +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Brake-squeal problems typically require manual calculations of the unsymmetric +terms arising from sources such as frictional sliding, and then inputting the +unsymmetric terms using special elements (such as +``MATRIX27``). It is a tedious process requiring a matched mesh +at the disc-pad interface along with assumptions related to the amount of area in +contact and sliding. + +3-D contact elements (``CONTA17x``) offer a more efficient alternative by modeling +surface-to-surface contact at the pad-disc interface. With contact +surface-to-surface contact elements, a matched mesh is unnecessary at the +contact-target surface, and there is no need to calculate the unsymmetric +terms. + +Contact surface-to-surface elements offer many controls for defining contact +pairs, such as the type of contact surface, algorithm, contact stiffness, and +gap/initial penetration effect. + +1.3.2. Modeling Contact Pairs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Frictional surface-to-surface contact pairs with a 0.3 coefficient of friction are +used to define contact between the brake pads and disc to simulate frictional +sliding contact occurring at the pad-disc interface. Bonded surface-to-surface +contact pairs are used to define the contact for other components which will be +always in contact throughout the braking operation. + +The augmented Lagrange algorithm is used for the frictional contact pairs, as the +pressure and frictional stresses are augmented during equilibrium iterations in such +a way that the penetration is reduced gradually. The augmented Lagrange algorithm +also requires fewer computational resources than the standard Lagrange multiplier +algorithm, which normally requires additional iterations to ensure that the contact +compatibility is satisfied exactly. The augmented Lagrange is well suited for +modeling general frictional contact, such as the contact between the brake pad and +disc defined in this example. + +An internal multipoint constraint (MPC) contact algorithm is used for bonded +contact because it ties contact and target surface together efficiently for +solid-solid assembly. The MPC algorithm builds equations internally based on the +contact kinematics and does not require the degrees of freedom of the contact +surface nodes, reducing the wave front size of the equation solver. A contact +detection point is made on the Gauss point for frictional contact pairs, and on the +nodal point (normal-to-target surface) for MPC bonded contact pairs. + + + +1.3.3. Generating Internal Sliding Motion +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The :meth:`Mapdl.cmrotate() ` +command defines constant rotational velocities on +the contact/target nodes to generate internal sliding motion. The specified +rotational velocity is used only to determine the sliding direction and has no +effect on the final solution. The element component used should include only the +contact or the target elements that are on the brake disc/rotor. In this example, +the target elements are defined on the disc surface and the contact elements are +defined on the pad surface. The target elements attached to the disc surface are +grouped to form a component named E\_ROTOR which is then later specified on the +:meth:`Mapdl.cmrotate() ` +command to generate a sliding frictional force. + +1.3.4. Meshing the Brake Disc-Pad Model +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The sweep method is used to generate a hexahedral dominant mesh of the brake +system assembly. Brake discs, pads and all other associated components are meshed +with 20-node structural solid ``SOLID186`` elements with +uniform reduced-integration element technology. The edge sizing tool is used to +obtains a refined mesh at the pad-disc interface to improve the solution accuracy. +For problems with a large unsymmetric coefficient, a finer mesh should be used at +the pad-disc interface to accurately predict the unstable modes. +``CONTA174`` (3-D 8 node surface to surface contact) +elements are used to define the contact surface and +``TARGE170`` (3-D target segment) elements are used to +define the target surface. The brake disc-pad assembly is meshed with total of 60351 +nodes and 11473 elements. + + +Start this example by launching MAPDL and loading the model. + +.. code:: python + + # sphinx_gallery_thumbnail_path = '_static/tse1_setup.png' + + import pyvista + pyvista.set_plot_theme('document') + + from ansys.mapdl.core import launch_mapdl, Mapdl + from ansys.mapdl.core.examples.downloads import download_tech_demo_data + from ansys.mapdl.core.examples.examples import ansys_colormap + + cdb_path = download_tech_demo_data("td-1", "disc_pad_model.cdb") + + def start(mapdl, case): + """Initialize MAPDL with a fresh disc pad model""" + mapdl.finish() + mapdl.verify(case) + mapdl.prep7() + mapdl.shpp("OFF", value2="NOWARN") # disable element shape checking + mapdl.cdread("COMB", cdb_path) # Read disc_pad_model.cdb file + mapdl.allsel() + + + mapdl = launch_mapdl(nproc=8) + mapdl.clear() + + start(mapdl, 'linear_non_prestressed') + mapdl.title("linear_non_prestressed, Solving brake squeal problem using linear non pre-stressed modal solve") + + mapdl.eplot( + vtk=True, cpos="xy", show_edges=True, show_axes=False, line_width=2, background="w" + ) + + +.. jupyter-execute:: ../../common_jupyter_execute.py + :hide-code: + +.. jupyter-execute:: + :hide-code: + + from ansys.mapdl.core import examples + from ansys.mapdl.core.examples.downloads import download_vtk_rotor, download_tech_demo_data + + rotor = pyvista.read(download_vtk_rotor()) + rotor.plot(color='w', show_edges=True) + + +1.4. Material properties +------------------------ + +Linear elastic isotropic materials are assigned to all the components of the braking +system. + + +**Table 1.1: Material properties** + ++------------------------+----------------------+ +| | Material properties | ++========================+======================+ +| Young's Modulus (Nm-2) | 2.0 E+11 Pa | ++------------------------+----------------------+ +| Density | 7800 Kg/m3 | ++------------------------+----------------------+ +| Poisson's Ratio | 0.3 | ++------------------------+----------------------+ + + +1.5. Boundary conditions and loading +------------------------------------ + +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 +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). + +.. figure:: images/gtecbrakesqueal_fig5.gif + :align: center + :alt: Boundary conditions (Displacement Constraints and Pressure Loading) + :figclass: align-center + + **Figure 1.2: Boundary conditions (Displacement Constraints and Pressure Loading)** + + +1.6. Analysis and solution controls +----------------------------------- + +The analysis settings and solution controls differ depending upon the method used +to solve a brake-squeal problem. This section describes three possible +methods: + +* `1.6.1. Linear Non-prestressed Modal Analysis`_ +* `1.6.2. Partial Nonlinear Perturbed Modal Analysis`_ +* `1.6.3. Full Nonlinear Perturbed Modal Analysis`_ + +1.6.1. Linear Non-prestressed Modal Analysis +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +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 +is based on the initial contact status. + +Following is the process for solving a brake-squeal problem using this method: + +1. Perform a linear partial-element analysis with no prestress effects. +2. Generate the unsymmetric stiffness matrix + (:meth:`Mapdl.nropt("UNSYM") `). +3. Generate sliding frictional force (:meth:`Mapdl.cmrotate() `). +4. Perform a complex modal analysis using the QRDAMP or UNSYM eigensolver. + + When using the QRDAMP solver, you can reuse the symmetric + eigensolution from the previous load steps + (:meth:`Mapdl.qrdopt() `), effective when performing a friction- + 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`. + + For this analysis, the UNSYM solver is selected to solve the problem. + (Guidelines for selecting the eigensolver for brake-squeal problems appear + in `1.8. Recommendations`_.) + + +The frequencies obtained from the modal solution have real and imaginary parts due +the presence of an unsymmetric stiffness matrix. The imaginary frequency reflects +the damped frequency, and the real frequency indicates whether the mode is stable or +not. A real eigenfrequency with a positive value indicates an unstable mode. + +The following input shows the solution steps involved in this method: + +**Modal Solution** + +.. code:: python + + mapdl.run("/SOLU") + mapdl.nropt("UNSYM") # To generate non symmetric + mapdl.cmsel("S", "C1_R") # Select the target elements of the disc + mapdl.cmsel("A", "C2_R") + mapdl.cm("E_ROTOR", "ELEM") # Form a component named E_ROTOR with the selected target elements + mapdl.allsel("ALL") + mapdl.cmrotate("E_ROTOR", "", "", 2) # Rotate the selected element along global Z using CMROTATE command + + # Perform modal solve, use UNSYM to extract 30 modes, and expand those + # modes. + mapdl.modal_analysis("UNSYM", 30, mxpand=True) + mapdl.finish() + + mapdl.post1() + modes = [] + modes.append(mapdl.set("list")) + mapdl.set(1, 21) + + # Plot the mode shape for mode 21 + mapdl.post_processing.plot_nodal_displacement( + "NORM", + cmap=ansys_colormap(), + line_width=5, + cpos="xy", + scalar_bar_args={"title": "Displacement", "vertical": False}, + ) + + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data('td-1', 'rotor_linear_step21_unorm.vtk' )) + rotor1.plot(scalars='values', cmap='jet', show_edges=True) + + +**Figure 1.3: Mode Shape for Unstable Mode (Mode 21).** +Obtained from the `1.6.1. Linear Non-prestressed Modal Analysis`_ . + + + +1.6.2. Partial Nonlinear Perturbed Modal Analysis +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use a partial nonlinear perturbed modal analysis when stress-stiffening affects +the final modal solution. The initial contact conditions are established, and a +prestressed matrix is generated at the end of the first static solution. + +Following is the process for solving a brake-squeal problem using this method: + +1. Perform a nonlinear, large-deflection static analysis + (:meth:`Mapdl.nlgeom("ON") `). + + Use the unsymmetric Newton-Raphson method + (:meth:`Mapdl.nropt("UNSYM") `). Specify the restart control points needed + for the linear perturbation analysis (:meth:`Mapdl.rescontrol() `) + + Create components for use in the next step. + + The static solution with external loading establishes the initial contact + condition and generates a prestressed matrix. + +2. Restart the previous static solution from the desired load step and + substep, and perform the first phase of the perturbation analysis while + preserving the **.ldhi**, **.rnnn** and **.rst** files (:meth:`Mapdl.antype("STATIC", "RESTART", "", "", "PERTURB") `). + + Initiate a modal linear perturbation analysis + (:meth:`Mapdl.perturb("MODAL") `). + + Generate forced frictional sliding contact (:meth:`Mapdl.cmrotate() `), + specifying the component names created in the previous step. + + The contact stiffness matrix is based only on the contact status at the + restart point. + + Regenerate the element stiffness matrix at the end of the first phase of + the linear perturbation solution (:meth:`Mapdl.solve("ELFORM") `). + +3. Obtain the linear perturbation modal solution using the QRDAMP or UNSYM + eigensolver (:meth:`Mapdl.modopt() `). + + When using the QRDAMP solver, you can reuse the symmetric + eigensolution from the previous load steps + (:meth:`Mapdl.qrdopt() `), effective when performing a + friction-sensitive/parametric analysis, as it saves time by not + recalculating the real symmetric modes after the first solve + operation. + +4. Expand the modes and postprocess the results (from the `jobname.rstp` file). + +The following inputs show the solution steps involved with this method: + +**Static Solution** + +.. code:: python + + start(mapdl, "partial_prestressed") + mapdl.title("partial_prestressed, Solving brake squeal problem using partial pre-stressed modal solve") + + mapdl.run("/SOLU") + mapdl.antype("STATIC") # Perform static solve + mapdl.outres("ALL", "ALL") # Write all element and nodal solution results for each sub steps + mapdl.nropt("UNSYM") # Specify unsymmetric Newton-Raphson option to solve the problem + mapdl.rescontrol("DEFINE", "ALL", 1) # Control restart files + mapdl.nlgeom("ON") # Activate large deflection + mapdl.autots("ON") # Auto time stepping turned on + mapdl.time(1.0) # End time = 1.0 sec + mapdl.esel("S", "TYPE", "", 124) # Select element type 124 + mapdl.nsle("S", "ALL") # Select nodes attached to the element + mapdl.sf("ALL", "PRES", "%_LOADVARI4059%") # Apply surface pressure on the selected nodes + mapdl.esel("S", "TYPE", "", 125) # Select element type 125 + mapdl.nsle("S", "ALL") # Select nodes attached to the element + mapdl.sf("ALL", "PRES", "%_LOADVARI4061%") # Apply surface pressure on the selected nodes + mapdl.nsel("ALL") + mapdl.allsel("ALL") + mapdl.cmsel("S", "C1_R") # Select target elements of the disc + mapdl.cmsel("A", "C2_R") + mapdl.cm("E_ROTOR", "ELEM") # Form a component named E_ROTOR + mapdl.allsel("ALL") + mapdl.solve() # Solve with prestress + mapdl.finish() + +**Post processing to show partial results.** + +.. code:: python + + # select contact elements attached to the brake pad + mapdl.post1() + mapdl.set("last") + mapdl.esel("s", "type", "", 30, 32, 2) + mapdl.post_processing.plot_element_values( + "CONT", "STAT", scalar_bar_args={"title": "Contact status"} + ) + + mapdl.post_processing.plot_element_values( + "CONT", "SLIDE", scalar_bar_args={"title": "Contact sliding distance"} + ) + + mapdl.allsel("all") + mapdl.finish() + +.. figure:: images/cont_slide.png + :align: center + :alt: Contact Sliding Distance + :figclass: align-center + + **Figure 1.4: Contact Sliding Distance** + + +**Perturbed Modal Solution** + +.. code:: python + + # Restart from last load step and sub step of previous + mapdl.run("/SOLU") + mapdl.antype("static", "restart", "", "", "perturb") + + # static solution to perform perturbation analysis + mapdl.perturb("modal", "", "", "") # Perform perturbation modal solve + mapdl.cmrotate("E_ROTOR", rotatz=2) + mapdl.solve("elform") # Regenerate the element matrices + mapdl.outres("all", "all") + mapdl.modopt("unsym", 30) # Use UNSYM eigen solver and extract 30 modes + mapdl.mxpand(30, "", "", "") # Expand 30 modes + mapdl.solve() + mapdl.finish() + +**Post processing to show results.** + +.. code:: python + + mapdl.post1() + mapdl.file("", "rstp") + print(mapdl.post_processing) + + mapdl.set(1, 21) + mapdl.post_processing.plot_nodal_displacement( + scalar_bar_args={"title": "Total displacement\n Substep 21"} + ) + + mapdl.set(1, 22) + mapdl.post_processing.plot_nodal_displacement( + scalar_bar_args={"title": "Total displacement\n Substep 22"} + ) + + +.. jupyter-execute:: + :hide-code: + + rotor2_21 = pyvista.read(download_tech_demo_data('td-1', 'rotor_partial_step21_unorm.vtk' )) + rotor2_21.plot(scalars='values', cmap='jet', show_edges=True) + + +**Figure 1.5: Mode Shape for Unstable Mode (Mode 21).** +Obtained from the `1.6.1. Linear Non-prestressed Modal Analysis`_ . + + + +.. jupyter-execute:: + :hide-code: + + rotor2_22 = pyvista.read(download_tech_demo_data('td-1', 'rotor_partial_step22_unorm.vtk' )) + rotor2_22.plot(scalars='values', cmap='jet', show_edges=True) + + +**Figure 1.6: Mode Shape for Unstable Mode (Mode 21).** +Obtained from the `1.6.1. Linear Non-prestressed Modal Analysis`_ . + + + +1.6.3. Full Nonlinear Perturbed Modal Analysis +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A full nonlinear perturbed modal analysis is the most accurate method for modeling +the brake-squeal problem. This method uses Newton-Raphson iterations for *both* of the static solutions. + +Following is the process for solving a brake-squeal problem using this method: + +1. Perform a nonlinear, large-deflection static analysis + (:meth:`Mapdl.nlgeom("ON") `). + Use the unsymmetric Newton-Raphson method (:meth:`Mapdl.nropt("UNSYM") `). + Specify the restart control points needed for the linear perturbation analysis + (:meth:`Mapdl.rescontrol() `). + +2. Perform a full second static analysis. Generate sliding contact + (:meth:`Mapdl.cmrotate() `) to form an unsymmetric stiffness matrix. + +3. After obtaining the second static solution, postprocess the contact results. + Determine the status (that is, whether the elements are sliding, and the sliding distance, if any). + +4. Restart the previous static solution from the desired load step and substep, and perform the first + phase of the perturbation analysis while preserving the **.ldhi**, **.rnnn** and + **.rst** files (:meth:`Mapdl.antype("STATIC", "RESTART",,, "PERTURB") `). + + Initiate a modal linear perturbation analysis + (:meth:`Mapdl.perturb("MODAL") `). + + Regenerate the element stiffness matrix at the end of the first phase of + the linear perturbation solution (:meth:`Mapdl.solve("ELFORM") `). + +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). + The following inputs show the solution steps involved with this method: + +**First Static Solution** + +.. code:: python + + start(mapdl, 'full_non_linear') + + mapdl.run("/SOLU") + mapdl.antype("STATIC") # Perform static solve + mapdl.outres("ALL", "ALL") # Write all element and nodal solution results for each substep + mapdl.nropt("UNSYM") # Specify unsymmetric Newton-Raphson option to solve the problem + mapdl.rescontrol("DEFINE", "ALL", 1) # Control restart files + mapdl.nlgeom("ON") # Activate large deflection + mapdl.autots("ON") # Auto time stepping turned on + mapdl.time(1.0) # End time = 1.0 sec + mapdl.esel("S", "TYPE", "", 124) # Select element type 124 + mapdl.nsle("S", "ALL") # Select nodes attached to the element + mapdl.sf("ALL", "PRES", "%_LOADVARI4059%") # Apply surface pressure on the selected nodes + mapdl.esel("S", "TYPE", "", 125) # Select element type 125 + mapdl.nsle("S", "ALL") # Select nodes attached to the element + mapdl.sf("ALL", "PRES", "%_LOADVARI4061%") # Apply surface pressure on the selected nodes + mapdl.nsel("ALL") + mapdl.allsel("ALL") + mapdl.cmsel("S", "C1_R") # Select the target elements of the disc + mapdl.cmsel("A", "C2_R") + mapdl.cm("E_ROTOR", "ELEM") # Form a component named E_ROTOR with the selected target ELEMENTS + mapdl.allsel("ALL") + mapdl.solve() # Solve with prestress loading + + +**Second Static Solution** + +.. code:: python + + mapdl.cmrotate("E_ROTOR", rotatz=2) + mapdl.time(2.0) # End time = 2.0sec + mapdl.solve() # Perform full solve + mapdl.finish() + +**Plotting partial results** + +.. code:: python + + mapdl.post1() + mapdl.set("last") + + # select contact elements attached to the brake pad + mapdl.esel("s", "type", "", 30, 32, 2) + + mapdl.post_processing.plot_element_values( + "CONT", "STAT", scalar_bar_args={"title": "Contact status"} + ) + + mapdl.post_processing.plot_element_values( + "CONT", "SLIDE", scalar_bar_args={"title": "Contact sliding distance"} + ) + + mapdl.allsel("all") + mapdl.finish() + + +**Perturbed Modal Solution** + +.. code:: python + + mapdl.run("/SOLU") + mapdl.antype("STATIC", "RESTART", action="PERTURB") # Restart from last load step and sub step + mapdl.perturb("MODAL") # Perform linear perturbation modal solve + mapdl.solve("ELFORM") # Regenerate the element stiffness matrix + mapdl.outres("ALL", "ALL") + mapdl.modopt("UNSYM", 30) # Use UNSYM eigensolver and extract 30 modes + mapdl.mxpand(30) # Expand 30 modes + mapdl.solve() # Solve linear perturbation modal solve + +**Plotting results** + +.. code:: python + + + mapdl.post1() + mapdl.file("", "RSTP") + print(mapdl.post_processing) + + + mapdl.set(1, 21) + mapdl.post_processing.plot_nodal_displacement( + scalar_bar_args={"title": "Total displacement\n Substep 21"} + ) + + mapdl.set(1, 22) + mapdl.post_processing.plot_nodal_displacement( + scalar_bar_args={"title": "Total displacement\n Substep 22"} + ) + + mapdl.finish() + mapdl.exit() + + + +.. jupyter-execute:: + :hide-code: + + rotor3_21 = pyvista.read(download_tech_demo_data('td-1', 'rotor_non_linear_step21_unorm.vtk' )) + rotor3_21.plot(scalars='values', cmap='jet', show_edges=True) + + + +**Figure 1.7: Mode Shape for Unstable Mode (Mode 21).** + + + +.. jupyter-execute:: + :hide-code: + + rotor3_22 = pyvista.read(download_tech_demo_data('td-1', 'rotor_non_linear_step22_unorm.vtk' )) + rotor3_22.plot(scalars='values', cmap='jet', show_edges=True) + + + +**Figure 1.8: Mode Shape for Unstable Mode (Mode 21).** + + + +1.7. Results and discussion +--------------------------- + +The unstable mode predictions for the brake disc-pad assembly using all three methods +were very close due to the relatively small prestress load. +The `1.6.1. Linear Non-prestressed Modal Analysis`_ predicted +unstable modes at 6474 Hz, while the other two solution methods predicted unstable modes +at 6470 Hz. + +The mode shape plots for the unstable modes suggest that the bending mode of the pads +and disc have similar characteristics. These bending modes couple due to friction, and +produce a squealing noise. + +.. jupyter-execute:: + :hide-code: + + rotor3_21 = pyvista.read(download_tech_demo_data('td-1', 'rotor_linear_step21_unorm.vtk' )) + rotor3_21.plot(scalars='values', cmap='jet', show_edges=True) + + +**Figure 1.9: Mode Shape for Unstable Mode (Mode 21).** +Obtained from the `1.6.1. Linear Non-prestressed Modal Analysis`_ . + + + +.. jupyter-execute:: + :hide-code: + + rotor3_22 = pyvista.read(download_tech_demo_data('td-1', 'rotor_linear_step22_unorm.vtk' )) + rotor3_22['values'] = rotor3_22['values']*100 + rotor3_22.plot(scalars='values', cmap='jet', show_edges=True) + + +**Figure 1.10: Mode Shape for Unstable Mode (Mode 22).** +Obtained from the `1.6.1. Linear Non-prestressed Modal Analysis`_ . + + +**Table 1.2: Solution Output** + ++----------+-----------------------------------+-------------------------------------------+-----------------------------------+ +| | Linear non-prestressed modal | Partial nonlinear perturbed modal | Full nonlinear perturbed modal | ++==========+========================+==========+==========================+================+==================+================+ +| **Mode** | **Imaginary** | **Real** | **Imaginary** | **Real** | **Imaginary** | **Real** | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 1.00 | 775.91 | 0.00 | 775.73 | 0.00 | 775.73 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 2.00 | 863.54 | 0.00 | 863.45 | 0.00 | 863.45 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 3.00 | 1097.18 | 0.00 | 1097.03 | 0.00 | 1097.03 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 4.00 | 1311.54 | 0.00 | 1311.06 | 0.00 | 1311.06 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 5.00 | 1328.73 | 0.00 | 1328.07 | 0.00 | 1328.07 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 6.00 | 1600.95 | 0.00 | 1600.66 | 0.00 | 1600.66 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 7.00 | 1616.15 | 0.00 | 1615.87 | 0.00 | 1615.87 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 8.00 | 1910.50 | 0.00 | 1910.50 | 0.00 | 1910.50 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 9.00 | 2070.73 | 0.00 | 2070.44 | 0.00 | 2070.44 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 10.00 | 2081.26 | 0.00 | 2080.98 | 0.00 | 2080.98 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 11.00 | 2676.71 | 0.00 | 2675.23 | 0.00 | 2675.23 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 12.00 | 2724.05 | 0.00 | 2722.61 | 0.00 | 2722.61 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 13.00 | 3373.96 | 0.00 | 3373.32 | 0.00 | 3373.32 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 14.00 | 4141.64 | 0.00 | 4141.45 | 0.00 | 4141.45 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 15.00 | 4145.16 | 0.00 | 4145.04 | 0.00 | 4145.04 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 16.00 | 4433.91 | 0.00 | 4431.08 | 0.00 | 4431.08 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 17.00 | 4486.50 | 0.00 | 4484.00 | 0.00 | 4484.00 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 18.00 | 4668.51 | 0.00 | 4667.62 | 0.00 | 4667.62 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 19.00 | 4767.54 | 0.00 | 4766.95 | 0.00 | 4766.95 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 20.00 | 5241.61 | 0.00 | 5241.38 | 0.00 | 5241.38 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 21.00 | 6474.25 | 21.61 | 6470.24 | 21.90 | 6470.24 | 21.90 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 22.00 | 6474.25 | -21.61 | 6470.24 | -21.90 | 6470.24 | -21.90 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 23.00 | 6763.36 | 0.00 | 6763.19 | 0.00 | 6763.19 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 24.00 | 6765.62 | 0.00 | 6765.51 | 0.00 | 6765.51 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 25.00 | 6920.64 | 0.00 | 6919.64 | 0.00 | 6919.64 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 26.00 | 6929.25 | 0.00 | 6929.19 | 0.00 | 6929.19 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 27.00 | 7069.69 | 0.00 | 7066.72 | 0.00 | 7066.72 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 28.00 | 7243.80 | 0.00 | 7242.71 | 0.00 | 7242.71 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 29.00 | 8498.41 | 0.00 | 8493.08 | 0.00 | 8493.08 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ +| 30.00 | 8623.76 | 0.00 | 8616.68 | 0.00 | 8616.68 | 0.00 | ++----------+------------------------+----------+--------------------------+----------------+------------------+----------------+ + +1.7.1. Determining the Modal Behavior of Individual Components +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is important to determine the modal behavior of individual components (disc and +pads) when predicting brake-squeal noise. A modal analysis performed on the free pad +and free disc model gives insight into potential coupling modes. The natural +frequency and mode shapes of brake pads and disc can also be used to define the type +of squeal noise that may occur in a braking system. Bending modes of pads and disc +are more significant than twisting modes because they eventually couple to produce +squeal noise. + +An examination of the results obtained from the modal analysis of a free disc and +pad shows that the second bending mode of the pad and ninth bending mode of the disc +can couple to create dynamic instability in the system. These pad and disc bending +modes can couple to produce an intermediate lock, resulting in a squeal noise at a +frequency close to 6470 Hz. + +1.7.2. Parametric Study with Increasing Friction Coefficient +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A parametric study was performed on the brake disc model using a linear +non-prestressed modal solution with an increasing coefficient of friction. QRDAMP +eigensolver is used to perform the parametric studies by reusing the symmetric real +modes (:meth:`Mapdl.qrdopt("ON") `) obtained in the first load +step. + +The following plot suggests that modes with similar characteristics approach each +other and couple as the coefficient of friction increases: + + +.. _Table-1: + +.. jupyter-execute:: + :hide-code: + + columns_names = ['x', 'mode 21', 'mode 22'] + values = np.array( + [[0.0 , 860.933 , 6320.512], + [0.05 , 1774.363 , 5438.580], + [0.10 , 3653.717 , 3653.717], + [0.15 , 3632.719 , 3632.719], + [0.20 , 3685.215 , 3685.215], + [0.25 , 3779.708 , 3779.708], + [0.30 , 3842.703 , 3842.703]]) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['x'], y=df['mode 21'], name='Mode 21', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=True + ), + go.Scatter(x=df['x'], y=df['mode 22'], name='Mode 22', + mode='markers+lines', + marker=dict(color='red', size=10), + line=dict(color='red', width=3), + showlegend=True + ) + ] + ) + + fig.update_layout( + template='simple_white', + xaxis_title='Friction coefficient', + yaxis_title='Imaginary Eigenvalue (Hz)', + title='Effect of friction coefficient on Mode coupling', + title_x=0.5, + legend_title='Modes', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + +**Figure 1.11: Effect of Friction Coefficient on Unstable Modes** + +1.8. Recommendations +-------------------- + +The following table provides guidelines for selecting the optimal analysis method to +use for a brake-squeal problem: + + +**Table 1.3: Analysis comparison** + ++-----------------------------------+----------------------------------------------------------+----------------------------------------------+ +| Analysis Method | Benefits | Costs | ++===================================+==========================================================+==============================================+ +| Linear non-prestressed modal | * Fast run time. | * Accuracy. | +| | * No convergence issues. | * Does not include prestress effects | +| | * Good method for performing parametric studies | | ++-----------------------------------+----------------------------------------------------------+----------------------------------------------+ +| Partial nonlinear perturbed modal | * No convergence issues. | * Accuracy | +| | * Includes prestress effects | | ++-----------------------------------+----------------------------------------------------------+----------------------------------------------+ +| Full nonlinear perturbed modal | * Accurate. | * Longer run time. | +| | * Includes prestress effects | * Convergence issues | ++-----------------------------------+----------------------------------------------------------+----------------------------------------------+ + +The following table provides guidelines for selecting the optimal eigensolver +(:meth:`Mapdl.modopt() `) for obtaining the brake-squeal solution: + + + +**Table 1.4: Solver comparison** + ++---------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Eigensolver | Benefits | Costs | ++===============+===================================================================================+==============================================================================================================================================================+ +| QRDAMP | * Fast run time. | * Accuracy, as it approximates the unsymmetric stiffness matrix. | +| | * An excellent solver for performing parametric studies | * Not recommended when the number of elements contributing to unsymmetric stiffness matrix exceeds 10 percent of the total number of elements in the model. | ++---------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| UNSYM | * Accuracy, as it uses the full unsymmetric stiffness matrix to solve the problem | * Long run time when many modes are extracted | ++---------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +For further information, see Brake-Squeal (Prestressed Modal) Analysis in the *Structural Analysis Guide*. + +1.9. References +--------------- + +The following works were consulted when creating this example problem: + +1. Triches, M. Jr., Gerges, S. N. Y., & Jordon, R. (2004). Reduction of + squeal noise from disc brake systems using constrained layer damping. + *Journal of the Brazilian Society of Mechanical Sciences and + Engineering.* 26, 340-343. +2. Allgaier, R., Gaul, L., Keiper, W., & Willner, K. (1999). Mode lock-in and + friction modeling. *Computational Methods in Contact + 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 twenty second International Modal Analysis + Conference (IMAC XXII).* + +1.10. Input files +----------------- + +The following input files were used for this problem: + +* **linear\_non\_prestressed.html** -- Linear non-prestressed modal solve input file. + :download:`Download source code: linear_non_prestressed.py `. +* **partial\_prestressed.html** -- Partial prestressed modal solve input file. + :download:`Download source code: partial_prestressed.py `. +* **full\_non\_linear.html** -- Full nonlinear prestressed modal solve input file. + :download:`Download source code: full_non_linear.py `. +* **linear\_non\_prestressed\_par.html** -- Parametric studies with increasing coefficient of friction. + :download:`Download source code: linear_non_prestressed_par.py `. +* **disc\_pad\_model.cdb** -- Common database file used for the linear non-prestressed modal analysis, the partial prestressed modal analysis, + and the full nonlinear prestressed modal analysis (called by the **linear\_non\_prestressed.dat**, **partial\_prestressed.dat**, + **full\_non\_linear.html** and **linear\_non\_prestressed\_par.html** files, respectively). + :download:`Download file: disc_pad_model.cdb `. + ++-----------------------------------------------------------------------------------------------------------------------------------+ +| `Download the zipped td-1 file set for this problem `_ | ++-----------------------------------------------------------------------------------------------------------------------------------+ + +For more information, see `Obtaining the input files `_. + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ + diff --git a/_sources/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst.txt b/_sources/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst.txt new file mode 100644 index 00000000..db2235c8 --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-15/ex_15-teccalvalhyper.rst.txt @@ -0,0 +1,456 @@ +.. _sphx_glr_ex_15-tecHyperConstlModel.py: + +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. + +The following topics are available: + +* `15.1. Introduction`_ +* `15.2. Problem description`_ +* `15.3. Material properties`_ +* `15.4. Analysis and solution controls`_ +* `15.5. Results and discussion`_ +* `15.6. Recommendations`_ +* `15.7. References`_ +* `15.8. Input files`_ + +You can also perform this example analysis entirely in the Ansys +Mechanical Application. For more information, see +*Calibrating and Validating a Hyperelastic Constitutive Model in the Workbench Technology Showcase: Example Problems*. + +15.1. Introduction +------------------ + +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. + +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. + +15.2. Problem description +------------------------- + +A constitutive model is needed that matches the behavior of a vulcanized natural +rubber material up to 100 percent engineering strain in a variety of deformation modes. + +In this problem, the experimental data are obtained from a simulation of a +hyperelastic test suite (uniaxial, biaxial, and planar tension tests) using common +experimental test specimens. Using this data, parameters for a constitutive model are +determined using hyperelastic fitting capabilities that focus on use of the three-, +five-, and nine-parameter Mooney-Rivlin hyperelastic models. + +After demonstrating the fitting procedure and selecting a suitable constitutive model, +a tension-torsion experiment is simulated and compared to the experimental data to +validate the predictions for the model. + +15.3. Material properties +------------------------- + +Material properties for the calibration and validation experiments follow: + +* `15.3.1. Calibration Experiments`_ +* `15.3.2. Validation Experiment`_ + +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: + +.. figure:: graphics/gtec_calvalhyper_fig1.gif + :align: center + :alt: Hyperelastic test suite: test specimens + :figclass: align-center + + **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 + :figclass: align-center + :name: figure_experimental_data + + **Figure 15.2: Hyperelastic test suite: experimental data** + +The uniaxial specimen is similar to ASTM D412-C (ASTM Standard D412, 2006). + +The crosshead is displaced by 396 mm, giving a measured engineering strain in the +gage section of 662 percent and a calculated engineering stress of 58.1 MPa. + +The equibiaxial specimen is disc-shaped, with 16 equally spaced tabs about the +circumference. The tabs are stretched 127.3 mm, resulting in a measured engineering +strain in the gage section of 336 percent and a calculated engineering stress of +22.1 MPa. + +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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A simulated tension-torsion experiment was performed on a thin strip. The specimen +is similar to that specified in ASTM D1043 (ASTM Standard D1043, 2006) and is shown +here: + +.. figure:: graphics/gtec_calvalhyper_fig3.gif + :align: center + :alt: Tension-torsion test specimen + :figclass: align-center + + **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 +and twisting one end of the specimen for four complete revolutions. Following is the +resulting moment-vs.-rotation data: + +.. figure:: graphics/gtec_calvalhyper_fig4.gif + :align: center + :alt: Tension-torsion experimental data + :figclass: align-center + + **Figure 15.4: Tension-torsion experimental data** + +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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Material parameter calibration occurs using the curve-fitting +tool. + +**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 +possible via command input, Ansys, Inc. recommends using the graphical user +interface (GUI) to perform the curve-fitting, or at least visually validating +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 + mapdl.tbft("solve",1,"hyper","mooney",3) + mapdl.tbft("fset",1,"hyper","mooney",3) + + + +The ``TBFT,FADD`` command initializes the curve-fitting procedure +for a hyperelastic, three-parameter, Mooney-Rivlin model assigned to +material identification number 1. + +``TBFT,EADD`` reads the uniaxial experimental data in the +``uniax.log`` file as the fitting data for material number 1. +The experimental data in the file is a set of engineering-strain vs. +engineering-stress input: + + +.. code:: output + + 0.819139E-01 0.82788577E+00 + 0.166709E+00 0.15437247E+01 + 0.253960E+00 0.21686152E+01 + 0.343267E+00 0.27201819E+01 + 0.434257E+00 0.32129833E+01 + 0.526586E+00 0.36589498E+01 + 0.619941E+00 0.40677999E+01 + 0.714042E+00 0.44474142E+01 + 0.808640E+00 0.48041608E+01 + 0.903519E+00 0.51431720E+01 + 0.998495E+00 0.54685772E+01 + 0.109341E+01 0.57836943E+01 + + +``TBFT,SOLVE`` determines the three constitutive parameters for the +Mooney-Rivlin model, minimizing the difference between the model and the +experimental data. + +``TBFT,FSET`` assigns the fitted constitutive parameters to +material number 1. + +For this problem, the fitted parameters for the three-parameter Mooney-Rivlin +model are: + ++-----------------------------------+ +| :math:`C_{10} = 1.338856` | ++-----------------------------------+ +| :math:`C_{11} = - 1.648364 x10-2` | ++-----------------------------------+ + + +15.4.2. Validating parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Following is a mesh developed to simulate the torsion experiment to validate the +fitted constitutive model parameters obtained in `15.4.1. Calibrating Parameters`_: + +.. figure:: graphics/gtec_calvalhyper_fig5.gif + :align: center + :alt: Tension-Torsion Test Specimen Mesh + :figclass: align-center + + **Figure 15.5: Tension-Torsion Test Specimen Mesh** + +The mesh consists of 1,332 SOLID186 elements using the +default formulation (a mixed-displacement pressure formulation with reduced +integration). + +The attachment of the test specimen +to the test apparatus is simulated by boundary conditions applied to the specimen in +the region of the clamps, as described here: + +* The back-left clamp region is fully restrained. +* The back-right clamp region is attached to a rigid-contact surface and + fixed in place. +* The front-left clamp region is attached to a rigid-contact surface and + displaced in the z direction to simulate a clamping displacement equal + to 25 percent of the specimen thickness. The same is true for the + front-right clamp region. + The stretching to 50 percent engineering strain is simulated by displacing the + rigid-contact surfaces attached to the right clamp regions while holding left clamp + regions fixed. + +The torsion of the specimen is simulated by holding the left clamp region in place +and twisting the keypoints attached to the right contact surfaces about the +longitudinal axis. + +15.5. Results and discussion +---------------------------- + +Results for the calibration and validation operations are discussed below: + +* `15.5.1. Calibration results`_ +* `15.5.2. Validation results`_ + +15.5.1. Calibration results +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Using all of experimental data shown in :numref:`figure_experimental_data` +to fit the three-, five-, and nine-parameter Mooney-Rivlin models results in the +following parameters, fit to the entire range of experimental data: + ++----------------+-------------------+------------------+------------------+ +| | Three-Parameter | Five-Parameter | Nine-Parameter | ++================+===================+==================+==================+ +| :math:`C_{10}` | 1.8785 | 1.4546 | 1.7095 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{01}` | -5.7759 x 10-2 | 7.6677 x 10-2 | 5.6365 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{20}` | --- | 1.3484 x 10-2 | -1.2088 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{11}` | 1.9589 x 10-3 | -4.4337 x 10-3 | 3.7099 x 10-5 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{02}` | --- | 2.3997 x 10-4 | -4.6858 x 10-4 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{30}` | --- | --- | 3.5202 x 10-4 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{21}` | --- | --- | 6.0562 x 10-6 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{12}` | --- | --- | 1.9666 x 10-5 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{03}` | --- | --- | -8.9997 x 10-7 | ++----------------+-------------------+------------------+------------------+ +| :math:`\nu` | 3.6415 | 3.0625 | 3.5318 | ++----------------+-------------------+------------------+------------------+ + +The following figure is a comparison of the models to the experimental data: + +.. figure:: graphics/gtec_calvalhyper_fig6.gif + :align: center + :alt: Comparison of the Data and Fits Over the Entire Range of Data + :figclass: align-center + + **Figure 15.6: Comparison of the Data and Fits Over the Entire Range of Data** + +Thus far, it is obvious that none of the models provide a suitable fit to the +entire range of experimental data. The reason is that the least-squares fitting +procedure is minimizing the error over the entire range of data; therefore, it can +be detrimental to include data that is not representative of the *actual range of use*. + +If the experimental data range is limited to about 100 percent strain, however, +the fitted parameters shown in the following table are obtained: + ++----------------+-------------------+------------------+------------------+ +| | Three-Parameter | Five-Parameter | Nine-Parameter | ++================+===================+==================+==================+ +| :math:`C_{10}` | 1.6540 | 1.7874 | 1.8904 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{01}` | 1.2929 x 10-1 | 5.7229 x 10-2 | -3.6352 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{20}` | --- | -5.8765 x 10-2 | -2.3484 x 10-1 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{11}` | -1.2726 x 10-2 | 2.6843 x 10-2 | 2.6511 x 10-1 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{02}` | --- | -5.1127 x 10-3 | -6.8670 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{30}` | --- | --- | 5.1742 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{21}` | --- | --- | -8.3262 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{12}` | --- | --- | 3.6204 x 10-2 | ++----------------+-------------------+------------------+------------------+ +| :math:`C_{03}` | --- | --- | -4.3754 x 10-3 | ++----------------+-------------------+------------------+------------------+ +| :math:`\nu` | 3.5665 | 3.6892 | 3.7081 | ++----------------+-------------------+------------------+------------------+ + +The following figure is a comparison of the models with the parameters fit to the +modified experimental data: + +.. figure:: graphics/gtec_calvalhyper_fig7.gif + :align: center + :alt: Parameters Fit to Experimental Data to About 100 Percent Strain + :figclass: align-center + + **Figure 15.7: Parameters Fit to Experimental Data to About 100 Percent Strain** + +For the equibiaxial and planar experiments, any of the three models might be +acceptable; however, the comparison with the uniaxial data might indicate that +*none* of the three models are acceptable. + +The behavior of the model outside the fitted range can significantly differ from +the actual response of the material. For example, the model parameters fit to the +experimental data to 100 percent strain have been used to simulate the hyperelastic +test suite to strains of about 200 percent, as shown in the following comparisons: + +.. figure:: graphics/gtec_calvalhyper_fig8.gif + :align: center + :alt: Comparison of the Data and Fits Showing Predictions Outside the Range of Fitted Data + :figclass: align-center + + **Figure 15.8: Comparison of the Data and Fits Showing Predictions Outside the Range of Fitted Data** + +Beyond 100 percent strain, it becomes apparent that some of the predictions +quickly deteriorate. In all three comparisons, the nine-parameter model quickly +loses accuracy, and it appears that the three- and nine-parameter Mooney-Rivlin +models have lost stability for the biaxial deformation case. + +15.5.2. Validation results +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The five-parameter Mooney-Rivlin model, fit to the experimental data up to 100 +percent strain, is selected as an adequate representation of the material response. +The constitutive model is specified via the following input: + +.. code:: python3 + + C10 = 1.787381e+00 + C01 = 5.722875e-02 + C20 =-5.876502e-02 + C11 = 2.684331e-02 + C02 =-5.112790e-03 + mapdl.tb("HYPER",1,"",5,"MOONEY") + mapdl.tbdata(1,C10,C01,C20,C11,C02) + + +The following figure shows a contour plot of the strain energy density at the end +of simulation. The plot offers a general idea of the overall deformation of the +specimen. + +.. figure:: graphics/gtec_calvalhyper_fig9.gif + :align: center + :alt: Strain-Energy Density Contours of the Tension-Torsion Test + :figclass: align-center + + **Figure 15.9: Strain-Energy Density Contours of the Tension-Torsion Test** + +With the exception of the clamp regions, the deformation shows a uniform pattern +in the gage region along the axis of twisting. Perpendicular to the axis of twisting +is a large strain-energy density near the outside edge of the specimen, decreasing +toward the center. + +The following figure shows a comparison of the model with the experimental moment +vs. theta data: + +.. figure:: graphics/gtec_calvalhyper_fig10.gif + :align: center + :alt: Comparison of Tension-Torsion Experiment to the Five-Parameter Mooney-Rivlin Model + :figclass: align-center + + **Figure 15.10: Comparison of Tension-Torsion Experiment to the Five-Parameter Mooney-Rivlin Model** + +After a seemingly anomalous first data point, the error between the simulation and +experiment is in the range of 2 to 4 percent. Throughout the entire simulation, the +five-parameter Mooney-Rivlin model predicts a higher moment for an equivalent twist, +which is not entirely expected by the error plots for the hyperelastic test suite +comparisons; nevertheless, a maximum four percent error appears to be a reasonable +margin of error for this simulation. + +15.6. Recommendations +--------------------- + +When performing a similar type of calibration and validation, consider the following +recommendations: + +* Obtain test data from at least two (and preferably all three) of the + experiments in the hyperelastic test suite. +* Ensure that the test data covers the range of deformation over which the + constitutive model will be used. +* If the error between the experimental data and the constitutive model is too + great, try limiting the experimental data to the range of deformation over which + the constitutive model will be used. +* Use the constitutive model within the range of fitted data only. +* Use an independent experiment to validate that the constitutive model + adequately matches the material behavior. + +15.7. References +---------------- + +The following references were consulted when creating this example problem: + +1. ASTM International. (2006). (http://www.astm.org/Standards/D1043.htm). +*Standard Test Method for Stiffness Properties of Plastics as a Function of Temperature by Means of a Torsion Test*. +West Conshohocken. +2. ASTM International. (2006). [ASTM Standard D412](http://www.astm.org/Standards/D412.htm). +*Standard Test Methods for Vulcanized Rubber and Thermoplastic Elastomers-Tension*. +West Conshohocken. + +15.8. Input files +----------------- + +The following files were used in this problem: + +* **tension\_torsion.dat** -- Tension-torsion simulation input file. +* **tension\_torsion.cdb** -- The common database file containing the model information for this problem + (called by **tension\_torsion.dat** ). + ++-----------------------------------------------------------------------------------------------------------------------------------+ +| `Download the zipped td-15 file set for this problem `_ | ++-----------------------------------------------------------------------------------------------------------------------------------+ + +For more information, see `Obtaining the input files `_. + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ + diff --git a/_sources/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst.txt b/_sources/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst.txt new file mode 100644 index 00000000..248a7a9c --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-20/ex_20-tecPCB.rst.txt @@ -0,0 +1,2566 @@ +.. _sphx_glr_ex_20-tecPCB.rst: +.. _ref_dynamic_simulation_printed_circuit_board: +.. _tech_demo_20: + +Dynamic simulation of a printed circuit board assembly +====================================================== + +This examples shows how to use PyMAPDL to import an existing FE model and to +run a modal and PSD analysis. PyDPF modules are also used for post-processing. + +The following topics are available: + +* `20.1. Introduction`_ +* `20.2. Modeling`_ +* `20.3. Modal analysis`_ +* `20.4. PSD analysis`_ +* `20.5. Exit MAPDL`_ +* `20.6. Input files`_ + + +This example is inspired from the model and analysis defined in Chapter 20 of +the Mechanical APDL Technology Showcase Manual. + +20.1. Introduction +------------------ + +20.1.1. Additional Packages Used +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* `Matplotlib `_ is used for plotting purposes. + +.. GENERATED FROM PYTHON SOURCE LINES 20-33 + +20.1.2. Setting up model +~~~~~~~~~~~~~~~~~~~~~~~~ + +The original FE model is given in the Ansys Mechanical APDL Technology +Showcase Manual. The ``pcb_mesh_file.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 +between the IC packages and the circuit board. + +20.1.3. Starting MAPDL as a service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +.. code-block:: default + + # sphinx_gallery_thumbnail_path = '_static/tse20_setup.png' + + import _.pyplot as plt + + from ansys.mapdl.core import launch_mapdl + from ansys.mapdl.core.examples.downloads import download_tech_demo_data + + # start MAPDL as a service + mapdl = launch_mapdl() + print(mapdl) + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Product: Ansys Mechanical Enterprise + MAPDL Version: 21.2 + ansys.mapdl Version: 0.63.0 + +20.2. Modeling +-------------- + +20.2.1. Importing an external model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: default + + # read model of single circuit board + # download the cdb file + pcb_mesh_file = download_tech_demo_data("td-20", "pcb_mesh_file.cdb") + + # enter preprocessor and read in cdb + mapdl.prep7() + mapdl.cdread("COMB", pcb_mesh_file) + mapdl.allsel() + mapdl.eplot(background="w") + mapdl.cmsel("all") + + +.. figure:: images/ex_20-tecPCB_001.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + + +20.2.2. Creating the complete layered model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The original model will be duplicated to create a layered PCB of three layers +that are bound together. + +.. code-block:: default + + + # duplicate single PCB to get three layers + # get the maximum node number for the single layers PCB in the input file + max_nodenum = mapdl.get("max_nodenum", "node", "", "num", "max") + + # generate additional PCBs offset by 20 mm in the -y direction + mapdl.egen(3, max_nodenum, "all", dy=-20) + + + # bind the three layers together + # select components of interest + mapdl.cmsel("s", "N_JOINT_BOARD") + mapdl.cmsel("a", "N_JOINT_LEGS") + mapdl.cmsel("a", "N_BASE") + + # get number of currently selected nodes + nb_selected_nodes = mapdl.mesh.n_node + current_node = 0 + queries = mapdl.queries + + # also select similar nodes for copies of the single PCB + # and couple all dofs at the interface + for node_id in range(1, nb_selected_nodes + 1): + current_node = queries.ndnext(current_node) + mapdl.nsel("a", "node", "", current_node + max_nodenum) + mapdl.nsel("a", "node", "", current_node + 2 * max_nodenum) + mapdl.cpintf("all") + + # define fixed support boundary condition + # get max coupled set number + cp_max = mapdl.get("cp_max", "cp", 0, "max") + + # unselect nodes scoped in CP equations + mapdl.nsel("u", "cp", "", 1, "cp_max") + + # create named selection for base excitation + mapdl.cm("n_base_excite", "node") + + # fix displacement for base excitation nodes + mapdl.d("all", "all") + + # select all and plot the model using MAPDL's plotter and VTK's + mapdl.allsel("all") + mapdl.cmsel("all") + mapdl.graphics("power") + mapdl.rgb("index", 100, 100, 100, 0) + mapdl.rgb("index", 80, 80, 80, 13) + mapdl.rgb("index", 60, 60, 60, 14) + mapdl.rgb("index", 0, 0, 0, 15) + mapdl.triad("rbot") + mapdl.pnum("type", 1) + mapdl.number(1) + mapdl.hbc(1, "on") + mapdl.pbc("all", "", 1) + mapdl.view(1, 1, 1, 1) + # mapdl.eplot(vtk=False) + mapdl.eplot(vtk=True) + + +.. figure:: images/ex_20-tecPCB_002.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + + + +20.3. Modal analysis +-------------------- + +20.3.1. Run modal analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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). + + +.. GENERATED FROM PYTHON SOURCE LINES 128-142 + +.. code-block:: default + + + # enter solution processor and define analysis settings + mapdl.slashsolu() + mapdl.antype("modal") + # set number of modes to extract + # using a higher number of modes is recommended + nb_modes = 10 + # use Block Lanczos to extract specified number of modes + mapdl.modopt("lanb", nb_modes) + mapdl.mxpand(nb_modes) + output = mapdl.solve() + print(output) + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + *** 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. + + ***** ANSYS SOLVE COMMAND ***** + + *** NOTE *** CP = 0.812 TIME= 06:52:51 + 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. + + *** 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. + + *** NOTE *** CP = 0.844 TIME= 06:52:51 + 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. + + *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS *** + ---GIVE SUGGESTIONS ONLY--- + + ELEMENT TYPE 1 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 1 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 2 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 2 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 3 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 3 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 4 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 4 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 5 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 5 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED. + + ELEMENT TYPE 6 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. + + ELEMENT TYPE 6 HAS KEYOPT(3)=2. FOR THE SPECIFIED ANALYSIS TYPE, LUMPED MASS + MATRIX OPTION (LUMPM, ON) IS SUGGESTED. + + ELEMENT TYPE 7 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 8 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 9 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 10 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 11 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 12 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 13 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 14 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 15 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 16 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 17 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 18 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 19 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 20 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + ELEMENT TYPE 21 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED. + + + + *** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2021 R2 21.2 *** + DISTRIBUTED Ansys Mechanical Enterprise + + 00000000 VERSION=WINDOWS x64 06:52:51 JUL 25, 2022 CP= 0.844 + + + + + + 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 . . . . . . . . . . . . . . . . .MODAL + EXTRACTION METHOD. . . . . . . . . . . . . .BLOCK LANCZOS + NUMBER OF MODES TO EXTRACT. . . . . . . . . . . 10 + GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC + 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. + + *** NOTE *** CP = 0.891 TIME= 06:52:51 + 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. + 300 internal nodes are used for quadratic and/or cubic options of + 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.0609 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6035 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.7893 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6670 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.4344 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.2769 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2044 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.065814104E-14 was detected between contact + element 23925 and target element 24048. + **************************************** + + + *** 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 + 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, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.8833 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.6992 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.33226763E-14 was detected between contact + element 24136 and target element 24168. + **************************************** + + + *** 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7212 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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.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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.1818 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 2.131628207E-14 was detected between contact + element 24242 and target element 24365. + **************************************** + + + *** 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7511 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2093 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7849 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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.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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.8622 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 + 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7993 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2658 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.8514 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.8593 + Average contact pair depth 4.0000 + Pinball region factor PINB 1.0000 + The resulting pinball region 4.0000 + + *** 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. + 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 + 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 + the same behavior. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 1.8845 + Average contact pair depth 2.5000 + Pinball region factor PINB 1.0000 + The resulting pinball region 2.5000 + 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.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 + the same behavior. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.2391 + Average contact pair depth 4.0000 + Pinball region factor PINB 1.0000 + The resulting pinball region 4.0000 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.4761 + Average contact pair depth 2.5000 + Pinball region factor PINB 1.0000 + The resulting pinball region 2.5000 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.3552 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 + 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7967 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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.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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.1237 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 + 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.5685 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.0637 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 + 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.8027 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 + 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2471 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6964 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + 300 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: 26046 + ...Number of nodes: 44197 + ...Decompose to 2 CPU domains + ...Element load balance ratio = 1.001 + + + L O A D S T E P O P T I O N S + + LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 + THERMAL STRAINS INCLUDED IN THE LOAD VECTOR . . YES + PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT + DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN + + + *** 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.0609 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6035 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.7893 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6670 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.1818 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.7511 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2658 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.8514 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 2.8593 + Average contact pair depth 4.0000 + Pinball region factor PINB 1.0000 + The resulting pinball region 4.0000 + + *** 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. + 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. + **************************************** + + + *** 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 1.8845 + Average contact pair depth 2.5000 + Pinball region factor PINB 1.0000 + The resulting pinball region 2.5000 + 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.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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.0637 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.8027 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 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. + ANSYS will keep the current pair and deactivate its companion pair, + 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. + 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. + Average contact surface length 3.2471 + Average contact pair depth 4.0000 + User defined pinball region PINB 0.86250 + 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.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. + ANSYS will deactivate the current pair and keep its companion pair, + 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. + Contact detection at: nodal point (normal to target surface) + MPC will be built internally to handle bonded contact. + Average contact surface length 2.6964 + Average contact pair depth 2.5000 + User defined pinball region PINB 0.86250 + 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 7.105427358E-15 was detected between contact + element 25939 and target element 25890. + **************************************** + + + + *********** PRECISE MASS SUMMARY *********** + + TOTAL RIGID BODY MASS MATRIX ABOUT ORIGIN + Translational mass | Coupled translational/rotational mass + 0.25166E-03 0.0000 0.0000 | 0.0000 0.34581E-01 0.50068E-02 + 0.0000 0.25166E-03 0.0000 | -0.34581E-01 0.0000 0.25711E-01 + 0.0000 0.0000 0.25166E-03 | -0.50068E-02 -0.25711E-01 0.0000 + ------------------------------------------ | ------------------------------------------ + | Rotational mass (inertia) + | 6.4515 0.51185 -3.5215 + | 0.51185 9.6801 0.68875 + | -3.5215 0.68875 3.5678 + + TOTAL MASS = 0.25166E-03 + The mass principal axes coincide with the global Cartesian axes + + CENTER OF MASS (X,Y,Z)= 102.17 -19.895 137.41 + + TOTAL INERTIA ABOUT CENTER OF MASS + 1.5999 0.32438E-03 0.11573E-01 + 0.32438E-03 2.3014 0.74412E-03 + 0.11573E-01 0.74412E-03 0.84133 + + PRINCIPAL INERTIAS = 1.6001 2.3014 0.84115 + ORIENTATION VECTORS OF THE INERTIA PRINCIPAL AXES IN GLOBAL CARTESIAN + ( 1.000,-0.000, 0.015) ( 0.000, 1.000, 0.001) (-0.015,-0.001, 1.000) + + + *** MASS SUMMARY BY ELEMENT TYPE *** + + TYPE MASS + 1 0.326079E-05 + 2 0.326079E-05 + 3 0.326079E-05 + 4 0.326079E-05 + 5 0.326079E-05 + 6 0.159600E-03 + 7 0.429027E-05 + 8 0.777647E-05 + 9 0.197978E-05 + 10 0.735761E-05 + 11 0.186775E-05 + 12 0.704400E-05 + 13 0.696150E-05 + 14 0.368481E-05 + 15 0.459882E-05 + 16 0.330798E-05 + 17 0.197978E-05 + 18 0.111823E-04 + 19 0.391721E-05 + 20 0.411780E-05 + 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. + + *** ELEMENT MATRIX FORMULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 60 BEAM188 0.000 0.000000 + 2 60 BEAM188 0.000 0.000000 + 3 60 BEAM188 0.000 0.000000 + 4 60 BEAM188 0.000 0.000000 + 5 60 BEAM188 0.000 0.000000 + 6 13038 SHELL181 1.125 0.000086 + 7 252 SOLID186 0.062 0.000248 + 8 432 SOLID186 0.078 0.000181 + 9 168 SOLID186 0.031 0.000186 + 10 396 SOLID186 0.000 0.000000 + 11 108 SOLID186 0.000 0.000000 + 12 384 SOLID186 0.062 0.000163 + 13 384 SOLID186 0.016 0.000041 + 14 210 SOLID186 0.016 0.000074 + 15 270 SOLID186 0.078 0.000289 + 16 408 SOLID186 0.047 0.000115 + 17 150 SOLID186 0.000 0.000000 + 18 588 SOLID186 0.094 0.000159 + 19 240 SOLID186 0.078 0.000326 + 20 216 SOLID186 0.062 0.000289 + 21 324 SOLID186 0.016 0.000048 + 22 228 CONTA174 0.016 0.000069 + 23 228 TARGE170 0.000 0.000000 + 24 435 CONTA174 0.031 0.000072 + 25 435 TARGE170 0.000 0.000000 + 26 156 CONTA174 0.000 0.000000 + 27 156 TARGE170 0.000 0.000000 + 28 354 CONTA174 0.000 0.000000 + 29 354 TARGE170 0.000 0.000000 + 30 108 CONTA174 0.000 0.000000 + 31 108 TARGE170 0.000 0.000000 + 32 348 CONTA174 0.016 0.000045 + 33 348 TARGE170 0.000 0.000000 + 34 342 CONTA174 0.000 0.000000 + 35 342 TARGE170 0.000 0.000000 + 36 204 CONTA174 0.016 0.000077 + 37 204 TARGE170 0.000 0.000000 + 38 234 CONTA174 0.000 0.000000 + 39 234 TARGE170 0.000 0.000000 + 40 300 CONTA174 0.047 0.000156 + 41 300 TARGE170 0.000 0.000000 + 42 159 CONTA174 0.047 0.000295 + 43 159 TARGE170 0.000 0.000000 + 44 519 CONTA174 0.016 0.000030 + 45 519 TARGE170 0.000 0.000000 + 46 210 CONTA174 0.000 0.000000 + 47 210 TARGE170 0.000 0.000000 + 48 204 CONTA174 0.000 0.000000 + 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. + + BLOCK LANCZOS CALCULATION OF UP TO 10 EIGENVECTORS. + NUMBER OF EQUATIONS = 159678 + MAXIMUM WAVEFRONT = 708 + MAXIMUM MODES STORED = 10 + MINIMUM EIGENVALUE = 0.00000E+00 + MAXIMUM EIGENVALUE = 0.10000E+31 + + + *** NOTE *** CP = 7.078 TIME= 06:52:58 + 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 + Local memory required for out-of-core solution = 208.135 MB + + Total memory allocated for solver = 851.493 MB + Total memory required for in-core solution = 811.685 MB + Total memory required for out-of-core solution = 378.173 MB + + *** 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 + 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. + + *** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2021 R2 21.2 *** + DISTRIBUTED Ansys Mechanical Enterprise + + 00000000 VERSION=WINDOWS x64 06:53:02 JUL 25, 2022 CP= 10.781 + + + + + + *** FREQUENCIES FROM BLOCK LANCZOS ITERATION *** + + MODE FREQUENCY (HERTZ) + + + 1 21.68428280230 + 2 21.69024198077 + 3 21.69131650666 + 4 33.82973502589 + 5 33.83798485758 + 6 33.83938717337 + 7 37.06064330146 + 8 37.07091158772 + 9 37.07187102168 + 10 43.83753554036 + + *** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2021 R2 21.2 *** + DISTRIBUTED Ansys Mechanical Enterprise + + 00000000 VERSION=WINDOWS x64 06:53:03 JUL 25, 2022 CP= 10.875 + + + + + + + + ***** PARTICIPATION FACTOR CALCULATION ***** X DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 0.13337E-03 1.000000 0.177881E-07 0.312579 0.706832E-04 + 2 21.6902 0.46104E-01 0.58730E-04 0.440351 0.344927E-08 0.373191 0.137061E-04 + 3 21.6913 0.46101E-01 0.87053E-04 0.652706 0.757817E-08 0.506358 0.301129E-04 + 4 33.8297 0.29560E-01 -0.85976E-04 0.644632 0.739184E-08 0.636250 0.293725E-04 + 5 33.8380 0.29553E-01 -0.38997E-04 0.292392 0.152076E-08 0.662973 0.604293E-05 + 6 33.8394 0.29551E-01 -0.57555E-04 0.431539 0.331259E-08 0.721184 0.131630E-04 + 7 37.0606 0.26983E-01 0.25886E-04 0.194086 0.670065E-09 0.732958 0.266259E-05 + 8 37.0709 0.26975E-01 0.14838E-04 0.111256 0.220178E-09 0.736827 0.874909E-06 + 9 37.0719 0.26975E-01 0.18637E-04 0.139738 0.347343E-09 0.742931 0.138021E-05 + 10 43.8375 0.22812E-01 -0.12095E-03 0.906870 0.146291E-07 1.00000 0.581308E-04 + ----------------------------------------------------------------------------------------------------------------- + sum 0.569074E-07 0.226129E-03 + ----------------------------------------------------------------------------------------------------------------- + + + + ***** PARTICIPATION FACTOR CALCULATION ***** Y DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 0.73666E-02 1.000000 0.542664E-04 0.343547 0.215635 + 2 21.6902 0.46104E-01 0.33431E-02 0.453826 0.111766E-04 0.414303 0.444117E-01 + 3 21.6913 0.46101E-01 0.50476E-02 0.685209 0.254787E-04 0.575602 0.101243 + 4 33.8297 0.29560E-01 0.18755E-02 0.254589 0.351732E-05 0.597869 0.139765E-01 + 5 33.8380 0.29553E-01 0.89959E-03 0.122118 0.809258E-06 0.602992 0.321569E-02 + 6 33.8394 0.29551E-01 0.13665E-02 0.185497 0.186726E-05 0.614814 0.741981E-02 + 7 37.0606 0.26983E-01 0.31196E-02 0.423480 0.973187E-05 0.676423 0.386709E-01 + 8 37.0709 0.26975E-01 0.19657E-02 0.266836 0.386383E-05 0.700884 0.153535E-01 + 9 37.0719 0.26975E-01 0.28496E-02 0.386823 0.811999E-05 0.752290 0.322659E-01 + 10 43.8375 0.22812E-01 0.62552E-02 0.849139 0.391281E-04 1.00000 0.155481 + ----------------------------------------------------------------------------------------------------------------- + sum 0.157959E-03 0.627673 + ----------------------------------------------------------------------------------------------------------------- + + + + ***** PARTICIPATION FACTOR CALCULATION ***** Z DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 -0.19752E-05 0.023957 0.390136E-11 0.276278E-03 0.155026E-07 + 2 21.6902 0.46104E-01 -0.13045E-05 0.015822 0.170176E-11 0.396790E-03 0.676218E-08 + 3 21.6913 0.46101E-01 -0.25987E-05 0.031519 0.675314E-11 0.875019E-03 0.268345E-07 + 4 33.8297 0.29560E-01 -0.60916E-04 0.738845 0.371071E-08 0.263652 0.147450E-04 + 5 33.8380 0.29553E-01 -0.30181E-04 0.366070 0.910916E-09 0.328160 0.361965E-05 + 6 33.8394 0.29551E-01 -0.49330E-04 0.598325 0.243346E-08 0.500487 0.966969E-05 + 7 37.0606 0.26983E-01 0.12143E-04 0.147286 0.147459E-09 0.510930 0.585948E-06 + 8 37.0709 0.26975E-01 0.67274E-05 0.081597 0.452579E-10 0.514135 0.179838E-06 + 9 37.0719 0.26975E-01 0.79651E-05 0.096609 0.634435E-10 0.518628 0.252101E-06 + 10 43.8375 0.22812E-01 0.82447E-04 1.000000 0.679752E-08 1.00000 0.270109E-04 + ----------------------------------------------------------------------------------------------------------------- + sum 0.141211E-07 0.561122E-04 + ----------------------------------------------------------------------------------------------------------------- + + + + ***** PARTICIPATION FACTOR CALCULATION *****ROTX DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 -1.0941 1.000000 1.19712 0.282791 0.185559 + 2 21.6902 0.46104E-01 -0.49643 0.453718 0.246440 0.341006 0.381991E-01 + 3 21.6913 0.46101E-01 -0.74956 0.685070 0.561836 0.473726 0.870866E-01 + 4 33.8297 0.29560E-01 -0.91221 0.833733 0.832132 0.670296 0.128984 + 5 33.8380 0.29553E-01 -0.43610 0.398583 0.190185 0.715223 0.294794E-01 + 6 33.8394 0.29551E-01 -0.66259 0.605584 0.439023 0.818931 0.680502E-01 + 7 37.0606 0.26983E-01 -0.43459 0.397204 0.188871 0.863547 0.292757E-01 + 8 37.0709 0.26975E-01 -0.27377 0.250213 0.749480E-01 0.881252 0.116172E-01 + 9 37.0719 0.26975E-01 -0.39680 0.362658 0.157447 0.918445 0.244048E-01 + 10 43.8375 0.22812E-01 -0.58757 0.537023 0.345243 1.00000 0.535139E-01 + ----------------------------------------------------------------------------------------------------------------- + sum 4.23325 0.656169 + ----------------------------------------------------------------------------------------------------------------- + + + + ***** PARTICIPATION FACTOR CALCULATION *****ROTY DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 0.18704E-01 0.627437 0.349826E-03 0.233000 0.361386E-04 + 2 21.6902 0.46104E-01 0.82795E-02 0.277746 0.685502E-04 0.278658 0.708153E-05 + 3 21.6913 0.46101E-01 0.12340E-01 0.413962 0.152277E-03 0.380081 0.157308E-04 + 4 33.8297 0.29560E-01 -0.52401E-02 0.175786 0.274589E-04 0.398370 0.283663E-05 + 5 33.8380 0.29553E-01 -0.21221E-02 0.071189 0.450333E-05 0.401370 0.465213E-06 + 6 33.8394 0.29551E-01 -0.26739E-02 0.089698 0.714953E-05 0.406132 0.738577E-06 + 7 37.0606 0.26983E-01 0.12926E-02 0.043363 0.167090E-05 0.407244 0.172611E-06 + 8 37.0709 0.26975E-01 0.73521E-03 0.024663 0.540527E-06 0.407604 0.558388E-07 + 9 37.0719 0.26975E-01 0.89887E-03 0.030154 0.807971E-06 0.408143 0.834668E-07 + 10 43.8375 0.22812E-01 -0.29810E-01 1.000000 0.888614E-03 1.00000 0.917976E-04 + ----------------------------------------------------------------------------------------------------------------- + sum 0.150140E-02 0.155101E-03 + ----------------------------------------------------------------------------------------------------------------- + + + + ***** PARTICIPATION FACTOR CALCULATION *****ROTZ DIRECTION + CUMULATIVE RATIO EFF.MASS + MODE FREQUENCY PERIOD PARTIC.FACTOR RATIO EFFECTIVE MASS MASS FRACTION TO TOTAL MASS + 1 21.6843 0.46116E-01 0.38768 0.418447 0.150298 0.941155E-01 0.421268E-01 + 2 21.6902 0.46104E-01 0.17775 0.191858 0.315959E-01 0.113901 0.885597E-02 + 3 21.6913 0.46101E-01 0.26826 0.289550 0.719650E-01 0.158965 0.201709E-01 + 4 33.8297 0.29560E-01 0.36987 0.399221 0.136804 0.244630 0.383445E-01 + 5 33.8380 0.29553E-01 0.17635 0.190342 0.310986E-01 0.264104 0.871658E-02 + 6 33.8394 0.29551E-01 0.26789 0.289152 0.717670E-01 0.309044 0.201154E-01 + 7 37.0606 0.26983E-01 0.33130 0.357593 0.109762 0.377775 0.307648E-01 + 8 37.0709 0.26975E-01 0.20886 0.225431 0.436217E-01 0.405091 0.122266E-01 + 9 37.0719 0.26975E-01 0.30278 0.326807 0.916758E-01 0.462498 0.256957E-01 + 10 43.8375 0.22812E-01 0.92648 1.000000 0.858367 1.00000 0.240590 + ----------------------------------------------------------------------------------------------------------------- + sum 1.59695 0.447608 + ----------------------------------------------------------------------------------------------------------------- + + + + + + *** NOTE *** CP = 10.875 TIME= 06:53:03 + The modes requested are mass normalized (Nrmkey on MODOPT). However, + the modal masses and kinetic energies below are calculated with unit + normalized modes. + + ***** MODAL MASSES, KINETIC ENERGIES, AND TRANSLATIONAL EFFECTIVE MASSES SUMMARY ***** + + EFFECTIVE MASS + MODE FREQUENCY MODAL MASS KENE | X-DIR RATIO% Y-DIR RATIO% Z-DIR RATIO% + 1 21.68 0.9470E-05 0.8789E-01 | 0.1779E-07 0.01 0.5427E-04 21.56 0.3901E-11 0.00 + 2 21.69 0.9779E-05 0.9081E-01 | 0.3449E-08 0.00 0.1118E-04 4.44 0.1702E-11 0.00 + 3 21.69 0.7728E-05 0.7178E-01 | 0.7578E-08 0.00 0.2548E-04 10.12 0.6753E-11 0.00 + 4 33.83 0.2795E-04 0.6314 | 0.7392E-08 0.00 0.3517E-05 1.40 0.3711E-08 0.00 + 5 33.84 0.2850E-04 0.6441 | 0.1521E-08 0.00 0.8093E-06 0.32 0.9109E-09 0.00 + 6 33.84 0.2333E-04 0.5274 | 0.3313E-08 0.00 0.1867E-05 0.74 0.2433E-08 0.00 + 7 37.06 0.1111E-04 0.3012 | 0.6701E-09 0.00 0.9732E-05 3.87 0.1475E-09 0.00 + 8 37.07 0.1103E-04 0.2991 | 0.2202E-09 0.00 0.3864E-05 1.54 0.4526E-10 0.00 + 9 37.07 0.1007E-04 0.2732 | 0.3473E-09 0.00 0.8120E-05 3.23 0.6344E-10 0.00 + 10 43.84 0.5791E-05 0.2197 | 0.1463E-07 0.01 0.3913E-04 15.55 0.6798E-08 0.00 + -------------------------------------------------------------------------------------------------------------- + sum | 0.5691E-07 0.02 0.1580E-03 62.77 0.1412E-07 0.01 + -------------------------------------------------------------------------------------------------------------- + + + *** ANSYS BINARY FILE STATISTICS + BUFFER SIZE USED= 16384 + 38.000 MB WRITTEN ON ELEMENT SAVED DATA FILE: file0.esav + 83.375 MB WRITTEN ON ASSEMBLED MATRIX FILE: file0.full + 12.438 MB WRITTEN ON MODAL MATRIX FILE: file0.mode + 14.375 MB WRITTEN ON RESULTS FILE: file0.rst + + + + +20.3.2. Post-processing the modal results +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This sections illustrates different methods to post-process the results of the +modal analysis : PyMAPDL method, PyMAPDL result reader, PyDPF-Post +and PyDPF-Core. All methods lead to the same result and are just given as an +example of how each module can be used. + + +.. code-block:: default + + + # using MAPDL methods + mapdl.post1() + mapdl.set(1, 1) + mapdl.plnsol("u", "sum") + + + + +20.3.2.1 Using PyMAPDL result reader +************************************ + +*Not recommended* - PyMAPDL reader library is in process to being deprecated. +It is recommended to use `DPF Post `_. + + +.. code-block:: default + + + mapdl_result = mapdl.result + mapdl_result.plot_nodal_displacement(0) + + +.. figure:: images/ex_20-tecPCB_003.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + + +20.3.2.2. Using DPF-Post +************************ + + +.. code-block:: default + + + from ansys.dpf import post + + solution_path = mapdl.result_file + solution = post.load_solution(solution_path) + print(solution) + displacement = solution.displacement(time_scoping=1) + total_deformation = displacement.norm + total_deformation.plot_contour(show_edges=True, background="w") + + + + + +.. figure:: images/ex_20-tecPCB_004.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + +.. rst-class:: sphx-glr-script-out + + + .. code-block:: none + + Modal Analysis Solution object. + + + Data Sources + ------------------------------ + DPF DataSources: + Result files: + result key: rst and path: C:/Users/gayuso/AppData/Local/Temp/ansys_pasiuwhdkb\file.rst + Secondary files: + + + DPF Model + ------------------------------ + Modal analysis + Unit system: NMM: mm, ton, N, s, mA, degC + Physics Type: Mecanic + Available results: + - displacement: Nodal Displacement + ------------------------------ + DPF Meshed Region: + 44097 nodes + 26046 elements + Unit: mm + With solid (3D) elements, shell (2D) elements, shell (3D) elements, beam (1D) elements + ------------------------------ + DPF Time/Freq Support: + Number of sets: 10 + Cumulative Frequency (Hz) LoadStep Substep + 1 21.684283 1 1 + 2 21.690242 1 2 + 3 21.691317 1 3 + 4 33.829735 1 4 + 5 33.837985 1 5 + 6 33.839387 1 6 + 7 37.060643 1 7 + 8 37.070912 1 8 + 9 37.071871 1 9 + 10 43.837536 1 10 + + This may contain complex results. + + + + +.. GENERATED FROM PYTHON SOURCE LINES 182-185 + +20.3.2.3. Using DPF-Core +************************ + + +.. code-block:: default + + + from ansys.dpf import core + + model = core.Model(solution_path) + results = model.results + print(results) + displacements = results.displacement() + total_def = core.operators.math.norm_fc(displacements) + total_def_container = total_def.outputs.fields_container() + mesh = model.metadata.meshed_region + mesh.plot(total_def_container.get_field_by_time_id(1)) + + + +.. figure:: images/ex_20-tecPCB_005.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Modal analysis + Unit system: NMM: mm, ton, N, s, mA, degC + Physics Type: Mecanic + Available results: + - displacement: Nodal Displacement + + + + +20.4. PSD analysis +------------------ + +20.4.1. Run PSD analysis +~~~~~~~~~~~~~~~~~~~~~~~~ + +The response spectrum analysis is defined, solved and post-processed. + +.. GENERATED FROM PYTHON SOURCE LINES 201-241 + +.. code-block:: default + + + # define PSD analysis with input spectrum + mapdl.slashsolu() + mapdl.antype("spectr") + + # power spectral density + mapdl.spopt("psd") + + # use input table 1 with acceleration spectrum in terms of acceleration due to gravity + mapdl.psdunit(1, "accg", 9.81 * 1000) + + # define the frequency points in the input table 1 + mapdl.psdfrq(1, "", 1, 40, 50, 70.71678, 100, 700, 900) + + # define the PSD values in the input table 1 + mapdl.psdval(1, 0.01, 0.01, 0.1, 1, 10, 10, 1) + + # set the damping ratio as 5% + mapdl.dmprat(0.05) + + # apply base excitation on the set of nodes N_BASE_EXCITE in the y-direction from table 1 + mapdl.d("N_BASE_EXCITE", "uy", 1) + + # calculate the participation factor for PSD with base excitation from input table 1 + mapdl.pfact(1, "base") + + # write the displacent solution relative to the base excitation to the results file from the PSD analysis + mapdl.psdres("disp", "rel") + + # write the absolute velocity solution to the results file from the PSD analysis + mapdl.psdres("velo", "abs") + + # write the absolute acceleration solution to the results file from the PSD analysis + mapdl.psdres("acel", "abs") + + # combine only those modes whose significance level exceeds 0.0001 + mapdl.psdcom() + output = mapdl.solve() + print(output) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + *** 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. + + ***** ANSYS SOLVE COMMAND ***** + + Time at start of random vibration closed-form solution CP= 16.328125. + + + FREQUENCIES USED FOR RANDOM VIBRATION SOLUTION + + MODE FREQUENCY + + 1 21.6843 + 2 21.6902 + 3 21.6913 + 4 33.8297 + 5 33.8380 + 6 33.8394 + 7 37.0606 + 8 37.0709 + 9 37.0719 + 10 43.8375 + + PERFORM INTEGRATION FOR DISPLACEMENT-TYPE QUANTITIES + + PERFORM INTEGRATION FOR VELOCITY-TYPE QUANTITIES + + PERFORM INTEGRATION FOR ACCELERATION-TYPE QUANTITIES + + Modal covariance matrix computed CP= 16.328125. + + Quasi-static modal covariance matrix computed CP= 16.328125. + + Covariant-modal covariance matrix computed CP= 16.328125. + + Psd file file0.psd created. CP= 16.328125. + + Time at start of random vibration mode combinations CP= 16.328125. + + BASE EXCITATION PROBLEM + + + ***** SUMMARY OF TERMS INCLUDED IN MODE COMBINATIONS ***** + (MODAL COVARIANCE MATRIX TERMS ONLY) + + *** DISPLACEMENT-TYPE QUANTITY *** + + MAXIMUM TERM = 0.73456E-04 + + MODE MODE COVARIANCE COVARIANCE + I J TERM RATIO + + 1 1 0.73456E-04 1.0000 + 2 1 0.33327E-04 0.45370 + 2 2 0.15120E-04 0.20584 + 3 1 0.50316E-04 0.68498 + 3 2 0.22828E-04 0.31078 + 3 3 0.34466E-04 0.46920 + 4 1 0.64485E-05 0.87787E-01 + 4 2 0.29267E-05 0.39843E-01 + 4 3 0.44189E-05 0.60158E-01 + 4 4 0.26183E-05 0.35644E-01 + 5 1 0.30932E-05 0.42109E-01 + 5 2 0.14039E-05 0.19112E-01 + 5 3 0.21196E-05 0.28856E-01 + 5 4 0.12558E-05 0.17096E-01 + 5 5 0.60234E-06 0.82001E-02 + 6 1 0.46985E-05 0.63964E-01 + 6 2 0.21325E-05 0.29031E-01 + 6 3 0.32198E-05 0.43833E-01 + 6 4 0.19076E-05 0.25969E-01 + 6 5 0.91495E-06 0.12456E-01 + 6 6 0.13898E-05 0.18920E-01 + 7 1 0.10933E-04 0.14884 + 7 2 0.49619E-05 0.67549E-01 + 7 3 0.74918E-05 0.10199 + 7 4 0.37206E-05 0.50651E-01 + 7 5 0.17855E-05 0.24307E-01 + 7 6 0.27124E-05 0.36925E-01 + 7 7 0.71392E-05 0.97190E-01 + 8 1 0.68895E-05 0.93791E-01 + 8 2 0.31268E-05 0.42567E-01 + 8 3 0.47210E-05 0.64270E-01 + 8 4 0.23433E-05 0.31900E-01 + 8 5 0.11245E-05 0.15309E-01 + 8 6 0.17083E-05 0.23256E-01 + 8 7 0.44986E-05 0.61241E-01 + 8 8 0.28346E-05 0.38590E-01 + 9 1 0.99875E-05 0.13597 + 9 2 0.45329E-05 0.61708E-01 + 9 3 0.68440E-05 0.93171E-01 + 9 4 0.33968E-05 0.46243E-01 + 9 5 0.16301E-05 0.22192E-01 + 9 6 0.24763E-05 0.33712E-01 + 9 7 0.65214E-05 0.88780E-01 + 9 8 0.41093E-05 0.55942E-01 + 9 9 0.59571E-05 0.81098E-01 + 10 1 0.23871E-04 0.32496 + 10 2 0.10834E-04 0.14748 + 10 3 0.16357E-04 0.22268 + 10 4 0.70587E-05 0.96095E-01 + 10 5 0.33864E-05 0.46101E-01 + 10 6 0.51441E-05 0.70030E-01 + 10 7 0.12750E-04 0.17358 + 10 8 0.80366E-05 0.10941 + 10 9 0.11651E-04 0.15861 + 10 10 0.36571E-04 0.49786 + + *** VELOCITY-TYPE QUANTITY *** + + MAXIMUM TERM = 15.547 + + MODE MODE COVARIANCE COVARIANCE + I J TERM RATIO + + 1 1 15.547 1.0000 + 2 1 7.0557 0.45383 + 2 2 3.2021 0.20596 + 3 1 10.653 0.68521 + 3 2 4.8347 0.31097 + 3 3 7.2996 0.46952 + 4 1 3.8958 0.25058 + 4 2 1.7681 0.11372 + 4 3 2.6695 0.17171 + 4 4 1.0786 0.69377E-01 + 5 1 1.8688 0.12020 + 5 2 0.84811 0.54551E-01 + 5 3 1.2805 0.82365E-01 + 5 4 0.51739 0.33279E-01 + 5 5 0.24818 0.15963E-01 + 6 1 2.8387 0.18259 + 6 2 1.2883 0.82864E-01 + 6 3 1.9451 0.12511 + 6 4 0.78592 0.50551E-01 + 6 5 0.37699 0.24249E-01 + 6 6 0.57266 0.36834E-01 + 7 1 6.5885 0.42378 + 7 2 2.9901 0.19233 + 7 3 4.5146 0.29039 + 7 4 1.7955 0.11549 + 7 5 0.86132 0.55401E-01 + 7 6 1.3084 0.84155E-01 + 7 7 3.0886 0.19866 + 8 1 4.1517 0.26704 + 8 2 1.8842 0.12119 + 8 3 2.8448 0.18298 + 8 4 1.1314 0.72770E-01 + 8 5 0.54272 0.34908E-01 + 8 6 0.82441 0.53027E-01 + 8 7 1.9463 0.12519 + 8 8 1.2264 0.78885E-01 + 9 1 6.0186 0.38712 + 9 2 2.7315 0.17569 + 9 3 4.1241 0.26527 + 9 4 1.6401 0.10549 + 9 5 0.78677 0.50606E-01 + 9 6 1.1951 0.76872E-01 + 9 7 2.8215 0.18148 + 9 8 1.7779 0.11436 + 9 9 2.5774 0.16578 + 10 1 13.822 0.88902 + 10 2 6.2727 0.40347 + 10 3 9.4709 0.60918 + 10 4 3.7285 0.23982 + 10 5 1.7885 0.11504 + 10 6 2.7168 0.17475 + 10 7 6.3657 0.40945 + 10 8 4.0114 0.25802 + 10 9 5.8153 0.37404 + 10 10 14.121 0.90826 + + *** ACCELERATION-TYPE QUANTITY *** + + MAXIMUM TERM = 0.36471E+08 + + MODE MODE COVARIANCE COVARIANCE + I J TERM RATIO + + 1 1 0.36471E+08 1.0000 + 2 1 0.16552E+08 0.45383 + 2 2 0.75116E+07 0.20596 + 3 1 0.24990E+08 0.68521 + 3 2 0.11341E+08 0.31097 + 3 3 0.17124E+08 0.46952 + 4 1 0.93868E+07 0.25738 + 4 2 0.42600E+07 0.11680 + 4 3 0.64320E+07 0.17636 + 4 4 0.24200E+07 0.66353E-01 + 5 1 0.45026E+07 0.12346 + 5 2 0.20434E+07 0.56028E-01 + 5 3 0.30852E+07 0.84593E-01 + 5 4 0.11608E+07 0.31827E-01 + 5 5 0.55679E+06 0.15267E-01 + 6 1 0.68394E+07 0.18753 + 6 2 0.31039E+07 0.85106E-01 + 6 3 0.46865E+07 0.12850 + 6 4 0.17632E+07 0.48346E-01 + 6 5 0.84577E+06 0.23190E-01 + 6 6 0.12847E+07 0.35226E-01 + 7 1 0.15678E+08 0.42987 + 7 2 0.71150E+07 0.19509 + 7 3 0.10743E+08 0.29455 + 7 4 0.40413E+07 0.11081 + 7 5 0.19385E+07 0.53152E-01 + 7 6 0.29446E+07 0.80738E-01 + 7 7 0.67544E+07 0.18520 + 8 1 0.98787E+07 0.27086 + 8 2 0.44832E+07 0.12293 + 8 3 0.67690E+07 0.18560 + 8 4 0.25465E+07 0.69822E-01 + 8 5 0.12215E+07 0.33491E-01 + 8 6 0.18554E+07 0.50874E-01 + 8 7 0.42560E+07 0.11670 + 8 8 0.26818E+07 0.73531E-01 + 9 1 0.14321E+08 0.39266 + 9 2 0.64992E+07 0.17820 + 9 3 0.98129E+07 0.26906 + 9 4 0.36916E+07 0.10122 + 9 5 0.17707E+07 0.48552E-01 + 9 6 0.26898E+07 0.73750E-01 + 9 7 0.61698E+07 0.16917 + 9 8 0.38877E+07 0.10660 + 9 9 0.56359E+07 0.15453 + 10 1 0.31765E+08 0.87095 + 10 2 0.14416E+08 0.39526 + 10 3 0.21766E+08 0.59679 + 10 4 0.81902E+07 0.22457 + 10 5 0.39286E+07 0.10772 + 10 6 0.59676E+07 0.16362 + 10 7 0.13688E+08 0.37532 + 10 8 0.86252E+07 0.23649 + 10 9 0.12504E+08 0.34284 + 10 10 0.27823E+08 0.76287 + + + ***** SUMMARY OF OUTPUT QUANTITIES COMPUTED ***** + AND WRITTEN ON RESULTS FILE + + DISPLACEMENT-TYPE QUANTITIES COMPUTED + AND WRITTEN ON RESULTS FILE AS LOAD STEP 3 + VALUES ARE RELATIVE TO BASE + + THESE ARE STATISTICAL QUANTITIES WHICH + CANNOT BE COMBINED OR TRANSFORMED IN ANY + VECTORIAL SENSE + + + VELOCITY-TYPE QUANTITIES COMPUTED + AND WRITTEN ON RESULTS FILE AS LOAD STEP 4 + VALUES ARE ABSOLUTE + + THESE ARE STATISTICAL QUANTITIES WHICH + CANNOT BE COMBINED OR TRANSFORMED IN ANY + VECTORIAL SENSE + + + ACCELERATION-TYPE QUANTITIES COMPUTED + AND WRITTEN ON RESULTS FILE AS LOAD STEP 5 + VALUES ARE ABSOLUTE + + THESE ARE STATISTICAL QUANTITIES WHICH + CANNOT BE COMBINED OR TRANSFORMED IN ANY + VECTORIAL SENSE + + + + + +20.4.2. Post-process PSD analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The response spectrum analysis is post-processed. First, the standard +MAPDL POST1 postprocessor is used. Then, the MAPDL time-history +POST26 postprocessor is used to generate the response power spectral +density. + +.. note:: + The graph generated through POST26 is exported as a picture in the working + directory. Finally, the results from POST26 are saved to Python variables + to be plotted in the Python environment with the use of Matplotlib + library. + +.. GENERATED FROM PYTHON SOURCE LINES 257-259 + +20.4.2.1. Post-process PSD analysis in POST1 +******************************************** + +.. GENERATED FROM PYTHON SOURCE LINES 259-266 + +.. code-block:: default + + + mapdl.post1() + mapdl.set(1, 1) + mapdl.plnsol("u", "sum") + mapdl.set("last") + mapdl.plnsol("u", "sum") + + +.. figure:: images/ex_20-tecPCB_006.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + + + +20.4.2.2. Post-process PSD analysis in POST26 (time-history post-processing) +**************************************************************************** + + +.. code-block:: default + + + mapdl.post26() + + # allow storage for 200 variables + mapdl.numvar(200) + mapdl.cmsel("s", "MY_MONITOR") + monitored_node = mapdl.queries.ndnext(0) + mapdl.store("psd") + + # store the psd analysis u_y data for the node MYMONITOR as the reference no 2 + mapdl.nsol(2, monitored_node, "u", "y") + + # compute the response power spectral density for displacement associated with variable 2 + mapdl.rpsd(3, 2) + mapdl.show("png") + + # plot the variable 3 + mapdl.plvar(3) + + # print the variable 3 + mapdl.prvar(3) + + # x-axis is set for Log X scale + mapdl.gropt("logx", 1) + + # y-axis is set for Log X scale + mapdl.gropt("logy", 1) + + # plot the variable 3 + mapdl.plvar(3) + mapdl.show("close") + + + + +20.4.2.3. Post-process PSD analysis using Matplotlib +**************************************************** + +.. GENERATED FROM PYTHON SOURCE LINES 304-322 + +.. code-block:: default + + + # store MAPDL results to python variables + mapdl.dim("frequencies", "array", 4000, 1) + mapdl.dim("response", "array", 4000, 1) + mapdl.vget("frequencies(1)", 1) + mapdl.vget("response(1)", 3) + frequencies = mapdl.parameters["frequencies"] + response = mapdl.parameters["response"] + + # use Matplotlib to create graph + fig = plt.figure() + ax = fig.add_subplot(111) + plt.xscale("log") + plt.yscale("log") + ax.plot(frequencies, response) + ax.set_xlabel("Frequencies") + ax.set_ylabel("Response power spectral density") + + +.. figure:: images/ex_20-tecPCB_007.png + :align: center + :alt: 20 example technology showcase dynamic simulation PCB + :figclass: sphx-glr-single-img + + + +20.5. Exit MAPDL +---------------- + +.. code-block:: default + + mapdl.exit() + + + +20.6. Input files +----------------- +The following file was used in this problem: +``pcb_mesh_file.cdb`` contains a FE model of a single +circuit board + +* **pcb_mesh_file.cdb** -- Input file containing the model of a single + circuit board. + + ++-----------------------------------------------------------------------------------------------------------------------------------+ +| `Download the zipped td-20 file set for this problem `_ | ++-----------------------------------------------------------------------------------------------------------------------------------+ + +For more information, see `Obtaining the input files `_. + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ + diff --git a/_sources/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst.txt b/_sources/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst.txt new file mode 100644 index 00000000..5b015c38 --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-21/ex_21-tecbuckling.rst.txt @@ -0,0 +1,1607 @@ +.. _sphx_glr_ex_21-tecbuckling.rst: + +.. _tech_demo_21: + + +Buckling and post-buckling analysis of a ring-stiffened cylinder using nonlinear stabilization +============================================================================================== + + +This examples shows how to use PyMAPDL to import an existing FE model and +to perform a7 nonlinear buckling and post-buckling analysis using nonlinear +stabilization. The problem uses a stiffened cylinder subjected to uniform +external pressure to show how to find the nonlinear buckling loads, achieve +convergence at the post-buckling stage, and interpret the results. + +This example is inspired from the model and analysis defined in Chapter 21 +of the Mechanical APDL Technology Showcase Manual. + + +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 ring-stiffened cylinder. + +A circular cylinder made of bare 2024-T3 aluminum alloy is stiffened inside +with five Z-section rings. Its ends are closed with thick aluminum bulkheads. +A riveted L section exists between the top plate and the top ring and the +bottom plate and bottom ring. +The cylinder is subjected to a differential external pressure. The pressure +causes a local buckling phenomenon characterized by buckling of the skin +between stiffening rings, leading eventually to collapse. + +The finite element model of the ring stiffened cylinder is meshed with +SHELL281 elements with an element size of 10 mm. The fine mesh is required +for buckling analysis, and a full 360-degree model is necessary because +the deformation is no longer axisymmetric after buckling occurs. + +All shell elements have uniform thickness. Five sections are created in the +model with no offsets, so the shell sections are offset to the midplane +by default. + +Starting MAPDL as a service and importing an external model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + + from ansys.mapdl.core import launch_mapdl + from ansys.mapdl.core.examples.downloads import download_tech_demo_data + + # define geometric parameters + bs = 95.3 # Ring spacing (mm) + ts = 1.034 # Skin thickness (mm) + tw = 0.843 # Ring thickness (mm) + r = 344 * ts # Radius of cylinder (mm) + L = 431.8 + 2 * (19 - 9.5) # Length of cylinder (mm) + pext = 0.24 # Differential external pressure (MPa) + + # start MAPDL as a service + mapdl = launch_mapdl(run_location="D:\PyAnsys\Examples\Buckling_PostBuckling_TD21") + print(mapdl) + + mapdl.filname("buckling") # change filename + # mapdl.nerr(nmerr=200, nmabt=10000, abort=-1, ifkey=0, num=0) + + # enter preprocessor + mapdl.prep7() + + # define material properties for 2024-T3 Alluminum alloy + EX = 73000 # Young's Modulus (MPA) + ET = 73 # Tangent modulus + mapdl.mp("ex", 1, EX) # Young's Modulus (MPA) + mapdl.mp("prxy", 1, 0.33) # Poisson's ratio + EP = EX * ET / (EX - ET) + mapdl.tb("biso", 1) + mapdl.tbdata(1, 268.9, EP) + # create material plot + mapdl.show("png") + mapdl.tbplot("biso", 1) + mapdl.show("close") + + # define shell elements and their sections + mapdl.et(1, 181) + # cylinder + mapdl.sectype(1, "shell") + mapdl.secdata(ts, 1) + # L + mapdl.sectype(2, "shell") + mapdl.secdata(ts + 1.64, 1) + # Z shaped ring stiffener + mapdl.sectype(3, "shell") + mapdl.secdata(tw, 1) + # Plate at z=0 with thickness=25 mm + mapdl.sectype(4, "shell") + mapdl.secdata(25, 1) + # Plate at z=L with thickness=25 mm + mapdl.sectype(5, "shell") + mapdl.secdata(25, 1) + + + # read model of stiffened cylinder + # download the cdb file + ring_mesh_file = download_tech_demo_data( + "td-21", "ring_stiffened_cylinder_mesh_file.cdb" + ) + + # read in cdb + mapdl.cdread("db", ring_mesh_file) + mapdl.allsel() + mapdl.eplot(background="w") + mapdl.cmsel("all") + +.. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_000.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_000.png + :class: sphx-glr-single-img + + +.. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_001.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Product: Ansys Mechanical Enterprise + MAPDL Version: 23.1 + ansys.mapdl Version: 0.65.dev0 + + + ALSO SELECT ALL COMPONENTS + + + + +Define static prestress analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Displacement boundary conditions are defined to prevent the six rigid body +motions. A total of six displacements are therefore applied to three nodes +located on the top plate at 0, 90, and 270 degrees; the nodes are restricted +so that all rigid translations and rotations are not possible for the +cylinder. + +Loading consists of a uniformly distributed external differential +pressure: :math:`P_{ext} = 0.24 MPa` + +.. code-block:: python + + + print("Begin static prestress analysis") + + mapdl.csys(1) # activate cylindrical coordinate system + + # Define pressure on plate at z=0 + mapdl.nsel("s", "loc", "z", 0) + mapdl.esln("s", 1) + mapdl.sfe("all", 2, "pres", 1, pext) + mapdl.allsel() + + # Define pressure on the rim of plate at z=0 + mapdl.nsel("s", "loc", "z", 0) + mapdl.nsel("r", "loc", "x", r - ts / 2, 760 / 2) + mapdl.esln("s", 1) + mapdl.sfe("all", 1, "pres", 1, pext) + mapdl.allsel() + + # Define pressure on plate at z=L + mapdl.nsel("s", "loc", "z", L) + mapdl.esln("s", 1) + mapdl.sfe("all", 2, "pres", 1, pext) + mapdl.allsel() + + # Define pressure on the rim of plate at z=L + mapdl.nsel("s", "loc", "z", L) + mapdl.nsel("r", "loc", "x", r - ts / 2, 760 / 2) + mapdl.esln("s", 1) + mapdl.sfe("all", 1, "pres", 1, pext) + mapdl.allsel() + + # Define pressure on cylinder + mapdl.nsel("s", "loc", "x", r - ts / 2) + mapdl.esln("s", 1) + mapdl.sfe("all", 2, "pres", 1, pext) + mapdl.allsel() + + # Define displacement BSs to avoid rigid body motion + mapdl.csys(0) # activate cartesian coordinate system + mapdl.nsel("s", "loc", "x", r - ts / 2) + mapdl.nsel("r", "loc", "y", 0) + mapdl.nsel("r", "loc", "z", 0) + mapdl.d("all", "ux", 0) + mapdl.d("all", "uy", 0) + mapdl.d("all", "uz", 0) + mapdl.allsel() + # + mapdl.nsel("s", "loc", "x", 0) + mapdl.nsel("r", "loc", "y", r - ts / 2) + mapdl.nsel("r", "loc", "z", 0) + mapdl.d("all", "uz", 0) + mapdl.allsel() + # + mapdl.nsel("s", "loc", "x", 0) + mapdl.nsel("r", "loc", "y", -(r - ts / 2)) + mapdl.nsel("r", "loc", "z", 0) + mapdl.d("all", "uy", 0) + mapdl.d("all", "uz", 0) + mapdl.allsel() + # + + # Print DOF constraints + print(mapdl.dlist()) + + # Solve static prestress analysis + mapdl.slashsolu() + mapdl.pstres("on") + mapdl.antype("STATIC") + output = mapdl.solve() + print(output) + + # Plot total deformation + mapdl.post1() + mapdl.set("last") + mapdl.post_processing.plot_nodal_displacement("NORM", smooth_shading=True) + + print("End static prestress analysis") + + + +.. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_002.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Begin static prestress analysis + LIST CONSTRAINTS FOR SELECTED NODES 1 TO 85474 BY 1 + CURRENTLY SELECTED DOF SET= UX UY UZ ROTX ROTY ROTZ + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE LABEL REAL IMAG + 1 UX 0.00000000 0.00000000 + 1 UY 0.00000000 0.00000000 + 1 UZ 0.00000000 0.00000000 + 2 UZ 0.00000000 0.00000000 + 902 UY 0.00000000 0.00000000 + 902 UZ 0.00000000 0.00000000 + ***** MAPDL SOLVE COMMAND ***** + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + There is no title defined for this analysis. + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + Section ID set 2 (and possibly others), with only 1 layer and 3 + integration points, is associated with material plasticity. The + number of integration points will be changed to 5 for improved + accuracy. + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + The model data was checked and warning messages were found. + Please review output or errors file ( ) for these warning messages. + + *** 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) + PRESTRESS EFFECTS CALCULATED. . . . . . . . . .YES + PLASTIC MATERIAL PROPERTIES INCLUDED. . . . . .YES + NEWTON-RAPHSON OPTION . . . . . . . . . . . . .PROGRAM CHOSEN + 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 + This nonlinear analysis defaults to using the full Newton-Raphson + solution procedure. This can be modified using the NROPT command. + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + The conditions for direct assembly have been met. No .emat or .erot + files will be produced. + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + The program chosen initial timestep/load-factor is arbitrary. It is + necessary for the user to supply a suitable initial + timestep/load-factor through the NSUB or DELTIM command for + convergence and overall efficiency. + + + + 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: 26796 + ...Number of nodes: 73662 + ...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 + AUTOMATIC TIME STEPPING . . . . . . . . . . . . ON + INITIAL NUMBER OF SUBSTEPS . . . . . . . . . 1 + MAXIMUM NUMBER OF SUBSTEPS . . . . . . . . . 1000 + MINIMUM NUMBER OF SUBSTEPS . . . . . . . . . 1 + START WITH TIME STEP FROM PREVIOUS SUBSTEP . YES + MAXIMUM NUMBER OF EQUILIBRIUM ITERATIONS. . . . 15 + STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO + TERMINATE ANALYSIS IF NOT CONVERGED . . . . . .YES (EXIT) + CONVERGENCE CONTROLS. . . . . . . . . . . . . .USE DEFAULTS + COPY INTEGRATION POINT VALUES TO NODE . . . . .YES, FOR ELEMENTS WITH + ACTIVE MAT. NONLINEARITIES + 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 = 489978589 at element 0. + Minimum = 165335.668 at element 0. + + *** ELEMENT MATRIX FORMULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + Time at end of element matrix formulation CP = 0. + + ALL CURRENT MAPDL DATA WRITTEN TO FILE NAME= + FOR POSSIBLE RESUME FROM THIS POINT + FORCE CONVERGENCE VALUE = 3478. CRITERION= 17.39 + MOMENT CONVERGENCE VALUE = 0.000 CRITERION= 15.96 + + DISTRIBUTED SPARSE MATRIX DIRECT SOLVER. + Number of equations = 441966, 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 + . + DISP CONVERGENCE VALUE = 2.213 CRITERION= 0.1106 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -2.213 + FORCE CONVERGENCE VALUE = 0.5808E-05 CRITERION= 17.39 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.2147E-05 CRITERION= 15.96 <<< CONVERGED + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + A reference moment value times the tolerance is used by the + Newton-Raphson method for checking convergence. The calculated + reference MOMENT CONVERGENCE VALUE = 0 is less than a threshold. This + threshold is internally calculated. You can overwrite it by + specifying MINREF on the CNVTOL command. Check results carefully. + DISP CONVERGENCE VALUE = 0.7695E-09 CRITERION= 0.1106 <<< CONVERGED + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC = 0.7695E-09 + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 2 + + *** ELEMENT RESULT CALCULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + + *** NODAL LOAD CALCULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 2 + *** TIME = 1.00000 TIME INC = 1.00000 + End static prestress analysis + + + + +Run linear buckling analysis +---------------------------- + +This preliminary analysis predicts the theoretical buckling pressure of the +ideal linear elastic structure (perfect cylinder) and the buckled mode shapes +used in the next step to generate the imperfections. +It is also an efficient way to check the completeness and +correctness of modeling. +To run the linear buckling analysis, a static solution with prestress effects +must be obtained, followed by the eigenvalue buckling solution using the +Block Lanczos method and mode expansion. + +.. code-block:: python + + + print("Begin linear buckling analysis") + + # Define and solve linear buckling analysis + mapdl.slashsolu() + mapdl.outres("all", "all") + mapdl.antype("BUCKLE") + mapdl.bucopt("lanb", "10") + mapdl.mxpand(10) + output = mapdl.solve() + print(output) + + # Plot total deformation of first and 10th mode + mapdl.post1() + mapdl.set(1, 1) + mapdl.post_processing.plot_nodal_displacement("NORM", smooth_shading=True) + mapdl.set(1, 10) + mapdl.post_processing.plot_nodal_displacement("NORM", smooth_shading=True) + + print("End linear buckling analysis") + + + +.. rst-class:: sphx-glr-horizontal + + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_003.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_003.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_004.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_004.png + :class: sphx-glr-multi-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Begin linear buckling analysis + ***** 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 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 . . . . . . . . . . . . . . . . .BUCKLING + EXTRACTION METHOD. . . . . . . . . . . . . .BLOCK LANCZOS + PRESTRESS EFFECTS INCLUDED IF AVAILABLE . . . .YES + GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + The conditions for direct assembly have been met. No .emat or .erot + files will be produced. + + L O A D S T E P O P T I O N S + + LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1 + PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT + DATABASE OUTPUT CONTROLS + ITEM FREQUENCY COMPONENT + ALL ALL + + + BLOCK LANCZOS CALCULATION OF UP TO 10 EIGENVECTORS. + NUMBER OF EQUATIONS = 441966 + MAXIMUM WAVEFRONT = 0 + MAXIMUM MODES STORED = 10 + MINIMUM EIGENVALUE = -0.10000E+31 + MAXIMUM EIGENVALUE = 0.10000E+31 + CENTER EIGENVALUE = 0.00000E+00 + + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ***** EIGENVALUES (LOAD MULTIPLIERS FOR BUCKLING) ***** + *** FROM BLOCK LANCZOS ITERATION *** + + SHAPE NUMBER LOAD MULTIPLIER + + 1 0.62493510 + 2 0.62493510 + 3 0.62746216 + 4 0.62748425 + 5 0.63023610 + 6 0.63025918 + 7 0.63985985 + 8 0.63985995 + 9 0.64191573 + 10 0.64191576 + End linear buckling analysis + + +Generate imperfections +---------------------- + +If a structure is perfectly symmetric, nonsymmetric buckling does not occur +numerically, and a nonlinear buckling analysis fails because +nonsymmetric buckling responses cannot be triggered. In this problem, +the geometry, elements, and pressure are all axisymmetric. +It is not possible, therefore, to simulate nonaxisymmetric buckling with +the initial model. To overcome this problem, small geometric imperfections +(similar to those caused by manufacturing a real structure) must be +introduced to trigger the buckling responses. +Because the radius of the cylinder is 355.69 mm and the maximum +displacement of a mode shape is 1 mm, a factor of 0.1 is applied when +updating the geometry with mode shapes. The factor assumes the manufacturing +tolerance of the radius to be on the order of 0.1. + +.. code-block:: python + + + print("Begin adding imperfections") + + mapdl.finish() + mapdl.prep7() + for i in range(1, 11): + mapdl.upgeom(0.1, 1, i, "buckling", "rst") # Add imperfections as a tenth of each + # mode shape + mapdl.finish() + + print("Finish adding imperfections") + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Begin adding imperfections + Finish adding imperfections + + + + +Run nonlinear static analysis on geometry with imperfections +------------------------------------------------------------ + +The nonlinear buckling analysis is a static analysis performed after adding +imperfections with large deflection active (NLGEOM,ON), extended to a point +where the stiffened cylinder can reach its limit load. +To perform the analysis, the load must be allowed to increase using very +small time increments so that the expected critical buckling load can +be predicted accurately. +Note - as this is a buckling analysis, divergence is expected. + + +.. code-block:: python + + + print("Begin nonlinear static analysis on imperfect geometry") + + mapdl.slashsolu() + mapdl.antype("STATIC") + mapdl.nlgeom("on") + mapdl.pred("on") + mapdl.time(1) + mapdl.nsubst(100, 10000, 10) + mapdl.rescontrol("define", "all", 1) + mapdl.outres("all", "all") + mapdl.ncnv(2) # Do not terminate the program execution if the solution diverges + mapdl.allow_ignore = True # in order for PyMAPDL to not raise an error + output = mapdl.solve() + print(output) + mapdl.finish() + + print("End nonlinear static analysis on imperfect geometry") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Begin nonlinear static analysis on imperfect geometry + ***** 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 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) + NONLINEAR GEOMETRIC EFFECTS . . . . . . . . . .ON + PLASTIC MATERIAL PROPERTIES INCLUDED. . . . . .YES + NEWTON-RAPHSON OPTION . . . . . . . . . . . . .PROGRAM CHOSEN + GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + This nonlinear analysis defaults to using the full Newton-Raphson + solution procedure. This can be modified using the NROPT command. + + *** 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: 26796 + ...Number of nodes: 73662 + ...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 + AUTOMATIC TIME STEPPING . . . . . . . . . . . . ON + INITIAL NUMBER OF SUBSTEPS . . . . . . . . . 100 + MAXIMUM NUMBER OF SUBSTEPS . . . . . . . . . 10000 + MINIMUM NUMBER OF SUBSTEPS . . . . . . . . . 10 + MAXIMUM NUMBER OF EQUILIBRIUM ITERATIONS. . . . 15 + STEP CHANGE BOUNDARY CONDITIONS . . . . . . . . NO + STRESS-STIFFENING . . . . . . . . . . . . . . . ON + PREDICTOR USAGE . . . . . . . . . . . . . . . .ON (AFTER FIRST SUBSTEP) + TERMINATE ANALYSIS IF NOT CONVERGED . . . . . .YES (REMAIN) + CONVERGENCE CONTROLS. . . . . . . . . . . . . .USE DEFAULTS + COPY INTEGRATION POINT VALUES TO NODE . . . . .YES, FOR ELEMENTS WITH + ACTIVE MAT. NONLINEARITIES + PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT + DATABASE OUTPUT CONTROLS + ITEM FREQUENCY COMPONENT + ALL ALL + + + + Range of element maximum matrix coefficients in global coordinates + Maximum = 489978592 at element 0. + Minimum = 165328.012 at element 0. + + *** ELEMENT MATRIX FORMULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + Time at end of element matrix formulation CP = 0. + + ALL CURRENT MAPDL DATA WRITTEN TO FILE NAME= + FOR POSSIBLE RESUME FROM THIS POINT + FORCE CONVERGENCE VALUE = 34.78 CRITERION= 0.1739 + MOMENT CONVERGENCE VALUE = 0.1824E-05 CRITERION= 0.1596 + + DISTRIBUTED SPARSE MATRIX DIRECT SOLVER. + Number of equations = 441966, 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 + . + DISP CONVERGENCE VALUE = 0.2221E-01 CRITERION= 0.1110E-02 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2221E-01 + FORCE CONVERGENCE VALUE = 1.654 CRITERION= 0.1739 + MOMENT CONVERGENCE VALUE = 0.2307 CRITERION= 0.1596 + DISP CONVERGENCE VALUE = 0.2244E-03 CRITERION= 0.1111E-02 <<< CONVERGED + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2244E-03 + FORCE CONVERGENCE VALUE = 0.2717E-03 CRITERION= 0.1739 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.1623E-03 CRITERION= 0.1596 <<< CONVERGED + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + A reference moment value times the tolerance is used by the + Newton-Raphson method for checking convergence. The calculated + reference MOMENT CONVERGENCE VALUE = 0 is less than a threshold. This + threshold is internally calculated. You can overwrite it by + specifying MINREF on the CNVTOL command. Check results carefully. + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 2 + + *** ELEMENT RESULT CALCULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + + *** NODAL LOAD CALCULATION TIMES + TYPE NUMBER ENAME TOTAL CP AVE CP + + 1 26796 SHELL281 0.000 0.000000 + *** LOAD STEP 1 SUBSTEP 1 COMPLETED. CUM ITER = 2 + *** TIME = 0.100000E-01 TIME INC = 0.100000E-01 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000E-01 UNCHANGED + + FORCE CONVERGENCE VALUE = 3.342 CRITERION= 0.3478 + MOMENT CONVERGENCE VALUE = 0.4703 CRITERION= 0.3191 + DISP CONVERGENCE VALUE = 0.4679E-03 CRITERION= 0.1111E-02 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.4679E-03 + FORCE CONVERGENCE VALUE = 0.1163E-02 CRITERION= 0.3478 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.2879E-03 CRITERION= 0.3191 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 2 COMPLETED. CUM ITER = 3 + *** TIME = 0.200000E-01 TIME INC = 0.100000E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.15000E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 6.409 CRITERION= 0.6086 + MOMENT CONVERGENCE VALUE = 0.9124 CRITERION= 0.5585 + DISP CONVERGENCE VALUE = 0.9445E-03 CRITERION= 0.1667E-02 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.9445E-03 + FORCE CONVERGENCE VALUE = 0.4674E-02 CRITERION= 0.6086 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.6922E-03 CRITERION= 0.5585 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 3 COMPLETED. CUM ITER = 4 + *** TIME = 0.350000E-01 TIME INC = 0.150000E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.22500E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 14.89 CRITERION= 0.9998 + MOMENT CONVERGENCE VALUE = 2.142 CRITERION= 0.9175 + DISP CONVERGENCE VALUE = 0.2356E-02 CRITERION= 0.2502E-02 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2356E-02 + FORCE CONVERGENCE VALUE = 0.2851E-01 CRITERION= 0.9998 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.3006E-02 CRITERION= 0.9175 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 4 COMPLETED. CUM ITER = 5 + *** TIME = 0.575000E-01 TIME INC = 0.225000E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.33750E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 35.48 CRITERION= 1.587 + MOMENT CONVERGENCE VALUE = 5.147 CRITERION= 1.456 + DISP CONVERGENCE VALUE = 0.6229E-02 CRITERION= 0.3757E-02 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.6229E-02 + FORCE CONVERGENCE VALUE = 0.1940 CRITERION= 1.587 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.1811E-01 CRITERION= 1.456 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2802E-04 CRITERION= 0.3757E-02 <<< CONVERGED + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC = -0.2802E-04 + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 2 + *** LOAD STEP 1 SUBSTEP 5 COMPLETED. CUM ITER = 7 + *** TIME = 0.912500E-01 TIME INC = 0.337500E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.50625E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 88.92 CRITERION= 2.467 + MOMENT CONVERGENCE VALUE = 12.81 CRITERION= 2.264 + DISP CONVERGENCE VALUE = 0.1802E-01 CRITERION= 0.5646E-02 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1802E-01 + FORCE CONVERGENCE VALUE = 1.576 CRITERION= 2.467 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.1360 CRITERION= 2.264 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2509E-03 CRITERION= 0.5646E-02 <<< CONVERGED + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC = -0.2509E-03 + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 2 + *** LOAD STEP 1 SUBSTEP 6 COMPLETED. CUM ITER = 9 + *** TIME = 0.141875 TIME INC = 0.506250E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.75938E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 252.2 CRITERION= 3.787 + MOMENT CONVERGENCE VALUE = 33.74 CRITERION= 3.475 + DISP CONVERGENCE VALUE = 0.6000E-01 CRITERION= 0.1142E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.6000E-01 + FORCE CONVERGENCE VALUE = 17.33 CRITERION= 3.787 + MOMENT CONVERGENCE VALUE = 1.320 CRITERION= 3.475 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2965E-02 CRITERION= 0.1157E-01 <<< CONVERGED + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2965E-02 + FORCE CONVERGENCE VALUE = 0.3051E-01 CRITERION= 3.787 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.9014E-02 CRITERION= 3.475 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 2 + *** LOAD STEP 1 SUBSTEP 7 COMPLETED. CUM ITER = 11 + *** TIME = 0.217813 TIME INC = 0.759375E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.10000 INCREASED (FACTOR = 1.3169) + + FORCE CONVERGENCE VALUE = 781.3 CRITERION= 5.525 + MOMENT CONVERGENCE VALUE = 79.26 CRITERION= 5.071 + DISP CONVERGENCE VALUE = 0.1687 CRITERION= 0.2356E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1687 + FORCE CONVERGENCE VALUE = 177.9 CRITERION= 5.526 + MOMENT CONVERGENCE VALUE = 11.17 CRITERION= 5.071 + DISP CONVERGENCE VALUE = 0.2494E-01 CRITERION= 0.2481E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2494E-01 + FORCE CONVERGENCE VALUE = 3.277 CRITERION= 5.526 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.3322 CRITERION= 5.071 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.8120E-03 CRITERION= 0.2484E-01 <<< CONVERGED + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC = -0.8120E-03 + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 3 + *** LOAD STEP 1 SUBSTEP 8 COMPLETED. CUM ITER = 14 + *** TIME = 0.317813 TIME INC = 0.100000 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000 UNCHANGED + + FORCE CONVERGENCE VALUE = 2522. CRITERION= 7.264 + MOMENT CONVERGENCE VALUE = 157.6 CRITERION= 6.666 + DISP CONVERGENCE VALUE = 0.3201 CRITERION= 0.3187E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3201 + FORCE CONVERGENCE VALUE = 802.8 CRITERION= 7.265 + MOMENT CONVERGENCE VALUE = 48.60 CRITERION= 6.667 + DISP CONVERGENCE VALUE = 0.1286 CRITERION= 0.3533E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1286 + FORCE CONVERGENCE VALUE = 71.58 CRITERION= 7.265 + MOMENT CONVERGENCE VALUE = 5.723 CRITERION= 6.667 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.4113E-01 CRITERION= 0.3557E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4113E-01 + FORCE CONVERGENCE VALUE = 4.570 CRITERION= 7.265 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.3269 CRITERION= 6.667 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1397E-02 CRITERION= 0.3557E-01 <<< CONVERGED + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC = 0.1397E-02 + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 4 + *** LOAD STEP 1 SUBSTEP 9 COMPLETED. CUM ITER = 18 + *** TIME = 0.417813 TIME INC = 0.100000 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000 UNCHANGED + + FORCE CONVERGENCE VALUE = 9178. CRITERION= 9.006 + MOMENT CONVERGENCE VALUE = 777.1 CRITERION= 8.264 + DISP CONVERGENCE VALUE = 0.8389 CRITERION= 0.6052E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.8389 + FORCE CONVERGENCE VALUE = 3620. CRITERION= 9.008 + MOMENT CONVERGENCE VALUE = 267.5 CRITERION= 8.266 + DISP CONVERGENCE VALUE = 0.6188 CRITERION= 0.7166E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.6188 + FORCE CONVERGENCE VALUE = 1032. CRITERION= 9.010 + MOMENT CONVERGENCE VALUE = 89.59 CRITERION= 8.268 + DISP CONVERGENCE VALUE = 1.023 CRITERION= 0.9582E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -1.023 + FORCE CONVERGENCE VALUE = 3337. CRITERION= 9.011 + MOMENT CONVERGENCE VALUE = 313.5 CRITERION= 8.269 + DISP CONVERGENCE VALUE = 0.1755 CRITERION= 0.9586E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1755 + FORCE CONVERGENCE VALUE = 142.2 CRITERION= 9.011 + MOMENT CONVERGENCE VALUE = 44.23 CRITERION= 8.270 + DISP CONVERGENCE VALUE = 0.3050 CRITERION= 0.9623E-01 + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3050 + FORCE CONVERGENCE VALUE = 246.8 CRITERION= 9.012 + MOMENT CONVERGENCE VALUE = 18.13 CRITERION= 8.270 + DISP CONVERGENCE VALUE = 0.2704 CRITERION= 0.9628E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2704 + FORCE CONVERGENCE VALUE = 243.5 CRITERION= 9.012 + MOMENT CONVERGENCE VALUE = 17.49 CRITERION= 8.270 + DISP CONVERGENCE VALUE = 0.9261 CRITERION= 0.9628E-01 + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.9261 + FORCE CONVERGENCE VALUE = 2146. CRITERION= 10.59 + MOMENT CONVERGENCE VALUE = 238.1 CRITERION= 9.720 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 8 + *** LOAD STEP 1 SUBSTEP 10 NOT COMPLETED. CUM ITER = 26 + *** BEGIN BISECTION NUMBER 1 NEW TIME INCREMENT= 0.45000E-01 + + FORCE CONVERGENCE VALUE = 2995. CRITERION= 8.048 + MOMENT CONVERGENCE VALUE = 194.5 CRITERION= 7.386 + DISP CONVERGENCE VALUE = 0.3766 CRITERION= 0.3557E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3766 + FORCE CONVERGENCE VALUE = 496.4 CRITERION= 8.049 + MOMENT CONVERGENCE VALUE = 33.11 CRITERION= 7.386 + DISP CONVERGENCE VALUE = 0.1569 CRITERION= 0.3743E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1569 + FORCE CONVERGENCE VALUE = 105.3 CRITERION= 8.050 + MOMENT CONVERGENCE VALUE = 7.260 CRITERION= 7.387 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.6500E-01 CRITERION= 0.3929E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.6500E-01 + FORCE CONVERGENCE VALUE = 16.99 CRITERION= 8.050 + MOMENT CONVERGENCE VALUE = 1.221 CRITERION= 7.387 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1541E-01 CRITERION= 0.3939E-01 <<< CONVERGED + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1541E-01 + FORCE CONVERGENCE VALUE = 0.8279 CRITERION= 8.050 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.1052 CRITERION= 7.387 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 4 + *** LOAD STEP 1 SUBSTEP 10 COMPLETED. CUM ITER = 29 + *** TIME = 0.462813 TIME INC = 0.450000E-01 + *** AUTO STEP TIME: NEXT TIME INC = 0.45000E-01 UNCHANGED + + FORCE CONVERGENCE VALUE = 5962. CRITERION= 8.835 + MOMENT CONVERGENCE VALUE = 543.9 CRITERION= 8.107 + DISP CONVERGENCE VALUE = 0.6835 CRITERION= 0.5040E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.6835 + FORCE CONVERGENCE VALUE = 1134. CRITERION= 8.835 + MOMENT CONVERGENCE VALUE = 90.52 CRITERION= 8.108 + DISP CONVERGENCE VALUE = 0.5647 CRITERION= 0.6684E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.5647 + FORCE CONVERGENCE VALUE = 1111. CRITERION= 8.836 + MOMENT CONVERGENCE VALUE = 74.43 CRITERION= 8.109 + DISP CONVERGENCE VALUE = 0.1671 CRITERION= 0.7284E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1671 + FORCE CONVERGENCE VALUE = 105.0 CRITERION= 8.836 + MOMENT CONVERGENCE VALUE = 9.946 CRITERION= 8.109 + DISP CONVERGENCE VALUE = 0.7323E-01 CRITERION= 0.7417E-01 <<< CONVERGED + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.7323E-01 + FORCE CONVERGENCE VALUE = 22.34 CRITERION= 8.836 + MOMENT CONVERGENCE VALUE = 1.546 CRITERION= 8.109 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.4771E-02 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4771E-02 + FORCE CONVERGENCE VALUE = 0.1063 CRITERION= 8.836 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.1221 CRITERION= 8.109 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 5 + *** LOAD STEP 1 SUBSTEP 11 COMPLETED. CUM ITER = 34 + *** TIME = 0.507812 TIME INC = 0.450000E-01 + *** AUTO TIME STEP: NEXT TIME INC = 0.67500E-01 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 0.3334E+05 CRITERION= 10.02 + MOMENT CONVERGENCE VALUE = 7795. CRITERION= 9.195 + DISP CONVERGENCE VALUE = 1.683 CRITERION= 0.8513E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 1.683 + FORCE CONVERGENCE VALUE = 0.3672E+05 CRITERION= 10.02 + MOMENT CONVERGENCE VALUE = 0.1468E+05 CRITERION= 9.198 + DISP CONVERGENCE VALUE = 7.150 CRITERION= 0.2864 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 7.150 + FORCE CONVERGENCE VALUE = 0.1337E+06 CRITERION= 10.09 + MOMENT CONVERGENCE VALUE = 0.6255E+06 CRITERION= 9.261 + DISP CONVERGENCE VALUE = 380.7 CRITERION= 18.90 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -380.7 + FORCE CONVERGENCE VALUE = 0.4605E+07 CRITERION= 84.79 + MOMENT CONVERGENCE VALUE = 0.2265E+08 CRITERION= 77.81 + DISP CONVERGENCE VALUE = 0.1374E+05 CRITERION= 703.1 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1374E+05 + + *** ERROR *** CP = 0.000 TIME= 00:00:00 + Element 17426 has excessive thickness change. + + *** ERROR *** CP = 0.000 TIME= 00:00:00 + Element 2517 has excessive thickness change. + *** LOAD STEP 1 SUBSTEP 12 NOT COMPLETED. CUM ITER = 39 + *** BEGIN BISECTION NUMBER 1 NEW TIME INCREMENT= 0.23625E-01 + + FORCE CONVERGENCE VALUE = 7739. CRITERION= 9.250 + MOMENT CONVERGENCE VALUE = 1071. CRITERION= 8.489 + DISP CONVERGENCE VALUE = 0.3148 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3148 + FORCE CONVERGENCE VALUE = 521.2 CRITERION= 9.250 + MOMENT CONVERGENCE VALUE = 168.1 CRITERION= 8.489 + DISP CONVERGENCE VALUE = 3.185 CRITERION= 0.1758 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 3.185 + FORCE CONVERGENCE VALUE = 0.1925E+05 CRITERION= 9.252 + MOMENT CONVERGENCE VALUE = 6530. CRITERION= 8.490 + DISP CONVERGENCE VALUE = 2.477 CRITERION= 0.1758 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 2.477 + FORCE CONVERGENCE VALUE = 0.2903E+05 CRITERION= 9.255 + MOMENT CONVERGENCE VALUE = 0.3408E+05 CRITERION= 8.493 + DISP CONVERGENCE VALUE = 9.697 CRITERION= 0.5765 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 9.697 + FORCE CONVERGENCE VALUE = 0.5777E+06 CRITERION= 9.488 + MOMENT CONVERGENCE VALUE = 0.2332E+07 CRITERION= 8.707 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 5 + *** LOAD STEP 1 SUBSTEP 12 NOT COMPLETED. CUM ITER = 43 + *** BEGIN BISECTION NUMBER 2 NEW TIME INCREMENT= 0.10631E-01 + + FORCE CONVERGENCE VALUE = 2830. CRITERION= 9.023 + MOMENT CONVERGENCE VALUE = 316.6 CRITERION= 8.280 + DISP CONVERGENCE VALUE = 0.1987 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1987 + FORCE CONVERGENCE VALUE = 150.4 CRITERION= 9.023 + MOMENT CONVERGENCE VALUE = 40.22 CRITERION= 8.280 + DISP CONVERGENCE VALUE = 0.2897 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2897 + FORCE CONVERGENCE VALUE = 259.6 CRITERION= 9.023 + MOMENT CONVERGENCE VALUE = 18.92 CRITERION= 8.280 + DISP CONVERGENCE VALUE = 0.4809 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4809 + FORCE CONVERGENCE VALUE = 690.2 CRITERION= 9.023 + MOMENT CONVERGENCE VALUE = 46.30 CRITERION= 8.280 + DISP CONVERGENCE VALUE = 1.755 CRITERION= 0.1271 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 1.755 + FORCE CONVERGENCE VALUE = 6684. CRITERION= 9.024 + MOMENT CONVERGENCE VALUE = 973.2 CRITERION= 8.281 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 5 + *** LOAD STEP 1 SUBSTEP 12 NOT COMPLETED. CUM ITER = 47 + *** BEGIN BISECTION NUMBER 3 NEW TIME INCREMENT= 0.47841E-02 + + FORCE CONVERGENCE VALUE = 1140. CRITERION= 8.920 + MOMENT CONVERGENCE VALUE = 114.9 CRITERION= 8.186 + DISP CONVERGENCE VALUE = 0.1121 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1121 + FORCE CONVERGENCE VALUE = 42.68 CRITERION= 8.920 + MOMENT CONVERGENCE VALUE = 8.289 CRITERION= 8.186 + DISP CONVERGENCE VALUE = 0.7531E-01 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.7531E-01 + FORCE CONVERGENCE VALUE = 16.17 CRITERION= 8.920 + MOMENT CONVERGENCE VALUE = 1.451 CRITERION= 8.186 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1739E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1739E-01 + FORCE CONVERGENCE VALUE = 1.085 CRITERION= 8.920 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.2552 CRITERION= 8.186 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 3 + *** LOAD STEP 1 SUBSTEP 12 COMPLETED. CUM ITER = 49 + *** TIME = 0.512597 TIME INC = 0.478406E-02 + *** AUTO STEP TIME: NEXT TIME INC = 0.47841E-02 UNCHANGED + + FORCE CONVERGENCE VALUE = 437.0 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 32.47 CRITERION= 8.263 + DISP CONVERGENCE VALUE = 0.1258 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1258 + FORCE CONVERGENCE VALUE = 56.91 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 5.574 CRITERION= 8.263 <<< CONVERGED + DISP CONVERGENCE VALUE = 1.113 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -1.113 + FORCE CONVERGENCE VALUE = 4126. CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 575.1 CRITERION= 8.263 + DISP CONVERGENCE VALUE = 0.3482 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3482 + FORCE CONVERGENCE VALUE = 202.8 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 90.86 CRITERION= 8.262 + DISP CONVERGENCE VALUE = 0.3248 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.3248 + FORCE CONVERGENCE VALUE = 703.1 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 63.27 CRITERION= 8.262 + DISP CONVERGENCE VALUE = 0.1437 CRITERION= 0.7422E-01 + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1437 + FORCE CONVERGENCE VALUE = 67.13 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 12.22 CRITERION= 8.263 + DISP CONVERGENCE VALUE = 0.2515 CRITERION= 0.7422E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2515 + FORCE CONVERGENCE VALUE = 225.4 CRITERION= 9.004 + MOMENT CONVERGENCE VALUE = 17.31 CRITERION= 8.263 + DISP CONVERGENCE VALUE = 0.1216 CRITERION= 0.7422E-01 + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1216 + FORCE CONVERGENCE VALUE = 57.19 CRITERION= 10.58 + MOMENT CONVERGENCE VALUE = 5.638 CRITERION= 9.712 <<< CONVERGED + DISP CONVERGENCE VALUE = 1.048 CRITERION= 0.7422E-01 + EQUIL ITER 8 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 1.048 + FORCE CONVERGENCE VALUE = 4350. CRITERION= 10.80 + MOMENT CONVERGENCE VALUE = 481.8 CRITERION= 9.911 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 9 + *** LOAD STEP 1 SUBSTEP 13 NOT COMPLETED. CUM ITER = 58 + *** BEGIN BISECTION NUMBER 1 NEW TIME INCREMENT= 0.21528E-02 + + FORCE CONVERGENCE VALUE = 143.3 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 9.974 CRITERION= 8.220 + DISP CONVERGENCE VALUE = 0.4821E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4821E-01 + FORCE CONVERGENCE VALUE = 10.86 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 1.356 CRITERION= 8.220 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.7755E-01 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.7755E-01 + FORCE CONVERGENCE VALUE = 22.42 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 1.937 CRITERION= 8.221 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.5666E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.5666E-01 + FORCE CONVERGENCE VALUE = 13.12 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 1.281 CRITERION= 8.221 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1207 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1207 + FORCE CONVERGENCE VALUE = 55.45 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 4.396 CRITERION= 8.221 <<< CONVERGED + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 5 + *** LOAD STEP 1 SUBSTEP 13 NOT COMPLETED. CUM ITER = 62 + *** BEGIN BISECTION NUMBER 2 NEW TIME INCREMENT= 0.96877E-03 + + FORCE CONVERGENCE VALUE = 54.02 CRITERION= 8.937 + MOMENT CONVERGENCE VALUE = 3.686 CRITERION= 8.201 + DISP CONVERGENCE VALUE = 0.2413E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2413E-01 + FORCE CONVERGENCE VALUE = 2.383 CRITERION= 8.937 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.4496 CRITERION= 8.201 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 13 COMPLETED. CUM ITER = 62 + *** TIME = 0.513565 TIME INC = 0.968773E-03 + *** AUTO STEP TIME: NEXT TIME INC = 0.96877E-03 UNCHANGED + + FORCE CONVERGENCE VALUE = 39.63 CRITERION= 8.954 + MOMENT CONVERGENCE VALUE = 2.841 CRITERION= 8.217 + DISP CONVERGENCE VALUE = 0.3882E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3882E-01 + FORCE CONVERGENCE VALUE = 6.308 CRITERION= 8.954 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.7885 CRITERION= 8.217 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 14 COMPLETED. CUM ITER = 63 + *** TIME = 0.514534 TIME INC = 0.968773E-03 + *** AUTO TIME STEP: NEXT TIME INC = 0.14532E-02 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 177.7 CRITERION= 8.980 + MOMENT CONVERGENCE VALUE = 13.17 CRITERION= 8.240 + DISP CONVERGENCE VALUE = 0.3462 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3462 + FORCE CONVERGENCE VALUE = 348.9 CRITERION= 8.980 + MOMENT CONVERGENCE VALUE = 22.75 CRITERION= 8.241 + DISP CONVERGENCE VALUE = 1.482 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -1.482 + FORCE CONVERGENCE VALUE = 5235. CRITERION= 8.980 + MOMENT CONVERGENCE VALUE = 761.6 CRITERION= 8.240 + DISP CONVERGENCE VALUE = 0.3994 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3994 + FORCE CONVERGENCE VALUE = 250.6 CRITERION= 8.979 + MOMENT CONVERGENCE VALUE = 109.2 CRITERION= 8.240 + DISP CONVERGENCE VALUE = 0.2678 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2678 + FORCE CONVERGENCE VALUE = 374.0 CRITERION= 8.979 + MOMENT CONVERGENCE VALUE = 40.17 CRITERION= 8.240 + DISP CONVERGENCE VALUE = 0.1573 CRITERION= 0.7422E-01 + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1573 + FORCE CONVERGENCE VALUE = 85.54 CRITERION= 8.980 + MOMENT CONVERGENCE VALUE = 11.95 CRITERION= 8.240 + DISP CONVERGENCE VALUE = 0.1360 CRITERION= 0.7422E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1360 + FORCE CONVERGENCE VALUE = 86.90 CRITERION= 8.980 + MOMENT CONVERGENCE VALUE = 7.445 CRITERION= 8.240 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1102 CRITERION= 0.7422E-01 + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1102 + FORCE CONVERGENCE VALUE = 53.46 CRITERION= 10.55 + MOMENT CONVERGENCE VALUE = 4.531 CRITERION= 9.686 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2589 CRITERION= 0.7422E-01 + EQUIL ITER 8 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2589 + FORCE CONVERGENCE VALUE = 268.2 CRITERION= 10.77 + MOMENT CONVERGENCE VALUE = 19.45 CRITERION= 9.884 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 9 + *** LOAD STEP 1 SUBSTEP 15 NOT COMPLETED. CUM ITER = 72 + *** BEGIN BISECTION NUMBER 1 NEW TIME INCREMENT= 0.65392E-03 + + FORCE CONVERGENCE VALUE = 58.54 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 4.289 CRITERION= 8.228 + DISP CONVERGENCE VALUE = 0.1294 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1294 + FORCE CONVERGENCE VALUE = 61.77 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 4.735 CRITERION= 8.228 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2145 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2145 + FORCE CONVERGENCE VALUE = 143.2 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 10.70 CRITERION= 8.228 + DISP CONVERGENCE VALUE = 0.6552E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.6552E-01 + FORCE CONVERGENCE VALUE = 10.25 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 1.454 CRITERION= 8.228 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2108 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2108 + FORCE CONVERGENCE VALUE = 196.7 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 14.50 CRITERION= 8.228 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 5 + *** LOAD STEP 1 SUBSTEP 15 NOT COMPLETED. CUM ITER = 76 + *** BEGIN BISECTION NUMBER 2 NEW TIME INCREMENT= 0.29426E-03 + + FORCE CONVERGENCE VALUE = 24.66 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 1.900 CRITERION= 8.222 + DISP CONVERGENCE VALUE = 0.6161E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.6161E-01 + FORCE CONVERGENCE VALUE = 16.81 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 1.550 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.3000 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.3000 + FORCE CONVERGENCE VALUE = 345.4 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 28.45 CRITERION= 8.222 + DISP CONVERGENCE VALUE = 0.9271E-01 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.9271E-01 + FORCE CONVERGENCE VALUE = 21.13 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 3.953 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1182 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1182 + FORCE CONVERGENCE VALUE = 53.95 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 4.324 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.5180E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.5180E-01 + FORCE CONVERGENCE VALUE = 10.69 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 1.181 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.7971E-01 CRITERION= 0.7422E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.7971E-01 + FORCE CONVERGENCE VALUE = 27.32 CRITERION= 8.959 + MOMENT CONVERGENCE VALUE = 2.305 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2621 CRITERION= 0.7422E-01 + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2621 + FORCE CONVERGENCE VALUE = 255.6 CRITERION= 10.53 + MOMENT CONVERGENCE VALUE = 20.50 CRITERION= 9.664 + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 8 + *** LOAD STEP 1 SUBSTEP 15 NOT COMPLETED. CUM ITER = 83 + *** BEGIN BISECTION NUMBER 3 NEW TIME INCREMENT= 0.10000E-03 + + FORCE CONVERGENCE VALUE = 11.54 CRITERION= 8.956 + MOMENT CONVERGENCE VALUE = 1.060 CRITERION= 8.219 + DISP CONVERGENCE VALUE = 0.4012E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4012E-01 + FORCE CONVERGENCE VALUE = 6.714 CRITERION= 8.956 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.7801 CRITERION= 8.219 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 1 + *** LOAD STEP 1 SUBSTEP 15 COMPLETED. CUM ITER = 83 + *** TIME = 0.514634 TIME INC = 0.100000E-03 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000E-03 UNCHANGED + + FORCE CONVERGENCE VALUE = 28.39 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 2.158 CRITERION= 8.220 + DISP CONVERGENCE VALUE = 0.5154 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.5154 + FORCE CONVERGENCE VALUE = 996.2 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 93.89 CRITERION= 8.220 + DISP CONVERGENCE VALUE = 0.1513 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1513 + FORCE CONVERGENCE VALUE = 46.69 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 14.29 CRITERION= 8.220 + DISP CONVERGENCE VALUE = 0.1749 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1749 + FORCE CONVERGENCE VALUE = 129.2 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 10.61 CRITERION= 8.220 + DISP CONVERGENCE VALUE = 0.6899E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.6899E-01 + FORCE CONVERGENCE VALUE = 19.35 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 2.207 CRITERION= 8.220 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.8524E-01 CRITERION= 0.7422E-01 + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.8524E-01 + FORCE CONVERGENCE VALUE = 27.44 CRITERION= 8.958 + MOMENT CONVERGENCE VALUE = 2.327 CRITERION= 8.220 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.4444E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4444E-01 + FORCE CONVERGENCE VALUE = 8.756 CRITERION= 8.958 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.9666 CRITERION= 8.220 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 6 + *** LOAD STEP 1 SUBSTEP 16 COMPLETED. CUM ITER = 89 + *** TIME = 0.514734 TIME INC = 0.100000E-03 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000E-03 UNCHANGED + + FORCE CONVERGENCE VALUE = 10.90 CRITERION= 8.960 + MOMENT CONVERGENCE VALUE = 1.171 CRITERION= 8.222 + DISP CONVERGENCE VALUE = 0.1377 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1377 + FORCE CONVERGENCE VALUE = 82.42 CRITERION= 8.960 + MOMENT CONVERGENCE VALUE = 6.212 CRITERION= 8.222 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.2067 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2067 + FORCE CONVERGENCE VALUE = 135.0 CRITERION= 8.960 + MOMENT CONVERGENCE VALUE = 10.00 CRITERION= 8.222 + DISP CONVERGENCE VALUE = 0.4928E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.4928E-01 + FORCE CONVERGENCE VALUE = 5.373 CRITERION= 8.960 <<< CONVERGED + MOMENT CONVERGENCE VALUE = 0.8629 CRITERION= 8.222 <<< CONVERGED + >>> SOLUTION CONVERGED AFTER EQUILIBRIUM ITERATION 3 + *** LOAD STEP 1 SUBSTEP 17 COMPLETED. CUM ITER = 92 + *** TIME = 0.514834 TIME INC = 0.100000E-03 + *** AUTO TIME STEP: NEXT TIME INC = 0.15000E-03 INCREASED (FACTOR = 1.5000) + + FORCE CONVERGENCE VALUE = 13.64 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 2.192 CRITERION= 8.224 + DISP CONVERGENCE VALUE = 0.1057 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1057 + FORCE CONVERGENCE VALUE = 46.42 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 3.675 CRITERION= 8.224 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.9430 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.9430 + FORCE CONVERGENCE VALUE = 3204. CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 398.8 CRITERION= 8.224 + DISP CONVERGENCE VALUE = 0.2859 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.2859 + FORCE CONVERGENCE VALUE = 146.8 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 61.78 CRITERION= 8.224 + DISP CONVERGENCE VALUE = 0.2422 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2422 + FORCE CONVERGENCE VALUE = 455.6 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 40.41 CRITERION= 8.224 + DISP CONVERGENCE VALUE = 0.1148 CRITERION= 0.7422E-01 + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1148 + FORCE CONVERGENCE VALUE = 49.29 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 7.475 CRITERION= 8.224 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1648 CRITERION= 0.7422E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1648 + FORCE CONVERGENCE VALUE = 96.52 CRITERION= 8.962 + MOMENT CONVERGENCE VALUE = 7.504 CRITERION= 8.224 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.6973E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.6973E-01 + FORCE CONVERGENCE VALUE = 21.02 CRITERION= 10.53 + MOMENT CONVERGENCE VALUE = 2.113 CRITERION= 9.667 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.9208E-01 CRITERION= 0.7422E-01 + EQUIL ITER 8 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.9208E-01 + FORCE CONVERGENCE VALUE = 32.98 CRITERION= 10.75 + MOMENT CONVERGENCE VALUE = 2.723 CRITERION= 9.864 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1312 CRITERION= 0.7422E-01 + EQUIL ITER 9 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1312 + FORCE CONVERGENCE VALUE = 67.80 CRITERION= 10.97 + MOMENT CONVERGENCE VALUE = 5.182 CRITERION= 10.07 <<< CONVERGED + >>> SOLUTION PATTERNS SHOW DIVERGENCE AT ITERATION = 10 + *** LOAD STEP 1 SUBSTEP 18 NOT COMPLETED. CUM ITER = 102 + *** BEGIN BISECTION NUMBER 1 NEW TIME INCREMENT= 0.10000E-03 + + FORCE CONVERGENCE VALUE = 10.10 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 1.683 CRITERION= 8.223 + DISP CONVERGENCE VALUE = 0.1036 CRITERION= 0.7422E-01 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1036 + FORCE CONVERGENCE VALUE = 44.92 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 3.556 CRITERION= 8.224 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.3994 CRITERION= 0.7422E-01 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.3994 + FORCE CONVERGENCE VALUE = 577.0 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 49.52 CRITERION= 8.223 + DISP CONVERGENCE VALUE = 0.1151 CRITERION= 0.7422E-01 + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1151 + FORCE CONVERGENCE VALUE = 28.35 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 6.978 CRITERION= 8.223 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1348 CRITERION= 0.7422E-01 + EQUIL ITER 4 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1348 + FORCE CONVERGENCE VALUE = 74.52 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 6.026 CRITERION= 8.223 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.6109E-01 CRITERION= 0.7422E-01 <<< CONVERGED + EQUIL ITER 5 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.6109E-01 + FORCE CONVERGENCE VALUE = 14.38 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 1.547 CRITERION= 8.223 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.8651E-01 CRITERION= 0.7422E-01 + EQUIL ITER 6 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.8651E-01 + FORCE CONVERGENCE VALUE = 31.28 CRITERION= 8.961 + MOMENT CONVERGENCE VALUE = 2.604 CRITERION= 8.223 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.9241 CRITERION= 0.7422E-01 + EQUIL ITER 7 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.9241 + FORCE CONVERGENCE VALUE = 3187. CRITERION= 10.53 + MOMENT CONVERGENCE VALUE = 317.2 CRITERION= 9.666 + DISP CONVERGENCE VALUE = 0.3616 CRITERION= 0.7422E-01 + EQUIL ITER 8 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.3616 + FORCE CONVERGENCE VALUE = 279.6 CRITERION= 10.75 + MOMENT CONVERGENCE VALUE = 45.13 CRITERION= 9.864 + DISP CONVERGENCE VALUE = 1.388 CRITERION= 0.1293 + EQUIL ITER 9 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 1.388 + FORCE CONVERGENCE VALUE = 6388. CRITERION= 10.97 + MOMENT CONVERGENCE VALUE = 901.9 CRITERION= 10.07 + DISP CONVERGENCE VALUE = 0.2434 CRITERION= 0.1293 + EQUIL ITER 10 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2434 + FORCE CONVERGENCE VALUE = 397.3 CRITERION= 11.19 + MOMENT CONVERGENCE VALUE = 150.2 CRITERION= 10.27 + DISP CONVERGENCE VALUE = 0.8643 CRITERION= 0.1293 + EQUIL ITER 11 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.8643 + FORCE CONVERGENCE VALUE = 1849. CRITERION= 11.42 + MOMENT CONVERGENCE VALUE = 175.5 CRITERION= 10.48 + DISP CONVERGENCE VALUE = 0.1396 CRITERION= 0.1293 + EQUIL ITER 12 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1396 + FORCE CONVERGENCE VALUE = 84.71 CRITERION= 11.66 + MOMENT CONVERGENCE VALUE = 32.81 CRITERION= 10.70 + DISP CONVERGENCE VALUE = 0.2072 CRITERION= 0.1293 + EQUIL ITER 13 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.2072 + FORCE CONVERGENCE VALUE = 103.4 CRITERION= 11.89 + MOMENT CONVERGENCE VALUE = 8.223 CRITERION= 10.91 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.1151 CRITERION= 0.1293 <<< CONVERGED + EQUIL ITER 14 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.1151 + FORCE CONVERGENCE VALUE = 29.64 CRITERION= 12.14 + MOMENT CONVERGENCE VALUE = 2.837 CRITERION= 11.14 <<< CONVERGED + DISP CONVERGENCE VALUE = 0.7430E-01 CRITERION= 0.1293 <<< CONVERGED + EQUIL ITER 15 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -0.7430E-01 + FORCE CONVERGENCE VALUE = 12.61 CRITERION= 12.38 + MOMENT CONVERGENCE VALUE = 1.019 CRITERION= 11.36 <<< CONVERGED + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + Solution not converged at time 0.514934108 (load step 1 substep 18). + Run continued at user request. + *** LOAD STEP 1 SUBSTEP 18 COMPLETED. CUM ITER = 116 + *** TIME = 0.514934 TIME INC = 0.100000E-03 + *** MAX PLASTIC STRAIN STEP = 0.1223E-04 CRITERION = 0.1500 + *** AUTO STEP TIME: NEXT TIME INC = 0.10000E-03 UNCHANGED + + FORCE CONVERGENCE VALUE = 0.1381E+06 CRITERION= 8.966 + MOMENT CONVERGENCE VALUE = 0.2126E+07 CRITERION= 8.228 + DISP CONVERGENCE VALUE = 38.66 CRITERION= 1.929 + EQUIL ITER 1 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= -38.66 + FORCE CONVERGENCE VALUE = 0.1716E+07 CRITERION= 10.01 + MOMENT CONVERGENCE VALUE = 0.1078E+08 CRITERION= 9.188 + DISP CONVERGENCE VALUE = 4183. CRITERION= 209.2 + EQUIL ITER 2 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 4183. + FORCE CONVERGENCE VALUE = 0.1094E+08 CRITERION= 8790. + MOMENT CONVERGENCE VALUE = 0.6503E+08 CRITERION= 8067. + DISP CONVERGENCE VALUE = 0.1526E+06 CRITERION= 7739. + EQUIL ITER 3 COMPLETED. NEW TRIANG MATRIX. MAX DOF INC= 0.1934E+06 + + *** ERROR *** CP = 0.000 TIME= 00:00:00 + Element 19905 has excessive thickness change. + + *** ERROR *** CP = 0.000 TIME= 00:00:00 + Element 3389 has excessive thickness change. + + *** ERROR *** CP = 0.000 TIME= 00:00:00 + Element 0 (type = 1, SHELL281) (and maybe other elements) has become + highly distorted. Excessive distortion of elements is usually a + symptom indicating the need for corrective action elsewhere. Try + incrementing the load more slowly (increase the number of substeps or + decrease the time step size). You may need to improve your mesh to + obtain elements with better aspect ratios. Also consider the behavior + of materials, contact pairs, and/or constraint equations. Please rule + out other root causes of this failure before attempting rezoning or + nonlinear adaptive solutions. If this message appears in the first + iteration of first substep, be sure to perform element shape checking. + + *** WARNING *** CP = 0.000 TIME= 00:00:00 + The unconverged solution (identified as time 1 substep 999999) is + output for analysis debug purposes. Results should not be used for + any other purpose. + + + + + R E S T A R T I N F O R M A T I O N + + REASON FOR TERMINATION. . . . . . . . . .ERROR IN ELEMENT FORMULATION + FILES NEEDED FOR RESTARTING . . . . . . . buckling0.Rnnn + buckling.ldhi + buckling.rdb + TIME OF LAST SOLUTION . . . . . . . . . . 0.51493 + TIME AT START OF THE LOAD STEP . . . . 0.0000 + TIME AT END OF THE LOAD STEP . . . . . 1.0000 + + ALL CURRENT MAPDL DATA WRITTEN TO FILE NAME= + FOR POSSIBLE RESUME FROM THIS POINT + + + + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + End nonlinear static analysis on imperfect geometry + + + +Post-buckling analysis +---------------------- + +An unconverged solution of the nonlinear static analysis could mean that +buckling has occurred. In this example, the change in time (or load) +increment, and displacement value, occurs between substeps 10 and 11, +which corresponds to TIME = 0.51781 and TIME = 0.53806 and to a pressure +between 0.124 MPa and 0.129 MPa. It is therefore very likely that buckling +occurred at this time; to be sure, the analysis is continued. The goal is to +verify the assessment made at this stage by obtaining the load-displacement +behavior over a larger range. Because the post-buckling state is unstable, +special techniques are necessary to compensate - in this case, nonlinear +stabilization is used. + + +.. code-block:: python + + print('Begin post-buckling analysis') + + mapdl.slashsolu() # Restart analysis with stabilization + mapdl.antype("static", "restart", 1, 10) + mapdl.nsubst(100, 50000, 10) + mapdl.rescontrol("define", "last") + mapdl.stabilize("constant", "energy", 0.000145) # Use energy option + output = mapdl.solve() + mapdl.finish() + + print('End of post-buckling analysis run') + + + +Postprocess buckling analysis in POST1 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + + print('Begin POST1 postprocessing of post-buckling analysis') + mapdl.post1() + mapdl.set("last") + mapdl.post_processing.plot_nodal_displacement("NORM", smooth_shading=True) + mapdl.post_processing.plot_nodal_eqv_stress() + mapdl.finish() + print('End POST1 postprocessing of post-buckling analysis') + + +.. rst-class:: sphx-glr-horizontal + + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_005.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_005.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_006.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_006.png + :class: sphx-glr-multi-img + + + +Postprocess buckling analysis in POST26 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + + print('Begin POST26 postprocessing of post-buckling analysis') + mapdl.post26() + + + mapdl.numvar(100) # allow storage for 100 variables + mapdl.enersol(13, "sene") # store stiffness energy + mapdl.enersol(14, "sten") # store artificial stabilization energy + + # time history plot of stiffness and stabilization energies + mapdl.show("png") + mapdl.plvar(13, 14) + mapdl.show("close") + + # pressure versus axial shortening for some nodes under the upper ring + mapdl.nsol(2, 67319, "U", "Z", "UZ1") + mapdl.prod( + ir=3, ia=2, ib="", ic="", name="strain1", facta="", factb="", factc=-1 / 431.8 + ) + mapdl.prod(ir=12, ia=1, ib="", ic="", name="Load", facta="", factb="", factc=0.24) + mapdl.xvar(3) + mapdl.show("png") + mapdl.xrange(0.01) + mapdl.yrange(0.24) + mapdl.axlab("X", "Axial Shortening") + mapdl.axlab("Y", "Applied Pressure ") + mapdl.plvar(12) + mapdl.show("close") + mapdl.xvar(3) + mapdl.show("png") + mapdl.xrange(0.002) + mapdl.yrange(1) + mapdl.axlab("X", "Axial Shortening") + mapdl.axlab("Y", "Time") + mapdl.plvar(1) + mapdl.show("png") + mapdl.show("close") + + # pressure versus radial displacement for the node with max. deformation + mapdl.nsol(6, 65269, "U", "Y", "UY_1") + mapdl.prod(ir=7, ia=6, ib=6, ic="", name="UY2_1") + mapdl.nsol(8, 65269, "U", "X", "UX_1") + mapdl.prod(ir=9, ia=8, ib=8, ic="", name="UX2_1") + mapdl.add(10, 7, 9, "sum") + mapdl.sqrt(ir=11, ia=10, name="Urad") + mapdl.xvar(11) + mapdl.show("png") + mapdl.xrange(4) + mapdl.yrange(0.24) + mapdl.axlab("X", "Radial Displacement") + mapdl.axlab("Y", "Applied Pressure") + mapdl.plvar(12) + mapdl.show("png") + mapdl.show("close") + mapdl.finish() + + print('End POST26 postprocessing of post-buckling analysis') + + +.. rst-class:: sphx-glr-horizontal + + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_007.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_007.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_008.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_008.png + :class: sphx-glr-multi-img + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_009.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_009.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_010.png + :alt: 21 example technology showcase buckling + :srcset: /technology_showcase_examples/techdemo-21/images/sphx_glr_21-example-technology-showcase-buckling_010.png + :class: sphx-glr-multi-img + + + + + + + +Exit MAPDL +---------- + +Exit MAPDL instance. + + +.. code-block:: python + + + mapdl.exit() + print("Exited MAPDL") + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Exited MAPDL diff --git a/_sources/technology_showcase_examples/techdemo-25/ex_25-tecstent.rst.txt b/_sources/technology_showcase_examples/techdemo-25/ex_25-tecstent.rst.txt new file mode 100644 index 00000000..f48966b6 --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-25/ex_25-tecstent.rst.txt @@ -0,0 +1,538 @@ +.. _sphx_glr_ex_25-tecstent.rst: + +.. _tech_demo_25: + +Cardiovascular Stent Simulation +=============================== + +This example problem shows how to simulate stent-artery interaction during and after stent +placement in an occluded artery. +The analysis exposes advanced modeling techniques using PyMAPDL such as: +* Contact +* Element birth and death +* Mixed u-P formulation +* Nonlinear stabilization + +The following topics are available: + +* `25.1. Introduction`_ +* `25.2. Setting up the model`_ +* `25.3. Analysis`_ +* `25.4. Solution of the model`_ +* `25.5. Results`_ +* `25.6. Exit MAPDL`_ +* `25.7. Input files`_ + +This example is inspired from the model and analysis defined in Chapter 25 of the `Mechanical +APDL Technology Showcase Manual `_. + +25.1. Introduction +------------------ + + +25.1.1. Problem description +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A bare metal stent is an effective device for opening atherosclerotic arteries and +other blockages: + +.. figure:: images/gtecstent1.png + :align: center + :alt: Effect of Stent Placement in Increasing Blood FlowCourtesy of Lakeview Center + :figclass: align-center + + **Figure 25.1: Effect of Stent Placement in Increasing Blood Flow** + Courtesy of `LakeviewCenter ` + +The success of stenting depends largely on how the stent and the artery interact +mechanically. In both the stent-design process and in pre-clinical patient-specific +evaluations, computer simulation using finite element analysis (FEA) has become an +accepted tool for studying stent-artery interaction. + +A viable stent-artery finite element model must properly reflect the nonlinear nature +of the phenomenon, such as the biological tissue properties, large arterial wall +deformation, and the sliding contact between the stent and the artery wall. + + +25.1.2. Starting MAPDL as a service +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code:: ipython3 + + # starting MAPDL as a service and importing an external model + from ansys.mapdl.core import launch_mapdl + + # start MAPDL as a service + mapdl = launch_mapdl() + print(mapdl) + + + +25.2. Setting up the model +-------------------------- + +First, we define the material properties. + +.. code:: ipython3 + + # define 316L Stainless steel + mapdl.prep7() + mapdl.mptemp() + mapdl.mptemp(sloc="1", t1="0") + mapdl.mpdata(lab="EX", mat="1", c1="200e3") + mapdl.mpdata(lab="PRXY", mat="1", c1="0.3") + mapdl.mptemp() + mapdl.mptemp(sloc="1", t1="0") + mapdl.mpdata(lab="DENS", mat="1", c1="8000e-9") + + +Then, we can define the elements. + +.. code:: ipython3 + + # for straight line segments + mapdl.et(itype="1", ename="beam189") + mapdl.sectype(secid="1", type_="beam", subtype="csolid") + mapdl.secdata(val1=0.05) + + # for arcs + mapdl.et(itype="2", ename="beam189") + mapdl.sectype(secid="2", type_="beam", subtype="csolid") + mapdl.secdata(val1=0.05) + + +We define the 5-parameter Mooney-Rivlin hyperelastic artery material +model. + +.. code:: ipython3 + + c10 = 18.90e-3 + c01 = 2.75e-3 + c20 = 590.43e-3 + c11 = 857.2e-3 + nu1 = 0.49 + dd = 2 * (1 - 2 * nu1) / (c10 + c01) + + mapdl.tb(lab="hyper", mat="2", npts="5", tbopt="mooney") + mapdl.tbdata(stloc="1", c1="c10", c2="c01", c3="c20", c4="c11", c6="dd") + + +We define the linear elastic material model for stiff calcified plaque. + +.. code:: ipython3 + + mapdl.mp(lab="EX", mat="3", c0=".00219e3") + mapdl.mp(lab="NUXY", mat="3", c0="0.49") + + +We define the Solid185 element type to mesh both the artery and plaque. + +.. code:: ipython3 + + # for artery + mapdl.et(itype="9", ename="SOLID185") + mapdl.keyopt( + itype="9", knum="6", value="1") # Use mixed u-P formulation to avoid locking + mapdl.keyopt(itype="9", knum="2", value="3") # Use Simplified Enhanced Strain method + + # for plaque + mapdl.et(itype="16", ename="SOLID185") + mapdl.keyopt(itype="16", knum="2", value="0") # Use B-bar + + +We define the settings to model the stent, the artery and the plaque. + +We use force-distributed boundary constraints on 2 sides of artery wall to allow +for radial expansion of tissue without rigid body motion. + +Settings for MPC Surface-based, force-distributed contact on proximal plane +parallel to x-y plane + +.. code:: ipython3 + + mapdl.mat("2") + mapdl.r(nset="3") + mapdl.real(nset="3") + mapdl.et(itype="3", ename="170") + mapdl.et(itype="4", ename="174") + mapdl.keyopt(itype="4", knum="12", value="5") + mapdl.keyopt(itype="4", knum="4", value="1") + mapdl.keyopt(itype="4", knum="2", value="2") + mapdl.keyopt(itype="3", knum="2", value="1") + mapdl.keyopt(itype="3", knum="4", value="111111") + mapdl.type(itype="3") + + mapdl.mat("2") + mapdl.r(nset="4") + mapdl.real(nset="4") + mapdl.et(itype="5", ename="170") + mapdl.et(itype="6", ename="174") + mapdl.keyopt(itype="6", knum="12", value="5") + mapdl.keyopt(itype="6", knum="4", value="1") + mapdl.keyopt(itype="6", knum="2", value="2") + mapdl.keyopt(itype="5", knum="2", value="1") + mapdl.keyopt(itype="5", knum="4", value="111111") + mapdl.type(itype="5") + + +Settings for standard contact between stent and inner plaque wall contact +surface + +.. code:: ipython3 + + mapdl.mp(lab="MU", mat="1", c0="0") + mapdl.mat("1") + mapdl.mp(lab="EMIS", mat="1", c0="7.88860905221e-31") + mapdl.r(nset="6") + mapdl.real(nset="6") + mapdl.et(itype="10", ename="170") + mapdl.et(itype="11", ename="177") + mapdl.r(nset="6", r3="1.0", r4="1.0", r5="0") + mapdl.rmore(r9="1.0E20", r10="0.0", r11="1.0") + mapdl.rmore(r7="0.0", r8="0", r9="1.0", r10="0.05", r11="1.0", r12="0.5") + mapdl.rmore(r7="0", r8="1.0", r9="1.0", r10="0.0") + mapdl.keyopt(itype="11", knum="5", value="0") + mapdl.keyopt(itype="11", knum="7", value="1") + mapdl.keyopt(itype="11", knum="8", value="0") + mapdl.keyopt(itype="11", knum="9", value="0") + mapdl.keyopt(itype="11", knum="10", value="2") + mapdl.keyopt(itype="11", knum="11", value="0") + mapdl.keyopt(itype="11", knum="12", value="0") + mapdl.keyopt(itype="11", knum="2", value="3") + mapdl.keyopt(itype="10", knum="5", value="0") + + +Settings for MPC based, force-distributed constraint on proximal stent nodes + +.. code:: ipython3 + + mapdl.mat("1") + mapdl.r(nset="7") + mapdl.real(nset="7") + mapdl.et(itype="12", ename="170") + mapdl.et(itype="13", ename="175") + mapdl.keyopt(itype="13", knum="12", value="5") + mapdl.keyopt(itype="13", knum="4", value="1") + mapdl.keyopt(itype="13", knum="2", value="2") + mapdl.keyopt(itype="12", knum="2", value="1") + mapdl.keyopt(itype="12", knum="4", value="111111") + mapdl.type(itype="12") + + + +Settings for MPC based, force-distributed constraint on distal stent +nodes. + +.. code:: ipython3 + + mapdl.mat("1") + mapdl.r(nset="8") + mapdl.real(nset="8") + mapdl.et(itype="14", ename="170") + mapdl.et(itype="15", ename="175") + mapdl.keyopt(itype="15", knum="12", value="5") + mapdl.keyopt(itype="15", knum="4", value="1") + mapdl.keyopt(itype="15", knum="2", value="2") + mapdl.keyopt(itype="14", knum="2", value="1") + mapdl.keyopt(itype="14", knum="4", value="111111") + mapdl.type(itype="14") + +Once all the setups are ready, we read the geometry file. + +.. code:: ipython3 + + mapdl.cdread(option="db", fname="stent", ext="cdb") + mapdl.allsel(labt="all") + mapdl.finish() + + + +25.3. Analysis +-------------- + +25.3.1. Static Analysis +^^^^^^^^^^^^^^^^^^^^^^^ + +We, then, apply the static analysis. + +.. code:: ipython3 + + # enter solution processor and define analysis settings + mapdl.run("/solu") + mapdl.antype(antype="0") + mapdl.nlgeom(key="on") + + +25.3.2. Loads +^^^^^^^^^^^^^ + +We apply the Load Step 1: +Balloon angioplasty of the artery to expand it past the +radius of the stent - IGNORE STENT + +.. code:: ipython3 + + mapdl.nsubst(nsbstp="20", nsbmx="20") + mapdl.nropt(option1="full") + mapdl.cncheck(option="auto") + mapdl.esel(type_="s", item="type", vmin="11") + mapdl.cm(cname="contact2", entity="elem") + mapdl.ekill(elem="contact2") # Kill contact elements in stent-plaque contact + #pair so that the stent is ignored in the first loadstep + mapdl.nsel(type_="s", item="loc", comp="x", vmin="0", vmax="0.01e-3") + mapdl.nsel(type_="r", item="loc", comp="y", vmin="0", vmax="0.01e-3") + mapdl.d(node="all", lab="all") + mapdl.allsel() + + mapdl.sf(nlist="load", lab="pres", value="10e-2") # Apply 0.1 Pa/mm^2 pressure to inner plaque wall + mapdl.allsel() + mapdl.nldiag(label="cont", key="iter") + mapdl.solve() + mapdl.save() + + +We then apply the Load Step 2: Reactivate contact between stent and plaque. + +.. code:: ipython3 + + mapdl.ealive(elem="contact2") + mapdl.allsel() + + mapdl.nsubst(nsbstp="2", nsbmx="2") + mapdl.save() + mapdl.solve() + + +We apply the Load Step 3. + +.. code:: ipython3 + + mapdl.nsubst(nsbstp="1", nsbmx="1", nsbmn="1") + mapdl.solve() + + +We apply the Load Step 4: Apply blood pressure (13.3 kPa) load to +inner wall of plaque and allow the stent to act as a scaffold. + +.. code:: ipython3 + + mapdl.nsubst(nsbstp="300", nsbmx="3000", nsbmn="30") + mapdl.sf(nlist="load", lab="pres", value="13.3e-3") + mapdl.allsel() + + +Finally, we apply stabilization with energy option. + +.. code:: ipython3 + + mapdl.stabilize(key="const", method="energy", value="0.1") + + + +25.4. Solution of the model +--------------------------- + +.. code:: ipython3 + + mapdl.solve() + mapdl.save() + mapdl.finish() + + + +25.5. Results +------------- + +This section illustrates the use of PyDPF-Core to post-process the results. + +.. code:: ipython3 + + from ansys.dpf import core as dpf + from ansys.dpf.core import operators as ops + import pyvista + + +25.5.1. Mesh of the model +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code:: ipython3 + + # Loading the result file + model = dpf.Model(mapdl.result_file) + ds = dpf.DataSources(mapdl.result_file) + + mesh = model.metadata.meshed_region + mesh.plot() + + +.. jupyter-execute:: ../../common_jupyter_execute.py + :hide-code: + +.. jupyter-execute:: + :hide-code: + + file = "./source/technology_showcase_examples/techdemo-25/data/mesh.vtk" + mesh_file = pyvista.read(file) + pl = pyvista.Plotter() + pl.add_mesh(mesh_file, cmap='jet', show_scalar_bar=False, show_edges=True) + pl.add_text("Mesh of the model", color='w') + pl.show() + + +25.5.2. Computed displacements of the model +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code:: ipython3 + + # Collecting the computed displacement + u = model.results.displacement(time_scoping=[4]).eval() + + u[0].plot(deform_by = u[0]) + +.. jupyter-execute:: + :hide-code: + + file = "./source/technology_showcase_examples/techdemo-25/data/u.vtk" + u_file = pyvista.read(file) + u_file = u_file.warp_by_scalar('U') + pl = pyvista.Plotter(notebook=True) + pl.add_mesh(u_file, scalars = 'U', show_scalar_bar=True, scalar_bar_args={'title':'Displacements'}, cmap='jet') + pl.add_text("Displacements of the model", color='w') + pl.show() + + +25.5.3. Von Mises stress +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code:: ipython3 + + # Collecting the computed stress + s_op = model.results.stress(time_scoping=[3]) + s_op.inputs.requested_location.connect(dpf.locations.nodal) + s = s_op.eval() + + # Calculating Von Mises stress + s_VM = dpf.operators.invariant.von_mises_eqv_fc(fields_container=s) + s_VM_plot = s_VM.eval() + + s_VM_plot[0].plot(deform_by = u[0]) + +.. jupyter-execute:: + :hide-code: + + file = "./source/technology_showcase_examples/techdemo-25/data/s_VM.vtk" + s_VM_file = pyvista.read(file) + s_VM_file = s_VM_file.warp_by_scalar('S_VM') + pl = pyvista.Plotter(notebook=True) + pl.add_mesh(s_VM_file, scalars = "S_VM", show_scalar_bar=True, scalar_bar_args={'title':'Von Mises Stress'}, cmap='jet') + pl.add_text("Von Mises Stress", color='w') + pl.show() + + +25.5.4. Computed displacements of the stent +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +.. code:: ipython3 + + # Creating the mesh associated to the stent + esco = mesh.named_selection("STENT") + print(esco) + + # Transposing elemental location to nodal one + op = dpf.operators.scoping.transpose() + op.inputs.mesh_scoping.connect(esco) + op.inputs.meshed_region.connect(mesh) + op.inputs.inclusive.connect(1) + nsco = op.eval() + print(nsco) + + +.. code:: ipython3 + + # Collecting the computed displacements of the stent + u_stent = model.results.displacement(mesh_scoping=nsco, time_scoping=[4]) + u_stent = u_stent.outputs.fields_container() + + # Linking the stent mesh to the global one + op = dpf.operators.mesh.from_scoping() # operator instantiation + op.inputs.scoping.connect(nsco) + op.inputs.inclusive.connect(1) + op.inputs.mesh.connect(mesh) + mesh_sco = op.eval() + u_stent[0].meshed_region = mesh_sco + + # Plotting the meshes + mesh.plot(color="w", show_edges=True, text='Mesh of the model', ) + mesh_sco.plot(color="black", show_edges=True, text='Mesh of the stent') + +.. jupyter-execute:: + :hide-code: + + file = "./source/technology_showcase_examples/techdemo-25/data/mesh.vtk" + mesh_file = pyvista.read(file) + + file = "./source/technology_showcase_examples/techdemo-25/data/mesh_sco.vtk" + mesh_sco_file = pyvista.read(file) + + pl = pyvista.Plotter(shape=(1, 2)) + pl.subplot(0, 0) + pl.add_mesh(mesh_file, cmap="jet", show_scalar_bar=False, show_edges=True) + pl.add_text("Mesh of the model", color='w') + pl.subplot(0, 1) + pl.add_mesh(mesh_sco_file, color="black", show_scalar_bar=False, show_edges=True) + pl.add_text("Mesh of the stent", color='w') + pl.link_views() + pl.camera_position = 'iso' + pl.show() + + +.. code:: ipython3 + + u_stent[0].plot(deformed_by=u_stent[0]) + +.. jupyter-execute:: + :hide-code: + + file = "./source/technology_showcase_examples/techdemo-25/data/u_stent.vtk" + u_stent_file = pyvista.read(file) + u_stent_file.warp_by_scalar('U_STENT') + data = u_stent_file.get_array('U_STENT') + u_stent_mesh = mesh_sco_file + u_stent_mesh.point_data['U_STENT'] = data + u_stent_mesh = mesh_sco_file.point_data_to_cell_data() + u_stent_mesh.title = 'Displacements of the stent' + u_stent_mesh.plot(scalars='U_STENT', show_scalar_bar=True, scalar_bar_args={'title':'Displacements'}, cmap='jet', text='Displacements of the stent') + + +25.6. Exit MAPDL +---------------- + +.. code:: ipython3 + + mapdl.exit() + + +25.7. Input files +----------------- + +The following files were used in this problem: + +* **stent.dat** -- Input file for the cardiovascular stent + problem. +* **stent.cdb** -- The common database file containing the model + information for this problem (called by **stent.dat**). + ++-----------------------------------------------------------------------------------------------------------------------------------+ +| `Download the zipped td-25 file set for this problem `_ | ++-----------------------------------------------------------------------------------------------------------------------------------+ + +For more information, see `Obtaining the input files `_. + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ + diff --git a/_sources/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst.txt b/_sources/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst.txt new file mode 100644 index 00000000..725f05f1 --- /dev/null +++ b/_sources/technology_showcase_examples/techdemo-28/ex_28-tecfricstir.rst.txt @@ -0,0 +1,1736 @@ +.. _sphx_glr_ex_28-tecfricstir.py: + +.. _tech_demo_28: + +.. role:: red-text + +.. role:: blue-text + +.. role:: green-text + +.. role:: yellow-text + +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 +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 +during the FSW process. + +Because it is often difficult to find a full set of engineering data to +simulate the FSW process, the problem emphasizes the simulation rather than the +numerical results. A simplified version of the model created by Zhu and Chao +illustrates the FSW simulation method. + +The following features and capabilities are highlighted: + +* Direct Structural-thermal analysis using coupled-field solid elements +* Plastic heat generation in coupled-field elements +* Frictional heat generation using contact elements +* Surface-projection-based contact method +* Contact elements with bonding capability + +The following topics are available: + +* `28.1. Introduction`_ +* `28.2. Problem description`_ +* `28.3. Modeling`_ +* `28.4. Material properties`_ +* `28.5. Boundary conditions and loading`_ +* `28.6. Analysis and solution controls`_ +* `28.7. Results and discussion`_ +* `28.8. Exit MAPDL`_ +* `28.9. Recommendations`_ +* `28.10. References`_ +* `28.11. Input files`_ + +You can also perform this example analysis entirely in the Ansys Mechanical +Application. For more information, see Friction Stir Welding (FSW) Simulation +in the Workbench Technology Showcase: Example Problems. + +28.1. Introduction +------------------ + +Friction stir welding (FSW) is a solid-state welding technique that involves +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 +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 +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 +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. + +The calculated frictional heat generation and plastic heat generation show that +the friction between the tool shoulder and workpiece is responsible for +generating most of the heat. A bonding temperature is specified at the contact +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 +------------------------- + +**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]_. +Zhu and Chao presented nonlinear thermal and thermomechanical simulations using +the finite element analysis code `WELDSIM`. They initially formulated a +heat-transfer problem using a moving heat source, and later used the transient +temperature outputs from the thermal analysis to determine residual stresses in +the welded plates via a 3-D elastoplastic thermomechanical simulation. + +A direct coupled-field analysis is performed on a reduced-scale version of the +Zhu and Chao model [Zhu2004]_. Also, rather than using a moving heat source as +in the reference model, a rotating and moving tool is used for a more realistic +simulation. + +The tool pin is ignored. The heat generated at the pin represents approximately +two percent of the total heat and is therefore negligible. + +The simulation welds two 304L stainless steel plates (workpiece) with a +cylindrical shape tool, as shown in the following figure: + +.. jupyter-execute:: ../../common_jupyter_execute.py + :hide-code: + +.. jupyter-execute:: + :hide-code: + + from ansys.mapdl.core import examples + from ansys.mapdl.core.examples.downloads import download_vtk_rotor, download_tech_demo_data + + 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) + # ***** Problem parameters ******** + l = 76.2e-03 # Length of each plate,m + w = 31.75e-03 # Width of each plate,m + t = 3.18e-03 # Thickness of each plate,m + r1 = 7.62e-03 # Shoulder radius of tool,m + h = 15.24e-03 # Height of tool, m + l1 = r1 # Starting location of tool on weldline + l2 = l-l1 + tcc1 = 2e06 # Thermal contact conductance b/w plates,W/m^2'C + tcc2 = 10 # Thermal contact conductance b/w tool & + # workpiece,W/m^2'C + fwgt = 0.95 # weight factor for distribution of heat b/w tool + # & workpiece + fplw = 0.8 # Fraction of plastic work converted to heat + uz1 = t/4000 # Depth of penetration,m + nr1 = 3.141593*11 # No. of rotations in second load step + nr2 = 3.141593*45 # No. of rotations in third load step + uy1 = 60.96e-03 # Travelling distance along weld line + tsz = 0.01 # Time step size + # ========================================================== + # * Geometry + # ========================================================== + # * Node for pilot node + mapdl.n(1, 0, 0, h) + # * Workpiece geometry (two rectangular plates) + mapdl.block(0, w, -l1, l2, 0, -t) + mapdl.block(0, -w, -l1, l2, 0, -t) + # * Tool geometry + mapdl.cyl4(0, 0, r1, 0, r1, 90, h) + mapdl.cyl4(0, 0, r1, 90, r1, 180, h) + mapdl.cyl4(0, 0, r1, 180, r1, 270, h) + mapdl.cyl4(0, 0, r1, 270, r1, 360, h) + mapdl.vglue(3, 4, 5, 6); + +.. jupyter-execute:: + :hide-code: + + # Plotting geometry + p = pyvista.Plotter() + p.background_color='white' + mapdl.geometry.areas.plot() + p.show() + + +**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 +materials such as aluminium. With the development of tools made from +super-abrasive materials such as polycrystalline cubic boron nitride (PCBN), +FSW has become possible with high-temperature materials such as stainless +steel. A cylindrical PCBN tool is modeled in this case. + +The workpiece sides parallel to the weld line are constrained in all the +directions to simulate the clamping ends. The bottom side of the workpiece is +constrained in the perpendicular (z) direction to simulate support at the +bottom. Heat losses are considered on all the surfaces of the model. All +`28.5. Boundary conditions and loading`_ are symmetric across the weld +centerline. + +The simulation is performed in three load steps, each representing a respective +phase ( `28.5.3. Loading`_) of the FSW process. + +28.3. Modeling +-------------- + +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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Two rectangular shaped plates (similar to those used in the reference model) +are used as the workpiece. Dimensions have been reduced to decrease the +simulation time. + +The plate size is 3 x 1.25 x 0.125 in (76.2 x 31.75 x 3.18 mm). The tool +shoulder diameter is 0.6 in (15.24 mm). + +Plate thickness remains the same as that of the reference model, but the plate +length and width are reduced. The plate width is reduced because the regions +away from the weld line are not significantly affected by the welding process, +and this example focuses primarily on the heat generation and temperature rise +in the region nearest the weld line. + +The height of the tool is equal to the shoulder diameter. Both the workpiece +(steel plates) and the tool are modeled using coupled-field element +``SOLID226`` with the structural-thermal option (``KEYOPT(1)= 11``). + + +.. code:: python + + # sphinx_gallery_thumbnail_path = '_static/tse28_setup.png' + + import numpy as np + import pyvista + + from ansys.mapdl.core import launch_mapdl + mapdl = launch_mapdl() + mapdl.prep7() + + # ***** Problem parameters ******** + l = 76.2e-03 # Length of each plate,m + w = 31.75e-03 # Width of each plate,m + t = 3.18e-03 # Thickness of each plate,m + r1 = 7.62e-03 # Shoulder radius of tool,m + h = 15.24e-03 # Height of tool, m + l1 = r1 # Starting location of tool on weldline + l2 = l-l1 + tcc1 = 2e06 # Thermal contact conductance b/w plates,W/m^2'C + tcc2 = 10 # Thermal contact conductance b/w tool & + # workpiece,W/m^2'C + fwgt = 0.95 # weight factor for distribution of heat b/w tool + # & workpiece + fplw = 0.8 # Fraction of plastic work converted to heat + uz1 = t/4000 # Depth of penetration,m + nr1 = 3.141593*11 # No. of rotations in second load step + nr2 = 3.141593*45 # No. of rotations in third load step + uy1 = 60.96e-03 # Travelling distance along weld line + tsz = 0.01 # Time step size + + # ========================================================== + # * Geometry + # ========================================================== + # * Node for pilot node + mapdl.n(1, 0, 0, h) + # * Workpiece geometry (two rectangular plates) + mapdl.block(0, w, -l1, l2, 0, -t) + mapdl.block(0, -w, -l1, l2, 0, -t) + # * Tool geometry + mapdl.cyl4(0, 0, r1, 0, r1, 90, h) + mapdl.cyl4(0, 0, r1, 90, r1, 180, h) + mapdl.cyl4(0, 0, r1, 180, r1, 270, h) + mapdl.cyl4(0, 0, r1, 270, r1, 360, h) + mapdl.vglue(3, 4, 5, 6) + + +A hexahedral mesh with dropped midside nodes is used because the presence of +midside nodes (or quadratic interpolation functions) can lead to oscillations +in the thermal solution, leading to nonphysical temperature distribution. A +hexahedral mesh is used instead of a tetrahedral mesh to avoid mesh-orientation +dependency. For more accurate results, a finer mesh is used in the weld-line +region. The following figure shows the 3-D meshed model: + + +.. code:: python + + # ========================================================== + # * Meshing + # ========================================================== + mapdl.et(1, "SOLID226", 11) # Coupled-field solid element,KEYOPT(1) is + # set to 11 for a structural-thermal analysis + mapdl.allsel() + mapdl.lsel("s", "", "", 4, 5) + mapdl.lsel("a", "", "", 14, 19, 5) + mapdl.lesize("all", "", "", 22, 5) + mapdl.lsel("s", "", "", 16, 17) + mapdl.lsel("a", "", "", 2, 7, 5) + mapdl.lesize("all", "", "", 22, "1/5") + mapdl.lsel("s", "", "", 1) + mapdl.lsel("a", "", "", 3) + mapdl.lsel("a", "", "", 6) + mapdl.lsel("a", "", "", 8) + mapdl.lsel("a", "", "", 13) + mapdl.lsel("a", "", "", 15) + mapdl.lsel("a", "", "", 18) + mapdl.lsel("a", "", "", 20) + mapdl.lesize("all", "", "", 44) + mapdl.lsel("s", "", "", 9, "") + mapdl.lsel("a", "", "", 22) + mapdl.lesize("all", "", "", 2) + mapdl.allsel("all") + mapdl.mshmid(2) # midside nodes dropped + mapdl.vsweep(1) + mapdl.vsweep(2) + mapdl.vsel("u", "volume", "", 1, 2) + mapdl.mat(2) + mapdl.esize(0.0015) + mapdl.vsweep("all") + mapdl.allsel("all") + + mapdl.eplot(vtk=True, background='white') + + +.. jupyter-execute:: + :hide-code: + + # Plotting mesh + mapdl.allsel() + pl = pyvista.Plotter() + pl.background_color = "white" + pl.add_mesh(mapdl.mesh.grid, show_edges=True, color='gray') + pl.show() + + +**Figure 28.2: 3-D meshed model of workpiece and tool** + + +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 + + +28.3.2.1. Contact pair between the plates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +During the simulation, the surfaces to be joined come into contact. A standard +surface-to-surface contact pair using ``TARGE170`` and ``CONTA174``, as shown +in the following figure: + +.. figure:: images/gtecfricstir_fig3.png + :align: center + :alt: Contact pair between plates + :figclass: align-center + + **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 +contact method is well suited to highly nonlinear problems that include +geometrical, material, and contact nonlinearities. + +The problem simulates welding using the bonding capability of contact +elements. To achieve continuous bonding and simulate a perfect thermal contact +between the plates, a high thermal contact conductance (TCC) of 2 ⋅ 10E6 W/m2 +°C is specified. (A small TCC value yields an imperfect contact and a +temperature discontinuity across the interface.) The conductance is specified +as a real constant for ``CONTA174`` elements. + +The maximum temperature ranges from 70 to 90 percent of the melting temperature +of the workpiece material. Welding occurs after the temperature of the material +around the contacting surfaces exceeds the bonding temperature (approximately +70 percent of the workpiece melting temperature). In this case, 1000 °C is +considered to be the bonding temperature based on the reference results. The +bonding temperature is specified using the real constant ``TBND`` for +``CONTA174``. When the temperature at the contact surface for closed contact +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** + +.. 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.mat(1) + mapdl.asel("s", "", "", 5) + mapdl.nsla("", 1) + #mapdl.nplot() + mapdl.cm("tn.cnt", "node") # Creating component on weld side of plate1 + + mapdl.asel("s", "", "", 12) + mapdl.nsla("", 1) + #mapdl.nplot() + mapdl.cm("tn.tgt", "node") # Creating component on weld side of plate2 + + mapdl.allsel("all") + mapdl.type(6) + mapdl.r(6) + 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 + mapdl.real(6) + mapdl.cmsel("s", "tn.cnt") + mapdl.nplot(title='Example of Contact Nodes', background='white') + mapdl.esurf() + mapdl.type(7) + mapdl.real(6) + mapdl.cmsel("s", "tn.tgt") + mapdl.esurf() + mapdl.allsel("all") + + +28.3.2.2. Contact pair between tool and workpiece +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The tool plunges into the work piece, rotates, and moves along the weld line. +Because the frictional contact between the tool and workpiece is primarily +responsible for heat generation, a standard surface-to-surface contact pair is +defined between the tool and workpiece. The ``CONTA174`` element is used to +model the contact surface on the top surface of the workpiece, and the +``TARGE170`` element is used for the tool, as shown in this figure: + +.. jupyter-execute:: + :hide-code: + + mapdl.allsel("all") + + # Plotting geometry + p = pyvista.Plotter() + p.background_color='white' + for elem, color in zip((170, 174),('red', 'blue')): + mapdl.esel("s", "ename","", elem) + esurf = mapdl.mesh._grid.linear_copy().extract_surface().clean() + p.add_mesh(esurf, + show_edges=True, + show_scalar_bar=False, + style='surface', + color=color) + + p.show() + +**Figure 28.4: Contact pair between tool and workpiece.** +``CONTA174`` in :blue-text:`blue`, and ``TARGE170`` in :red-text:`red`. + + +Two real constants are specified to model friction-induced heat generation. +The fraction of frictional dissipated energy converted into heat is modeled +first; the ``FHTG`` real constant is set to 1 to convert all frictional +dissipated energy into heat. The factor for the distribution of heat between +contact and target surfaces is defined next; the ``FWGT`` real constant is set +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 +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 +defined (:meth:`Mapdl.tb("FRIC") ` with +:meth:`mapdl.tbtemp() ` and +:meth:`Mapdl.tbdata() `). + + +.. **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, 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 + # based + + # Bottom & lateral(all except top) surfaces of tool for target + mapdl.vsel("u", "volume", "", 1, 2) + mapdl.allsel("below", "volume") + mapdl.nsel("r", "loc", "z", 0, h) + mapdl.nsel("u", "loc", "z", h) + mapdl.type(4) + mapdl.r(5) + mapdl.tb("fric", 5, 6) # Definition of friction co efficient at + # different temp + mapdl.tbtemp(25) + mapdl.tbdata(1, 0.4) # friction co-efficient at temp 25 + mapdl.tbtemp(200) + mapdl.tbdata(1, 0.4) # friction co-efficient at temp 200 + mapdl.tbtemp(400) + mapdl.tbdata(1, 0.4) # friction co-efficient at temp 400 + mapdl.tbtemp(600) + mapdl.tbdata(1, 0.3) # friction co-efficient at temp 600 + mapdl.tbtemp(800) + mapdl.tbdata(1, 0.3) # friction co-efficient at temp 800 + mapdl.tbtemp(1000) + mapdl.tbdata(1, 0.2) # friction co-efficient at temp 1000 + mapdl.rmodif(5, 9, 500e6) # Max.friction stress + mapdl.rmodif(5, 14, tcc2) # Thermal contact conductance b/w tool and + # workpiece, 10 W/m^2'C + 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 + # the distribution of heat between the + # contact and target surfaces, 0.95 + mapdl.real(5) + mapdl.mat(5) + mapdl.esln() + mapdl.esurf() + mapdl.allsel("all") + + + +28.3.2.3. Rigid surface constraint +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The workpiece remains fixed in all stages of the simulation. The tool rotates +and moves along the weld line. A pilot node is created at the center of the top +surface of the tool in order to apply the rotation and translation on the tool. +The motion of the pilot node controls the motion of the entire tool. A rigid +surface constraint is defined between the pilot node (``TARGE170``) and the +nodes of the top surface of the tool (``CONTA174``). A multipoint constraint +(MPC) algorithm with contact surface behavior defined as bonded always is used +to constrain the contact nodes to the rigid body motion defined by the pilot +node. + +The following contact settings are used for the ``CONTA174`` elements: + +* To include MPC contact algorithm: ``KEYOPT(2) = 2`` +* For a rigid surface constraint: ``KEYOPT(4) = 2`` +* To set the behavior of contact surface as bonded (always): ``KEYOPT(12) = 5`` + + +.. jupyter-execute:: + :hide-code: + + ## figure 28.5 + mapdl.allsel("all") + mapdl.esel('s', 'mat', '', 2) + mapdl.nsle('s') + + pl = mapdl.eplot(plot_bc=True, + bc_glyph_size=0.002, + return_plotter=True, + show_axes=False, + theme=mytheme) + pl.background_color = 'white' + + for elem, color in zip((170, 174), ('red', 'blue')): + + mapdl.esel('s', 'mat', '', 2) + mapdl.esel("r", "ename", "", elem) + esurf = mapdl.mesh._grid.linear_copy().extract_surface().clean() + if mapdl.mesh.n_elem != 1: + pl.add_mesh(esurf, show_edges=True, show_scalar_bar=False, + style='surface', color=color) + pl.show() + +**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`).** + + +.. code:: python + + # * Define Rigid Surface Constraint on tool top surface + mapdl.et(2, "TARGE170") + mapdl.keyopt(2, 2, 1) # User defined boundary condition on rigid + # target nodes + + mapdl.et(3, "CONTA174") + mapdl.keyopt(3, 1, 1) # To include Temp DOF + mapdl.keyopt(3, 2, 2) # To include MPC contact algorithm + mapdl.keyopt(3, 4, 2) # For a rigid surface constraint + mapdl.keyopt(3, 12, 5) # To set the behavior of contact surface as a + # bonded (always) + + mapdl.vsel("u", "volume", "", 1, 2) # Selecting Tool volume + mapdl.allsel("below", "volume") + mapdl.nsel("r", "loc", "z", h) # Selecting nodes on the tool top surface + mapdl.type(3) + mapdl.r(3) + mapdl.real(3) + mapdl.esln() + mapdl.esurf() # Create contact elements + mapdl.allsel("all") + + # * Define pilot node at the top of the tool + mapdl.nsel("s", "node", "", 1) + mapdl.tshap("pilo") + mapdl.type(2) + mapdl.real(3) + mapdl.e(1) # Create target element on pilot node + mapdl.allsel() + + # Top surfaces of plates nodes for contact + mapdl.vsel("s", "volume", "", 1, 2) + mapdl.allsel("below", "volume") + mapdl.nsel("r", "loc", "z", 0) + mapdl.type(5) + mapdl.real(5) + mapdl.esln() + mapdl.esurf() + mapdl.allsel("all") + + +28.4. Material properties +------------------------- + +Accurate temperature calculation is critical to the FSW process because the +stresses and strains developed in the weld are temperature-dependent. Thermal +properties of the 304L steel plates such as thermal conductivity, specific +heat, and density are temperature-dependent. Mechanical properties of the +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 +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. + +The fraction of the plastic work dissipated as heat during FSW is about 80 +percent. Therefore, the fraction of plastic work converted to heat +(Taylor-Quinney coefficient) is set to 0.8 (:meth:`Mapdl.mp("QRATE") +`) for the calculation of plastic heat generation in +the workpiece material. + +To weld a high-temperature material such as 304L stainless steel, a tool +composed of hard material is required. Tools made from super-abrasive materials +such as PCBN are suitable for such processes, and so a cylindrical PCBN tool is +used here. The material properties of the PCBN tool are obtained from the +references: [Ozel2008]_ and [Mishra2007]_. + + +The following table shows the material properties of the PCBN tool: + +**Table 28.2: Material properties of the PCBN tool** + ++----------------------+-------------+ +| Property | Value | ++======================+=============+ +| Young modulus | 680 GPa | ++----------------------+-------------+ +| Poisson's ratio | 0.22 | ++----------------------+-------------+ +| Thermal conductivity | 100 W/m °C | ++----------------------+-------------+ +| Specific heat | 750 J/Kg °C | ++----------------------+-------------+ +| Density | 4280 Kg/m3 | ++----------------------+-------------+ + +The following code setup the material properties: + + +.. code:: python + + # ========================================================== + # * Material properties + # ========================================================== + # * Material properties for 304l stainless steel Plates + mapdl.mp("ex", 1, 193e9) # Elastic modulus (N/m^2) + mapdl.mp("nuxy", 1, 0.3) # Poisson's ratio + mapdl.mp("alpx", 1, 1.875e-5) # Coefficient of thermal expansion, µm/m'c + # Fraction of plastic work converted to heat, 80% + mapdl.mp("qrate", 1, fplw) + + # *BISO material model + EX = 193e9 + ET = 2.8e9 + EP = EX*ET/(EX-ET) + mapdl.tb("plas", 1, 1, "", "biso") # Bilinear isotropic material + mapdl.tbdata(1, 290e6, EP) # Yield stress & plastic tangent modulus + mapdl.mptemp(1, 0, 200, 400, 600, 800, 1000) + mapdl.mpdata("kxx", 1, 1, 16, 19, 21, 24, 29, 30) # therm cond.(W/m'C) + mapdl.mpdata("c", 1, 1, 500, 540, 560, 590, 600, 610) # spec heat(J/kg'C) + mapdl.mpdata("dens", 1, 1, 7894, 7744, 7631, 7518, 7406, 7406) # kg/m^3 + + # * Material properties for PCBN tool + mapdl.mp("ex", 2, 680e9) # Elastic modulus (N/m^2) + mapdl.mp("nuxy", 2, 0.22) # Poisson's ratio + mapdl.mp("kxx", 2, 100) # Thermal conductivity(W/m'C) + mapdl.mp("c", 2, 750) # Specific heat(J/kg'C) + mapdl.mp("dens", 2, 4280) # Density,kg/m^3 + + + +28.5. Boundary conditions and loading +------------------------------------- + +This section describes the thermal and mechanical boundary conditions imposed +on the FSW model: + +* `28.5.1. Thermal Boundary conditions`_ +* `28.5.2. Mechanical Boundary conditions`_ +* `28.5.3. Loading`_ + +28.5.1. Thermal boundary conditions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The frictional and plastic heat generated during the FSW process propagates +rapidly into remote regions of the plates. On the top and side surfaces of the +workpiece, convection and radiation account for heat loss to the +ambient. Conduction losses also occur from the bottom surface of the workpiece +to the backing plate. + + +.. jupyter-execute:: + :hide-code: + + pl = pyvista.Plotter() + + mapdl.allsel() + mapdl.asel('u', 'loc', 'z', -t) + + mapdl.geometry.areas.plot(show_edges=False, show_scalar_bar=False, + style='surface', color='red') + pl.show() + + mapdl.asel('s', 'loc', 'z', -t) + + mapdl.geometry.areas.plot(show_edges=False, show_scalar_bar=False, + style='surface', color='yellow') + pl.show() + + +**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 +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. + +.. **Example 28.3: Defining the thermal boundary conditions** + +.. code:: python + + # Initial boundary conditions. + mapdl.tref(25) # Reference temperature 25'C + mapdl.allsel() + mapdl.nsel("all") + mapdl.ic("all", "temp", 25) # Initial condition at nodes,temp 25'C + + + # Thermal boundary conditions + # Convection heat loss from the workpiece surfaces + mapdl.vsel("s", "volume", "", 1, 2) # Selecting the workpiece + mapdl.allsel("below", "volume") + mapdl.nsel("r", "loc", "z", 0) + mapdl.nsel("a", "loc", "x", -w) + mapdl.nsel("a", "loc", "x", w) + mapdl.nsel("a", "loc", "y", -l1) + mapdl.nsel("a", "loc", "y", l2) + mapdl.sf("all", "conv", 30, 25) + + # Convection (high)heat loss from the workpiece bottom + mapdl.nsel("s", "loc", "z", -t) + mapdl.sf("all", "conv", 300, 25) + mapdl.allsel("all") + + # Convection heat loss from the tool surfaces + mapdl.vsel("u", "volume", "", 1, 2) # Selecting the tool + mapdl.allsel("below", "volume") + mapdl.csys(1) + mapdl.nsel("r", "loc", "x", r1) + mapdl.nsel("a", "loc", "z", h) + mapdl.sf("all", "conv", 30, 25) + mapdl.allsel("all") + + # Constraining all DOFs at pilot node except the Temp DOF + mapdl.d(1, "all") + mapdl.ddele(1, "temp") + mapdl.allsel("all") + + + +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 +the plates, all bottom nodes of the workpiece are constrained in the +perpendicular direction (z direction). + + +.. jupyter-execute:: + :hide-code: + + mapdl.allsel("all") + + # Plotting BC + pl = mapdl.eplot( + plot_bc=True, + return_plotter=True, + bc_glyph_size=0.002, + theme=mytheme, + show_axes=False) + pl.show() + +**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`. + + +.. code:: python + + # Mechanical Boundary conditions + # 20% ends of the each plate is constraint + mapdl.nsel("s", "loc", "x", -0.8*w, -w) + mapdl.nsel("a", "loc", "x", 0.8*w, w) + mapdl.d("all", "uz", 0) # Displacement constraint in x-direction + mapdl.d("all", "uy", 0) # Displacement constraint in y-direction + mapdl.d("all", "ux", 0) # Displacement constraint in z-direction + mapdl.allsel("all") + + # Bottom of workpiece is constraint in z-direction + mapdl.nsel("s", "loc", "z", -t) + mapdl.d("all", "uz") # Displacement constraint in z-direction + mapdl.allsel("all") + + + +28.5.3. Loading +^^^^^^^^^^^^^^^ + +The FSW process consists of three primary phases: + +1. **Plunge** -- The tool plunges slowly into the workpiece + +2. **Dwell** -- Friction between the rotating tool and workpiece generates heat + at the initial tool position until the workpiece temperature reaches the + value required for the welding. +3. **Traverse (or Traveling)** -- The rotating tool moves along the weld line. + +During the traverse phase, the temperature at the weld line region rises, but +the maximum temperature values do not surpass the melting temperature of the +workpiece material. As the temperature drops, a solid continuous joint appears +between the two plates. + +For illustrative purposes, each phase of the FSW process is considered a separate +load step. A rigid surface constraint is already defined for applying loading on the +tool. + +The following table shows the details for each load step. + +**Table 28.3: Load steps** + ++-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ +| Load step | Time period (sec)| Loadings on pilot node | Boundary Condition | ++===========+==================+============================================================================+=======================================+ +| 1 | 1 | Displacement boundary condition | ``UZ`` = -7.95E-07 m | ++-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ +| 2 | 5.5 | Rotational boundary condition | ``ROTZ`` = 60 RPM | ++-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ +| 3 | 22.5 | Displacement and rotational boundary conditions together on the pilot node | ``ROTZ`` = 60 RPM ``UY`` = 60.96E-3 m | ++-----------+------------------+----------------------------------------------------------------------------+---------------------------------------+ + + +The tool plunges into the workpiece at a very shallow depth, then rotates to +generate heat. The depth and rotating speeds are the critical parameters for +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 +------------------------------------ + +A nonlinear transient analysis is performed in three load steps using +structural-thermal options of ``SOLID226`` and +``CONTA174``. + +FSW simulation includes factors such as nonlinearity, contact, friction, large +plastic deformation, structural-thermal coupling, and different loadings at +each load step. The solution settings applied consider all of these factors. + +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** + ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Solution setting | Description of setting and comments | ++==================================================================================+==================================================================================================================================================================================================================================================================================================================================================================+ +| :meth:`Mapdl.antype(4) ` | Transient analysis. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.lnsrch("ON") ` | For contact problems,this option is useful for enhancing convergence. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.cutcontrol("PLSLIMIT", 0.15) ` | Controls the time-step cutback during a nonlinear solution and specifies the maximum equivalent plastic strain allowed within a time-step. If the calculated value exceeds the specified value, the program performs a cutback (bisection). ``PLSLIMIT`` is set at 15 percent (from the default five percent) because solution-control support is not available. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.nlgeom("ON") ` | Includes large-deflection effects or large strain effects, according to the element type. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.nropt("UNSYM") ` | Recommended for contact elements with high friction coefficients. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.timint("OFF", "STRUC") ` | To speed up convergence in a coupled-field transient analysis, the structural dynamic effects are turned off. These structural effects are not important in the modeling of heat generation due to friction; however,the thermal dynamic effects are considered here. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :meth:`Mapdl.kbc(0) ` | The loads applied to intermediate substeps within the load step are ramped because the structural dynamic effects are set to off. | ++----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +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 +unconverged solution. + +The time step values are determined based on mesh or element size. For +stability, no time-step limitation exists for the implicit integration +algorithm. Because this problem is inherently nonlinear and an accurate +solution is necessary, a disturbance must not propagate to more than one +element in a time step; therefore, an upper limit on the time step size is +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** + +.. code:: python + + mapdl.solu() + mapdl.antype(4) # Transient analysis + mapdl.lnsrch('on') + mapdl.cutcontrol('plslimit', 0.15) + mapdl.kbc(0) # Ramped loading within a load step + mapdl.nlgeom("on") # Turn on large deformation effects + mapdl.timint("off", "struc") # Structural dynamic effects are turned off. + mapdl.nropt('unsym') + + ## Solving + # Load step1 + mapdl.time(1) + mapdl.nsubst(10, 1000, 10) + mapdl.d(1, "uz", -uz1) # Tool plunges into the workpiece + mapdl.outres("all", "all") + mapdl.allsel() + mapdl.solve() + mapdl.save() + + # Load step2 + mapdl.time(6.5) + mapdl.d(1, "rotz", nr1) # Rotation of tool, 60rpm + mapdl.deltim(tsz, 0.001, 0.2) + mapdl.outres("all", 10) + mapdl.allsel() + mapdl.solve() + mapdl.save() + + # Load step3 + mapdl.time(29) + mapdl.d(1, "rotz", nr2) # Rotation of tool,60rpm + mapdl.d(1, "uy", uy1) # Displacement of tool along weldline + mapdl.deltim(tsz, 0.001, 0.2) + mapdl.outres("all", 10) + mapdl.solve() + mapdl.finish() + mapdl.save() + + + +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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is important to observe the change in various quantities around the weld +line during the FSW process. The following figure shows the deflection of the +workpiece due to plunging of the tool in the first load step: + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.9.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + + +**Figure 28.9: Deflection at workpiece after load step 1** + + +The deflection causes high stresses to develop on the workpiece beneath the +tool, as shown in this figure: + + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.10.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + +**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: + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.11.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + + +**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 +frictional stresses from load step 1 to load step 2: + + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.12.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + + +**Figure 28.12: Frictional stress after load step 1** + + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.13.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + + +**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 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following two figures shows the temperature rise due to heat generation in the +second and third load steps: + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.14.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + +**Figure 28.14: Temperature after load step 2** + + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.15.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.show() + +**Figure 28.15: Temperature after load step 3** + + +The maximum temperature on the workpiece occurs beneath the tool during the +last two load steps. Heat generation is due to the mechanical loads. No +external heat sources are used. As the temperature increases, the material +softens and the coefficient of friction decreases. A temperature-dependent +coefficient of friction (0.4 to 0.2) helps to prevent the maximum temperature +from exceeding the material melting point. + +The observed temperature rise in the model shows that heat generation during +the second and third load steps is due to friction between the tool shoulder +and workpiece, as well as plastic deformation of the workpiece material. + +The melting temperature of 304L stainless steel is 1450 °C. As shown in the +following figure, the maximum temperature range at the weld line region on the +workpiece beneath the tool is well below the melting temperature of the +workpiece material during the second and third load steps, but above 70 percent +of the melting temperature: + +.. jupyter-execute:: + :hide-code: + + columns_names = ['time', 'max temp'] + values = np.loadtxt(download_tech_demo_data("td-28/supporting_files","Figure_28.16.txt")) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['max temp'], y=df['time'], name='Maximum Temperature', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=True + ) + ] + ) + + fig.update_layout( + template='simple_white', + xaxis_title='Time (Sec)', + yaxis_title='Temperature (C)', + #title='Effect of friction coefficient on Mode coupling', + title_x=0.5, + #legend_title='Modes', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + + +**Figure 28.16: Maximum temperature (on workpiece beneath the tool) variation with time** + + +The two plates can be welded together within this temperature range. + +The following figure shows the temperature distributions on the top surface of +the workpiece along the transverse distance (perpendicular to the weld line): + + +.. jupyter-execute:: + :hide-code: + + columns_names = ['x', 'loc1', 'loc2', 'loc3'] + values = np.loadtxt(download_tech_demo_data("td-28/supporting_files","Figure_28.17.txt")) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['x'], y=df['loc1'], name='Location 1 - 0.016 m', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=True + ), + go.Scatter(x=df['x'], y=df['loc2'], name='Location 2 - 0.027 m', + mode='markers+lines', + marker=dict(color='red', size=10), + line=dict(color='red', width=3), + showlegend=True + ), + go.Scatter(x=df['x'], y=df['loc3'], name='Location 3 - 0.040 m', + mode='markers+lines', + marker=dict(color='green', size=10), + line=dict(color='green', width=3), + showlegend=True + ), + ] + ) + + fig.update_layout( + template='simple_white', + xaxis_title='Transverse distance (m)', + yaxis_title='Temperature (C)', + #title='Temperature Distribution on the Top Surface of Workpiece at Various Locations', + title_x=0.5, + #legend_title='Locations', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + +**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 +temperature occurs at those locations: + +.. figure:: images/gtecfricstir_fig17.png + :align: center + :alt: Various locations on the workpiece + :figclass: align-center + + **Figure 28.18: Various locations on the workpiece** + + +**Table 28.5: Locations on weld line** + ++------------------+-------------------------------------------+---------------------------------------+ +| Location Number | Distance on the weld line in y direction | Time when maximum temperature occurs | ++==================+===========================================+=======================================+ +| 1 | 0.016 m | 15.25 Sec | ++------------------+-------------------------------------------+---------------------------------------+ +| 2 | 0.027 m | 19.2 Sec | ++------------------+-------------------------------------------+---------------------------------------+ +| 3 | 0.040 m | 24 Sec | ++------------------+-------------------------------------------+---------------------------------------+ + + +The following figure shows the temperature distribution in the thickness direction +at location 1: + +.. jupyter-execute:: + :hide-code: + + rotor1 = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.19.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(rotor1, scalars="values", cmap='jet', show_edges=True) + pl.camera.position=(0,0.15,0) + pl.show() + +**Figure 28.19: Temperature distribution in thickness direction at location 1** + + +As expected, the highest temperature caused by heat generation appears around +the weld line region. By comparing the above temperature results with the +reference results, it can be determined that the temperatures obtained at the +weld line are well below the melting temperature of the workpiece material, but +still sufficient for friction stir welding. + +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 | ++==================+============================+ +| 1 | 0.018 m | ++------------------+----------------------------+ +| 2 | 0.023 m | ++------------------+----------------------------+ +| 3 | 0.027 m | ++------------------+----------------------------+ +| 4 | 0.032 m | ++------------------+----------------------------+ +| 5 | 0.035 m | ++------------------+----------------------------+ +| 6 | 0.039 m | ++------------------+----------------------------+ + + +.. jupyter-execute:: + :hide-code: + + columns_names = ['time', 'loc1', 'loc2', 'loc3', 'loc4', 'loc5', 'loc6'] + values = np.loadtxt(download_tech_demo_data("td-28/supporting_files","Figure_28.20.txt")) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['time'], y=df['loc1'], name='Location 1 (0.018 m)', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=True + ), + go.Scatter(x=df['time'], y=df['loc2'], name='Location 2 (0.023 m)', + mode='markers+lines', + marker=dict(color='red', size=10), + line=dict(color='red', width=3), + showlegend=True + ), + go.Scatter(x=df['time'], y=df['loc3'], name='Location 3 (0.027 m)', + mode='markers+lines', + marker=dict(color='green', size=10), + line=dict(color='green', width=3), + showlegend=True + ), + go.Scatter(x=df['time'], y=df['loc4'], name='Location 4 (0.032 m)', + mode='markers+lines', + marker=dict(color='purple', size=10), + line=dict(color='purple', width=3), + showlegend=True + ), + go.Scatter(x=df['time'], y=df['loc5'], name='Location 5 (0.035 m)', + mode='markers+lines', + marker=dict(color='orange', size=10), + line=dict(color='orange', width=3), + showlegend=True + ), + go.Scatter(x=df['time'], y=df['loc6'], name='Location 6 (0.039 m)', + mode='markers+lines', + marker=dict(color='pink', size=10), + line=dict(color='pink', width=3), + showlegend=True + ), + ] + ) + + fig.update_layout( + template='simple_white', + xaxis_title='Time (Sec)', + yaxis_title='Temperature (C)', + title='Temperature Variation with Time on Various Joint Locations', + title_x=0.5, + legend_title='Locations', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + + +**Figure 28.20: Temperature variation with time on various joint locations** + + +28.7.3. Welding results +^^^^^^^^^^^^^^^^^^^^^^^ + +A bonding temperature of 1000 °C is already defined for the welding simulation +at the interface of the plates. The contact status at this interface after the last +load step is shown in the following figure: + + +.. jupyter-execute:: + :hide-code: + + mesh = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.21.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(mesh, scalars="values", cmap='jet', show_edges=True) + pl.camera.position=(0.15,0.0,0) + pl.show() + + +**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. + + +The sticking portion of the interface shows the bonding or welding region of +the plates. If the bonding temperature was assumed to be 900 °C, then the +welding region would increase, as shown in this figure: + + +.. jupyter-execute:: + :hide-code: + + mesh = pyvista.read(download_tech_demo_data("td-28/supporting_files",'Figure_28.22.vtk')) + pl = pyvista.Plotter() + pl.add_mesh(mesh, scalars="values", cmap='jet', show_edges=True) + pl.camera.position=(0.15,0.0,0) + pl.show() + +**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 +^^^^^^^^^^^^^^^^^^^^^^^ + +Friction and plastic deformation generate heat. A calculation of frictional and +plastic heat generation is performed. The generation of heat due to friction +begins in the second load step. + +The ``CONTA174`` element's ``FDDIS`` (``SMISC item``) output option is used to +calculate frictional heat generation on the workpiece. This option gives the +frictional energy dissipation per unit area for an element. After multiplying +this value with the corresponding element area, the friction heat-generation +rate for an element is calculated. By summing the values from each ``CONTA174`` +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 +following figure shows the plot of total frictional heat generation rate on the +workpiece with time: + +.. jupyter-execute:: + :hide-code: + + columns_names = ['time', 'fricheat'] + values = np.loadtxt(download_tech_demo_data("td-28/supporting_files","Figure_28.23.txt")) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['time'], y=df['fricheat'], #name='Location 1 (0.018 m)', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=False + ), + ] + ) + + fig.update_layout( + showlegend=True, + template='simple_white', + xaxis_title='Time (Sec)', + yaxis_title='Total frictional heat generation rate (W)', + title='Total Frictional Heat Rate Variation with Time', + title_x=0.5, + #legend_title='Locations', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + +**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). + +The element contact area can be calculated using the +``CONTA174`` element ``CAREA`` (``NMISC, 58``) output +option. + +.. **Example 28.6: Defining the frictional heat calculations** + +.. code:: python + + mapdl.post1() + mapdl.set("last") + nst = mapdl.get_value("nst", "active", "", "set", "nset") # To get number of data sets on result file + + # Total frictional heat rate + mapdl.esel("s", "real", "", 5) + mapdl.esel("r", "ename", "", 174) # Selecting the contact elements on Workpiece + fht = np.zeros(nst) + for i in range(1, nst): + mapdl.set("", "", "", "", "", "", i) + + # Frictional energy dissipation per unit + # area for an element, FDDIS + mapdl.etable("fri", "smisc", 18) + mapdl.etable("are1", "nmisc", 58) # Area of each contact element + + # Multiplying frictional energy dissipation + # per unit area with the area of + # corresponding element + mapdl.smult("frri", "fri", "are1") + mapdl.ssum() # Summing up the Frictional heat rate + + # Total Frictional heat rate on + # workpiece at a particular time + frhi = mapdl.get('frhi', 'ssum',, 'item', 'frri') + fht(i) = frhi + + mapdl.parsav("all") + mapdl.allsel("all") + mapdl.finish() + + mapdl.post26() + mapdl.file("fsw", "rst") + mapdl.numvar(200) + mapdl.solu(191, "ncmit") # Solution summary data per substep to be + # stored for cumulative no. of iterations. + mapdl.store("merge") # Merge data from results file + mapdl.filldata(191, "", "", "", 1, 1) + mapdl.realvar(191, 191) + mapdl.parres("new", "fsw", "parm") + mapdl.vput("fht", 11, "", "", "fric_heat") + mapdl.plvar(11) # Plot of frictional heat rate against time + + +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, +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. + +It is possible to calculate the total frictional heat generation rate at each +time-step (:meth:`Mapdl.etable `). The following +figure shows the plot of the total plastic heat-generation rate with time. + +.. jupyter-execute:: + :hide-code: + + columns_names = ['time', 'fricheat'] + values = np.loadtxt(download_tech_demo_data("td-28/supporting_files","Figure_28.24.txt")) + + df = pd.DataFrame(data=values, columns=columns_names) + + fig = go.Figure( + [ + go.Scatter(x=df['time'], y=df['fricheat'], #name='Location 1 (0.018 m)', + mode='markers+lines', + marker=dict(color='blue', size=10), + line=dict(color='blue', width=3), + showlegend=False + ), + ] + ) + + fig.update_layout( + template='simple_white', + xaxis_title='Time (Sec)', + yaxis_title='Total Plastic Heat Generation Rate (W)', + title='Total Plastic Heat Rate Variation with Time', + title_x=0.5, + legend_title='Locations', + hovermode='x', + xaxis=dict(showgrid=True), + yaxis=dict(showgrid=True) + ) + fig.show() + + +**Figure 28.24: Total plastic heat rate variation with time** + + +.. **Example 28.7: Defining the plastic heat calculations** + +.. code:: python + + + mapdl.post1() + mapdl.set("last") + nst = mapdl.get("nst", "active", "", "set", "nset") # To get number of data sets on result file + + # 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) + + for i in range(1, nst): + mapdl.set("", "", "", "", "", "", i) + + # Plastic heat rate per unit volume on + # each element, PHEAT + mapdl.etable("pi", "nmisc", 5) + + # Multiplying Pl. heat rate per unit + # volume with the volume of + # corresponding element + mapdl.smult("psi", "pi", "vlm1") + + mapdl.ssum() # Summing up the Plastic heat rate + # Total Plastic heat rate on workpiece + # at a particular time + ppi = mapdl.get('ppi','ssum',,'item','psi') + + pha[i] = ppi + + mapdl.parsav("all") + mapdl.allsel("all") + + mapdl.post26() + mapdl.file("fsw", "rst") + mapdl.numvar(200) + + # solution summary data per substep to be + # stored for cumulative no. of iterations. + mapdl.solu(191, "ncmit") + mapdl.store("merge") # Merge data from results file + mapdl.filldata(191, "", "", "", 1, 1) + mapdl.realvar(191, 191) + mapdl.parres("new", "fsw", "parm") + mapdl.vput("pha", 10, "", "", "pheat_nmisc") + mapdl.plvar(10) # Plot of Plastic heat rate against time + + +**Figure 28.23** and **Figure 28.24** +show that friction is responsible for generating most of the heat needed, while the +contribution of heat due to plastic deformation is less significant. Because the +tool-penetration is shallow and the tool pin is ignored, the plastic heat is small +compared to frictional heat. + + +28.8. Exit MAPDL +---------------- + +.. jupyter-execute:: + :hide-code: + + mapdl.finish() + mapdl.exit() + + +28.9. Recommendations +--------------------- + +To perform a similar FSW analysis, consider the following hints and +recommendations: + +* FSW is a coupled-field (structural-thermal) process. The temperature field + affects the stress distribution during the entire process. Also, heat generated + in structural deformation affects the temperature field. The direct method of + 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. +* A nonlinear transient analysis is preferable for simulations where the + objective is to study the transient temperature and transient heat + transfer. +* The dynamic effects of different physics should be controlled. In this + problem, for example, the dynamic effects of the structural degrees of freedom + are disabled as they are unimportant. +* Separating the solution process into three load steps helps you to understand + the physics and solve the problem. +* The contact between the two plates must be nearly perfect to maintain + temperature continuity. For a perfect thermal contact, specify a high thermal + contact conductance (TCC) coefficient between workpiece plates. A high + coefficient results in temperature continuity across the interface. +* Because the problem is nonlinear, proper solution settings are required. Set + the following analysis controls to the appropriate values to achieve the + converged solution: :meth:`Mapdl.lnsrch() `, + :meth:`Mapdl.cutcontrol() `, + :meth:`Mapdl.kbc() `, + :meth:`Mapdl.neqit() `, + :meth:`Mapdl.nropt() `, + and :meth:`Mapdl.autots() `. +* Convergence at the second and third load steps is difficult to achieve. The + depth of penetration of the tool on the workpiece (``UZ``), rotational speed of the + tool (``ROTZ``), and time-step size play crucial roles in the convergence of the + second load step. Use a very small time-step size if the rotational speed is + 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. +* 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. + To minimize computational time, the tool can be considered to be rigid with no + temperature degrees of freedom. + +28.10. References +----------------- + +The following papers are cited in this example problem: + + +.. [Zhu2004] Zhu, X. K. & Chao, Y. J. (2004). Numerical simulation of transient + temperature and residual stresses in friction stir welding of 304L stainless + steel. *Journal of Materials Processing Technology*. 146(2), + 263-272. + +.. [Prasanna2010] Prasanna, P., Rao, B. S., & Rao, G. K. (2010). Finite element modeling for + maximum temperature in friction stir welding and its validation. + *Journal of Advanced Manufacturing Technology*. 51, + 925-933. + +.. [Ozel2008] Ozel, T., Karpat, Y., & Srivastava, A. (2008). Hard turning with variable + micro-geometry PcBN tools. *CIRP Annals - Manufacturing + Technology*. 57, 73-76. + +.. [Mishra2007] Mishra, R. S. (2007). *Friction Stir Welding and + Processing*. Ed. R. S. Mishra and M. W. Mahoney. Materials Park, + OH: ASM International. + + +28.11. Input files +------------------ + +The following files were used in this problem: + +* :download:`fsw.cdb ` -- Common database file containing the FSW model information + + ++-----------------------------------------------------------------------------------------------------------------------------------+ +| `Download the zipped td-28 file set for this problem `_ | ++-----------------------------------------------------------------------------------------------------------------------------------+ + +For more information, see `Obtaining the input files `_. + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ + diff --git a/_sources/verif-manual/index.rst.txt b/_sources/verif-manual/index.rst.txt new file mode 100644 index 00000000..2718fe7b --- /dev/null +++ b/_sources/verif-manual/index.rst.txt @@ -0,0 +1,451 @@ +:orphan: + +.. _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. + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-001-statically_indeterminate_reaction_force_analysis_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_vm-005-laterally_loaded_tapered_support_structure.py` + +.. raw:: html + +
Laterally Loaded Tapered Support Structure
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-006-pinched_cylinder_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_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: + + :ref:`sphx_glr_verif-manual_vm-010-bending_of_a_t-shaped_beam.py` + +.. raw:: html + +
Bending of a Tee-Shaped Beam
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-011-residual-stress-problem_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-011-residual-stress-problem.py` + +.. raw:: html + +
Residual Stress Problem
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-012-combined-bending-and-torsion_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-012-combined-bending-and-torsion.py` + +.. raw:: html + +
Combined bending and torsion
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-013_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-013.py` + +.. raw:: html + +
Cylindrical Shell Under Pressure
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-014_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-014.py` + +.. raw:: html + +
Large Deflection Eccentric Compression of Slender Column
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-015_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-015.py` + +.. raw:: html + +
Bending of a Circular Plate Using Axisymmetric Shell Elements
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-016_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-016.py` + +.. raw:: html + +
Bending of a Solid Beam (Plane Elements)
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-018_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-018.py` + +.. raw:: html + +
Out-of-Plane Bending of a Curved Bar
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-020_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-020.py` + +.. raw:: html + +
Cylindrical Membrane Under Pressure
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-021_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-021.py` + +.. raw:: html + +
Tie Rod with Lateral Loading
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-025_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-025.py` + +.. raw:: html + +
Stresses in a Long Cylinder
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-291_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-291.py` + +.. raw:: html + +
Force on the Boundary of a Semi-Infinite Body (Boussinesq Problem)
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-295_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-295.py` + +.. raw:: html + +
One Dimensional Terzaghi's Consolidation Problem with Permeability as Function of Depth
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /verif-manual/images/thumb/sphx_glr_vm-299_thumb.png + :alt: + + :ref:`sphx_glr_verif-manual_vm-299.py` + +.. raw:: html + +
Sound Diffusion in a Flat Room
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /verif-manual/vm-001-statically_indeterminate_reaction_force_analysis + /verif-manual/vm-002-beam_stresses_and_deflections + /verif-manual/vm-003-thermally_loaded_support_structure + /verif-manual/vm-004-deflection_of_a_hinged_support + /verif-manual/vm-005-laterally_loaded_tapered_support_structure + /verif-manual/vm-006-pinched_cylinder + /verif-manual/vm-007-plastic_compression_of_a_pipe_assembly + /verif-manual/vm-008-parametric_calculation + /verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs + /verif-manual/vm-010-bending_of_a_t-shaped_beam + /verif-manual/vm-011-residual-stress-problem + /verif-manual/vm-012-combined-bending-and-torsion + /verif-manual/vm-013 + /verif-manual/vm-014 + /verif-manual/vm-015 + /verif-manual/vm-016 + /verif-manual/vm-018 + /verif-manual/vm-020 + /verif-manual/vm-021 + /verif-manual/vm-025 + /verif-manual/vm-291 + /verif-manual/vm-295 + /verif-manual/vm-299 + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/sg_execution_times.rst.txt b/_sources/verif-manual/sg_execution_times.rst.txt new file mode 100644 index 00000000..228c17cc --- /dev/null +++ b/_sources/verif-manual/sg_execution_times.rst.txt @@ -0,0 +1,103 @@ + +:orphan: + +.. _sphx_glr_verif-manual_sg_execution_times: + + +Computation times +================= +**00:33.973** total execution time for 23 files **from verif-manual**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_verif-manual_vm-299.py` (``vm-299.py``) + - 00:06.457 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-006-pinched_cylinder.py` (``vm-006-pinched_cylinder.py``) + - 00:04.392 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-016.py` (``vm-016.py``) + - 00:02.333 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-295.py` (``vm-295.py``) + - 00:01.740 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-005-laterally_loaded_tapered_support_structure.py` (``vm-005-laterally_loaded_tapered_support_structure.py``) + - 00:01.640 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-291.py` (``vm-291.py``) + - 00:01.594 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-018.py` (``vm-018.py``) + - 00:01.582 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-007-plastic_compression_of_a_pipe_assembly.py` (``vm-007-plastic_compression_of_a_pipe_assembly.py``) + - 00:01.365 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-012-combined-bending-and-torsion.py` (``vm-012-combined-bending-and-torsion.py``) + - 00:01.313 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-004-deflection_of_a_hinged_support.py` (``vm-004-deflection_of_a_hinged_support.py``) + - 00:01.192 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-003-thermally_loaded_support_structure.py` (``vm-003-thermally_loaded_support_structure.py``) + - 00:01.095 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-008-parametric_calculation.py` (``vm-008-parametric_calculation.py``) + - 00:01.016 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-002-beam_stresses_and_deflections.py` (``vm-002-beam_stresses_and_deflections.py``) + - 00:00.956 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-025.py` (``vm-025.py``) + - 00:00.914 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-001-statically_indeterminate_reaction_force_analysis.py` (``vm-001-statically_indeterminate_reaction_force_analysis.py``) + - 00:00.889 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-021.py` (``vm-021.py``) + - 00:00.849 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-011-residual-stress-problem.py` (``vm-011-residual-stress-problem.py``) + - 00:00.800 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-014.py` (``vm-014.py``) + - 00:00.719 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-015.py` (``vm-015.py``) + - 00:00.717 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-020.py` (``vm-020.py``) + - 00:00.658 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-013.py` (``vm-013.py``) + - 00:00.646 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-010-bending_of_a_t-shaped_beam.py` (``vm-010-bending_of_a_t-shaped_beam.py``) + - 00:00.630 + - 0.0 + * - :ref:`sphx_glr_verif-manual_vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py` (``vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py``) + - 00:00.476 + - 0.0 diff --git a/_sources/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.rst.txt b/_sources/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.rst.txt new file mode 100644 index 00000000..5e79ce5e --- /dev/null +++ b/_sources/verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.rst.txt @@ -0,0 +1,343 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-001-statically_indeterminate_reaction_force_analysis.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-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 64-76 + +.. code-block:: Python + + # 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 77-81 + +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 81-88 + +.. code-block:: Python + + + 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 89-93 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 93-102 + +.. code-block:: Python + + + 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 103-111 + +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 111-118 + +.. code-block:: Python + + + 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 119-122 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 122-127 + +.. code-block:: Python + + + 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 128-133 + +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 133-143 + +.. code-block:: Python + + + 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 144-155 + +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 155-165 + +.. code-block:: Python + + 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 166-167 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 167-168 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.889 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-001-statically_indeterminate_reaction_force_analysis.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-001-statically_indeterminate_reaction_force_analysis.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-002-beam_stresses_and_deflections.rst.txt b/_sources/verif-manual/vm-002-beam_stresses_and_deflections.rst.txt new file mode 100644 index 00000000..ae37fa76 --- /dev/null +++ b/_sources/verif-manual/vm-002-beam_stresses_and_deflections.rst.txt @@ -0,0 +1,659 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-002-beam_stresses_and_deflections.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-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 80-82 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm2_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 83-85 + +Start MAPDL +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 85-97 + +.. code-block:: Python + + + 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 98-101 + +Define element type +~~~~~~~~~~~~~~~~~~~ +Set up the element type (a beam-type). + +.. GENERATED FROM PYTHON SOURCE LINES 101-122 + +.. code-block:: Python + + + # 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 123-126 + +Define material +~~~~~~~~~~~~~~~ +Set up the material. + +.. GENERATED FROM PYTHON SOURCE LINES 126-132 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("PRXY", 1, 0.3) + 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 + + TEMP PRXY + 0.3000000 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 133-136 + +Define section +~~~~~~~~~~~~~~ +Set up the cross-section properties for a beam element. + +.. GENERATED FROM PYTHON SOURCE LINES 136-144 + +.. code-block:: Python + + + 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.78160E-12 + Izz = 590.47 + Warping Constant = 0.12403E+06 + Torsion Constant = 14.962 + Centroid Y =-0.11661E-14 + Centroid Z = 15.048 + Shear Center Y = 0.51867E-13 + Shear Center Z = 15.048 + Shear Correction-xy = 0.54626 + Shear Correction-yz =-0.75912E-14 + Shear Correction-xz = 0.38629 + + Beam Section is offset to CENTROID of cross section + + + +.. GENERATED FROM PYTHON SOURCE LINES 145-149 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. Create nodes then create elements +between nodes. + +.. GENERATED FROM PYTHON SOURCE LINES 149-160 + +.. code-block:: Python + + + # 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 + + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 161-162 + +Define elements + +.. GENERATED FROM PYTHON SOURCE LINES 162-173 + +.. code-block:: Python + + + 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) + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png + :alt: vm 002 beam stresses and deflections + :srcset: /verif-manual/images/sphx_glr_vm-002-beam_stresses_and_deflections_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + LIST ALL SELECTED ELEMENTS. (LIST NODES) + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC 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 174-177 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Application of boundary conditions (BC). + +.. GENERATED FROM PYTHON SOURCE LINES 177-189 + +.. code-block:: Python + + + # 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 + + + array([1, 2, 3, 4, 5, 6], dtype=int32) + + + +.. GENERATED FROM PYTHON SOURCE LINES 190-194 + +Define distributed loads +~~~~~~~~~~~~~~~~~~~~~~~~ +Apply a distributed force of :math:`w = (10000/12) lb/in` +in the y-direction. + +.. GENERATED FROM PYTHON SOURCE LINES 194-204 + +.. code-block:: Python + + + # 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 205-208 + +Solve +~~~~~ +Enter solution mode and solve the system. Print the solver output. + +.. GENERATED FROM PYTHON SOURCE LINES 208-215 + +.. code-block:: Python + + + 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 216-221 + +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 221-233 + +.. code-block:: Python + + + # 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 234-239 + +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 239-260 + +.. code-block:: Python + + + # 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 261-262 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 262-263 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.956 seconds) + + +.. _sphx_glr_download_verif-manual_vm-002-beam_stresses_and_deflections.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-002-beam_stresses_and_deflections.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-002-beam_stresses_and_deflections.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-003-thermally_loaded_support_structure.rst.txt b/_sources/verif-manual/vm-003-thermally_loaded_support_structure.rst.txt new file mode 100644 index 00000000..cbd6ae82 --- /dev/null +++ b/_sources/verif-manual/vm-003-thermally_loaded_support_structure.rst.txt @@ -0,0 +1,468 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-003-thermally_loaded_support_structure.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-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 71-84 + +.. code-block:: Python + + + # 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 85-92 + +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 92-104 + +.. code-block:: Python + + + 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 105-110 + +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 110-119 + +.. code-block:: Python + + + 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") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png + :alt: vm 003 thermally loaded support structure + :srcset: /verif-manual/images/sphx_glr_vm-003-thermally_loaded_support_structure_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-125 + +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 125-132 + +.. code-block:: Python + + + mapdl.e(1, 4) + mapdl.e(3, 6) + mapdl.mat(2) + mapdl.e(2, 5) + mapdl.eplot(show_node_numbering=True, cpos="xy") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png + :alt: vm 003 thermally loaded support structure + :srcset: /verif-manual/images/sphx_glr_vm-003-thermally_loaded_support_structure_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 133-141 + +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 141-149 + +.. code-block:: Python + + + 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 150-156 + +Solve +~~~~~ +- Enter solution mode +- Specify a timestep of 1 to be used for this load step +- Solve the system. + + +.. GENERATED FROM PYTHON SOURCE LINES 156-161 + +.. code-block:: Python + + + 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 process 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 162-169 + +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 169-182 + +.. code-block:: Python + + + 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 183-188 + +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 188-208 + +.. code-block:: Python + + + 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 209-210 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 210-211 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.095 seconds) + + +.. _sphx_glr_download_verif-manual_vm-003-thermally_loaded_support_structure.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-003-thermally_loaded_support_structure.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-003-thermally_loaded_support_structure.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-004-deflection_of_a_hinged_support.rst.txt b/_sources/verif-manual/vm-004-deflection_of_a_hinged_support.rst.txt new file mode 100644 index 00000000..12297dc5 --- /dev/null +++ b/_sources/verif-manual/vm-004-deflection_of_a_hinged_support.rst.txt @@ -0,0 +1,436 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-004-deflection_of_a_hinged_support.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-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 78-80 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm4_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 81-83 + +Start MAPDL +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 83-96 + +.. code-block:: Python + + + 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 97-104 + +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 104-116 + +.. code-block:: Python + + + 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 117-121 + +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 121-130 + +.. code-block:: Python + + + 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") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png + :alt: vm 004 deflection of a hinged support + :srcset: /verif-manual/images/sphx_glr_vm-004-deflection_of_a_hinged_support_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 131-136 + +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 136-142 + +.. code-block:: Python + + + 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 143-146 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 146-151 + +.. code-block:: Python + + + 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 152-160 + +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 160-170 + +.. code-block:: Python + + + mapdl.post1() + mapdl.post_processing.plot_nodal_displacement( + "Y", + cmap="magma", + line_width=5, + cpos="xy", + scalar_bar_args={"title": "Displacement", "vertical": False}, + ) + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png + :alt: vm 004 deflection of a hinged support + :srcset: /verif-manual/images/sphx_glr_vm-004-deflection_of_a_hinged_support_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 171-180 + +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 180-191 + +.. code-block:: Python + + + + 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 192-204 + +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 204-223 + +.. code-block:: Python + + + 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 224-225 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 225-226 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.192 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-004-deflection_of_a_hinged_support.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-004-deflection_of_a_hinged_support.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-005-laterally_loaded_tapered_support_structure.rst.txt b/_sources/verif-manual/vm-005-laterally_loaded_tapered_support_structure.rst.txt new file mode 100644 index 00000000..1f288dd1 --- /dev/null +++ b/_sources/verif-manual/vm-005-laterally_loaded_tapered_support_structure.rst.txt @@ -0,0 +1,471 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-005-laterally_loaded_tapered_support_structure.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-005-laterally_loaded_tapered_support_structure.py: + +.. _ref_vm5_example: + +Laterally Loaded Tapered Support Structure +------------------------------------------ +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 72-74 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm5_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-77 + +Start MAPDL +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 77-88 + +.. code-block:: Python + + + 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 89-94 + +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 94-102 + +.. code-block:: Python + + + 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 103-107 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 107-119 + +.. code-block:: Python + + + 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") + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png + :alt: vm 005 laterally loaded tapered support structure + :srcset: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-124 + +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 124-133 + +.. code-block:: Python + + + # 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 134-137 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 137-142 + +.. code-block:: Python + + + 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 143-148 + +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 148-162 + +.. code-block:: Python + + + + 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 163-168 + +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 168-180 + +.. code-block:: Python + + + result = mapdl.result + result.plot_principal_nodal_stress( + 0, + "SEQV", + show_edges=True, + show_displacement=True, + displacement_factor=26.0, + cmap="Oranges", + cpos="xy", + ) + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png + :alt: vm 005 laterally loaded tapered support structure + :srcset: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 181-185 + +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 185-215 + +.. code-block:: Python + + + 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", + ) + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png + :alt: vm 005 laterally loaded tapered support structure + :srcset: /verif-manual/images/sphx_glr_vm-005-laterally_loaded_tapered_support_structure_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 216-221 + +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 221-242 + +.. code-block:: Python + + + + 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 243-244 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 244-245 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.640 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-005-laterally_loaded_tapered_support_structure.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-005-laterally_loaded_tapered_support_structure.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-006-pinched_cylinder.rst.txt b/_sources/verif-manual/vm-006-pinched_cylinder.rst.txt new file mode 100644 index 00000000..939a884f --- /dev/null +++ b/_sources/verif-manual/vm-006-pinched_cylinder.rst.txt @@ -0,0 +1,1563 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-006-pinched_cylinder.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-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 68-70 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm6_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-73 + +Start MAPDL +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 73-80 + +.. code-block:: Python + + + from ansys.mapdl.core import launch_mapdl + + # Start mapdl. + mapdl = launch_mapdl() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 81-84 + +Initiate pre-processing +~~~~~~~~~~~~~~~~~~~~~~~ +Enter verification example mode and the pre-processing routine. + +.. GENERATED FROM PYTHON SOURCE LINES 84-95 + +.. code-block:: Python + + + + def start_prep7(): + mapdl.clear() + mapdl.verify() + mapdl.prep7() + + + start_prep7() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +Define element type +~~~~~~~~~~~~~~~~~~~ +Set up the element type (a shell-type). + +.. GENERATED FROM PYTHON SOURCE LINES 99-136 + +.. code-block:: Python + + + # 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: + LIST ELEMENT TYPES FROM 1 TO 1 BY 1 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + 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 137-142 + +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 142-158 + +.. code-block:: Python + + + # 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 + + LIST MATERIALS 1 TO 1 BY 1 + PROPERTY= ALL + + MATERIAL NUMBER 1 + + TEMP EX + 0.1050000E+08 + + TEMP NUXY + 0.3125000 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 159-162 + +Define section +~~~~~~~~~~~~~~ +Set up the cross-section properties for a shell element. + +.. GENERATED FROM PYTHON SOURCE LINES 162-179 + +.. code-block:: Python + + + # 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 + + LIST SECTION ID SETS 1 TO 1 BY 1 + + 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 180-183 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the keypoints and create the area through the keypoints. + +.. GENERATED FROM PYTHON SOURCE LINES 183-230 + +.. code-block:: Python + + + # 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 + + + * + + .. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_001.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_001.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_002.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_002.png + :class: 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 231-234 + +Meshing +~~~~~~~ +Define line division of the lines, then mesh the area with shell elements. + +.. GENERATED FROM PYTHON SOURCE LINES 234-273 + +.. code-block:: Python + + + # 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 + + + * + + .. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_003.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_003.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_004.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_004.png + :class: sphx-glr-multi-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + LIST ALL SELECTED ELEMENTS. (LIST NODES) + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC NODES + + 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 + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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.2937 0.00 0.00 0.00 + 45 1.8954 4.5760 1.2937 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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.8812 0.00 0.00 0.00 + 71 3.5023 3.5023 3.8812 0.00 0.00 0.00 + 72 2.7517 4.1183 3.8812 0.00 0.00 0.00 + 73 1.8954 4.5760 3.8812 0.00 0.00 0.00 + 74 0.96628 4.8578 3.8812 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 274-277 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Application of symmetric boundary conditions for simplified model. + +.. GENERATED FROM PYTHON SOURCE LINES 277-293 + +.. code-block:: Python + + + # 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 294-297 + +Define distributed loads +~~~~~~~~~~~~~~~~~~~~~~~~ +Apply the force of :math:`F = (100/4) lb` in the y-direction. + +.. GENERATED FROM PYTHON SOURCE LINES 297-311 + +.. code-block:: Python + + + # 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 312-315 + +Solve +~~~~~ +Enter solution mode and solve the system. Print the solver output. + +.. GENERATED FROM PYTHON SOURCE LINES 315-327 + +.. code-block:: Python + + + + 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 328-333 + +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 333-343 + +.. code-block:: Python + + + # Start post-processing mode. + def post_processing(): + mapdl.post1() + mapdl.set(1) + + + post_processing() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 344-347 + +Plotting +~~~~~~~~ +Plot nodal displacement using PyVista. + +.. GENERATED FROM PYTHON SOURCE LINES 347-364 + +.. code-block:: Python + + + + 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() + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_005.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 365-369 + +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 369-397 + +.. code-block:: Python + + + + 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 398-401 + +Rerun model with SHELL281 +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Perform the simulation again using the element type SHELL281. + +.. GENERATED FROM PYTHON SOURCE LINES 401-413 + +.. code-block:: Python + + + # Restart pre-processing routine. + start_prep7() + elem_type = define_element(elem_type="SHELL281") + define_material() + define_section() + define_geometry() + meshing() + define_bc() + define_loads() + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_006.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_006.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + LIST ALL SELECTED ELEMENTS. (LIST NODES) + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC NODES + + 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 + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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.64687 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.64687 0.00 0.00 0.00 + 81 2.7517 4.1183 0.64687 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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.2937 0.00 0.00 0.00 + 104 2.3348 4.3682 1.2937 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.2937 0.00 0.00 0.00 + 107 0.96628 4.8578 1.2937 0.00 0.00 0.00 + 108 0.48548 4.9291 1.2937 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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.8812 0.00 0.00 0.00 + 189 3.5023 3.5023 3.8812 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.8812 0.00 0.00 0.00 + 192 2.3348 4.3682 3.8812 0.00 0.00 0.00 + 193 1.8954 4.5760 3.8812 0.00 0.00 0.00 + 194 1.4378 4.7397 3.8812 0.00 0.00 0.00 + 195 0.96628 4.8578 3.8812 0.00 0.00 0.00 + 196 0.48548 4.9291 3.8812 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 414-417 + +Solve +~~~~~ +Enter solution mode and solve the system. Print the solver output. + +.. GENERATED FROM PYTHON SOURCE LINES 417-421 + +.. code-block:: Python + + + 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 422-427 + +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 427-433 + +.. code-block:: Python + + + post_processing() + plot_nodal_disp() + top_node_281, deflect_shell_281 = get_displacements() + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_007.png + :alt: vm 006 pinched cylinder + :srcset: /verif-manual/images/sphx_glr_vm-006-pinched_cylinder_007.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 434-440 + +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 440-464 + +.. code-block:: Python + + + # 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 465-466 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 466-467 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 4.392 seconds) + + +.. _sphx_glr_download_verif-manual_vm-006-pinched_cylinder.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-006-pinched_cylinder.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-006-pinched_cylinder.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.rst.txt b/_sources/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.rst.txt new file mode 100644 index 00000000..5a090985 --- /dev/null +++ b/_sources/verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.rst.txt @@ -0,0 +1,1112 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.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-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 99-101 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm7_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 102-105 + +Start MAPDL +~~~~~~~~~~~ +Start MAPDL and import Numpy and Pandas libraries. + +.. GENERATED FROM PYTHON SOURCE LINES 105-115 + +.. code-block:: Python + + + from ansys.mapdl.core import launch_mapdl + import matplotlib.pyplot as plt + import numpy as np + import pandas as pd + + # Start MAPDL. + mapdl = launch_mapdl() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 116-119 + +Pre-processing +~~~~~~~~~~~~~~ +Enter verification example mode and the pre-processing routine. + +.. GENERATED FROM PYTHON SOURCE LINES 119-125 + +.. code-block:: Python + + + mapdl.clear() + mapdl.verify() + mapdl.prep7(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 126-128 + +Parameterization +~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 128-138 + +.. code-block:: Python + + + # 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 139-142 + +Define element type +~~~~~~~~~~~~~~~~~~~ +Set up the element types . + +.. GENERATED FROM PYTHON SOURCE LINES 142-168 + +.. code-block:: Python + + + # 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 + + LIST ELEMENT TYPES FROM 1 TO 3 BY 1 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + 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 169-178 + +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 178-203 + +.. code-block:: Python + + + # 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 + + LIST MATERIALS 1 TO 2 BY 1 + PROPERTY= ALL + + 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 204-207 + +Plot stress - strain curve +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use Matplotlib library to plot material model curves of steel and aluminum. + +.. GENERATED FROM PYTHON SOURCE LINES 207-270 + +.. code-block:: Python + + + # 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() + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png + :alt: Stress - Strain Curve + :srcset: /verif-manual/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 271-274 + +Define section +~~~~~~~~~~~~~~ +Set up the cross-section properties for a shell and pipe elements. + +.. GENERATED FROM PYTHON SOURCE LINES 274-303 + +.. code-block:: Python + + + # 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 + + LIST SECTION ID SETS 1 TO 4 BY 1 + + 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 304-307 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and create the elements through the nodes. + +.. GENERATED FROM PYTHON SOURCE LINES 307-378 + +.. code-block:: Python + + + # 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 the inside (steel) tube. + mapdl.type(2) + mapdl.mat(1) + mapdl.e(101, 102, 112, 111, 105, 106, 116, 115) + + # Create elements for the 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) + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png + :alt: vm 007 plastic compression of a pipe assembly + :srcset: /verif-manual/images/sphx_glr_vm-007-plastic_compression_of_a_pipe_assembly_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 379-382 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Application of boundary conditions (BC) for simplified axisymmetric model. + +.. GENERATED FROM PYTHON SOURCE LINES 382-433 + +.. code-block:: Python + + + # 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 direction 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 434-437 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 437-461 + +.. code-block:: Python + + + # 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 462-465 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. + +.. GENERATED FROM PYTHON SOURCE LINES 465-470 + +.. code-block:: Python + + + # Enter the post-processing routine. + mapdl.post1(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 471-475 + +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 475-517 + +.. code-block:: Python + + + + 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 518-521 + +Getting loads for each load step +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Obtain the loads of the model using :func:`getload()` function. + +.. GENERATED FROM PYTHON SOURCE LINES 521-535 + +.. code-block:: Python + + + # 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 536-545 + +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 545-634 + +.. code-block:: Python + + + 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 635-636 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 636-637 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.365 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-007-plastic_compression_of_a_pipe_assembly.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-007-plastic_compression_of_a_pipe_assembly.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-008-parametric_calculation.rst.txt b/_sources/verif-manual/vm-008-parametric_calculation.rst.txt new file mode 100644 index 00000000..d32333e4 --- /dev/null +++ b/_sources/verif-manual/vm-008-parametric_calculation.rst.txt @@ -0,0 +1,466 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-008-parametric_calculation.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-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 73-75 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm8_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-79 + +Start MAPDL +~~~~~~~~~~~ +Start MAPDL and import Numpy and Pandas libraries. + +.. GENERATED FROM PYTHON SOURCE LINES 79-89 + +.. code-block:: Python + + + + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Start MAPDL. + mapdl = launch_mapdl() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 90-93 + +Pre-processing +~~~~~~~~~~~~~~ +Enter verification example mode and the pre-processing routine. + +.. GENERATED FROM PYTHON SOURCE LINES 93-99 + +.. code-block:: Python + + + mapdl.clear() + mapdl.verify() + mapdl.prep7(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-105 + +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 105-179 + +.. code-block:: Python + + + + 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 180-187 + +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 187-198 + +.. code-block:: Python + + + 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()) + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-008-parametric_calculation_001.png + :alt: vm 008 parametric calculation + :srcset: /verif-manual/images/sphx_glr_vm-008-parametric_calculation_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Distance between keypoint is: 305.16 + + + LIST ALL SELECTED KEYPOINTS. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NO. X,Y,Z LOCATION KESIZE NODE ELEM MAT REAL TYP ESYS + 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 199-206 + +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 206-217 + +.. code-block:: Python + + + 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()) + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-008-parametric_calculation_002.png + :alt: vm 008 parametric calculation + :srcset: /verif-manual/images/sphx_glr_vm-008-parametric_calculation_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Distance between nodes is: 8.58 + + + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 218-230 + +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 230-256 + +.. code-block:: Python + + + # 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 257-258 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 258-259 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.016 seconds) + + +.. _sphx_glr_download_verif-manual_vm-008-parametric_calculation.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-008-parametric_calculation.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-008-parametric_calculation.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst.txt b/_sources/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst.txt new file mode 100644 index 00000000..d5589e1b --- /dev/null +++ b/_sources/verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.rst.txt @@ -0,0 +1,763 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-009-large_lateral_deflection_of_unequal_stiffness_springs.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-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 85-87 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm9_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-91 + +Start MAPDL +~~~~~~~~~~~ +Start MAPDL and import Numpy and Pandas libraries. + +.. GENERATED FROM PYTHON SOURCE LINES 91-100 + +.. code-block:: Python + + + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Start MAPDL. + mapdl = launch_mapdl() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-104 + +Pre-processing +~~~~~~~~~~~~~~ +Enter verification example mode and the pre-processing routine. + +.. GENERATED FROM PYTHON SOURCE LINES 104-110 + +.. code-block:: Python + + + mapdl.clear() + mapdl.verify() + mapdl.prep7(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 111-123 + +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 123-137 + +.. code-block:: Python + + + # 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 138-141 + +Define element type +~~~~~~~~~~~~~~~~~~~ +Set up the element types. + +.. GENERATED FROM PYTHON SOURCE LINES 141-183 + +.. code-block:: Python + + + # 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 + + LIST ELEMENT TYPES FROM 1 TO 4 BY 1 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + 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 184-189 + +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 189-206 + +.. code-block:: Python + + + # 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 + + LIST REAL SETS 1 TO 4 BY 1 + + 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 207-210 + +Define nodes +~~~~~~~~~~~~ +Set up the nodes coordinates using python ``for`` loop. + +.. GENERATED FROM PYTHON SOURCE LINES 210-223 + +.. code-block:: Python + + + # 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 + + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 224-227 + +Create elements +~~~~~~~~~~~~~~~ +Create the elements through the nodes. + +.. GENERATED FROM PYTHON SOURCE LINES 227-256 + +.. code-block:: Python + + + # 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) + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC 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 257-260 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Application of boundary conditions (BC) for the spring model. + +.. GENERATED FROM PYTHON SOURCE LINES 260-272 + +.. code-block:: Python + + + # 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 273-276 + +Solution settings +~~~~~~~~~~~~~~~~~ +Enter solution mode and apply settings for *Transient Dynamic Analysis*. + +.. GENERATED FROM PYTHON SOURCE LINES 276-305 + +.. code-block:: Python + + + # 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 306-309 + +Solve +~~~~~ +Solve the system , avoiding the printing output. + +.. GENERATED FROM PYTHON SOURCE LINES 309-315 + +.. code-block:: Python + + + # Run the simulation. + mapdl.solve() + mapdl.finish(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 316-319 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing, avoiding the printing output. + +.. GENERATED FROM PYTHON SOURCE LINES 319-324 + +.. code-block:: Python + + + # Enter the post-processing mode. + mapdl.post1(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 325-330 + +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 330-354 + +.. code-block:: Python + + + # 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 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ***** POST1 NODAL DEGREE OF FREEDOM LISTING ***** + + LOAD STEP= 1 SUBSTEP= 25 + TIME= 15.000 LOAD CASE= 0 + + THE FOLLOWING DEGREE OF FREEDOM RESULTS ARE IN THE GLOBAL COORDINATE SYSTEM + + NODE UX UY UZ USUM + 1 0.0000 0.0000 0.0000 0.0000 + 2 8.6319 4.5321 0.0000 9.7494 + 3 0.0000 0.0000 0.0000 0.0000 + 4 0.0000 0.0000 0.0000 0.0000 + 5 0.0000 0.0000 0.0000 0.0000 + + MAXIMUM ABSOLUTE VALUES + NODE 0 0 0 0 + VALUE 8.6319 4.5321 0.0000 9.7494 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 355-367 + +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 367-393 + +.. code-block:: Python + + + # 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 394-395 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 395-396 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.476 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-009-large_lateral_deflection_of_unequal_stiffness_springs.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-009-large_lateral_deflection_of_unequal_stiffness_springs.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-010-bending_of_a_t-shaped_beam.rst.txt b/_sources/verif-manual/vm-010-bending_of_a_t-shaped_beam.rst.txt new file mode 100644 index 00000000..8d76a126 --- /dev/null +++ b/_sources/verif-manual/vm-010-bending_of_a_t-shaped_beam.rst.txt @@ -0,0 +1,654 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-010-bending_of_a_t-shaped_beam.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-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 74-76 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm10_setup.png' + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 77-80 + +Start MAPDL +~~~~~~~~~~~ +Start MAPDL and import Numpy and Pandas libraries. + +.. GENERATED FROM PYTHON SOURCE LINES 80-89 + +.. code-block:: Python + + + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Start MAPDL. + mapdl = launch_mapdl() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 90-93 + +Pre-processing +~~~~~~~~~~~~~~ +Enter verification example mode and the pre-processing routine. + +.. GENERATED FROM PYTHON SOURCE LINES 93-99 + +.. code-block:: Python + + + mapdl.clear() + mapdl.verify() + mapdl.prep7(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-103 + +Define element type +~~~~~~~~~~~~~~~~~~~ +Set up the element type ``BEAM188``. + +.. GENERATED FROM PYTHON SOURCE LINES 103-121 + +.. code-block:: Python + + + # 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 + + LIST ELEMENT TYPES FROM 1 TO 1 BY 1 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + 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 122-128 + +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 128-138 + +.. code-block:: Python + + + # 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 + + LIST MATERIALS 1 TO 1 BY 1 + PROPERTY= ALL + + MATERIAL NUMBER 1 + + TEMP EX + 0.3000000E+08 + + TEMP PRXY + 0.3000000 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 139-147 + +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 147-162 + +.. code-block:: Python + + + # 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 + + LIST SECTION ID SETS 1 TO 1 BY 1 + + 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.47962E-13 + Izz = 247.50 + Warping Constant = 673.35 + Torsion Constant = 174.86 + Centroid Y = 0.14433E-15 + Centroid Z = 4.0000 + Shear Center Y = 0.34916E-13 + Shear Center Z = 0.30468 + Shear Correction-xy = 0.54640 + Shear Correction-yz = 0.49487E-14 + Shear Correction-xz = 0.45475 + + Beam Section is offset to CENTROID of cross section + + + + +.. GENERATED FROM PYTHON SOURCE LINES 163-166 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. Create nodes between elements. + +.. GENERATED FROM PYTHON SOURCE LINES 166-177 + +.. code-block:: Python + + + # 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 + + LIST ALL SELECTED NODES. DSYS= 0 + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + NODE X Y Z THXY THYZ THZX + 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 178-181 + +Define elements +~~~~~~~~~~~~~~~ +Create element between nodes 1 and 2 using node 3 as orientational node. + +.. GENERATED FROM PYTHON SOURCE LINES 181-198 + +.. code-block:: Python + + + # 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) + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png + :alt: vm 010 bending of a t shaped beam + :srcset: /verif-manual/images/sphx_glr_vm-010-bending_of_a_t-shaped_beam_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + LIST ALL SELECTED ELEMENTS. (LIST NODES) + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ELEM MAT TYP REL ESY SEC NODES + + 1 1 1 1 0 1 1 2 3 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 199-202 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Application of boundary conditions (BC). + +.. GENERATED FROM PYTHON SOURCE LINES 202-207 + +.. code-block:: Python + + + 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 208-211 + +Define distributed loads +~~~~~~~~~~~~~~~~~~~~~~~~ +Apply a bending moment :math:`\mathrm{M_{z}}= 100000\,in\,lb`. + +.. GENERATED FROM PYTHON SOURCE LINES 211-220 + +.. code-block:: Python + + + # 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 221-224 + +Solve +~~~~~ +Enter solution mode and run the simulation. + +.. GENERATED FROM PYTHON SOURCE LINES 224-233 + +.. code-block:: Python + + + # 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 234-237 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. + +.. GENERATED FROM PYTHON SOURCE LINES 237-242 + +.. code-block:: Python + + + # Enter the post-processing routine. + mapdl.post1(mute=True) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 243-248 + +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 248-262 + +.. code-block:: Python + + + # 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 263-274 + +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 274-303 + +.. code-block:: Python + + + # 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 304-305 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 305-306 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.630 seconds) + + +.. _sphx_glr_download_verif-manual_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-jupyter + + :download:`Download Jupyter notebook: vm-010-bending_of_a_t-shaped_beam.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-010-bending_of_a_t-shaped_beam.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-011-residual-stress-problem.rst.txt b/_sources/verif-manual/vm-011-residual-stress-problem.rst.txt new file mode 100644 index 00000000..6fa2d65b --- /dev/null +++ b/_sources/verif-manual/vm-011-residual-stress-problem.rst.txt @@ -0,0 +1,367 @@ + +.. 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() + + + + +.. 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 + + + + + +.. 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.800 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 `_ diff --git a/_sources/verif-manual/vm-012-combined-bending-and-torsion.rst.txt b/_sources/verif-manual/vm-012-combined-bending-and-torsion.rst.txt new file mode 100644 index 00000000..b85a2cbf --- /dev/null +++ b/_sources/verif-manual/vm-012-combined-bending-and-torsion.rst.txt @@ -0,0 +1,442 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-012-combined-bending-and-torsion.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-012-combined-bending-and-torsion.py: + +.. _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. + +.. GENERATED FROM PYTHON SOURCE LINES 72-77 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm12_setup.png' + + from ansys.mapdl.core import launch_mapdl + import pandas + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-81 + +Start MAPDL +~~~~~~~~~~~ +Start MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 81-84 + +.. code-block:: Python + + mapdl = launch_mapdl(loglevel="WARNING", print_com=True) + mapdl.clear() # optional as MAPDL just started + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 85-87 + +Pre-processing with ET PIPE16 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 87-104 + +.. code-block:: Python + + + 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() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-107 + +Solve +~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 107-118 + +.. code-block:: Python + + + mapdl.slashsolu() + mapdl.outpr("BASIC", 1) + + mapdl.solve() + mapdl.finish() + mapdl.post1() + mapdl.etable("P_STRS", "NMISC", 86) + mapdl.etable("SHR", "NMISC", 88) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + STORE SHR FROM ITEM=NMIS COMP= 88 FOR ALL SELECTED ELEMENTS + + + +.. GENERATED FROM PYTHON SOURCE LINES 119-121 + +Post-processing +~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 121-137 + +.. code-block:: Python + + + p_stress = mapdl.get("P_STRESS", "ELEM", 1, "ETAB", "P_STRS") + shear = mapdl.get("SHEAR", "ELEM", 1, "ETAB", "SHR") + p_trs = shear / 2 + + # Fill the array with target values + target_p_stress = 7527 + target_p_trs = 3777 + + data = [ + [target_p_stress, p_stress, abs(p_stress / target_p_stress)], + [target_p_trs, p_trs, abs(p_trs / target_p_trs)], + ] + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["MAX PRINSTRS psi", "MAX SH STRS psi"] + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 138-140 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 140-144 + +.. code-block:: Python + + + print(pandas.DataFrame(data, row_headers, col_headers)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + TARGET Mechanical APDL RATIO + MAX PRINSTRS psi 7527 7526.938960 0.999992 + MAX SH STRS psi 3777 3776.921145 0.999979 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 145-147 + +Pre-processing with ET PIPE288 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 147-170 + +.. code-block:: Python + + + mapdl.clear("nostart") + mapdl.prep7() + mapdl.run("C*** USING PIPE288") + mapdl.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.allsel() + mapdl.eplot() + + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-012-combined-bending-and-torsion_001.png + :alt: vm 012 combined bending and torsion + :srcset: /verif-manual/images/sphx_glr_vm-012-combined-bending-and-torsion_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 171-173 + +Solve +~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 173-179 + +.. code-block:: Python + + + mapdl.slashsolu() + mapdl.outpr("BASIC", 1) + mapdl.solve() + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + Distributed parallel processing has been reactivated. + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 180-182 + +Post-processing +~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 182-214 + +.. code-block:: Python + + + mapdl.post1() + mapdl.set("LAST") + mapdl.graphics("POWER") + mapdl.eshape(1) + mapdl.view(1, 1, 1, 1) + + mapdl.show(option="REV", fname="png") + mapdl.plesol("S", 1) + mapdl.show("close") + + p_stress = mapdl.get("P_STRESS", "PLNSOL", 0, "MAX") + + mapdl.show(option="REV", fname="png") + mapdl.plesol("S", "INT") + mapdl.show("close") + + shear = mapdl.get("SHEAR", "PLNSOL", 0, "MAX") + p_trs = shear / 2 + + + # Fill the array with target values + target_p_stress = 7527.0 + target_p_trs = 3777.0 + + data = [ + [target_p_stress, p_stress, abs(p_stress / target_p_stress)], + [target_p_trs, p_trs, abs(p_trs / target_p_trs)], + ] + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["MAX PRINSTRS psi", "MAX SH STRS psi"] + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-012-combined-bending-and-torsion_002.png + :alt: vm 012 combined bending and torsion + :srcset: /verif-manual/images/sphx_glr_vm-012-combined-bending-and-torsion_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 215-217 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 217-223 + +.. code-block:: Python + + + print(pandas.DataFrame(data, row_headers, col_headers)) + + mapdl.finish() + mapdl.starlist("vm12", "vrt") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + TARGET Mechanical APDL RATIO + MAX PRINSTRS psi 7527.0 7526.93994 0.999992 + MAX SH STRS psi 3777.0 3776.92212 0.999979 + + LISTING OF THE DATA ON FILE + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + Unable to open *LIST file vm12.vrt. + + + +.. GENERATED FROM PYTHON SOURCE LINES 224-225 + +Stop MAPDL. + +.. GENERATED FROM PYTHON SOURCE LINES 225-226 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.313 seconds) + + +.. _sphx_glr_download_verif-manual_vm-012-combined-bending-and-torsion.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-012-combined-bending-and-torsion.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-012-combined-bending-and-torsion.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-013.rst.txt b/_sources/verif-manual/vm-013.rst.txt new file mode 100644 index 00000000..c40005d8 --- /dev/null +++ b/_sources/verif-manual/vm-013.rst.txt @@ -0,0 +1,416 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-013.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-013.py: + +.. _ref_vm13: + +Cylindrical Shell Under Pressure +--------------------------------- +Problem description: + - A long cylindrical pressure vessel of mean diameter d and wall thickness t has closed + ends and is subjected to an internal pressure P. Determine the axial stress + :math:`\sigma_y` and the hoop stress :math:`\sigma_z` in the vessel at the + midthickness of the wall. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 45, article 11. + - UGURAL AND FENSTER, ADV. STRENGTH AND APPL. ELAS., 1981. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-Node Finite Strain Axisymmetric Shell (SHELL208) + +.. image:: ../_static/vm13_setup.png + :width: 400 + :alt: VM13 Cylindrical Shell Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`t = 1 in` + - :math:`d = 120 in` + +Loading: + - :math:`P = 500 psi` + +Analysis Assumptions and Modeling Notes: + - An arbitrary axial length of 10 inches is selected. + Nodal coupling is used in the radial direction. An axial + force of 5654866.8 lb (:math:`(Pπd^2)/4`) is applied to + simulate the closed-end effect. + +.. GENERATED FROM PYTHON SOURCE LINES 67-94 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm13_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + + # Launch MAPDL with specified settings + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear any existing database + mapdl.clear() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Run the /VERIFY command for VM13 + mapdl.verify("vm13") + + # Set the title of the analysis + mapdl.title("VM13 CYLINDRICAL SHELL UNDER PRESSURE") + + # Enter the model creation preprocessor + mapdl.prep7(mute=True) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-98 + +Define element type and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2-Node Axisymmetric Shell element (SHELL208) and "SHELL" as section type. + +.. GENERATED FROM PYTHON SOURCE LINES 98-104 + +.. code-block:: Python + + + mapdl.et(1, "SHELL208") # Element type SHELL208 + mapdl.sectype(1, "SHELL") # Section type SHELL + mapdl.secdata(1) # Define section data + mapdl.secnum(1) # Assign section number + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + SECTION ID NUMBER= 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-109 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 109-113 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("NUXY", 1, 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 114-118 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 118-125 + +.. code-block:: Python + + + mapdl.n(1, 60) # Node 1, 60 degrees + mapdl.n(2, 60, 10) # Node 2, 60 degrees and 10 units in Z-direction + + # Define element connectivity + mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 126-135 + +Define coupling and boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Couple the nodes #1 and 2 in radial direction (rotation around Z-axis). +Fix UY displacement for node 1. Fix ROTZ (rotation around Z-axis) for node 2. +Apply a concentrated force value of 5654866.8 lb in FY direction at node 2. +Internal pressure of 500 psi is applied. Then exit prep7 processor. + +Effectively, this sets: + :math:`P = 500 psi` + +.. GENERATED FROM PYTHON SOURCE LINES 135-150 + +.. code-block:: Python + + + mapdl.cp(1, "UX", 1, 2) # Couple radial direction (rotation around Z-axis) + mapdl.d(1, "UY", "", "", "", "", "ROTZ") # Fix UY displacement for node 1 + mapdl.d(2, "ROTZ") # Fix ROTZ (rotation around Z-axis) for node 2 + + mapdl.f(2, "FY", 5654866.8) # Apply a concentrated force FY to node 2 + mapdl.sfe(1, 1, "PRES", "", 500) # Apply internal pressure of 500 psi to element 1 + + # Selects all entities + mapdl.allsel() + mapdl.eplot() + + # Finish the pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-013_001.png + :alt: vm 013 + :srcset: /verif-manual/images/sphx_glr_vm-013_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 151-154 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 154-165 + +.. code-block:: Python + + + mapdl.slashsolu() + # Set the analysis type to STATIC + mapdl.antype("STATIC") + # Controls the solution printout + mapdl.outpr("ALL", 1) + # Solve the analysis + mapdl.solve() + # Finish the solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + Distributed parallel processing has been reactivated. + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 166-169 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing and compute stress components. + +.. GENERATED FROM PYTHON SOURCE LINES 169-183 + +.. code-block:: Python + + + mapdl.post1() + + # Create element tables for stress components + mapdl.etable("STRS_Y", "S", "Y") + mapdl.etable("STRS_Z", "S", "Z") + + # Retrieve element stresses from the element tables using *Get + stress_y = mapdl.get("STRSS_Y", "ELEM", 1, "ETAB", "STRS_Y") + stress_z = mapdl.get("STRSS_Z", "ELEM", 1, "ETAB", "STRS_Z") + + # Fill the array with target values + Target_values = np.array([15000, 29749]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 184-186 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 186-196 + +.. code-block:: Python + + + results = f""" + ------------------- VM13 RESULTS COMPARISON --------------------- + RESULT | TARGET | Mechanical APDL | RATIO + Stress, Y (psi) {Target_values[0]:.5f} {stress_y:.5f} {abs(stress_y/Target_values[0]):.5f} + Stress, Z (psi) {Target_values[1]:.5f} {stress_z:.5f} {abs(stress_z/Target_values[1]):.5f} + ----------------------------------------------------------------- + """ + print(results) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ------------------- VM13 RESULTS COMPARISON --------------------- + RESULT | TARGET | Mechanical APDL | RATIO + Stress, Y (psi) 15000.00000 15000.00000 1.00000 + Stress, Z (psi) 29749.00000 30000.00000 1.00844 + ----------------------------------------------------------------- + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 197-199 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 199-201 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 202-204 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 204-205 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.646 seconds) + + +.. _sphx_glr_download_verif-manual_vm-013.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-013.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-013.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-014.rst.txt b/_sources/verif-manual/vm-014.rst.txt new file mode 100644 index 00000000..657a4cf7 --- /dev/null +++ b/_sources/verif-manual/vm-014.rst.txt @@ -0,0 +1,479 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-014.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-014.py: + +.. _ref_vm14: + +Large Deflection Eccentric Compression of Slender Column +-------------------------------------------------------- +Problem description: + - Find the deflection :math:`\delta` at the middle and the maximum tensile and compressive stresses + in an eccentrically compressed steel strut of length L. The cross-section is a channel + with the dimensions shown in the diagram. The ends are pinned at the point of load application. + The distance between the centroid and the back of the channel is e, and the compressive force F + acts in the plane of the back of the channel and in the symmetry plane of the channel. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 263, problem 1. + +Analysis type(s): + - Static, Large Deflection Analysis ``ANTYPE=0`` + +Element type(s): + - Elastic Tapered Unsymmetric Beam Elements (BEAM188) + +.. image:: ../_static/vm14_setup.png + :width: 400 + :alt: VM14 Slender Column Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`L = 10 ft` + - :math:`h = 8 in` + - :math:`s = 0.22 in` + - :math:`t = 0.39 in` + - :math:`e = 0.6465 in` + - :math:`b = 2.26 in` + +Loading: + - :math:`F = 4000 lb` + +Analysis Assumptions and Modeling Notes: + - Only one-half of the structure is modeled because of symmetry. + The boundary conditions for the equivalent half model become fixed-free. + Large deflection is needed since the stiffness of the structure and the + loading change significantly with deflection. The offset e is defined in + the element coordinate system. + +.. GENERATED FROM PYTHON SOURCE LINES 72-99 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm14_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import pandas + + # Launch MAPDL with specified settings + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear any existing database + mapdl.clear() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Run the /VERIFY command for VM14 + mapdl.run("/VERIFY,VM14") + + # Set the title of the analysis + mapdl.title("VM14 LARGE DEFLECTION ECCENTRIC COMPRESSION OF SLENDER COLUMN") + + # Enter the model creation preprocessor + mapdl.prep7(mute=True) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-103 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 3D 2-Node Beam element (Beam188) and set cubic shape function Keyopt(3)=3. + +.. GENERATED FROM PYTHON SOURCE LINES 103-109 + +.. code-block:: Python + + + mapdl.et(1, "BEAM188", "", "", 3) # Element type BEAM188 + mapdl.sectype(1, "BEAM", "CHAN") # Section type BEAM CHAN + mapdl.secdata(2.26, 2.26, 8, 0.39, 0.39, 0.22) # Section data + mapdl.secoffset("USER", "", 0.6465) # Section offset + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + BEAM SECTION WITH SECTION ID NUMBER 1 IS OFFSET TO + OFFSET Y = 0.0000 + OFFSET Z = 0.64650 + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-114 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 114-118 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("PRXY", 1, 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 PRXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 119-123 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 123-136 + +.. code-block:: Python + + + mapdl.n(1) # Node 1 + mapdl.n(5, "", 60) # Node 5 at 60 degrees + + # Generate additional nodes + mapdl.fill() + + # Define element connectivity + mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + + # Generates elements from an existing pattern + mapdl.egen(4, 1, 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + GENERATE 4 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= 4 + + + +.. GENERATED FROM PYTHON SOURCE LINES 137-145 + +Define coupling and boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all degrees of freedom for node 1. Apply a negative force 4000 lb in FY +direction at node 5. Apply symmetry boundary condition along z-direction. +Then exit prep7 processor. + +Effectively, this sets: + :math:`F = 4000 lb` + +.. GENERATED FROM PYTHON SOURCE LINES 145-158 + +.. code-block:: Python + + + mapdl.d(1, "ALL") # Fix all degrees of freedom for node 1 + mapdl.f(5, "FY", -4000) # Apply a negative force FY to node 5 + mapdl.dsym("SYMM", "Z") # Apply symmetry boundary condition in Z-direction + + # select all entities + mapdl.allsel() + # element plot + mapdl.eplot() + + # Finish the pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-014_001.png + :alt: vm 014 + :srcset: /verif-manual/images/sphx_glr_vm-014_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 159-162 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 162-175 + +.. code-block:: Python + + + mapdl.slashsolu() + + # Activate large deflections + mapdl.nlgeom("ON") + + # Set convergence tolerances + mapdl.cnvtol("F", "", 1e-4) + mapdl.cnvtol("M", "", 1e-4) + + mapdl.solve() # starts a solution + mapdl.finish() # exists solution processor + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 176-179 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components. + +.. GENERATED FROM PYTHON SOURCE LINES 179-182 + +.. code-block:: Python + + + mapdl.post1() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ***** MAPDL RESULTS INTERPRETATION (POST1) ***** + + + USE LAST SUBSTEP ON RESULT FILE FOR LOAD CASE 0 + + SET COMMAND GOT LOAD STEP= 1 SUBSTEP= 1 CUMULATIVE ITERATION= 3 + TIME/FREQUENCY= 1.0000 + TITLE= VM14 LARGE DEFLECTION ECCENTRIC COMPRESSION OF SLENDER COLUMN + + + +.. GENERATED FROM PYTHON SOURCE LINES 183-185 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 185-188 + +.. code-block:: Python + + q = mapdl.queries + end_node = q.node(0, 60, 0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 189-191 + +Retrieve nodal deflection and section stresses +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 191-212 + +.. code-block:: Python + + deflection = mapdl.get("DEF", "NODE", end_node, "U", "X") # Nodal deflection + strss_tens = float( + mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")[:11] + ) # Maximum section tensile stress + strss_comp = float( + mapdl.get("STS_COMP", "SECR", 1, "S", "X", "MIN")[:11] + ) # Minimum section compressive stress + + # Fill the array with target values + target_def = 0.1086 + target_tens = 1803.63 + target_comp = -2394.53 + + data = [ + [target_def, deflection, target_def / deflection], + [target_tens, strss_tens, target_tens / strss_tens], + [target_comp, strss_comp, target_comp / strss_comp], + ] + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["DEFLECTION (in)", "STRSS_TENS (psi)", "STRSS_COMP (psi)"] + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 213-215 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 215-218 + +.. code-block:: Python + + + print(pandas.DataFrame(data, row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + TARGET Mechanical APDL RATIO + DEFLECTION (in) 0.1086 0.108815 0.998022 + STRSS_TENS (psi) 1803.6300 1807.344850 0.997945 + STRSS_COMP (psi) -2394.5300 -2396.000490 0.999386 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 219-221 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 221-223 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 224-226 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 226-227 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.719 seconds) + + +.. _sphx_glr_download_verif-manual_vm-014.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-014.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-014.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-015.rst.txt b/_sources/verif-manual/vm-015.rst.txt new file mode 100644 index 00000000..0d270f36 --- /dev/null +++ b/_sources/verif-manual/vm-015.rst.txt @@ -0,0 +1,581 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-015.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-015.py: + +.. _ref_vm15: + +Bending of a Circular Plate Using Axisymmetric Shell Elements +------------------------------------------------------------- +Problem description: + - A flat circular plate of radius r and thickness t is subject to + various edge constraints and surface loadings. Determine the + deflection :math:`\delta` at the middle and the maximum stress :math:`\sigma_{max}` + for each case. + + * Case 1: Uniform loading :math:`P`, clamped edge. + * Case 2: Concentrated center loading :math:`F`, clamped edge. + * Case 3: Uniform loading :math:`\frac{P}{4}`, simply supported edge. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 96,97, and 103. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-Node Finite Strain Axisymmetric Shell (SHELL208) + +.. image:: ../_static/vm15_setup.png + :width: 400 + :alt: VM15 Flat Circular Plate Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`r = 40.0 in` + - :math:`t = 1.0 in` + +Loading: + - :math:`P = 6.0 psi` + - :math:`F = 7,539.82 lb` + +Analysis Assumptions and Modeling Notes: + - The stiffness matrix formed in the first load step is automatically reused + in the second load step. A new stiffness matrix is automatically formed in + the third load step because of changed boundary constraints. The mesh density + is biased near the centerline and outer edge to recover stress values near + those points. + +.. GENERATED FROM PYTHON SOURCE LINES 72-99 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm15_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import pandas as pd + + # Launch MAPDL with specified settings + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear any existing database + mapdl.clear() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Run the /VERIFY command for VM15 + mapdl.run("/VERIFY,VM15") + + # Set the title of the analysis + mapdl.title("VM15 BENDING OF A CIRCULAR PLATE USING AXISYMMETRIC SHELL ELEMENTS") + + # Enter the model creation prep7 preprocessor + mapdl.prep7(mute=True) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-104 + +Define element type and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2-Node Axisymmetric Shell (SHELL208) and include extra internal node, +via Keyopt(3)=2. + +.. GENERATED FROM PYTHON SOURCE LINES 104-110 + +.. code-block:: Python + + + mapdl.et(1, "SHELL208", "", "", 2) # Element type SHELL208 + mapdl.sectype(1, "SHELL") # Section type SHELL + mapdl.secdata(1, 1) # Section data + mapdl.secnum(1) # Section number + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + SECTION ID NUMBER= 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 111-115 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 115-119 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) # Young's modulus + mapdl.mp("NUXY", 1, 0.3) # Poisson's ratio + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-124 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 124-147 + +.. code-block:: Python + + + mapdl.n(1) # Node 1 + mapdl.n(11, 40) # Node 11 at 40 degrees + mapdl.n(6, 20) # Node 6 at 20 degrees + + # Generate mesh with biased elements + mapdl.fill(1, 6, 4, "", "", "", "", 20) # BIAS THE MESH TO ALLOW STRESS RECOVERY NEAR + mapdl.fill(6, 11, 4, "", "", "", "", 0.05) # THE CENTERLINE AND EDGE CONSTRAINTS + + # Define element connectivity + mapdl.e(1, 2) # Element 1 with nodes 1 and 2 + + # Generates elements from an existing pattern + mapdl.egen(10, 1, -1) + + # select all entities + mapdl.allsel() + # element plot + mapdl.eplot() + + # Finish the pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-015_001.png + :alt: vm 015 + :srcset: /verif-manual/images/sphx_glr_vm-015_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 148-151 + +Solve +~~~~~ +Enter solution mode and solve the system for three load steps. + +.. GENERATED FROM PYTHON SOURCE LINES 151-160 + +.. code-block:: Python + + + mapdl.slashsolu() + + # Set analysis type to static + mapdl.antype("STATIC") + + # Controls the solution printout + mapdl.outpr("", 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + PRINT BASI ITEMS WITH A FREQUENCY OF 1 + FOR ALL APPLICABLE ENTITIES + + + +.. GENERATED FROM PYTHON SOURCE LINES 161-170 + +Define boundary conditions and loadings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all degrees of freedom (dof) at node 11 and fix UX & ROTZ dofs at node 1. +Solve for three load case scenarios as defined. + +Case 1: Apply uniform pressure loading, P = 6 psi near clamped edge. +Case 2: Concentrated center loading F = 7,539.82 lb, clamped edge. +Case 3: Uniform loading P/4, simply supported edge. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 170-201 + +.. code-block:: Python + + + # Apply boundary conditions and loads for CASE 1 + mapdl.d(1, "UX", "", "", "", "ROTZ") # Fix UX and ROTZ for node 1 + mapdl.d(11, "ALL") # Fix all degrees of freedom for node 11 + mapdl.sfe("ALL", 1, "PRES", "", 6) # Surface Pressure load = 6 PSI on all elements + + # start solve for 1st load case + mapdl.solve() + + # Apply boundary conditions and loads for Load Case 2 + # Load Case 2: Concentrated Center Loading - Clamped Edge + mapdl.f(1, "FY", -7539.82) # apply concentrated force FY on node 1 + mapdl.sfe( + "ALL", 1, "PRES", "", 0 + ) # apply elemental surface pressure load of magnitude "0" + + # start solve for 2nd load case + mapdl.solve() + + # Apply boundary conditions and loads for Load Case 3 + # Load Case 3: Uniform Loading - Simply Supported Edge + mapdl.ddele(11, "ROTZ") # Delete clamped boundary condition constraint + mapdl.f(1, "FY") # apply nodal force of magnitude "0" + mapdl.sfe("ALL", 1, "PRES", "", 1.5) # elemental surface pressure load = 1.5 PSI + + # start solve for 3rd load case + mapdl.solve() + + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 202-205 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components. + +.. GENERATED FROM PYTHON SOURCE LINES 205-227 + +.. code-block:: Python + + + mapdl.post1() + + # Set displacement scaling for post-processing + # mapdl.dscale(1, 35) + + # Set up and activate window 1 + mapdl.window(1, -1, 1, -1, -0.333) + + # reactivates suppressed printout + mapdl.gopr() + + # Set 1st load case to be read from result file for post-processing + mapdl.set(1, 1) + + mapdl.pldisp(1) # Displays the displaced structure + mapdl.window(1, "OFF") # Turn off window 1 + mapdl.window(2, -1, 1, -0.333, 0.333, 1) # Turn on window 2 + + # Don't erase existing displays + mapdl.run("/NOERASE") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + NO ERASE OPTION SET + + + +.. GENERATED FROM PYTHON SOURCE LINES 228-230 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 230-234 + +.. code-block:: Python + + q = mapdl.queries + # Grab node using coordinates and assign it variable to "MID_NODE" + MID_NODE = q.node(0, 0, 0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 235-237 + +Retrieve nodal deflection and elemental stresses for each load cases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 237-270 + +.. code-block:: Python + + + # 1st load case, retrieve nodal defection UY for a node assigned to "DEF_C1" + def_c1 = mapdl.get("DEF_C1", "NODE", MID_NODE, "U", "Y") + # Define etable for elemental component stress (X) + mapdl.etable("STRS", "S", "X") + # using *get command extracting elemental stress via ETAB + strss_c1 = mapdl.get("STRSS_C1", "ELEM", 10, "ETAB", "STRS") + + # Set 2nd load case to be read from result file for post-processing + mapdl.set(2, 1) + + mapdl.pldisp() # Displays the displaced structure + mapdl.window(2, "OFF") # Turn off window 2 + mapdl.window(3, -1, 1, 0.333, 1, 1) # Turn on window 3 + + # retrieve nodal defection UY for a node assigned to "DEF_C2" + def_c2 = mapdl.get("DEF_C2", "NODE", MID_NODE, "U", "Y") + # Define etable for elemental component stress (X) + mapdl.etable("STRS", "S", "X") + # using *get command extracting elemental stress via ETAB + strss_c2 = mapdl.get("STRSS_C2", "ELEM", 10, "ETAB", "STRS") + + # Set 2nd load case to be read from result file for post-processing + mapdl.set(3, 1) + + mapdl.pldisp() # Displays the displaced structure + # retrieve nodal defection UY for a node assigned to "DEF_C3" + def_c3 = mapdl.get("DEF_C3", "NODE", MID_NODE, "U", "Y") + # Define etable for elemental component stress (X) + mapdl.etable("STRS", "S", "X") + # using *get command extracting elemental stress via ETAB + strss_c3 = mapdl.get("STRSS_C3", "ELEM", 1, "ETAB", "STRS") + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 271-273 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 273-307 + +.. code-block:: Python + + + # Set target values + target_def = [-0.08736, -0.08736, -0.08904] + target_strss = [7200, 3600, 2970] + + # Fill result values + res_def = [def_c1, def_c2, def_c3] + res_strss = [strss_c1, strss_c2, strss_c3] + + title = f""" + + ------------------- VM15 RESULTS COMPARISON --------------------- + """ + print(title) + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["DEFLECTION (in)", "MAX STRESS (psi)"] + + for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + + RESULTS FOR CASE {lc+1:1d}: + ------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM15 RESULTS COMPARISON --------------------- + + + + RESULTS FOR CASE 1: + ------------------- + + + TARGET Mechanical APDL RATIO + DEFLECTION (in) -0.08736 -0.087641 0.996795 + MAX STRESS (psi) 7200.00000 7040.372800 1.022673 + + + RESULTS FOR CASE 2: + ------------------- + + + TARGET Mechanical APDL RATIO + DEFLECTION (in) -0.08736 -0.088273 0.989656 + MAX STRESS (psi) 3600.00000 3568.271970 1.008892 + + + RESULTS FOR CASE 3: + ------------------- + + + TARGET Mechanical APDL RATIO + DEFLECTION (in) -0.08904 -0.08911 0.999212 + MAX STRESS (psi) 2970.00000 2966.45447 1.001195 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 308-310 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 310-312 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 313-315 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 315-316 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.717 seconds) + + +.. _sphx_glr_download_verif-manual_vm-015.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-015.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-015.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-016.rst.txt b/_sources/verif-manual/vm-016.rst.txt new file mode 100644 index 00000000..1ebe4817 --- /dev/null +++ b/_sources/verif-manual/vm-016.rst.txt @@ -0,0 +1,1077 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-016.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-016.py: + +.. _ref_vm16: + +Bending of a Solid Beam (Plane Elements) +---------------------------------------- +Problem description: + - A beam of length :math:`l` and height :math:`h` is built-in at one end and loaded at the + free end with: + + * Case 1: a moment :math:`M`. + * Case 2: a shear force :math:`F`. + + For each case, determine the deflection :math:`\delta` at the free end and the bending + stress :math:`\sigma_{Bend}` a distance d from the wall at the outside fiber. + +Reference: + - Formulas for Stress and Strain, R. J. Roark, 4th Edition, McGraw-Hill Book Co., Inc., + New York, NY, 1965, pp. 104, 106. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-D Structural Solid Elements (PLANE42) + - 2-D 4 Node structural elements(PLANE182) + +.. image:: ../_static/vm16_setup.png + :width: 400 + :alt: VM16 Bending of a Solid Beam with Plane Elements Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.0` + +Geometric properties: + - :math:`l = 10 in` + - :math:`h = 2.0 in` + - :math:`d = 1.0 in` + +Loading: + - Case 1, :math:`M = 2000 in-lb` + - Case 2, :math:`F = 300 lb` + +Analysis Assumptions and Modeling Notes: + - The stiffness matrix formed in the first load step is also used in the second + load step (automatically determined by Mechanical APDL). The end moment is + represented by equal and opposite forces separated by a distance h. The bending + stress is obtained from face stresses on element 1. + +.. GENERATED FROM PYTHON SOURCE LINES 72-96 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm16_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import pandas as pd + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear the existing database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Run a /VERIFY command to verify the installation + mapdl.run("/VERIFY,VM16") + + # Set the ANSYS version and reference verification manual + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Set the analysis title + mapdl.title("VM16 BENDING OF A SOLID BEAM (PLANE ELEMENTS)") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + TITLE= + VM16 BENDING OF A SOLID BEAM (PLANE ELEMENTS) + + + +.. GENERATED FROM PYTHON SOURCE LINES 97-100 + +Case 1: Solve Using PLANE42 Element Model. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Enter the model creation prep7 preprocessor + +.. GENERATED FROM PYTHON SOURCE LINES 100-102 + +.. code-block:: Python + + mapdl.prep7(mute=True) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 103-107 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2-D Structural Solid (PLANE42) and include Surface solution for both faces, +via Keyopt(6)=2. + +.. GENERATED FROM PYTHON SOURCE LINES 107-112 + +.. code-block:: Python + + + mapdl.et( + 1, "PLANE42", "", "", "", "", "", 2 + ) # PLANE42 WITH SURFACE PRINTOUT FOR FACES 1 AND 3 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 113-117 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio of 0.0 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 117-121 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) # Elastic modulus + mapdl.mp("NUXY", 1, 0.0) # Poisson's ratio + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 122-126 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 126-147 + +.. code-block:: Python + + + mapdl.n(1) + mapdl.n(6, 10) + + # Generate additional nodes + mapdl.fill() + + # Generates nodes from an existing pattern + mapdl.ngen(2, 10, 1, 6, 1, "", 2) + + # Define elements + mapdl.e(1, 2, 12, 11) + + # Generate additional elements from an existing pattern + mapdl.egen(5, 1, 1) + + # select all entities + mapdl.allsel() + # element plot + mapdl.eplot(background="w") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_001.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 148-152 + +Define boundary conditions and loadings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all degrees of freedom (dof) at nodes 10 & 11. +For load case 1, apply end moment and then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 152-161 + +.. code-block:: Python + + + # Set boundary conditions for case 1 (end moment) + mapdl.d(1, "ALL", "", "", 11, 10) # Displacement constraint + mapdl.f(6, "FX", 1000) # Applied force + mapdl.f(16, "FX", -1000) # Applied force + + # Finish the pre-processing processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 162-165 + +Solve +~~~~~ +Enter solution mode and solve the system for the 1st load case. + +.. GENERATED FROM PYTHON SOURCE LINES 165-176 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set analysis type to static + mapdl.antype("STATIC") + + # start solve for 1st load case + mapdl.solve() + + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 177-180 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components for load case 1. + +.. GENERATED FROM PYTHON SOURCE LINES 180-202 + +.. code-block:: Python + + mapdl.post1() + + # Set "last" load case to be read from result file for post-processing + mapdl.set("LAST") + + # Get displacement at node 16 in the Y-direction + u1 = mapdl.get("U1", "NODE", 16, "U", "Y") + + mapdl.graphics("POWER") # Activates the graphics mode for power graphics + mapdl.eshape(1) # Display element shape + mapdl.view(1, 1, 1, 1) # Set the viewing options + + # for graphics displays + mapdl.show(option="REV", fname="png") + mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + + # Get maximum bending stress for case 1 + bend_stress1 = mapdl.get("BEND_STRESS1", "PLNSOL", 0, "MAX") + mapdl.show("close") + # exists solution processor for case 1 + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_002.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 203-206 + +Solve +~~~~~ +Enter solution mode and solve the system for the 2nd load case. + +.. GENERATED FROM PYTHON SOURCE LINES 206-208 + +.. code-block:: Python + + mapdl.slashsolu() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** MAPDL SOLUTION ROUTINE ***** + + + +.. GENERATED FROM PYTHON SOURCE LINES 209-212 + +Define boundary conditions and loadings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For load case 2, apply end load and then solve for 2nd load case. + +.. GENERATED FROM PYTHON SOURCE LINES 212-221 + +.. code-block:: Python + + + mapdl.f(6, "FX", "", "", 16, 10) # Applied force in the X-direction + mapdl.f(6, "FY", 150, "", 16, 10) # Applied force in the Y-direction + + # start solve for 2nd load case + mapdl.solve() + # exists solution processor for case 2 + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 222-225 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components for load case 2. + +.. GENERATED FROM PYTHON SOURCE LINES 225-245 + +.. code-block:: Python + + mapdl.post1() + + # Set "last" load case to be read from result file for post-processing + mapdl.set("LAST") + + # Retrieves the displacement "U2" of node 16 in the Y direction + u2 = mapdl.get("U2", "NODE", 16, "U", "Y") + + mapdl.graphics("POWER") # Activates the graphics mode for power graphics + mapdl.eshape(1) # Display element shape + mapdl.view(1, 1, 1, 1) # Set the viewing options + + # for graphics displays + mapdl.show(option="REV", fname="png") + mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + + # Retrieves the maximum bending stress from the plane stress plot + bend_stress2 = mapdl.get("BEND_STRESS2", "PLNSOL", 0, "MAX") + mapdl.show("close") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_003.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 246-248 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 248-284 + +.. code-block:: Python + + + # Set target values + target_def = [0.00500, 0.00500] + target_strss = [3000, 4050] + + # Fill result values + res_def = [u1, u2] + res_strss = [bend_stress1, bend_stress2] + + title = f""" + + ------------------- VM16 RESULTS COMPARISON --------------------- + + PLANE42 + ======= + """ + print(title) + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Deflection (in)", "Bending Stress (psi)"] + + for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + + RESULTS FOR CASE {lc+1:1d}: + ------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM16 RESULTS COMPARISON --------------------- + + PLANE42 + ======= + + + + RESULTS FOR CASE 1: + ------------------- + + + TARGET Mechanical APDL RATIO + Deflection (in) 0.005 0.005 1.0 + Bending Stress (psi) 3000.000 3000.000 1.0 + + + RESULTS FOR CASE 2: + ------------------- + + + TARGET Mechanical APDL RATIO + Deflection (in) 0.005 0.00505 0.990099 + Bending Stress (psi) 4050.000 4050.00000 1.000000 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 285-287 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 287-289 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 290-292 + +Clears the database without restarting. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 292-294 + +.. code-block:: Python + + mapdl.run("/CLEAR,NOSTART") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + CLEAR MAPDL DATABASE AND RESTART + + Ansys Mechanical Enterprise + + + +.. GENERATED FROM PYTHON SOURCE LINES 295-298 + +Case 2: Solve Using PLANE182 Element Model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Switches to the preprocessor (PREP7) + +.. GENERATED FROM PYTHON SOURCE LINES 298-300 + +.. code-block:: Python + + 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 301-305 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2-D 4 Node structural elements (PLANE182) and include simplified enhanced +strain formulation, via Keyopt(1)=3. + +.. GENERATED FROM PYTHON SOURCE LINES 305-311 + +.. code-block:: Python + + + # Defines an element type as PLANE182 + mapdl.et(1, "PLANE182") + # Sets a key option for the element type + mapdl.keyopt(1, 1, 3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ELEMENT TYPE 1 IS PLANE182 2-D 4-NODE PLANE STRS SOLID + KEYOPT( 1- 6)= 3 0 0 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 + TWO-DIMENSIONAL MODEL + + + +.. GENERATED FROM PYTHON SOURCE LINES 312-316 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio of 0.0 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 316-320 + +.. code-block:: Python + + + 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 321-325 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 325-347 + +.. code-block:: Python + + + # Defines nodes + mapdl.n(1) + mapdl.n(6, 10) + + # Generate additional nodes + mapdl.fill() + + # Generates additional nodes from an existing pattern + mapdl.ngen(2, 10, 1, 6, 1, "", 2) + + # Defines elements + mapdl.e(1, 2, 12, 11) + + # Generates additional elements from an existing pattern + mapdl.egen(5, 1, 1) + + # select all entities + mapdl.allsel() + # element plot + mapdl.eplot(background="w") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_004.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 348-352 + +Define boundary conditions and loadings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all degrees of freedom (dof) at nodes 10 & 11. +For load case 1, apply end moment and then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 352-361 + +.. code-block:: Python + + + mapdl.d(1, "ALL", "", "", 11, 10) + # Applies nodal forces + mapdl.f(6, "FX", 1000) + mapdl.f(16, "FX", -1000) + + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 362-365 + +Solve +~~~~~ +Enter solution mode and solve the system for the 1st load case. + +.. GENERATED FROM PYTHON SOURCE LINES 365-376 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set analysis type to static + mapdl.antype("STATIC") + + # start solve for 1st load case + mapdl.solve() + + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 377-380 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components for load case 1. + +.. GENERATED FROM PYTHON SOURCE LINES 380-403 + +.. code-block:: Python + + mapdl.post1() + + # Sets the LAST result as the active result set + mapdl.set("LAST") + + # Retrieves the displacement "U1" of node 16 in the Y direction + u1 = mapdl.get("U1", "NODE", 16, "U", "Y") + + mapdl.graphics("POWER") # Activates the graphics mode for power graphics + mapdl.eshape(1) # Display element shape + mapdl.view(1, 1, 1, 1) # Set the viewing options + + # for graphics displays + mapdl.show(option="REV", fname="png") + mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + + # Retrieves the maximum bending stress from the plane stress plot + bend_stress1 = mapdl.get("BEND_STRESS1", "PLNSOL", 0, "MAX") + mapdl.show("close") + + # exists solution processor for case 1 + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_005.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_005.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 404-407 + +Solve +~~~~~ +Enter solution mode and solve the system for the 2nd load case. + +.. GENERATED FROM PYTHON SOURCE LINES 407-409 + +.. code-block:: Python + + mapdl.slashsolu() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** MAPDL SOLUTION ROUTINE ***** + + + +.. GENERATED FROM PYTHON SOURCE LINES 410-413 + +Define boundary conditions and loadings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For load case 2, apply end load and then solve for 2nd load case. + +.. GENERATED FROM PYTHON SOURCE LINES 413-422 + +.. code-block:: Python + + + mapdl.f(6, "FX", "", "", 16, 10) + mapdl.f(6, "FY", 150, "", 16, 10) + + # start solve for 2nd load case + mapdl.solve() + # exists solution processor for case 2 + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 423-426 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress components for load case 2. + +.. GENERATED FROM PYTHON SOURCE LINES 426-446 + +.. code-block:: Python + + mapdl.post1() + + # Sets the LAST result as the active result set + mapdl.set("LAST") + + # Retrieves the displacement "U2" of node 16 in the Y direction + u2 = mapdl.get("U2", "NODE", 16, "U", "Y") + + mapdl.graphics("POWER") # Activates the graphics mode for power graphics + mapdl.eshape(1) # Display element shape + mapdl.view(1, 1, 1, 1) # Set the viewing options + + # for graphics displays + mapdl.show(option="REV", fname="png") + mapdl.plnsol("S", "X") # Plot bending stress along the X-axis + + # Retrieves the maximum bending stress from the plane stress plot + bend_stress2 = mapdl.get("BEND_STRESS2", "PLNSOL", 0, "MAX") + mapdl.show("close") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-016_006.png + :alt: vm 016 + :srcset: /verif-manual/images/sphx_glr_vm-016_006.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 447-449 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 449-484 + +.. code-block:: Python + + + # Set target values + target_def = [0.00500, 0.00500] + target_strss = [3000, 4050] + + # Fill result values + res_def = [u1, u2] + res_strss = [bend_stress1, bend_stress2] + + title = f""" + + PLANE182 + ======== + """ + print(title) + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Deflection (in)", "Bending Stress (psi)"] + + for lc in range(len(res_def)): + data = [ + [target_def[lc], res_def[lc], abs(target_def[lc] / res_def[lc])], + [target_strss[lc], abs(res_strss[lc]), abs(target_strss[lc] / res_strss[lc])], + ] + + title = f""" + + RESULTS FOR CASE {lc+1:1d}: + ------------------- + + """ + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + PLANE182 + ======== + + + + RESULTS FOR CASE 1: + ------------------- + + + TARGET Mechanical APDL RATIO + Deflection (in) 0.005 0.005 1.0 + Bending Stress (psi) 3000.000 3000.000 1.0 + + + RESULTS FOR CASE 2: + ------------------- + + + TARGET Mechanical APDL RATIO + Deflection (in) 0.005 0.00505 0.990099 + Bending Stress (psi) 4050.000 4050.00000 1.000000 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 485-487 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 487-491 + +.. code-block:: Python + + mapdl.finish() + + # Exit MAPDL session + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.333 seconds) + + +.. _sphx_glr_download_verif-manual_vm-016.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-016.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-016.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-018.rst.txt b/_sources/verif-manual/vm-018.rst.txt new file mode 100644 index 00000000..9e3745dc --- /dev/null +++ b/_sources/verif-manual/vm-018.rst.txt @@ -0,0 +1,837 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-018.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-018.py: + +.. _ref_vm18: + +Out-of-Plane Bending of a Curved Bar +------------------------------------ +Problem description: + - A portion of a horizontal circular ring, built-in at A, is loaded by a vertical (Z) + load F applied at the end B. The ring has a solid circular cross-section of diameter d. + Determine the deflection :math:`\delta` at end B, the maximum bending + stress :math:`\sigma_{Bend}` , and the maximum torsional shear stress τ. + +Reference: + - S. Timoshenko, Strength of Materials, Part I, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1955, + pg. 412, eq. 241. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - Elastic Curved Pipe Element (PIPE18) + - 3-D 3 Node Pipe Element (PIPE289) + +.. figure:: ../_static/vm18_setup1.png + :align: center + :width: 400 + :alt: VM18 Curved Bar Problem Sketch + +.. figure:: ../_static/vm18_setup2.png + :align: center + :width: 400 + :alt: VM18 Curved Bar Finite Element Model + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`r = 100 in` + - :math:`d = 2 in` + - :math:`\theta = 90°` + +Loading: + - :math:`F = 50 lb` + +Analysis Assumptions and Modeling Notes: + - Node 10 is arbitrarily located on the radius of curvature side of the element to define the + plane of the elbow when PIPE18 elements are used. The wall thickness is set to half the diameter + for a solid bar. Since the section has no hole in the middle, ovalization cannot occur and + PIPE289 elements can be used to determine the deflection and stresses. + +.. GENERATED FROM PYTHON SOURCE LINES 74-102 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm18_setup1.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Launch MAPDL with specified settings + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear the existing database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command + mapdl.run("/VERIFY,VM18") + + # Set the title of the analysis + mapdl.title("VM18 OUT-OF-PLANE BENDING OF A CURVED BAR") + + # Enter the model creation /Prep7 preprocessor + 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 103-106 + +Define element type and real properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use Elastic Curved Pipe element (PIPE18) and set KEYOPT(6)=2 for printing member forces. + +.. GENERATED FROM PYTHON SOURCE LINES 106-111 + +.. code-block:: Python + + mapdl.et(1, "PIPE18", "", "", "", "", "", 2) + + # Define geometry parameters (OD, wall thickness, radius) using "r" command (real constant) + mapdl.r(1, 2, 1, 100) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + REAL CONSTANT SET 1 ITEMS 1 TO 6 + 2.0000 1.0000 100.00 0.0000 0.0000 0.0000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 112-116 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio NUXY of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 116-119 + +.. code-block:: Python + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("NUXY", 1, 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-124 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 124-133 + +.. code-block:: Python + + + # Define nodes + mapdl.n(1, 100) + mapdl.n(2, "", 100) + mapdl.n(10) + + # Define element + mapdl.e(1, 2, 10) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 134-138 + +Define boundary conditions and load +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all dofs at node 1. Specify nodal force F = -50 lb along Z direction at node 2. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 138-150 + +.. code-block:: Python + + + mapdl.d(1, "ALL") # Define boundary conditions + mapdl.f(2, "FZ", -50) # Define load + + # Selects all entities + mapdl.allsel() + # Element plot + mapdl.eplot(vtk=False) + + # Finish preprocessing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-018_001.png + :alt: vm 018 + :srcset: /verif-manual/images/sphx_glr_vm-018_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 151-154 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 154-167 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set the analysis type to STATIC + mapdl.antype("STATIC") + + # Set output options + mapdl.outpr("BASIC", 1) + + # Perform the solution + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + Distributed parallel processing has been reactivated. + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 168-171 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress quantities. + +.. GENERATED FROM PYTHON SOURCE LINES 171-191 + +.. code-block:: Python + + mapdl.post1() + + # Set the current results set to the last set to be read from result file + mapdl.set("LAST") + + # Get displacement results at node 2 in the Z direction + def_z = mapdl.get("DEF", "NODE", 2, "U", "Z") + + # Create an element table for bending stresses using ETABLE command + strs_ben = mapdl.etable("STRS_BEN", "NMISC", 91) + + # Create an element table for shear stresses using ETABLE command + strs_shr = mapdl.etable("STRS_SHR", "LS", 4) + + # Get bending stresses (ETAB: STRS_BEN) for element 1 + strss_b = mapdl.get("STRSS_B", "ELEM", 1, "ETAB", "STRS_BEN") + + # Get shear stresses (ETAB: STRS_SHR) for element 1 + strss_t = mapdl.get("STRSS_T", "ELEM", 1, "ETAB", "STRS_SHR") + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 192-194 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 194-217 + +.. code-block:: Python + + + # Set target values + target_val = [-2.648, 6366, -3183] + + # Fill result values + sim_res = [def_z, strss_b, strss_t] + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Deflection (in)", "Stress_Bend (psi)", "Shear Stress (psi)"] + + data = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)] + + title = f""" + + ------------------- VM18 RESULTS COMPARISON --------------------- + + PIPE18: + ------- + """ + + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM18 RESULTS COMPARISON --------------------- + + PIPE18: + ------- + + TARGET Mechanical APDL RATIO + Deflection (in) -2.648 -2.649729 0.999348 + Stress_Bend (psi) 6366.000 6366.197750 0.999969 + Shear Stress (psi) -3183.000 -3183.098880 0.999969 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 218-220 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 220-222 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 223-225 + +Clears the database without restarting. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 225-227 + +.. code-block:: Python + + mapdl.run("/CLEAR,NOSTART") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + CLEAR MAPDL DATABASE AND RESTART + + Ansys Mechanical Enterprise + + + +.. GENERATED FROM PYTHON SOURCE LINES 228-230 + +Set a new title for the analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 230-232 + +.. code-block:: Python + + mapdl.title("VM18 OUT-OF-PLANE BENDING OF A CURVED BAR Using PIPE289 ELEMENT MODEL") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + TITLE= + VM18 OUT-OF-PLANE BENDING OF A CURVED BAR Using PIPE289 ELEMENT MODEL + + + +.. GENERATED FROM PYTHON SOURCE LINES 233-235 + +Switches to the preprocessor (PREP7) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 235-237 + +.. code-block:: Python + + 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 238-241 + +Define element type and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 3-D 3-Node Pipe element (PIPE289) and set KEYOPT(4)= 2 Thick pipe theory. + +.. GENERATED FROM PYTHON SOURCE LINES 241-245 + +.. code-block:: Python + + mapdl.et(1, "PIPE289", "", "", "", 2) + mapdl.sectype(1, "PIPE") # Set section type PIPE + mapdl.secdata(2, 1, 16) # Set section data (OD, wall thickness) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + SECTION ID NUMBER: 1 + PIPE SECTION NAME IS: + PIPE SECTION DATA SUMMARY: + Outside Diameter = 2.0000 + Thickness = 1.0000 + Area = 3.1414 + Iyy = 0.78529 + Torsion Constant = 1.5706 + Shear Correction-yy = 0.86083 + Num of Circum Cells = 16 + + + +.. GENERATED FROM PYTHON SOURCE LINES 246-250 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio NUXY of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 250-253 + +.. code-block:: Python + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("NUXY", 1, 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 254-258 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 258-275 + +.. code-block:: Python + + + mapdl.csys(1) # Set coordinate system to 1 + + mapdl.n(1, 100) # Define nodes + + # Generate additional nodes + mapdl.ngen(19, 1, 1, "", "", "", 5) + + # Define element + mapdl.e(1, 3, 2) + + # Generate additional elements from an existing pattern + mapdl.egen(9, 2, -1) + + # Reset coordinate system to global + mapdl.csys(0) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ACTIVE COORDINATE SYSTEM SET TO 0 (CARTESIAN) + + + +.. GENERATED FROM PYTHON SOURCE LINES 276-280 + +Define boundary conditions and load +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix all dofs at node 1. Specify nodal force F = -50 lb along Z direction at node 19. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 280-291 + +.. code-block:: Python + + mapdl.d(1, "ALL") + mapdl.f(19, "FZ", -50) + + # Selects all entities + mapdl.allsel() + # Element plot + mapdl.eplot(vtk=False) + + # exists pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-018_002.png + :alt: vm 018 + :srcset: /verif-manual/images/sphx_glr_vm-018_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 292-295 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 295-308 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set the analysis type to STATIC + mapdl.antype("STATIC") + + # Set output options + mapdl.outpr("BASIC", 1) + + # Perform the solution + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 309-312 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflection and stress quantities. + +.. GENERATED FROM PYTHON SOURCE LINES 312-337 + +.. code-block:: Python + + mapdl.post1() + + # Set the current results set to the last set + mapdl.set("LAST") + mapdl.graphics("POWER") # Set graphics mode to POWER + mapdl.eshape(1) # Set element shape + mapdl.view(1, 1, 1, 1) # Set view + + # Get displacement results at node 19 in the Z direction + def_z = mapdl.get("DEF", "NODE", 19, "U", "Z") + + # Create an element table for bending stresses using ETABLE command + strs_ben = mapdl.etable("STRS_BEN", "SMISC", 35) + + # Get bending stresses (ETAB: STRS_BEN) for element 1 using ETABLE command + strss_b = mapdl.get("STRSS_B", "ELEM", 1, "ETAB", "STRS_BEN") + + # for graphics displays + mapdl.show(option="REV") + # Plot elemtal solution values for SXY component + mapdl.plesol("S", "XY") + # Get minimum shear stress + shear_sxy = mapdl.get("SHEAR", "PLNSOL", 0, "MIN") + mapdl.show("close") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-018_003.png + :alt: vm 018 + :srcset: /verif-manual/images/sphx_glr_vm-018_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 338-340 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 340-361 + +.. code-block:: Python + + + # Set target values + target_val = [-2.648, 6366, -3183] + + # Fill result values + sim_res = [def_z, strss_b, shear_sxy] + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Deflection (in)", "Stress_Bend (psi)", "Shear Stress (psi)"] + + data = [target_val, sim_res, np.abs(target_val) / np.abs(sim_res)] + + title = f""" + + PIPE289: + -------- + """ + + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + PIPE289: + -------- + + TARGET Mechanical APDL RATIO + Deflection (in) -2.648 -2.649533 0.999422 + Stress_Bend (psi) 6366.000 -6446.631350 0.987492 + Shear Stress (psi) -3183.000 -3199.472410 0.994852 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 362-364 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 364-366 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 367-369 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 369-370 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.582 seconds) + + +.. _sphx_glr_download_verif-manual_vm-018.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-018.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-018.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-020.rst.txt b/_sources/verif-manual/vm-020.rst.txt new file mode 100644 index 00000000..c3b46f05 --- /dev/null +++ b/_sources/verif-manual/vm-020.rst.txt @@ -0,0 +1,444 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-020.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-020.py: + +.. _ref_vm20: + +Cylindrical Membrane Under Pressure +----------------------------------- +Problem description: + - A long cylindrical membrane container of diameter d and wall thickness t is subjected to a + uniform internal pressure P. Determine the axial stress :math:`\sigma_1` and the + hoop stress :math:`\sigma_2` in the container. See VM13 for the problem sketch. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 121, article 25. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 4-Node Finite Strain Shell Elements (SHELL181) + +.. image:: ../_static/vm20_setup.png + :width: 400 + :alt: VM20 Cylindrical Membrane Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + +Geometric properties: + - :math:`d = 120 in` + - :math:`t = 1 in` + +Loading: + - :math:`p = 500 psi` + +Analysis Assumptions and Modeling Notes: + - An arbitrary axial length is selected. Since the problem is axisymmetric, only a one element + sector is needed. A small angle :math:`\theta` = 10° is used for approximating the circular + boundary with a straight-sided element. Nodal coupling is used at the boundaries. An axial + traction of 15,000 psi is applied to the edge of the element to simulate the closed-end effect. + The internal pressure is applied as an equivalent negative pressure on the exterior (face 1) + of the element. + +.. GENERATED FROM PYTHON SOURCE LINES 67-95 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm20_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear the existing database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the VM20 verification + mapdl.run("/VERIFY,VM20") + + # Set the analysis title + mapdl.title("VM20 CYLINDRICAL MEMBRANE UNDER PRESSURE") + + # Enter the model creation /Prep7 preprocessor + 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 96-101 + +Define element type and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 4-Node Structural Shell element (SHELL181) for finite strain membrane. Specify +key option for membrane stiffness only via setting Keyopt(1)=1. Include full integration +via setting Keyopt(3)=2. + +.. GENERATED FROM PYTHON SOURCE LINES 101-108 + +.. code-block:: Python + + + mapdl.et(1, "SHELL181") # Define element type as SHELL181 + mapdl.keyopt(1, 1, 1) # Set key option for membrane stiffness only + mapdl.keyopt(1, 3, 2) # Set key option for full integration + mapdl.sectype(1, "SHELL") # Section type SHELL + mapdl.secdata(1, 1) # Define section data + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + Shell Section ID= 1 Number of layers= 1 Total Thickness= 1.000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-113 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio NUXY of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 113-117 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) # Define modulus of elasticity + mapdl.mp("NUXY", 1, 0.3) # Define Poisson's ratio + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 118-122 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 122-139 + +.. code-block:: Python + + + mapdl.csys(1) # Define cylindrical coordinate system + + mapdl.n(1, 60) # Define nodes + + # Define additional node with translation + mapdl.n(2, 60, "", 10) + + # Generate additional nodes from an existing pattern + mapdl.ngen(2, 2, 1, 2, 1, "", 10) + + # Rotate nodal coordinate system to cylindrical + mapdl.nrotat("ALL") + + # Define elements + mapdl.e(1, 2, 4, 3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 140-145 + +Define coupling and boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Apply couplings and fix UZ displacement at specific node and UY displacement for all nodes. +Specify axial traction= -15000 psi and internal pressure= -500 psi on elements uaing SFE command. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 145-163 + +.. code-block:: Python + + + mapdl.cp(1, "UX", 1, 2, 3, 4) # Couple radial displacements + mapdl.cp(2, "UZ", 2, 4) # Couple UZ displacements + + mapdl.d(1, "UZ", "", "", 3, 2) # Fix UZ displacement at specific node + mapdl.d("ALL", "UY") # Fix UY displacement for all nodes + + mapdl.sfe(1, 4, "PRES", "", -15000) # Apply axial traction on elements + mapdl.sfe(1, 1, "PRES", "", -500) # Apply internal pressure on elements + + # Selects all entities + mapdl.allsel() + # Element plot + mapdl.eplot(background="w") + + # Finish the preprocessing steps + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-020_001.png + :alt: vm 020 + :srcset: /verif-manual/images/sphx_glr_vm-020_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 164-167 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 167-180 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set the analysis type to STATIC + mapdl.antype("STATIC") + + mapdl.outpr("NSOL", 1) # Output the nodal solution + mapdl.outpr("RSOL", 1) # Output the result summary + + # Perform the solution + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + *** NOTE *** CP = 0.000 TIME= 00:00:00 + Distributed parallel processing has been reactivated. + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 181-184 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute stress quantities. + +.. GENERATED FROM PYTHON SOURCE LINES 184-191 + +.. code-block:: Python + + mapdl.post1() + + # Get hoop stresses at node 1 + strs_hop = mapdl.get("STRS_HOP", "NODE", 1, "S", 2) + # Get axial stresses at node 1 + strs_ax = mapdl.get("STRS_AX", "NODE", 1, "S", 1) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 192-194 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 194-214 + +.. code-block:: Python + + + # Set target values + target_stress = [15000, 29749] + + # Fill result values + sim_res = [strs_hop, strs_ax] + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Stress_1 (psi)", "Stress_2 (psi)"] + + data = [target_stress, sim_res, np.abs(target_stress) / np.abs(sim_res)] + + title = f""" + + ------------------- VM20 RESULTS COMPARISON --------------------- + + """ + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM20 RESULTS COMPARISON --------------------- + + + TARGET Mechanical APDL RATIO + Stress_1 (psi) 15000.0 15000.0000 1.000000 + Stress_2 (psi) 29749.0 29885.8418 0.995421 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 215-217 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 217-219 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 220-222 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 222-223 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.658 seconds) + + +.. _sphx_glr_download_verif-manual_vm-020.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-020.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-020.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-021.rst.txt b/_sources/verif-manual/vm-021.rst.txt new file mode 100644 index 00000000..1797502d --- /dev/null +++ b/_sources/verif-manual/vm-021.rst.txt @@ -0,0 +1,741 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-021.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-021.py: + +.. _ref_vm21: + +Tie Rod with Lateral Loading +---------------------------- +Problem description: + - A tie rod is subjected to the action of a tensile force F and a uniform lateral load p. + Determine the maximum deflection :math:`z_{max}`, the slope :math:`\theta` at the left-hand end, + and the maximum bending moment :math:`M_{max}`. In addition, determine the same three quantities + for the unstiffened tie rod (F = 0). + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 42, article 6. + +Analysis type(s): + - Static, Stress Stiffening Analysis ``ANTYPE=0`` + +Element type(s): + - 3-D 2 node beam (BEAM188) + +.. image:: ../_static/vm21_setup.png + :width: 400 + :alt: VM21 Tie Rod Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + +Geometric properties: + - :math:`l = 200 in` + - :math:`b = h = 2.5 in` + +Loading: + - :math:`F = 21,972.6 lb` + - :math:`p = 1.79253 lb/in` + +Analysis Assumptions and Modeling Notes: + - Due to symmetry, only one-half of the beam is modeled. The full load is applied for each + iteration. The first solution represents the unstiffened case. The second solution represents + the stiffened case. + +.. GENERATED FROM PYTHON SOURCE LINES 65-93 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm21_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear the current database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command for VM21 + mapdl.run("/VERIFY,VM21") + + # Set the title of the analysis + mapdl.title("VM21 TIE ROD WITH LATERAL LOADING NO STREES STIFFENING") + + # Enter the model creation /Prep7 preprocessor + 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 94-97 + +Define element type and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 3-D 2-Node Beam Element and specify cubic shape function via setting Keyopt(3)=3. + +.. GENERATED FROM PYTHON SOURCE LINES 97-104 + +.. code-block:: Python + + + mapdl.et(1, "BEAM188") + + mapdl.keyopt(1, 3, 3) # Set KEYOPT(3) to 3 cubic shape function + mapdl.sectype(1, "BEAM", "RECT") # Specify section properties for the beam element + mapdl.secdata(2.5, 2.5) # Define section data + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + SECTION ID NUMBER IS: 1 + BEAM SECTION TYPE IS: Rectangle + BEAM SECTION NAME IS: + COMPUTED BEAM SECTION DATA SUMMARY: + Area = 6.2500 + Iyy = 3.2552 + Iyz = 0.41633E-16 + Izz = 3.2552 + Warping Constant = 0.23513E-01 + Torsion Constant = 5.5714 + Centroid Y = 0.88818E-17 + Centroid Z = 0.17764E-16 + Shear Center Y = 0.27711E-16 + Shear Center Z =-0.14282E-15 + Shear Correction-xy = 0.84211 + Shear Correction-yz =-0.95989E-15 + Shear Correction-xz = 0.84211 + + Beam Section is offset to CENTROID of cross section + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-109 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson's ratio PRXY of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 109-113 + +.. code-block:: Python + + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("PRXY", "", 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 PRXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 114-118 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 118-131 + +.. code-block:: Python + + + mapdl.n(1) # define nodes + mapdl.n(5, 100) + + # Generate additional nodes + mapdl.fill() + + # Define elements + mapdl.e(1, 2) + + # Generate additional elements from an existing pattern + mapdl.egen(4, 1, 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + GENERATE 4 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= 4 + + + +.. GENERATED FROM PYTHON SOURCE LINES 132-138 + +Define boundary conditions and loading +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Apply a displacement boundary condition in the UY, ROTX and ROTZ directions to all nodes. +Specify symmetry degree-of-freedom constraints on nodes, surface normal to X-dir (default). +Apply a tensile force in X-dir, F = -21972.6 lb and a uniform lateral load, p = 1.79253 lb/in. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 138-162 + +.. code-block:: Python + + + mapdl.d("ALL", "UY", "", "", "", "", "ROTX", "ROTZ") + mapdl.d(1, "UZ") + + # Select nodes for symmetry boundary + mapdl.nsel("S", "", "", 5) + mapdl.dsym("SYMM", "X") + + # Select all nodes + mapdl.nsel("ALL") + + # Apply nodal force along x-direction + mapdl.f(1, "FX", -21972.6) + # Specifies surface loads on beam and pipe elements. + mapdl.sfbeam("ALL", 1, "PRES", 1.79253) + + # Selects all entities + mapdl.allsel() + # Element plot + mapdl.eplot() + + # Finish pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-021_001.png + :alt: vm 021 + :srcset: /verif-manual/images/sphx_glr_vm-021_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 163-166 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 166-175 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set the analysis type to STATIC + mapdl.antype("STATIC") + # Perform the solution + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 176-179 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute displacement and rotation quantities. + +.. GENERATED FROM PYTHON SOURCE LINES 179-196 + +.. code-block:: Python + + mapdl.post1() + + # Select nodes for results output + mapdl.nsel("S", "", "", 1, 5, 4) + + # Print displacement quantities in Z direction + mapdl.prnsol("U", "Z") + + # Print rotation quantities in Y direction + mapdl.prnsol("ROT", "Y") + + # Select all nodes + mapdl.nsel("ALL") + + # Print results solution + mapdl.prrsol() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'PRINT REACTION SOLUTIONS PER NODE\n *****MAPDL VERIFICATION RUN ONLY*****\n DO NOT USE RESULTS FOR PRODUCTION\n \n ***** POST1 TOTAL REACTION SOLUTION LISTING ***** \n \n LOAD STEP= 1 SUBSTEP= 1 \n TIME= 1.0000 LOAD CASE= 0 \n \n THE FOLLOWING X,Y,Z SOLUTIONS ARE IN THE GLOBAL COORDINATE SYSTEM \n \n NODE FX FY FZ MX MY MZ \n 1 0.0000 179.25 0.32697E-014 -0.69256E-014\n 2 0.0000 -0.21095E-015 -0.10747E-013\n 3 0.0000 -0.21095E-015 -0.71644E-014\n 4 0.0000 -0.21095E-015 -0.35822E-014\n 5 21973. 0.0000 -0.10548E-015 -8962.7 0.11439E-012\n\n TOTAL VALUES\n VALUE 21973. 0.0000 179.25 0.25314E-014 -8962.7 0.85973E-013' + + + +.. GENERATED FROM PYTHON SOURCE LINES 197-199 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 199-203 + +.. code-block:: Python + + q = mapdl.queries + RGHT_END = q.node(200, 0, 0) # store node number to 'RGHT_END' with coordinate (4,0,0) + LFT_END = q.node(0, 0, 0) # store node number to 'LFT_END' with coordinate (4,0,0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 204-206 + +Retrieve nodal deflection and rotation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 206-216 + +.. code-block:: Python + + + # Get results at node RGHT_END + uz_mx_c2 = mapdl.get("UZ_MX_C2", "NODE", RGHT_END, "U", "Z") + + # Get results at node LFT_END + slope_c2 = mapdl.get("SLOPE_C2", "NODE", LFT_END, "ROT", "Y") + + # exists post-processing processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 217-220 + +Post-processing +~~~~~~~~~~~~~~~ +Enter /post26 time-history post-processing processor. + +.. GENERATED FROM PYTHON SOURCE LINES 220-233 + +.. code-block:: Python + + mapdl.post26() + + # Specifies the total reaction force data to be stored at nodes associated to RGHT_END + mapdl.rforce(2, RGHT_END, "M", "Y") + + # Store results + mapdl.store() + # Get maximum moment at node RGHT_END + m_mx_c2 = mapdl.get("M_MX_C2", "VARI", 2, "EXTREM", "VMAX") + + # exists post-processing processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 234-236 + +Set a new title for the analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 236-238 + +.. code-block:: Python + + mapdl.title("VM21 TIE ROD WITH LATERAL LOADING STRESS STIFFENING PRESENT") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + TITLE= + VM21 TIE ROD WITH LATERAL LOADING STRESS STIFFENING PRESENT + + + +.. GENERATED FROM PYTHON SOURCE LINES 239-242 + +Solve +~~~~~ +Enter new solution mode and solve the nonlinear system including stress stiffening. + +.. GENERATED FROM PYTHON SOURCE LINES 242-257 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set number of substeps to 5 + mapdl.nsubst(5) + # Activate auto time stepping + mapdl.autots("ON") + # Activate nonlinear geometry + mapdl.nlgeom("ON") + # Set a smaller convergence tolerance + mapdl.cnvtol("F", "", 0.0001, "", 1) + # Perform the solution + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 258-261 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute displacement and rotation quantities. + +.. GENERATED FROM PYTHON SOURCE LINES 261-281 + +.. code-block:: Python + + mapdl.post1() + + # Select nodes for results output + mapdl.nsel("S", "", "", 1, 5, 4) + # Print displacement quantities in Z direction + mapdl.prnsol("U", "Z") + # Print rotation quantities in Y direction + mapdl.prnsol("ROT", "Y") + # Print results solution + mapdl.prrsol() + + # Get results at node RGHT_END + uz_mx_c1 = mapdl.get("UZ_MX_C1", "NODE", RGHT_END, "U", "Z") + + # Get results at node LFT_END + slope_c1 = mapdl.get("SLOPE_C1", "NODE", LFT_END, "ROT", "Y") + + # exists post-processing processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 282-285 + +Post-processing +~~~~~~~~~~~~~~~ +Enter /post26 time-history post-processing processor. + +.. GENERATED FROM PYTHON SOURCE LINES 285-296 + +.. code-block:: Python + + mapdl.post26() + + # Specifies the total reaction force data to be stored at nodes associated to RGHT_END + mapdl.rforce(2, RGHT_END, "M", "Y") + + # Store results + mapdl.store() + + # Get maximum moment at node RGHT_END + m_mx_c1 = mapdl.get("M_MX_C1", "VARI", 2, "EXTREM", "VMAX") + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 297-299 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 299-344 + +.. code-block:: Python + + + # Set target values + target_res = [-0.19945, 0.0032352, -4580.1] + target_res_strss = [-0.38241, 0.0061185, -8962.7] + + # Fill result values + sim_res = [uz_mx_c1, slope_c1, m_mx_c1] + sim_res_strss = [uz_mx_c2, slope_c2, m_mx_c2] + + title = f""" + + ------------------- VM21 RESULTS COMPARISON --------------------- + + F neq 0 (stiffened): + -------------------- + + """ + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Z_max, in", "Slope, rad", "M_max , in-lb"] + + data = [target_res, sim_res, np.abs(target_res) / np.abs(sim_res)] + + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + title = f""" + + + F = 0 (unstiffened): + -------------------- + + """ + + row_headers = ["Z_max, in", "Slope, rad", "M_max , in-lb"] + data = [ + target_res_strss, + sim_res_strss, + np.abs(target_res_strss) / np.abs(sim_res_strss), + ] + + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM21 RESULTS COMPARISON --------------------- + + F neq 0 (stiffened): + -------------------- + + + TARGET Mechanical APDL RATIO + Z_max, in -0.199450 -0.199560 0.999449 + Slope, rad 0.003235 0.003235 0.999957 + M_max , in-lb -4580.100000 -4579.818510 1.000061 + + + + F = 0 (unstiffened): + -------------------- + + + TARGET Mechanical APDL RATIO + Z_max, in -0.382410 -0.382554 0.999623 + Slope, rad 0.006118 0.006119 1.000000 + M_max , in-lb -8962.700000 -8962.650000 1.000006 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 345-347 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 347-349 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 350-352 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 352-353 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.849 seconds) + + +.. _sphx_glr_download_verif-manual_vm-021.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-021.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-021.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-025.rst.txt b/_sources/verif-manual/vm-025.rst.txt new file mode 100644 index 00000000..db8a8617 --- /dev/null +++ b/_sources/verif-manual/vm-025.rst.txt @@ -0,0 +1,918 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-025.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-025.py: + +.. _ref_vm25: + +Stresses in a Long Cylinder +--------------------------- +Problem description: + - A long thick-walled cylinder is initially subjected to an internal pressure p. + Determine the radial displacement :math:`\delta_r` at the inner surface, the + radial stress :math:`\sigma_r` , and tangential stress :math:`\sigma_t` , at the + inner and outer surfaces and at the middle wall thickness. Internal pressure is then + removed and the cylinder is subjected to a rotation ω about its center line. Determine + the radial :math:`\sigma_r` and tangential :math:`\sigma_t` stresses at the inner wall + and at an interior point located at r = Xi. + +Reference: + - S. Timoshenko, Strength of Materials, Part II, Elementary Theory and + Problems, 3rd Edition, D. Van Nostrand Co., Inc., New York, NY, 1956, + pg. 213, problem 1 and pg. 213, article 42. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2-D 8-Node Structural Solid Elements (PLANE183) + +.. image:: ../_static/vm25_setup.png + :width: 400 + :alt: VM25 Long Cylinder Problem Sketch + +Material properties: + - :math:`E = 30 \cdot 10^6 psi` + - :math:`\mu = 0.3` + - :math:`\rho = 0.00073 lb-sec^2/in^4` + +Geometric properties: + - :math:`a = 4 inches` + - :math:`b = 8 inches` + - :math:`X_i = 5.43 inches` + +Loading: + - :math:`p = 30,000 psi` + - :math:`\Omega = 1000 rad/sec` + +Analysis Assumptions and Modeling Notes: + - The axial length is arbitrarily selected. Elements are oriented such that surface stresses + may be obtained at the inner and outer cylinder surfaces. + POST1 is used to display linearized stresses through the thickness of the cylinder when it is + subjected to an internal pressure. + +.. GENERATED FROM PYTHON SOURCE LINES 72-103 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm25_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + import pandas as pd + + # Launching MAPDL with specified settings + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clearing the MAPDL database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command for VM25 + mapdl.run("/VERIFY,VM25") + + # Set the title of the analysis + mapdl.title("VM25 Stresses in a Long Cylinder") + + # Enter the model creation /Prep7 preprocessor + mapdl.prep7() + + # Deactivate automatic (smart) element sizing + mapdl.smrtsize(sizlvl="OFF") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + DEACTIVATE SMART SIZING + + + +.. GENERATED FROM PYTHON SOURCE LINES 104-108 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2-D 8-Node or 6-Node Structural Solid and specify Axisymmetric element behavior +via setting Keyopt(3)=1. + +.. GENERATED FROM PYTHON SOURCE LINES 108-110 + +.. code-block:: Python + + mapdl.et(1, "PLANE183", "", "", 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 111-115 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6, +Density, rho = 0.00073 and Poisson's ratio NUXY of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 115-119 + +.. code-block:: Python + + mapdl.mp("EX", 1, 30e6) + mapdl.mp("DENS", 1, 0.00073) + mapdl.mp("NUXY", 1, 0.3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 NUXY = 0.3000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-124 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 124-154 + +.. code-block:: Python + + + # Defining node 1 with coordinates (4) + mapdl.n(1, 4) + # Defining node 2 with coordinates (4+4/14) + mapdl.n(2, "4+4/14") + # Defining node 3 with coordinates (4+4/14, 0.5) + mapdl.n(3, "4+4/14", 0.5) + # Defining node 4 with coordinates (4, 0.5) + mapdl.n(4, 4, 0.5) + # Defining node 5 with coordinates (4+4/28) + mapdl.n(5, "4+4/28") + # Defining node 6 with coordinates (4+4/14, 0.25) + mapdl.n(6, "4+4/14", 0.25) + # Defining node 7 with coordinates (4+4/28, 0.5) + mapdl.n(7, "4+4/28", 0.5) + # Defining node 8 with coordinates (4, 0.25) + mapdl.n(8, 4, 0.25) + # Creating element 1 with nodes 2, 3, 4, 5, 6, 7, and 8 + mapdl.e(1, 2, 3, 4, 5, 6, 7, 8) + + # Generating additional nodes along element 14 using the specified + # parameters (from an existing pattern) + mapdl.egen(14, 8, 1, "", "", "", "", "", "", "", "4/14") + # Merging nodes based on their coordinates + mapdl.nummrg("NODE") + # Generate a mesh using EGEN command + mapdl.egen(2, 111, 1, 14, "", "", "", "", "", "", "", 0.5) + # Merge the nodes that share the same coordinates + mapdl.nummrg("NODE") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MERGE COINCIDENT NODES WITHIN TOLERANCE OF 0.10000E-03 + NODE 4 USED FOR NODES 112 + NODE 7 USED FOR NODES 116 + NODE 3 USED FOR NODES 113 + NODE 15 USED FOR NODES 124 + NODE 11 USED FOR NODES 121 + NODE 23 USED FOR NODES 132 + NODE 19 USED FOR NODES 129 + NODE 31 USED FOR NODES 140 + NODE 27 USED FOR NODES 137 + NODE 39 USED FOR NODES 148 + NODE 35 USED FOR NODES 145 + NODE 47 USED FOR NODES 156 + NODE 43 USED FOR NODES 153 + NODE 55 USED FOR NODES 164 + NODE 51 USED FOR NODES 161 + NODE 63 USED FOR NODES 172 + NODE 59 USED FOR NODES 169 + NODE 71 USED FOR NODES 180 + NODE 67 USED FOR NODES 177 + NODE 79 USED FOR NODES 188 + NODE 75 USED FOR NODES 185 + NODE 87 USED FOR NODES 196 + NODE 83 USED FOR NODES 193 + NODE 95 USED FOR NODES 204 + NODE 91 USED FOR NODES 201 + NODE 103 USED FOR NODES 212 + NODE 99 USED FOR NODES 209 + NODE 111 USED FOR NODES 220 + NODE 107 USED FOR NODES 217 + + + A total of 29 nodes were merged at 29 locations. + + + +.. GENERATED FROM PYTHON SOURCE LINES 155-161 + +Define coupling and boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Apply a displacement boundary condition in the vertical direction (UY) to all nodes. +Couple the axial displacements at the unconstrained Y-dir. Apply internal pressure of +30000 psi is applied on nodes. Also, apply dummy pressure for surface printout. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 161-192 + +.. code-block:: Python + + + mapdl.nsel("S", "LOC", "Y", 0) # Select nodes located on the Y-axis + # Apply a displacement boundary condition + mapdl.d("ALL", "UY") + mapdl.nsel("S", "LOC", "Y", 1) # Select nodes located on the positive Y-axis + # Couple the axial displacements at the unconstrained Y-dir + mapdl.cp(1, "UY", "ALL") + + mapdl.nsel( + "S", "LOC", "X", 4 + ) # Select nodes located on the X-axis at a specific coordinate + # Apply internal pressure on nodes + mapdl.sf("", "PRES", 30000) + + mapdl.nsel( + "S", "LOC", "X", 8 + ) # Select nodes located on the X-axis at a different coordinate + # Apply dummy pressure for surface printout + mapdl.sf("", "PRES", 1e-10) + + # Selects all entities + mapdl.allsel() + # Element plot + mapdl.eplot(background="w") + + # Finish the pre-processing processor + mapdl.finish() + + # Save the finite element model + mapdl.save("MODEL") + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-025_001.png + :alt: vm 025 + :srcset: /verif-manual/images/sphx_glr_vm-025_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ALL CURRENT MAPDL DATA WRITTEN TO FILE NAME= + FOR POSSIBLE RESUME FROM THIS POINT + + + +.. GENERATED FROM PYTHON SOURCE LINES 193-196 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 196-207 + +.. code-block:: Python + + mapdl.slashsolu() + + # Set the analysis type to STATIC + mapdl.antype("STATIC") + # Output results for all nodes + mapdl.outpr("", "ALL") + # Perform the solution for the load step 1, which is the internal pressure + mapdl.solve() + # exists solution processor for load case 1 + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 208-211 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute displacement and stress components. + +.. GENERATED FROM PYTHON SOURCE LINES 211-216 + +.. code-block:: Python + + mapdl.post1() + + # Set the load step 1 and substep to 1 + mapdl.set(1, 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + USE LOAD STEP 1 SUBSTEP 1 FOR LOAD CASE 0 + + SET COMMAND GOT LOAD STEP= 1 SUBSTEP= 1 CUMULATIVE ITERATION= 1 + TIME/FREQUENCY= 1.0000 + TITLE= VM25 Stresses in a Long Cylinder + + + +.. GENERATED FROM PYTHON SOURCE LINES 217-219 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 219-224 + +.. code-block:: Python + + q = mapdl.queries + LFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0) + MID_NODE = q.node(6, 0, 0) # store node number to 'MID_NODE' with coordinate (6,0,0) + RT_NODE = q.node(8, 0, 0) # store node number to 'RT_NODE' with coordinate (8,0,0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 225-227 + +Retrieve nodal deflection and section stresses +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 227-252 + +.. code-block:: Python + + + # Retrieves the displacement "DEF_4" of nodes associated to + # "LFT_NODE" in the X direction + def_4 = mapdl.get("DEF_4", "NODE", LFT_NODE, "U", "X") + + # Retrieves the stress and store it "parm" of nodes associated to a + # variables 'LFT_NODE','MID_NODE' and 'RT_NODE' + rst_4_c1 = mapdl.get("RST_4_C1", "NODE", LFT_NODE, "S", "X") + rst_6_c1 = mapdl.get("RST_6_C1", "NODE", MID_NODE, "S", "X") + rst_8_c1 = mapdl.get("RST_8_C1", "NODE", RT_NODE, "S", "X") + tst_4_c1 = mapdl.get("TST_4_C1", "NODE", LFT_NODE, "S", "Z") + tst_6_c1 = mapdl.get("TST_6_C1", "NODE", MID_NODE, "S", "Z") + tst_8_c1 = mapdl.get("TST_8_C1", "NODE", RT_NODE, "S", "Z") + + # Print the nodal stress solution (COMP means all stress components) + mapdl.prnsol("S", "COMP") + + # Define a path with the name 'STRESS' and ID 2, no limits specified + mapdl.path("STRESS", 2, "", 48) + mapdl.ppath(1, LFT_NODE) # Define the path points using the variable 'LFT_NODE' + mapdl.ppath(2, RT_NODE) # Define the path points using the variable 'RT_NODE' + mapdl.plsect("S", "Z", -1) # Display the SZ stresses in a sectional plot + mapdl.plsect("S", "X", -1) # Display the SX stresses in a sectional plot + mapdl.prsect(-1) # Print linearized stresses + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'PRINT LINEARIZED STRESS THROUGH A SECTION DEFINED BY PATH= STRESS DSYS= 0\n *****MAPDL VERIFICATION RUN ONLY*****\n DO NOT USE RESULTS FOR PRODUCTION\n\n ***** POST1 LINEARIZED STRESS LISTING *****\n INSIDE NODE = 1 OUTSIDE NODE = 106\n\n LOAD STEP 1 SUBSTEP= 1\n TIME= 1.0000 LOAD CASE= 0\n\n ** AXISYMMETRIC OPTION ** RHO = 0.47392E+12\n THE FOLLOWING X,Y,Z STRESSES ARE IN SECTION COORDINATES. \n\n ** MEMBRANE **\n SX SY SZ SXY SYZ SXZ\n -0.1000E+05 0.1255E-08 0.3000E+05 0.8005E-10 0.000 0.000 \n S1 S2 S3 SINT SEQV\n 0.3000E+05 0.000 -0.1000E+05 0.4000E+05 0.3606E+05\n\n ** BENDING ** I=INSIDE C=CENTER O=OUTSIDE\n SX SY SZ SXY SYZ SXZ\n I -0.1991E+05 0.1083E-08 0.1364E+05 0.000 0.000 0.000 \n C -4948. 0.1083E-09 0.1919E-07 0.000 0.000 0.000 \n O 0.1001E+05 -0.8666E-09 -0.1364E+05 0.000 0.000 0.000 \n S1 S2 S3 SINT SEQV\n I 0.1364E+05 0.000 -0.1991E+05 0.3355E+05 0.2922E+05\n C 0.000 0.000 -4948. 4948. 4948. \n O 0.1001E+05 0.000 -0.1364E+05 0.2365E+05 0.2056E+05\n\n ** MEMBRANE PLUS BENDING ** I=INSIDE C=CENTER O=OUTSIDE\n SX SY SZ SXY SYZ SXZ\n I -0.2991E+05 0.2338E-08 0.4364E+05 0.8005E-10 0.000 0.000 \n C -0.1495E+05 0.1363E-08 0.3000E+05 0.8005E-10 0.000 0.000 \n O 6.734 0.3879E-09 0.1636E+05 0.8005E-10 0.000 0.000 \n S1 S2 S3 SINT SEQV\n I 0.4364E+05 0.000 -0.2991E+05 0.7355E+05 0.6407E+05\n C 0.3000E+05 0.000 -0.1495E+05 0.4495E+05 0.3965E+05\n O 0.1636E+05 6.734 0.000 0.1636E+05 0.1636E+05\n\n ** PEAK ** I=INSIDE C=CENTER O=OUTSIDE\n SX SY SZ SXY SYZ SXZ\n I -0.3638E-11 0.2863E-08 6264. 0.1697E-07 0.000 0.000 \n C 7193. -0.9225E-09 -2245. 0.4677E-09 0.000 0.000 \n O 0.7061E-12 0.2176E-08 3632. 0.2536E-09 0.000 0.000 \n S1 S2 S3 SINT SEQV\n I 6264. 0.000 0.000 6264. 6264. \n C 7193. 0.000 -2245. 9438. 8540. \n O 3632. 0.000 0.000 3632. 3632. \n\n ** TOTAL ** I=INSIDE C=CENTER O=OUTSIDE \n SX SY SZ SXY SYZ SXZ\n I -0.2991E+05 0.5201E-08 0.4991E+05 0.1705E-07 0.000 0.000 \n C -7758. 0.4404E-09 0.2776E+05 0.5477E-09 0.000 0.000 \n O 6.734 0.2564E-08 0.1999E+05 0.3336E-09 0.000 0.000 \n S1 S2 S3 SINT SEQV TEMP\n I 0.4991E+05 0.000 -0.2991E+05 0.7982E+05 0.6984E+05 0.000 \n C 0.2776E+05 0.000 -7758. 0.3552E+05 0.3234E+05\n O 0.1999E+05 6.734 0.000 0.1999E+05 0.1999E+05 0.000' + + + +.. GENERATED FROM PYTHON SOURCE LINES 253-255 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 255-307 + +.. code-block:: Python + + + # Set target values + target_def = 0.0078666 + target_strss = [-30000, -7778, 0] + target_tst_strss = [50000, 27778, 20000] + + # Fill result values + res_def = def_4 + res_strss = [rst_4_c1, rst_6_c1, rst_8_c1] + res_tst_strss = [tst_4_c1, tst_6_c1, tst_8_c1] + + title = f""" + + ------------------- VM25 RESULTS COMPARISON --------------------- + + RESULTS FOR CASE p = 30,000 psi: + -------------------------------- + + """ + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + row_headers = ["Displacement, in (r = 4 in)"] + data = [ + [target_def, res_def, abs(target_def / res_def)], + ] + print(title) + print(pd.DataFrame(data, row_headers, col_headers)) + + # Radial stress results comparison + row_headers = [ + "Stress_r, psi (r = 4 in)", + "Stress_r, psi (r = 6 in)", + "Stress_r, psi (r = 8 in)", + ] + + data = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)] + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + # Tangential stress results comparison + row_headers = [ + "Stress_t, psi (r = 4 in)", + "Stress_t, psi (r = 6 in)", + "Stress_t, psi (r = 8 in)", + ] + data = [ + target_tst_strss, + res_tst_strss, + np.abs(target_tst_strss) / np.abs(res_tst_strss), + ] + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + ------------------- VM25 RESULTS COMPARISON --------------------- + + RESULTS FOR CASE p = 30,000 psi: + -------------------------------- + + + TARGET Mechanical APDL RATIO + Displacement, in (r = 4 in) 0.007867 0.007867 0.999992 + TARGET Mechanical APDL RATIO + Stress_r, psi (r = 4 in) -30000.0 -29908.046900 1.003075 + Stress_r, psi (r = 6 in) -7778.0 -7757.541500 1.002637 + Stress_r, psi (r = 8 in) 0.0 6.734007 0.000000 + TARGET Mechanical APDL RATIO + Stress_t, psi (r = 4 in) 50000.0 49908.0469 1.001842 + Stress_t, psi (r = 6 in) 27778.0 27757.5410 1.000737 + Stress_t, psi (r = 8 in) 20000.0 19993.2656 1.000337 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 308-310 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 310-312 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 313-315 + +Set a new title for the analysis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 315-320 + +.. code-block:: Python + + mapdl.title("VM25 Stresses in a Long Cylinder - Rotation About Axis") + + # Resume the Finite Element (FE) "MODEL" save previously + mapdl.resume("MODEL") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + RESUME ANSYS DATA FROM FILE NAME= + + *** MAPDL GLOBAL STATUS *** + + TITLE = VM25 Stresses in a Long Cylinder + 1 ELEM TYPES DEFINED MAX ELEM TYPE NUMBER = 1 + 28 ELEMENTS DEFINED MAX ELEMENT NUMBER = 28 + 117 NODES DEFINED MAX NODE NUMBER = 222 + 1 MATERIALS DEFINED MAX MATERIAL NUMBER = 1 + 0 REAL CONSTS DEFINED MAX REAL CONST NUMBER = 0 + 0 SECTIONS DEFINED MAX SECTION NUMBER = 0 + 0 COORD SYS DEFINED MAX COORD SYS NUMBER = 0 + 1 COUPLING EQNS DEFINED MAX COUPLING EQN NUMBER = 1 + + ACTIVE COORDINATE SYSTEM = 0 (CARTESIAN) + NUMBER OF DEFINED NODAL CONSTRAINTS = 29 + NUMBER OF DEFINED NODAL LOADS = 0 + NUMBER OF DEFINED ELEM SURFACE LOADS = 4 + NUMBER OF DEFINED ELEM BODY LOADS = 0 + NUMBER OF DEFINED NODE BODY FORCES = 0 + + INITIAL JOBNAME = + CURRENT JOBNAME = + + + +.. GENERATED FROM PYTHON SOURCE LINES 321-324 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 324-329 + +.. code-block:: Python + + mapdl.slashsolu() + + # Print all results + mapdl.outpr("", "ALL") + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + PRINT BASI ITEMS WITH A FREQUENCY OF ALL + FOR ALL APPLICABLE ENTITIES + + + +.. GENERATED FROM PYTHON SOURCE LINES 330-335 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Apply a displacement boundary condition in the vertical direction (UY) to all nodes. +Rotate the cylinder with an angular velocity of 1000 rad/sec. Also, apply dummy +pressure for surface printout. Then exit solution processor. + +.. GENERATED FROM PYTHON SOURCE LINES 335-356 + +.. code-block:: Python + + + mapdl.nsel( + "S", "LOC", "Y", 0 + ) # Select nodes located at Y=0 to prevent rigid body motion + mapdl.nsel("R", "LOC", "X", 4) # Select nodes located at X=4 + # Displace all nodes in the Y-direction + mapdl.d("ALL", "UY") + + mapdl.nsel("S", "LOC", "X", 4) # Select nodes located at X=4 + # Apply a small pressure to allow stress printout + mapdl.sf("", "PRES", 1e-10) + + mapdl.nsel("ALL") # Select all nodes + # Rotate the cylinder with an angular velocity of 1000 RAD/SEC + mapdl.omega("", 1000) + + # Solve the problem in load step 2 - centrifugal loading + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 357-360 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute displacement and stress components. + +.. GENERATED FROM PYTHON SOURCE LINES 360-362 + +.. code-block:: Python + + mapdl.post1() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + *****MAPDL VERIFICATION RUN ONLY***** + DO NOT USE RESULTS FOR PRODUCTION + + ***** MAPDL RESULTS INTERPRETATION (POST1) ***** + + + USE LAST SUBSTEP ON RESULT FILE FOR LOAD CASE 0 + + SET COMMAND GOT LOAD STEP= 1 SUBSTEP= 1 CUMULATIVE ITERATION= 1 + TIME/FREQUENCY= 1.0000 + TITLE= VM25 Stresses in a Long Cylinder + + + +.. GENERATED FROM PYTHON SOURCE LINES 363-365 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 365-371 + +.. code-block:: Python + + q = mapdl.queries + LFT_NODE = q.node(4, 0, 0) # store node number to 'LFT_NODE' with coordinate (4,0,0) + XI_NODE = q.node( + 5.43, 0, 0 + ) # store node number to 'XI_NODE' with coordinate (5.43,0,0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 372-374 + +Retrieve nodal deflection and section stresses +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 374-380 + +.. code-block:: Python + + + rst_4_c2 = mapdl.get("RST_4_C2", "NODE", LFT_NODE, "S", "X") + tst_4_c2 = mapdl.get("TST_4_C2", "NODE", LFT_NODE, "S", "Z") + rst_x_c2 = mapdl.get("RST_X_C2", "NODE", XI_NODE, "S", "X") + tst_x_c2 = mapdl.get("TST_X_C2", "NODE", XI_NODE, "S", "Z") + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 381-383 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 383-419 + +.. code-block:: Python + + + # Set target values + target_strss = [0, 4753] + target_tst_strss = [40588, 29436] + + # Fill result values + res_strss = [rst_4_c2, rst_x_c2] + res_tst_strss = [tst_4_c2, tst_x_c2] + + title = f""" + + RESULTS FOR CASE Rotation = 1000 rad/sec: + ----------------------------------------- + + """ + + col_headers = ["TARGET", "Mechanical APDL", "RATIO"] + + # Radial stress results comparison + row_headers = ["Stress_r, psi (r = 4 in)", "Stress_r, psi (r = 5.43 in)"] + + data = [target_strss, res_strss, np.abs(target_strss) / np.abs(res_strss)] + + print(title) + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + # Tangential stress results comparison + row_headers = ["Stress_t, psi (r = 4 in)", "Stress_t, psi (r = 5.43 in)"] + + data = [ + target_tst_strss, + res_tst_strss, + np.abs(target_tst_strss) / np.abs(res_tst_strss), + ] + print(pd.DataFrame(np.transpose(data), row_headers, col_headers)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + RESULTS FOR CASE Rotation = 1000 rad/sec: + ----------------------------------------- + + + TARGET Mechanical APDL RATIO + Stress_r, psi (r = 4 in) 0.0 50.366142 0.000000 + Stress_r, psi (r = 5.43 in) 4753.0 4957.113530 0.958824 + TARGET Mechanical APDL RATIO + Stress_t, psi (r = 4 in) 40588.0 41671.1641 0.974007 + Stress_t, psi (r = 5.43 in) 29436.0 29740.9404 0.989747 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 420-422 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 422-424 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 425-427 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 427-428 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.914 seconds) + + +.. _sphx_glr_download_verif-manual_vm-025.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-025.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-025.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-291.rst.txt b/_sources/verif-manual/vm-291.rst.txt new file mode 100644 index 00000000..c9596d9c --- /dev/null +++ b/_sources/verif-manual/vm-291.rst.txt @@ -0,0 +1,1151 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-291.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-291.py: + +.. _ref_vm291: + +Force on the Boundary of a Semi-Infinite Body (Boussinesq Problem) +------------------------------------------------------------------ +Problem description: + - A point force is applied at the origin of a half-space 2D axisymmetric solid modeled with + far-field domain. Determine the displacement in the Y-direction on nodes along the radial + direction (at location Y = 0) and vertical direction (at location X = 0). + +Reference: + - TIMOSHENKO,S.P.,AND J.N.GOODIER,THEORY OF ELASTICITY + MCGRAW-HILL,NEW YORK, PP 398-402, 1970. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - Structural Infinite Solid (INFIN257) + - 2-D 4-Node Structural Solid (PLANE182) + - 2-D 8-Node Structural Solid (PLANE183) + +.. figure:: ../_static/vm291_setup1.png + :align: center + :width: 400 + :alt: VM291 Finite and Infinite Element Mesh of the Problem (PLANE182 and INFIN257) + + **PLANE182 and INFIN257** + +.. figure:: ../_static/vm291_setup2.png + :align: center + :width: 400 + :alt: VM291 Finite and Infinite Element Mesh of the Problem (PLANE183 and INFIN257) + + **PLANE183 and INFIN257** + +Material properties: + - Youngs modulus, :math:`E = 1.0` + - Poissons ratio, :math:`\mu = 0.3` + +Geometric properties: + - Radius of finite mesh :math:`= 4.0` + - Radius of infinite mesh :math:`= 4.0` + +Loading: + - Point Load :math:`= 1.0` + +Analysis Assumptions and Modeling Notes: + - The problem is solved for two cases: + - Case 1: Using PLANE182 and INFIN257 elements + - Case 2: Using PLANE183 and INFIN257 elements + + - The problem is composed with 12 axisymmetric finite element mesh + (PLANE182 or PLANE183) with a radius of 4 from the origin, and 4 + infinite element mesh (INFIN257) modeling the far-field domain with + a radius of 4 extending from the finite element domain. The infinite + element mesh is modeled using the EINFIN command. The UX degrees of + freedom are constrained at location X = 0. The UY results are computed + along the radial and vertical direction on the nodes belonging to the + finite element mesh and then compared to the analytical results. + + - The analytic solution to compute vertical displacement for the problem + of a point load on a half space is: + :math:`\omega = \frac{P}{2 \pi E} \bigg [ \frac{(1+\nu)z^2}{(r^2+z^2)^{3/2}} + \frac{2(1-\nu ^2)}{(r^2 + z^2)^{1/2}} \bigg]` + Where :math:`P` is the point load, :math:`E` is the Young’s modulus, + :math:`\nu` is the Poisson’s ratio, and :math:`r` and :math:`z` are + the radial and vertical distance from the point load. + The above equation clearly shows the :math:`\frac {1}{r}` singularity + at the point of application of the load (:math:`r=0` and :math:`z=0`), + which indicates that the finite element results may not be close to + the analytical solution a points close to the origin. + +.. GENERATED FROM PYTHON SOURCE LINES 94-127 + +.. code-block:: Python + + + # sphinx_gallery_thumbnail_path = '_static/vm291_setup1.png' + + import math + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + + # Clear the current database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command for VM291 + mapdl.run("/VERIFY,VM291") + + # Set the title of the analysis + mapdl.title("VM291 FORCE ON BOUNDARY OF A SEMI-INFINITE BODY (BOUSSINESQ PROBLEM)") + + # Entering the PREP7 environment in MAPDL + mapdl.prep7(mute=True) + + # Constant value of PI + pi = math.pi + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 128-131 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2D 4-Node structural solid element (PLANE182) and set Keyopt(3)=1, Axisymmetric. + +.. GENERATED FROM PYTHON SOURCE LINES 131-134 + +.. code-block:: Python + + mapdl.et(1, "PLANE182") + mapdl.keyopt(1, 3, 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ELEMENT TYPE 1 IS PLANE182 4-NODE AXISYMMETRIC SOLID + KEYOPT( 1- 6)= 0 0 1 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 + AXISYMMETRIC MODEL + + + +.. GENERATED FROM PYTHON SOURCE LINES 135-139 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson'S ratio of 0.1 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 139-144 + +.. code-block:: Python + + exx = 1.0 + mapdl.mp("EX", 1, exx) + nuxy = 0.1 + mapdl.mp("PRXY", 1, nuxy) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 PRXY = 0.1000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 145-149 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 149-188 + +.. code-block:: Python + + + mapdl.n(1, 0, 0) + mapdl.n(2, 1, 0) + mapdl.n(3, 0.75, -0.75) + mapdl.n(4, 0, -1) + mapdl.n(5, 2, 0) + mapdl.n(6, 1.75, -0.75) + mapdl.n(7, 1.5, -1.5) + mapdl.n(8, 0.75, -1.75) + mapdl.n(9, 0, -2) + mapdl.n(10, 3, 0) + mapdl.n(11, 2.5833, -1.0833) + mapdl.n(12, 2.1667, -2.1667) + mapdl.n(13, 1.0833, -2.5833) + mapdl.n(14, 0, -3) + mapdl.n(15, 4, 0) + mapdl.n(16, 3.4167, -1.4167) + mapdl.n(17, 2.8333, -2.8333) + mapdl.n(18, 1.4167, -3.4167) + mapdl.n(19, 0, -4) + + # Define Mat =1 and Type = 1 + mapdl.mat(1) + mapdl.type(1) + + # FORM 2D 4 NODE STRUCTURAL SOLID ELEMENTS + mapdl.e(4, 3, 2, 1) + mapdl.e(6, 5, 2, 3) + mapdl.e(7, 6, 3, 8) + mapdl.e(9, 8, 3, 4) + mapdl.e(11, 10, 5, 6) + mapdl.e(12, 11, 6, 7) + mapdl.e(13, 12, 7, 8) + mapdl.e(14, 13, 8, 9) + mapdl.e(16, 15, 10, 11) + mapdl.e(17, 16, 11, 12) + mapdl.e(18, 17, 12, 13) + mapdl.e(19, 18, 13, 14) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 12 + + + +.. GENERATED FROM PYTHON SOURCE LINES 189-192 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Select node located at (0,0,0) and assign it to variable "NPOLE". + +.. GENERATED FROM PYTHON SOURCE LINES 192-204 + +.. code-block:: Python + + q = mapdl.queries + NPOLE = q.node(0, 0, 0) + + # selects nodes + mapdl.nsel("S", "", "", 15, 19) + + # GENERATE SEMI-INFINITE SOLID ELEMENTS + mapdl.einfin("", NPOLE) + + # Selects all entities + mapdl.allsel() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + SELECT ALL ENTITIES OF TYPE= ALL AND BELOW + + + +.. GENERATED FROM PYTHON SOURCE LINES 205-212 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix UX degrees of freedom at node location X=0. Apply a negative force 1.0 lb +along FY direction at node 1. Then exit prep7 processor. + +Effectiely, this sets: +- :math:`Point Load = 1.0` + +.. GENERATED FROM PYTHON SOURCE LINES 212-230 + +.. code-block:: Python + + + # Selects nodes using location x=0 + mapdl.nsel("S", "LOC", "X", 0) + # CONSTRAINT UX DOF AT LOCATION X=0 + mapdl.d("ALL", "UX", 0) + + # Selects all entities + mapdl.allsel() + mapdl.eplot() + + # FORCE magnitude + p = -1 + # APPLY FORCE ALONG Y DIRECTION AT NODE1 having magnitude "p" + mapdl.f(1, "FY", p) + + # Finish pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-291_001.png + :alt: vm 291 + :srcset: /verif-manual/images/sphx_glr_vm-291_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 231-234 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 234-248 + +.. code-block:: Python + + + mapdl.slashsolu() + + # Performing static analysis + mapdl.antype("STATIC") + # Controls the solution data written to the database. + mapdl.outres("ALL", "ALL") + # Sets the time for a load step, time=1 + mapdl.time(1) + # SOLVE STATIC ANALYSIS + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 249-252 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflections. + +.. GENERATED FROM PYTHON SOURCE LINES 252-334 + +.. code-block:: Python + + + mapdl.post1() + + # Set the current results set to the last set to be read from result file + mapdl.set("LAST") + # redirects output to the default system output file + mapdl.run("/OUT") + # reactivates suppressed printout + mapdl.gopr() + + # Set constant parameters + r1 = 1 + z1 = 1 + + # UY AT NODE (1,0,0) + uy1 = p * (1 - nuxy**2) / (pi * exx * r1) + # UY AT NODE (0,1,0) + up1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(1,0,0) + uya1 = mapdl.get("UYA1", "NODE", 2, "U", "Y") + # MADPL UY AT NODE(0,1,0) + upa1 = mapdl.get("UPA1", "NODE", 4, "U", "Y") + + # Set constant parameters + r2 = 2 + z2 = 2 + + # UY AT NODE (2,0,0) + uy2 = p * (1 - nuxy**2) / (pi * exx * r2) + # UY AT NODE (0,2,0) + up2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(2,0,0) + uya2 = mapdl.get("UYA2", "NODE", 5, "U", "Y") + # MADPL UY AT NODE(0,2,0) + upa2 = mapdl.get("UPA2", "NODE", 9, "U", "Y") + + # Set constant parameters, R3=3 and Z3=3 + r3 = 3 + z3 = 3 + + # UY AT NODE (3,0,0) + uy3 = p * (1 - nuxy**2) / (pi * exx * r3) + # UY AT NODE (0,3,0) + up3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(3,0,0) + uya3 = mapdl.get("UYA3", "NODE", 10, "U", "Y") + # MADPL UY AT NODE(0,3,0) + upa3 = mapdl.get("UPA3", "NODE", 14, "U", "Y") + + # Set constant parameters, R4=4 and Z4=4 + r4 = 4 + z4 = 4 + + # UY AT NODE (4,0,0) + uy4 = p * (1 - nuxy**2) / (pi * exx * r4) + # UY AT NODE (0,4,0) + up4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(4,0,0) + uya4 = mapdl.get("UYA4", "NODE", 15, "U", "Y") + # MADPL UY AT NODE(0,4,0) + upa4 = mapdl.get("UPA4", "NODE", 19, "U", "Y") + + # assign labels for nodes + label1 = np.array(["NODE5", "NODE10", "NODE15"]) + label2 = np.array(["NODE9", "NODE14", "NODE19"]) + + # create results arrays for printout + value1 = np.array([uy2, uy3, uy4]) + value_ana1 = np.array([uya2, uya3, uya4]) + value_ratio1 = [] + for i in range(len(value_ana1)): + a = value1[i] / value_ana1[i] + value_ratio1.append(a) + + # create results arrays for printout + value2 = np.array([up2, up3, up4]) + value_ana2 = np.array([upa2, upa3, upa4]) + value_ratio2 = [] + for i in range(len(value_ana2)): + a = value2[i] / value_ana2[i] + value_ratio2.append(a) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 335-337 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 337-372 + +.. code-block:: Python + + + results = f""" + --------------------------VM291 RESULTS COMPARISON-------------------------- + + USING PLANE182 AND INFIN257 ELEMENTS + ------------------------------------- + + VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) + ---------------------------------------------- + + | NODES | TARGET | Mechanical APDL | RATIO + + """ + print(results) + + for i in range(len(value1)): + message = f""" + {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f} + """ + print(message) + + results = f""" + + VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) + ---------------------------------------------------- + + """ + print(results) + + for i in range(len(value2)): + message = f""" + {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f} + """ + print(message) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + --------------------------VM291 RESULTS COMPARISON-------------------------- + + USING PLANE182 AND INFIN257 ELEMENTS + ------------------------------------- + + VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) + ---------------------------------------------- + + | NODES | TARGET | Mechanical APDL | RATIO + + + + NODE5 -0.15756 -0.15037 1.04786 + + + NODE10 -0.10504 -0.10090 1.04110 + + + NODE15 -0.07878 -0.07714 1.02128 + + + + VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) + ---------------------------------------------------- + + + + NODE9 -0.24510 -0.23512 1.04246 + + + NODE14 -0.16340 -0.16882 0.96791 + + + NODE19 -0.12255 -0.12920 0.94855 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 373-375 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 375-377 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 378-380 + +Clears the database without restarting. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 380-391 + +.. code-block:: Python + + + mapdl.run("/CLEAR,NOSTART") + # redirects output to the default system output file + mapdl.run("/OUT") + + # Enter PREP7 module for the new analysis + mapdl.prep7(mute=True) + + # Constant value of PI + pi = math.pi + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 392-396 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 30e6 +and Poisson'S ratio of 0.1 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 396-401 + +.. code-block:: Python + + exx = 1.0 + mapdl.mp("EX", 1, exx) + nuxy = 0.1 + mapdl.mp("PRXY", 1, nuxy) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + MATERIAL 1 PRXY = 0.1000000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 402-405 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2D 8-Node structural solid element (PLANE183) and set Keyopt(3)=1, Axisymmetric. + +.. GENERATED FROM PYTHON SOURCE LINES 405-408 + +.. code-block:: Python + + mapdl.et(1, "PLANE183") + mapdl.keyopt(1, 3, 1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ELEMENT TYPE 1 IS PLANE183 8-NODE AXISYMMETRIC SOLID + KEYOPT( 1- 6)= 0 0 1 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 + AXISYMMETRIC MODEL + + + +.. GENERATED FROM PYTHON SOURCE LINES 409-413 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 413-482 + +.. code-block:: Python + + + mapdl.n(1, 0.0000, -1.0000, 0.0000) + mapdl.n(2, 0.75000, -0.75000, 0.0000) + mapdl.n(3, 0.37500, -0.87500, 0.0000) + mapdl.n(4, 1.0000, 0.0000, 0.0000) + mapdl.n(5, 0.87500, -0.37500, 0.0000) + mapdl.n(6, 0.0000, 0.0000, 0.0000) + mapdl.n(7, 0.50000, 0.0000, 0.0000) + mapdl.n(8, 0.0000, -0.50000, 0.0000) + mapdl.n(9, 1.7500, -0.75000, 0.0000) + mapdl.n(10, 2.0000, 0.0000, 0.0000) + mapdl.n(11, 1.8750, -0.37500, 0.0000) + mapdl.n(12, 1.5000, 0.0000, 0.0000) + mapdl.n(13, 1.2500, -0.75000, 0.0000) + mapdl.n(14, 1.5000, -1.5000, 0.0000) + mapdl.n(15, 1.6250, -1.1250, 0.0000) + mapdl.n(16, 0.75000, -1.7500, 0.0000) + mapdl.n(17, 0.75000, -1.2500, 0.0000) + mapdl.n(18, 1.1250, -1.6250, 0.0000) + mapdl.n(19, 0.0000, -2.0000, 0.0000) + mapdl.n(20, 0.37500, -1.8750, 0.0000) + mapdl.n(21, 0.0000, -1.5000, 0.0000) + mapdl.n(22, 2.5833, -1.0833, 0.0000) + mapdl.n(23, 3.0000, 0.0000, 0.0000) + mapdl.n(24, 2.7917, -0.54165, 0.0000) + mapdl.n(25, 2.5000, 0.0000, 0.0000) + mapdl.n(26, 2.1667, -0.91665, 0.0000) + mapdl.n(27, 2.1667, -2.1667, 0.0000) + mapdl.n(28, 2.3750, -1.6250, 0.0000) + mapdl.n(29, 1.8334, -1.8334, 0.0000) + mapdl.n(30, 1.0833, -2.5833, 0.0000) + mapdl.n(31, 1.6250, -2.3750, 0.0000) + mapdl.n(32, 0.91665, -2.1667, 0.0000) + mapdl.n(33, 0.0000, -3.0000, 0.0000) + mapdl.n(34, 0.54165, -2.7917, 0.0000) + mapdl.n(35, 0.0000, -2.5000, 0.0000) + mapdl.n(36, 3.4167, -1.4167, 0.0000) + mapdl.n(37, 4.0000, 0.0000, 0.0000) + mapdl.n(38, 3.7083, -0.70835, 0.0000) + mapdl.n(39, 3.5000, 0.0000, 0.0000) + mapdl.n(40, 3.0000, -1.2500, 0.0000) + mapdl.n(41, 2.8333, -2.8333, 0.0000) + mapdl.n(42, 3.1250, -2.1250, 0.0000) + mapdl.n(43, 2.5000, -2.5000, 0.0000) + mapdl.n(44, 1.4167, -3.4167, 0.0000) + mapdl.n(45, 2.1250, -3.1250, 0.0000) + mapdl.n(46, 1.2500, -3.0000, 0.0000) + mapdl.n(47, 0.0000, -4.0000, 0.0000) + mapdl.n(48, 0.70835, -3.7083, 0.0000) + mapdl.n(49, 0.0000, -3.5000, 0.0000) + + # Define Mat =1 and Type = 1 + mapdl.mat(1) + mapdl.type(1) + + # DEFINE ELEMENTS + mapdl.e(1, 2, 4, 6, 3, 5, 7, 8) + mapdl.e(9, 10, 4, 2, 11, 12, 5, 13) + mapdl.e(14, 9, 2, 16, 15, 13, 17, 18) + mapdl.e(19, 16, 2, 1, 20, 17, 3, 21) + mapdl.e(22, 23, 10, 9, 24, 25, 11, 26) + mapdl.e(27, 22, 9, 14, 28, 26, 15, 29) + mapdl.e(30, 27, 14, 16, 31, 29, 18, 32) + mapdl.e(33, 30, 16, 19, 34, 32, 20, 35) + mapdl.e(36, 37, 23, 22, 38, 39, 24, 40) + mapdl.e(41, 36, 22, 27, 42, 40, 28, 43) + mapdl.e(44, 41, 27, 30, 45, 43, 31, 46) + mapdl.e(47, 44, 30, 33, 48, 46, 34, 49) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 12 + + + +.. GENERATED FROM PYTHON SOURCE LINES 483-486 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Select node located at (0,0,0) and assign it to variable "NPOLE". + +.. GENERATED FROM PYTHON SOURCE LINES 486-502 + +.. code-block:: Python + + q = mapdl.queries + NPOLE = q.node(0, 0, 0) + + # select nodes + mapdl.nsel("S", "NODE", "", 36, 38, 1) + mapdl.nsel("A", "NODE", "", 41, 42, 1) + mapdl.nsel("A", "NODE", "", 44, 45, 1) + mapdl.nsel("A", "NODE", "", 47, 48, 1) + + # GENERATE SEMI-INFINITE SOLID ELEMENTS + mapdl.einfin("", NPOLE) + + # Selects all entities + mapdl.allsel() + mapdl.eplot() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-291_002.png + :alt: vm 291 + :srcset: /verif-manual/images/sphx_glr_vm-291_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 503-510 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix UX degrees of freedom at node location X=0. Apply a negative force 1.0 lb +along FY direction at node 6. Then exit prep7 processor. + +Effectiely, this sets: +- :math:`Point Load = 1.0` + +.. GENERATED FROM PYTHON SOURCE LINES 510-526 + +.. code-block:: Python + + + # Selects nodes using location x=0 + mapdl.nsel("S", "LOC", "X", 0) + # CONSTRAINT UX DOF AT LOCATION X=0 + mapdl.d("ALL", "UX", 0) + # Selects all entities + mapdl.allsel() + + # FORCE magnitude + p = -1 + # APPLY FORCE ALONG Y DIRECTION AT NODE6 + mapdl.f(6, "FY", p) + + # Finish pre-processing processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 527-530 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 530-544 + +.. code-block:: Python + + + mapdl.slashsolu() + + # Performing static analysis + mapdl.antype("STATIC") + # Controls the solution data written to the database. + mapdl.outres("ALL", "ALL") + # Sets the time for a load step, time=1 + mapdl.time(1) + # SOLVE STATIC ANALYSIS + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 545-548 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. Compute deflections. + +.. GENERATED FROM PYTHON SOURCE LINES 548-668 + +.. code-block:: Python + + + mapdl.post1() + + # Set the current results set to the last set to be read from result file + mapdl.set("LAST") + # redirects output to the default system output file + mapdl.run("/OUT") + # reactivates suppressed printout + mapdl.gopr() + + # Set constant parameters + r1 = 1 + z1 = 1 + + # UY AT NODE (1,0,0) + uy1 = p * (1 - nuxy**2) / (pi * exx * r1) + # UY AT NODE (0,1,0) + up1 = p / (2 * pi * exx * z1) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(1,0,0) + uya1 = mapdl.get("UYA1", "NODE", 4, "U", "Y") + # MADPL UY AT NODE(0,1,0) + upa1 = mapdl.get("UPA1", "NODE", 1, "U", "Y") + + # Set constant parameters + r2 = 2 + z2 = 2 + + # UY AT NODE (2,0,0) + uy2 = p * (1 - nuxy**2) / (pi * exx * r2) + # UY AT NODE (0,2,0) + up2 = p / (2 * pi * exx * z2) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(2,0,0) + uya2 = mapdl.get("UYA2", "NODE", 10, "U", "Y") + # MADPL UY AT NODE(0,2,0) + upa2 = mapdl.get("UPA2", "NODE", 19, "U", "Y") + + # Set constant parameters + r3 = 3 + z3 = 3 + + # UY AT NODE (3,0,0) + uy3 = p * (1 - nuxy**2) / (pi * exx * r3) + # UY AT NODE (0,3,0) + up3 = p / (2 * pi * exx * z3) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(3,0,0) + uya3 = mapdl.get("UYA3", "NODE", 23, "U", "Y") + # MADPL UY AT NODE(0,3,0) + upa3 = mapdl.get("UPA3", "NODE", 33, "U", "Y") + + # Set constant parameters + r4 = 4 + z4 = 4 + + # UY AT NODE (4,0,0) + uy4 = p * (1 - nuxy**2) / (pi * exx * r4) + # UY AT NODE (0,4,0) + up4 = p / (2 * pi * exx * z4) * (1 + nuxy + 2 - 2 * nuxy**2) + # MAPDL UY AT NODE(4,0,0) + uya4 = mapdl.get("UYA4", "NODE", 37, "U", "Y") + # MADPL UY AT NODE(0,4,0) + upa4 = mapdl.get("UPA4", "NODE", 47, "U", "Y") + + # assign labels for nodes + label1 = np.array(["NODE10", "NODE23", "NODE37"]) + label2 = np.array(["NODE19", "NODE33", "NODE47"]) + + # create results arrays for printout + value1 = np.array([uy2, uy3, uy4]) + value_ana1 = np.array([uya2, uya3, uya4]) + value_ratio1 = [] + for i in range(len(value_ana1)): + a = value1[i] / value_ana1[i] + value_ratio1.append(a) + + # create results arrays for printout + value2 = np.array([up2, up3, up4]) + value_ana2 = np.array([upa2, upa3, upa4]) + value_ratio2 = [] + for i in range(len(value_ana2)): + a = value2[i] / value_ana2[i] + value_ratio2.append(a) + + mapdl.gopr() + results = f""" + + USING PLANE183 AND INFIN257 ELEMENTS + ------------------------------------ + + VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) + ---------------------------------------------- + + """ + print(results) + + + for i in range(len(value1)): + message = f""" + {label1[i]} {value1[i]:.5f} {value_ana1[i]:.5f} {value_ratio1[i]:.5f} + """ + print(message) + + results = f""" + + VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) + ---------------------------------------------------- + + """ + print(results) + + for i in range(len(value2)): + message = f""" + {label2[i]} {value2[i]:.5f} {value_ana2[i]:.5f} {value_ratio2[i]:.5f} + """ + print(message) + + message = f""" + ----------------------------------------------------------------- + """ + print(message) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + USING PLANE183 AND INFIN257 ELEMENTS + ------------------------------------ + + VERTICAL DISPLACEMENT(UY) ON THE SURFACE (Y=0) + ---------------------------------------------- + + + + NODE10 -0.15756 -0.15745 1.00070 + + + NODE23 -0.10504 -0.10582 0.99264 + + + NODE37 -0.07878 -0.07865 1.00162 + + + + VERTICAL DISPLACEMENT(UY) BELOW THE POINT LOAD (X=0) + ---------------------------------------------------- + + + + NODE19 -0.24510 -0.26633 0.92029 + + + NODE33 -0.16340 -0.16186 1.00952 + + + NODE47 -0.12255 -0.12254 1.00010 + + + ----------------------------------------------------------------- + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 669-671 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 671-673 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 674-676 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 676-677 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.594 seconds) + + +.. _sphx_glr_download_verif-manual_vm-291.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-291.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-291.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-295.rst.txt b/_sources/verif-manual/vm-295.rst.txt new file mode 100644 index 00000000..62594e2a --- /dev/null +++ b/_sources/verif-manual/vm-295.rst.txt @@ -0,0 +1,637 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-295.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-295.py: + +.. _ref_vm295: + +One Dimensional Terzaghi's Consolidation Problem with Permeability as Function of Depth +--------------------------------------------------------------------------------------- +Problem description: + - The test case is to simulate a one-dimensional Terzaghi's problem with permeability as a function + of the soil depth. A pressure P is applied on the top surface of the soil with depth H and + width W. The top surface of the soil is fully permeable and the permeability decreases linearly + with depth. The excess pore water pressure for 0.1, 0.2, 0.3, 0.4, and 0.5 day is calculated and + compared against the reference results obtained using the PIM method (Figure 5, pg. 5916). + +Reference: + - A POINT INTERPOLATION METHOD FOR SIMULATING DISSIPATION PROCESS + OF CONSOLIDATION, J.G.WANG, G.R.LIU, Y.G.WU, COMPUTER METHODS + IN APPLIED MECHANICS AND ENGINEERING 190 (2001),PG: 5907-5922 + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 2D 4-Node Coupled Pore-Pressure Element (CPT212) + +.. image:: ../_static/vm295_setup.png + :width: 100 + :alt: VM295 Problem Sketch + +Material properties: + - Youngs modulus, :math:`E = 4 \cdot 10^7 Pa` + - Poissons ratio, :math:`\mu = 0.3` + - Permeability value at bottom of the soil, :math:`fpx = 1.728 \cdot 10^-3 m/day` + - Permeability value at the top of the soil = :math:`100 * fpx` + +Geometric properties: + - Height, :math:`H = 16 m` + - Width, :math:`W = 1 m` + +Loading: + - Pressure, :math:`P = 1 \cdot 10^4 Pa` + +Analysis Assumptions and Modeling Notes: + - The soil is modeled using 2D CPT212 elements with plane strain element behavior. + The UX degree of freedom for all nodes is constrained and the UY degree of freedom at the bottom + of the soil is constrained. The pressure degree of freedom at the top edge is constrained to + make it fully permeable. Linearly varying permeability of the soil is defined using the TB,PM + material model. Static analysis is performed with an end time of 86400 seconds (1 day) and with + stepped pressure loading P on the top edge of the soil. The excess water pore pressure at depth + H = 6 m is computed for 0.1 (8640 s), 0.2 (17280 s), 0.3 (25920 s), 0.4 (34560 s), and + 0.5 days (43200 s) by interpolating the solution obtained at the nearest time points. + +.. GENERATED FROM PYTHON SOURCE LINES 73-109 + +.. code-block:: Python + + # sphinx_gallery_thumbnail_path = '_static/vm295_setup.png' + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + # Clear the current database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command for VM295 + mapdl.run("/VERIFY,VM295") + + # Set the title of the analysis + mapdl.title( + "VM295 1D TERZAGHI'S CONSOLIDATION PROBLEM WITH PERMEABILITY AS FUNCTION OF DEPTH" + ) + + # Entering the PREP7 environment in MAPDL + mapdl.prep7(mute=True) + + # Set Parameters + day = 24 * 3600 # SECONDS IN ONE DAY + h = 16 # TOTAL DEPTH OF SOIL IN METERS + w = 1 # WIDTH OF SOIL IN METERS + pres = 1e4 # PRESSURE IN PA + ex = 4e7 # YOUNG'S MODULUS IN PA + tt = 1 * day + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-114 + +Define element type and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use 2D 4 NOode Coupled Pore Pressure Element (CPT212) and +set PLANE STRAIN Formulation Keyopt(3)=2. + +.. GENERATED FROM PYTHON SOURCE LINES 114-119 + +.. code-block:: Python + + + mapdl.et(1, "CPT212") + mapdl.keyopt(1, 12, 1) + mapdl.keyopt(1, 3, 2) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ELEMENT TYPE 1 IS CPT212 2-D 4-NODE PLANE STRN COUPLE + KEYOPT( 1- 6)= 0 0 2 0 0 0 + KEYOPT( 7-12)= 0 0 0 0 0 1 + KEYOPT(13-18)= 0 0 0 0 0 0 + + CURRENT NODAL DOF SET IS UX UY PRES + TWO-DIMENSIONAL MODEL + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-124 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), Young's modulus of 4e7 +and Poisson's ratio of 0.3 is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 124-142 + +.. code-block:: Python + + + mapdl.mp("EX", 1, ex) + mapdl.mp("NUXY", 1, 0.3) + + # Set parameters + fpx = 1.728e-3 / day / 1e4 # PERMEABILITY FROM REFERENCE + one = 1.0 + + # Define TB material properties + mapdl.tb("PM", 1, "", "", "PERM") # DEFINING PERMEABILITY FOR THE SOIL + mapdl.tbfield("YCOR", 0) # LOCATION Y = 0 + mapdl.tbdata(1, fpx, fpx, fpx) # PERMEABILITY VALUES AT LOCATION Y=0 + mapdl.tbfield("YCOR", h) # LOCATION Y=16 + # PERMEABILITY VALUES AT LOCATION Y=16, LINEAR VARIABLE PERMEABILITY + mapdl.tbdata(1, fpx * 100, fpx * 100, fpx * 100) + mapdl.tb("PM", 1, "", "", "BIOT") # DEFINING BIOT COEFFICINET FOR SOIL + mapdl.tbdata(1, one) # BIOT COEFFICIENT + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + DATA FOR PM TABLE FOR MATERIAL 1 AT TEMPERATURE= 16.0000 + LOC= 1 1.00000e+00 + + + +.. GENERATED FROM PYTHON SOURCE LINES 143-147 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 147-157 + +.. code-block:: Python + + + mapdl.rectng(0, w, 0, h) # Generate rectangle + # Specifies the divisions and spacing ratio on unmeshed lines + mapdl.lesize(4, "", "", 16) + mapdl.lesize(3, "", "", 1) + # For elements that support multiple shapes, specifies the element shape, set mshape=2D + mapdl.mshape(0, "2D") + mapdl.mshkey(1) # Key(1) = Specifies mapped meshing should be used to mesh + mapdl.amesh(1) # CREATING CPT212 ELEMENTS + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + GENERATE NODES AND ELEMENTS + IN AREAS 1 TO 1 IN STEPS OF 1 + + NUMBER OF AREAS MESHED = 1 + MAXIMUM NODE NUMBER = 34 + MAXIMUM ELEMENT NUMBER = 16 + + + +.. GENERATED FROM PYTHON SOURCE LINES 158-163 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Fix UX degrees of freedom. Constraining UY DOF AT Location Y=0. +Defining the top portion of the soil as permeable. +Then exit prep7 processor. + +.. GENERATED FROM PYTHON SOURCE LINES 163-181 + +.. code-block:: Python + + + mapdl.d("ALL", "UX", 0) # CONSTRAINING ALL UX DOF + + mapdl.nsel("S", "LOC", "Y", 0) + mapdl.d("ALL", "UY", 0) # CONSTRAINING UY DOF AT LOCATION Y=0 + mapdl.nsel("ALL") + + mapdl.nsel("S", "LOC", "Y", h) + mapdl.d("ALL", "PRES", 0) # DEFINING THE TOP PORTION OF SOIL AS PERMEABLE + # selects all nodes + mapdl.nsel("ALL") + # selects all element + mapdl.esel("ALL") + mapdl.aplot() + + # Finish pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-295_001.png + :alt: vm 295 + :srcset: /verif-manual/images/sphx_glr_vm-295_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 182-185 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 185-209 + +.. code-block:: Python + + mapdl.slashsolu() + + mapdl.antype("STATIC") # Performing static analysis + mapdl.nropt("UNSYM") # UNSYMMETRIC NEWTON RAPHSON OPTION + mapdl.time(tt) # END TIME + + mapdl.nsel("S", "LOC", "Y", h) + # APPLYING Surface PRESSURE LOAD AT TOP OF THE SOIL + mapdl.sf("ALL", "PRES", pres) + # selects all nodes + mapdl.nsel("ALL") + + # Specify number of SUBSTEPS + mapdl.nsubst(nsbstp=350, nsbmx=1000, nsbmn=150) + + # Controls the solution data written to the database. + mapdl.outres("ALL", "ALL") + mapdl.kbc(1) # STEPPED LOADING + + # SOLVE STATIC ANALYSIS + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 210-213 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing. + +.. GENERATED FROM PYTHON SOURCE LINES 213-222 + +.. code-block:: Python + + + mapdl.post1() + # Set the current results set to the last set to be read from result file + mapdl.set("LAST") + # redirects output to the default system output file + mapdl.run("/OUT") + # reactivates suppressed printout + mapdl.gopr() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + PRINTOUT RESUMED BY /GOP + + + +.. GENERATED FROM PYTHON SOURCE LINES 223-225 + +Specify Reference Solution +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 225-233 + +.. code-block:: Python + + mapdl.com("") + mapdl.com("EXCESS PORE PRESSURE IN KILOPASCALS AT LOCATION X=1,Y=6") + mapdl.com("FOR 0.1 DAY (8640 SECONDS),0.2 DAY (17280 SECONDS)") + mapdl.com("0.3 DAY (25920 SECONDS), 0.4 DAY (34560 SECONDS)") + mapdl.com("AND 0.5 DAY (43200 SECONDS) ARE COMPUTED AND COMPARED") + mapdl.com("AGAINST REFERENCE SOLUTION") + mapdl.com("") + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 234-236 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 236-239 + +.. code-block:: Python + + q = mapdl.queries + nd1 = q.node(1.0, 6.0, 0.0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 240-243 + +Post-processing: Compute pore pressure +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +redirects solver output to a file named "SCRATCH" + +.. GENERATED FROM PYTHON SOURCE LINES 243-325 + +.. code-block:: Python + + mapdl.run("/OUT,SCRATCH") + # Specify load set to read from the result file, load step =1, sub-step=16 + mapdl.set(1, 16) + p11 = mapdl.get("P11", "NODE", nd1, "PRES") + t11 = mapdl.get("T11", "ACTIVE", 0, "SET", "TIME") + # Specify load set to read from the result file, load step =1, sub-step=17 + mapdl.set(1, 17) + p12 = mapdl.get("P12", "NODE", nd1, "PRES") + t12 = mapdl.get("T12", "ACTIVE", 0, "SET", "TIME") + t1 = day * 0.1 + mapdl.com("") + mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.1DAY") + mapdl.com("") + pt1 = (p11 + (t1 - t11) / (t12 - t11) * (p12 - p11)) / 1e3 + # Specify load set to read from the result file, load step =1, sub-step=31 + mapdl.set(1, 31) + p21 = mapdl.get("P21", "NODE", nd1, "PRES") + t21 = mapdl.get("T21", "ACTIVE", 0, "SET", "TIME") + # Specify load set to read from the result file, load step =1, sub-step=32 + mapdl.set(1, 32) + p22 = mapdl.get("P22", "NODE", nd1, "PRES") + t22 = mapdl.get("T22", "ACTIVE", 0, "SET", "TIME") + t2 = day * 0.2 + mapdl.com("") + mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.2DAY") + mapdl.com("") + pt2 = (p21 + (t2 - t21) / (t22 - t21) * (p22 - p21)) / 1e3 + # Specify load set to read from the result file, load step =1, sub-step=46 + mapdl.set(1, 46) + p31 = mapdl.get("P31", "NODE", nd1, "PRES") + t31 = mapdl.get("T31", "ACTIVE", 0, "SET", "TIME") + # Specify load set to read from the result file, load step =1, sub-step=47 + mapdl.set(1, 47) + p32 = mapdl.get("P32", "NODE", nd1, "PRES") + t32 = mapdl.get("T32", "ACTIVE", 0, "SET", "TIME") + t3 = day * 0.3 + mapdl.com("") + mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.3DAY") + mapdl.com("") + pt3 = (p31 + (t3 - t31) / (t32 - t31) * (p32 - p31)) / 1e3 + # Specify load set to read from the result file, load step =1, sub-step=61 + mapdl.set(1, 61) + p41 = mapdl.get("P41", "NODE", nd1, "PRES") + t41 = mapdl.get("T41", "ACTIVE", 0, "SET", "TIME") + # Specify load set to read from the result file, load step =1, sub-step=62 + mapdl.set(1, 62) + p42 = mapdl.get("P42", "NODE", nd1, "PRES") + t42 = mapdl.get("T42", "ACTIVE", 0, "SET", "TIME") + t4 = day * 0.4 + mapdl.com("") + mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.4DAY") + mapdl.com("") + pt4 = (p41 + (t4 - t41) / (t42 - t41) * (p42 - p41)) / 1e3 + # Specify load set to read from the result file, load step =1, sub-step=76 + mapdl.set(1, 76) + p51 = mapdl.get("P51", "NODE", nd1, "PRES") + t51 = mapdl.get("T51", "ACTIVE", 0, "SET", "TIME") + # Specify load set to read from the result file, load step =1, sub-step=77 + mapdl.set(1, 77) + p52 = mapdl.get("P52", "NODE", nd1, "PRES") + t52 = mapdl.get("T52", "ACTIVE", 0, "SET", "TIME") + t5 = day * 0.5 + mapdl.com("") + mapdl.com("INTERPOLATE THE RESULTS AT LOCATION (1,6,0) FOR TIME=0.5DAY") + mapdl.com("") + pt5 = (p51 + (t5 - t51) / (t52 - t51) * (p52 - p51)) / 1e3 + # Store result values in array + P = np.array([pt1, pt2, pt3, pt4, pt5]) + + # REFERENCE RESULTS, FIGURE 5, PG 5916 + # Fill the Target Result Values in array + Target_CP = np.array([5.230, 2.970, 1.769, 1.043, 0.632]) + + # store ratio + RT = [] + for i in range(len(Target_CP)): + a = P[i] / Target_CP[i] + RT.append(a) + + # assign labels for days + label = np.array([0.1, 0.2, 0.3, 0.4, 0.5]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 326-328 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 328-347 + +.. code-block:: Python + + + message = f""" + ------------------- VM295 RESULTS COMPARISON --------------------- + Time (day) | TARGET (kPa) | Mechanical APDL | RATIO + ----------------------------------------------------------------- + """ + print(message) + + for i in range(len(Target_CP)): + message = f""" + {label[i]:.5f} {Target_CP[i]:.5f} {P[i]:.5f} {RT[i]:.5f} + """ + print(message) + + message = f""" + ----------------------------------------------------------------- + """ + print(message) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ------------------- VM295 RESULTS COMPARISON --------------------- + Time (day) | TARGET (kPa) | Mechanical APDL | RATIO + ----------------------------------------------------------------- + + + 0.10000 5.23000 5.27900 1.00937 + + + 0.20000 2.97000 2.98412 1.00475 + + + 0.30000 1.76900 1.74289 0.98524 + + + 0.40000 1.04300 1.02083 0.97875 + + + 0.50000 0.63200 0.59800 0.94621 + + + ----------------------------------------------------------------- + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 348-350 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 350-352 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 353-355 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 355-356 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.740 seconds) + + +.. _sphx_glr_download_verif-manual_vm-295.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-295.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-295.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_sources/verif-manual/vm-299.rst.txt b/_sources/verif-manual/vm-299.rst.txt new file mode 100644 index 00000000..a42fc660 --- /dev/null +++ b/_sources/verif-manual/vm-299.rst.txt @@ -0,0 +1,550 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "verif-manual/vm-299.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-299.py: + +.. _ref_vm299: + +Sound Diffusion in a Flat Room +------------------------------ +Problem description: + - Sound diffusion is modeled in a flat room of size 30 x 30 x 3 :math:`m^3`. A sound source + is placed at (2,2,1) with a sound power level of :math:`1 \cdot 10^-2 W`. The wall absorption + coefficient is equal to 0.1. The coefficient of atmospheric attenuation is :math:`0.01 m^-1`. + +Reference: + - A.BILLON,J.PICAUT,'INTRODUCING ATMOSPHERIC ATTENUATION + WITHIN A DIFFUSION MODEL FOR ROOM-ACOUSTIC PREDICTIONS MARCH 2008. + +Analysis type(s): + - Static Analysis ``ANTYPE=0`` + +Element type(s): + - 3D 20-Node Acoustic Solid (FLUID220) + +.. image:: ../_static/vm299_setup.png + :width: 400 + :alt: VM299 Finite Element Model of a Flat Room + +Material properties: + - Speed of sound, :math:`c_0 = 343 m/s` + - Density, :math:`\rho = 1.21 kg/m^3` + - Wall absorption coefficient, :math:`\alpha = 0.1` + - Atmospheric attenuation coefficient attn. = :math:`0.01 m^-1` + +Geometric properties: + - Room length = :math:`30 m` + - Room width = :math:`30 m` + - Room height = :math:`3 m` + +Loading: + - Sound power source = :math:`1 \cdot 10^{-2} W` + + +Analysis Assumptions and Modeling Notes: + - Steady analysis is performed to determine the sound pressure level inside the room. + In the post-processing, the sound pressure level (SPL) is listed every 2 m along a line + passing through the room center at 1 m high. The sound pressure level is calculated in + Mechanical APDL as: + + :math:`SPL = 10 \times \log_{10} \times \frac{\rho \times c_0^2 \times w}{P_{ref}^2}` + + where w is diffuse sound energy and reference pressure :math:`P_{ref} = 2 \times 10^{-5}`. + +.. GENERATED FROM PYTHON SOURCE LINES 71-123 + +.. code-block:: Python + + + # sphinx_gallery_thumbnail_path = '_static/vm299_setup.png' + + import math + + # Importing the `launch_mapdl` function from the `ansys.mapdl.core` module + from ansys.mapdl.core import launch_mapdl + import numpy as np + + # Launch MAPDL with specified options + mapdl = launch_mapdl(loglevel="WARNING", print_com=True, remove_temp_dir_on_exit=True) + # Clear the current database + mapdl.clear() + + # Run the FINISH command to exists normally from a processor + mapdl.finish() + + # Set the ANSYS version + mapdl.com("ANSYS MEDIA REL. 2022R2 (05/13/2022) REF. VERIF. MANUAL: REL. 2022R2") + + # Run the /VERIFY command for VM299 + mapdl.run("/VERIFY,VM299") + + # Set the title of the analysis + mapdl.title("VM299 SOUND PRESSURE LEVEL IN A FLAT ROOM") + + # Entering the PREP7 environment in MAPDL + mapdl.prep7() + + # It is not recommended to use '/NOPR' in a normal PyMAPDL session. + mapdl._run("/NOPR") + + # Constant value of PI + pi = math.pi + + # Set parameters for ROOM SIZE + LX = 30 + LY = 30 + LZ = 3 + VOL = LX * LY * LZ + SURF = 2 * (LX * LY + LY * LZ + LX * LZ) + MFP = 4 * VOL / SURF + + # set parameters for MATERIAL PROPERTIES + C0 = 343 + RHO = 1.21 + ROOMD = MFP * C0 / 3 + ATTN_Val = 0.01 + ROOMDP = ROOMD / (1.0 + ATTN_Val * MFP) + ALPHA = 0.1 + WS = 1.0e-2 + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 124-128 + +Define material +~~~~~~~~~~~~~~~ +Set up the material and its type (a single material), density, speed of sound +wall absorption coefficient and Atmospheric attenuation coefficient is specified. + +.. GENERATED FROM PYTHON SOURCE LINES 128-134 + +.. code-block:: Python + + + mapdl.mp("DENS", 1, RHO) + mapdl.mp("SONC", 1, C0) + mapdl.tb("AFDM", 1, "", "", "ROOM") + mapdl.tbdata(1, ROOMDP, ATTN_Val) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 135-139 + +Define geometry +~~~~~~~~~~~~~~~ +Set up the nodes and elements. This creates a mesh just like in the +problem setup. + +.. GENERATED FROM PYTHON SOURCE LINES 139-172 + +.. code-block:: Python + + H = 0.5 + a = np.array([0, 2.0, LX]) + b = np.array([0, 2.0, LY]) + c = np.array([0, 2.0, LZ]) + for i in range(2): + for j in range(2): + for k in range(2): + mapdl.block(a[i], a[i + 1], b[j], b[j + 1], c[k], c[k + 1]) + # mapdl.aplot() + + # Generates new volumes by “gluing” volumes. + mapdl.vglue("ALL") + # Define element, 3-D Acoustic Fluid 20-Node Solid Element + mapdl.et(1, 220, 3, 4) + mapdl.type(1) # set element type, Type=1 + mapdl.mat(1) # set material type, MAT=1 + mapdl.esize(H) # Specifies the element size. + + # Generates nodes and volume elements within volumes. + mapdl.vmesh(9, 15, 1) + + # For elements that support multiple shapes, specifies the element shape, set mshape=3D + mapdl.mshape(0, "3D") + # Generates nodes and volume elements within volumes. + mapdl.vmesh(1) + # select nodes of specified location + mapdl.nsel("S", "LOC", "X", 0) + mapdl.nsel("A", "LOC", "X", LX) + mapdl.nsel("A", "LOC", "Y", 0) + mapdl.nsel("A", "LOC", "Y", LY) + mapdl.nsel("A", "LOC", "Z", 0) + mapdl.nsel("A", "LOC", "Z", LZ) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + array([ 1, 2, 3, ..., 99476, 99477, 99478], dtype=int32) + + + +.. GENERATED FROM PYTHON SOURCE LINES 173-181 + +Define boundary conditions +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define Absorption coefficient and transmission loss.Define Mass source; mass +source rate; or power source in an energy diffusion solution for room acoustics. +Then exit prep7 processor. + +Effectiely, this sets: +- Sound power source = :math:`1 \cdot 10^{-2} W` + +.. GENERATED FROM PYTHON SOURCE LINES 181-198 + +.. code-block:: Python + + + mapdl.sf("ALL", "ATTN", ALPHA) + # Selects all entities + mapdl.allsel() + # select nodes of specified location + mapdl.nsel("S", "LOC", "X", a[1]) + mapdl.nsel("R", "LOC", "Y", b[1]) + mapdl.nsel("R", "LOC", "Z", c[1]) + + mapdl.bf("ALL", "MASS", WS) + + # Selects all entities + mapdl.allsel() + mapdl.eplot() + # Finish pre-processing processor + mapdl.finish() + + + + +.. image-sg:: /verif-manual/images/sphx_glr_vm-299_001.png + :alt: vm 299 + :srcset: /verif-manual/images/sphx_glr_vm-299_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 199-202 + +Solve +~~~~~ +Enter solution mode and solve the system. + +.. GENERATED FROM PYTHON SOURCE LINES 202-208 + +.. code-block:: Python + + mapdl.slashsolu() + # SOLVE STATIC ANALYSIS + mapdl.solve() + # exists solution processor + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + FINISH SOLUTION PROCESSING + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 209-212 + +Post-processing +~~~~~~~~~~~~~~~ +Enter post-processing and read results set + +.. GENERATED FROM PYTHON SOURCE LINES 212-246 + +.. code-block:: Python + + + mapdl.post1() + # Set the current results set to the last set to be read from result file + mapdl.set("LAST") + # Defines a path name and establishes parameters for the path + mapdl.path("X_SPL", 2, "", 15) + mapdl.ppath(1, "NODE", 0, 15, 1) + mapdl.ppath(2, "NODE", 30, 15, 1) + # Interpolates an item onto a path. + mapdl.pdef("UX", "U", "X", "NOAV") + mapdl.pdef("SPLX", "SPL", "", "NOAV") + + # redirects output to the default system output file + mapdl.run("/OUT") + + # Prints path items along a geometry path. + mapdl.prpath("UX", "SPLX") + + # redirects solver output to a file named "SCRATCH" + mapdl.run("/OUT,SCRATCH") + # Sets various line graph display options + # DIVX: Determines the number of divisions (grid markers) that will be plotted on the X + mapdl.gropt("DIVX", 15) + # Specifies a linear ordinate (Y) scale range. + mapdl.yrange(71, 82) + # DIVY: Determines the number of divisions (grid markers) that will be plotted on the Y + mapdl.gropt("DIVY", 11) + # Specifies the device and other parameters for graphics displays. + # Creates PNG (Portable Network Graphics) files that are named Jobnamennn.png + mapdl.show("PNG", "rev") + + mapdl.plpath("UX", "SPLX") # Displays path items on a graph. + mapdl.show("CLOSE") # This option purges the graphics file buffer. + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 247-249 + +Inline functions in PyMAPDL to query node +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 249-256 + +.. code-block:: Python + + q = mapdl.queries + n1 = q.node(5, 15, 1) + n2 = q.node(10, 15, 1) + n3 = q.node(15, 15, 1) + n4 = q.node(20, 15, 1) + n5 = q.node(25, 15, 1) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 257-259 + +Post-processing: Compute sound pressure level (SPL) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 259-293 + +.. code-block:: Python + + + en_1 = mapdl.get("EN_1", "NODE", n1, "ENKE") + en_2 = mapdl.get("EN_2", "NODE", n2, "ENKE") + en_3 = mapdl.get("EN_3", "NODE", n3, "ENKE") + en_4 = mapdl.get("EN_4", "NODE", n4, "ENKE") + en_5 = mapdl.get("EN_5", "NODE", n5, "ENKE") + + PREF = 2e-5 + x1 = (RHO * en_1 * C0**2) / PREF**2 + x2 = (RHO * en_2 * C0**2) / PREF**2 + x3 = (RHO * en_3 * C0**2) / PREF**2 + x4 = (RHO * en_4 * C0**2) / PREF**2 + x5 = (RHO * en_5 * C0**2) / PREF**2 + SPL_1 = 10 * (math.log10(x1)) + SPL_2 = 10 * (math.log10(x2)) + SPL_3 = 10 * (math.log10(x3)) + SPL_4 = 10 * (math.log10(x4)) + SPL_5 = 10 * (math.log10(x5)) + + # Fill the target tesult values in array + target_ref = np.array([80.0, 79.0, 77.5, 76.0, 74.5]) + + # Fill the simulated result values in array + value = np.array([SPL_1, SPL_2, SPL_3, SPL_4, SPL_5]) + + # store ratio + value_ratio = [] + for i in range(len(target_ref)): + a = value[i] / target_ref[i] + value_ratio.append(a) + + # assign labels position in meter + label = np.array([5, 10, 15, 20, 25]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 294-296 + +Verify the results. +~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 296-315 + +.. code-block:: Python + + + message = f""" + ------------------- VM299 RESULTS COMPARISON --------------------- + SPL at Position, X(m) | TARGET | Mechanical APDL | RATIO + ----------------------------------------------------------------- + """ + print(message) + + for i in range(len(target_ref)): + message = f""" + {label[i]:.5f} {target_ref[i]:.5f} {value[i]:.5f} {value_ratio[i]:.5f} + """ + print(message) + + message = f""" + ----------------------------------------------------------------- + """ + print(message) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ------------------- VM299 RESULTS COMPARISON --------------------- + SPL at Position, X(m) | TARGET | Mechanical APDL | RATIO + ----------------------------------------------------------------- + + + 5.00000 80.00000 80.90616 1.01133 + + + 10.00000 79.00000 79.47874 1.00606 + + + 15.00000 77.50000 77.39411 0.99863 + + + 20.00000 76.00000 75.05736 0.98760 + + + 25.00000 74.50000 72.93575 0.97900 + + + ----------------------------------------------------------------- + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 316-318 + +Finish the post-processing processor. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 318-320 + +.. code-block:: Python + + mapdl.finish() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + EXIT THE MAPDL POST1 DATABASE PROCESSOR + + + ***** ROUTINE COMPLETED ***** CP = 0.000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 321-323 + +Stop MAPDL. +~~~~~~~~~~~ + +.. GENERATED FROM PYTHON SOURCE LINES 323-324 + +.. code-block:: Python + + mapdl.exit() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 6.457 seconds) + + +.. _sphx_glr_download_verif-manual_vm-299.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: vm-299.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: vm-299.py ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/_static/404.rst b/_static/404.rst new file mode 100644 index 00000000..c5599198 --- /dev/null +++ b/_static/404.rst @@ -0,0 +1,6 @@ +Oops! +===== + +This is unexpected. The page you are requesting does not exist. + +If this page should exist, please contact `{{ theme_contact_mail }} <{{ theme_contact_mail }}>`_. \ No newline at end of file diff --git a/_static/ansys-favicon.png b/_static/ansys-favicon.png new file mode 100644 index 00000000..cfb2e535 Binary files /dev/null and b/_static/ansys-favicon.png differ diff --git a/_static/ansys_logo_black.jpg b/_static/ansys_logo_black.jpg new file mode 100644 index 00000000..7f737335 Binary files /dev/null and b/_static/ansys_logo_black.jpg differ diff --git a/_static/ansys_logo_black_cropped.jpg b/_static/ansys_logo_black_cropped.jpg new file mode 100644 index 00000000..05d98e6c Binary files /dev/null and b/_static/ansys_logo_black_cropped.jpg differ diff --git a/_static/ansys_logo_white.pdf b/_static/ansys_logo_white.pdf new file mode 100644 index 00000000..fceb89b3 Binary files /dev/null and b/_static/ansys_logo_white.pdf differ diff --git a/_static/ansys_logo_white_cropped.pdf b/_static/ansys_logo_white_cropped.pdf new file mode 100644 index 00000000..ad122b15 Binary files /dev/null and b/_static/ansys_logo_white_cropped.pdf differ diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 00000000..e760386b --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 270px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/binder_badge_logo.svg b/_static/binder_badge_logo.svg new file mode 100644 index 00000000..327f6b63 --- /dev/null +++ b/_static/binder_badge_logo.svg @@ -0,0 +1 @@ + launchlaunchbinderbinder \ No newline at end of file diff --git a/_static/broken_example.png b/_static/broken_example.png new file mode 100644 index 00000000..4fea24e7 Binary files /dev/null and b/_static/broken_example.png differ diff --git a/_static/check-solid.svg b/_static/check-solid.svg new file mode 100644 index 00000000..92fad4b5 --- /dev/null +++ b/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/_static/clipboard.min.js b/_static/clipboard.min.js new file mode 100644 index 00000000..54b3c463 --- /dev/null +++ b/_static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 + + + + diff --git a/_static/copybutton.css b/_static/copybutton.css new file mode 100644 index 00000000..f1916ec7 --- /dev/null +++ b/_static/copybutton.css @@ -0,0 +1,94 @@ +/* Copy buttons */ +button.copybtn { + position: absolute; + display: flex; + top: .3em; + right: .3em; + width: 1.7em; + height: 1.7em; + opacity: 0; + transition: opacity 0.3s, border .3s, background-color .3s; + user-select: none; + padding: 0; + border: none; + outline: none; + border-radius: 0.4em; + /* The colors that GitHub uses */ + border: #1b1f2426 1px solid; + background-color: #f6f8fa; + color: #57606a; +} + +button.copybtn.success { + border-color: #22863a; + color: #22863a; +} + +button.copybtn svg { + stroke: currentColor; + width: 1.5em; + height: 1.5em; + padding: 0.1em; +} + +div.highlight { + position: relative; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + opacity: 1; +} + +.highlight button.copybtn:hover { + background-color: rgb(235, 235, 235); +} + +.highlight button.copybtn:active { + background-color: rgb(187, 187, 187); +} + +/** + * A minimal CSS-only tooltip copied from: + * https://codepen.io/mildrenben/pen/rVBrpK + * + * To use, write HTML like the following: + * + *

Short

+ */ + .o-tooltip--left { + position: relative; + } + + .o-tooltip--left:after { + opacity: 0; + visibility: hidden; + position: absolute; + content: attr(data-tooltip); + padding: .2em; + font-size: .8em; + left: -.2em; + background: grey; + color: white; + white-space: nowrap; + z-index: 2; + border-radius: 2px; + transform: translateX(-102%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); +} + +.o-tooltip--left:hover:after { + display: block; + opacity: 1; + visibility: visible; + transform: translateX(-100%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); + transition-delay: .5s; +} + +/* By default the copy button shouldn't show up when printing a page */ +@media print { + button.copybtn { + display: none; + } +} diff --git a/_static/copybutton.js b/_static/copybutton.js new file mode 100644 index 00000000..2ea7ff3e --- /dev/null +++ b/_static/copybutton.js @@ -0,0 +1,248 @@ +// Localization support +const messages = { + 'en': { + 'copy': 'Copy', + 'copy_to_clipboard': 'Copy to clipboard', + 'copy_success': 'Copied!', + 'copy_failure': 'Failed to copy', + }, + 'es' : { + 'copy': 'Copiar', + 'copy_to_clipboard': 'Copiar al portapapeles', + 'copy_success': '¡Copiado!', + 'copy_failure': 'Error al copiar', + }, + 'de' : { + 'copy': 'Kopieren', + 'copy_to_clipboard': 'In die Zwischenablage kopieren', + 'copy_success': 'Kopiert!', + 'copy_failure': 'Fehler beim Kopieren', + }, + 'fr' : { + 'copy': 'Copier', + 'copy_to_clipboard': 'Copier dans le presse-papier', + 'copy_success': 'Copié !', + 'copy_failure': 'Échec de la copie', + }, + 'ru': { + 'copy': 'Скопировать', + 'copy_to_clipboard': 'Скопировать в буфер', + 'copy_success': 'Скопировано!', + 'copy_failure': 'Не удалось скопировать', + }, + 'zh-CN': { + 'copy': '复制', + 'copy_to_clipboard': '复制到剪贴板', + 'copy_success': '复制成功!', + 'copy_failure': '复制失败', + }, + 'it' : { + 'copy': 'Copiare', + 'copy_to_clipboard': 'Copiato negli appunti', + 'copy_success': 'Copiato!', + 'copy_failure': 'Errore durante la copia', + } +} + +let locale = 'en' +if( document.documentElement.lang !== undefined + && messages[document.documentElement.lang] !== undefined ) { + locale = document.documentElement.lang +} + +let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; +if (doc_url_root == '#') { + doc_url_root = ''; +} + +/** + * SVG files for our copy buttons + */ +let iconCheck = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * Set up copy/paste for code blocks + */ + +const runWhenDOMLoaded = cb => { + if (document.readyState != 'loading') { + cb() + } else if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', cb) + } else { + document.attachEvent('onreadystatechange', function() { + if (document.readyState == 'complete') cb() + }) + } +} + +const codeCellId = index => `codecell${index}` + +// Clears selected text since ClipboardJS will select the text when copying +const clearSelection = () => { + if (window.getSelection) { + window.getSelection().removeAllRanges() + } else if (document.selection) { + document.selection.empty() + } +} + +// Changes tooltip text for a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +const addCopyButtonToCodeCells = () => { + // If ClipboardJS hasn't loaded, wait a bit and try again. This + // happens because we load ClipboardJS asynchronously. + if (window.ClipboardJS === undefined) { + setTimeout(addCopyButtonToCodeCells, 250) + return + } + + // Add copybuttons to all of our code cells + const COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} + + +var copyTargetText = (trigger) => { + var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '', false, true, true, true, '', '') +} + + // Initialize with a callback so we can modify the text before copy + const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) + + // Update UI with error/success messages + clipboard.on('success', event => { + clearSelection() + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) + temporarilyChangeIcon(event.trigger) + }) + + clipboard.on('error', event => { + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) + }) +} + +runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/_static/copybutton_funcs.js b/_static/copybutton_funcs.js new file mode 100644 index 00000000..dbe1aaad --- /dev/null +++ b/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} diff --git a/_static/css/ansys_sphinx_theme.css b/_static/css/ansys_sphinx_theme.css new file mode 100644 index 00000000..62ebe0ea --- /dev/null +++ b/_static/css/ansys_sphinx_theme.css @@ -0,0 +1,1170 @@ +/* Provided by the Sphinx base theme template at build time */ + +@import "../basic.css"; +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); +@import "../sg_gallery.css"; +@import "../design-style.4045f2051d55cab465a707391d5b2007.min.css"; +@import "../styles/pydata-sphinx-theme.css"; + +@font-face { + font-family: "Source Sans Pro Light"; + src: url(../fonts/SourceSansPro-Light.ttf); +} + +@font-face { + font-family: "Source Sans Pro"; + src: url(../fonts/SourceSansPro-Regular.ttf); +} + +:root { + /* Ansys specific changes to the theme */ + + /***************************************************************************** + * Ansys Font family + **/ + /* These are adapted from https://systemfontstack.com/ */ + --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, + "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol; + --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, + Liberation Mono, Lucida Console, monospace; + + --pst-font-family-base: "Source Sans Pro", sans-serif, + var(--pst-font-family-base-system); + --pst-font-family-heading: "Source Sans Pro", sans-serif, + var(--pst-font-family-base-system); + --pst-font-family-monospace: monospace, Courier, + var(--pst-font-family-monospace-system); + + /***************************************************************************** + * Ansys compatible colors + * + * Colors are defined in rgb string way, "red, green, blue" + **/ + --ansysGold: rgb(255, 183, 27); /* #FFB71B */ + --ansysBronze: rgb(200, 146, 17); /* #C89211 */ + --pythonBlue: rgb(57, 114, 161); /* #3972a1 */ + + --pst-color-active-navigation: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link: rgb(255, 255, 255); + --pst-color-navbar-link-hover: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link-active: var(--ansysGold); /* --ansysBronze */ + --pst-font-size-h1: 48px; + --pst-font-size-h2: 36px; + --pst-font-size-h3: 28px; + --pst-font-size-h4: 20px; + --pst-font-size-h5: 14px; + --pst-font-size-h6: 11px; +} + +html[data-theme="light"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #fff; + --pst-color-secondary: rgb(200, 146, 17); + --pst-color-success: rgb(40, 167, 69); + --pst-color-text-base: rgb(0, 0, 0); + --pst-color-text-muted: rgb(26, 24, 24); + --pst-color-border: #a19d9d; + --pst-color-shadow: rgb(216, 216, 216); + --pst-color-info: var(--pst-color-link); + + /***************************************************************************** + * depth colors + */ + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-on-surface: #f2f2f2; + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link: #1e6ddc; + --pst-color-link-hover: #32cfea; + --pst-color-link-visted: #9428f2; + --pst-color-inline-code: #000; + --pst-color-target: rgb(255, 255, 255); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #fafae2; + --pst-color-codeout: var(--pst-color-inline-code); + --pst-color-sig: #0965c8; + --pst-color-code-s1: #b35000; + --pst-color-code-c1: #095d0a; + /***************************************************************************** + * sphinx design primary color + */ + --sd-color-primary: var(--pst-color-text-base); + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-border); + + /***************************************************************************** + * search hide match + */ + --pst-color-search-match: #91969b; +} + +html[data-theme="dark"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #d09735; + --pst-color-secondary: #c58e30; + --pst-color-success: rgb(72, 135, 87); + --pst-color-text-base: rgb(201, 209, 217); + --pst-color-text-muted: rgb(192, 192, 192); + --pst-color-border: rgb(192, 192, 192); + --pst-color-shadow: rgb(104, 102, 102); + --pst-color-background: rgb(18, 18, 18); + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-surface: rgb(41, 41, 41); + --pst-color-on-surface: rgb(55, 55, 55); + --pst-color-info: var(--pst-color-secondary); + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link: #579ce5; + --pst-color-link-hover: #12b2e2; + --pst-color-link-visted: #c58af9; + --pst-color-inline-code: #fff; + --pst-color-target: rgb(71, 39, 0); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #495057; + --pst-color-codeout: #f2f4f6; + --pst-color-sig: #d6ab1e; + --pst-color-code-s1: #d79a60; + --pst-color-code-c1: #8fb842; + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-target); + + /***************************************************************************** + * search hide match + */ + --pst-color-search-match: var(--pst-color-primary); +} + +/* +################# +body and content +################# +*/ + +body { + font-family: "Open Sans", sans-serif; +} + +h1, +h2 { + color: var(--pst-color-text-base); +} + +/* +########## +Codecell +########## +*/ + +dt:target, +span.highlighted { + background-color: var(--pst-color-codecell) !important; +} + +.docutils { + color: var(--pst-color-inline-code); + font-family: var(--pst-font-family-monospace); + font-weight: 500; + font-size: 87.5%; +} + +code.literal { + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +.xref.std.std-ref { + color: var(--pst-color-inline-code); + font-family: "Inconsolata"; + font-weight: normal; + font-style: italic; + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + font-size: 90%; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +.sig { + font-family: "Consolas", "Menlo", "DejaVu Sans Mono", + "Bitstream Vera Sans Mono", monospace; +} + +.sig-name.descname { + color: var(--pst-color-inline-code); +} + +.sig-name { + color: var(--pst-color-sig); +} + +/* Increase empty-space around classes, methods, properties, etc. that are descendants + of other items */ +dl.class dl.py { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +/* Reduce empty-space around Notes and Examples headings */ +p.rubric { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +/* +######## +Table +######## +*/ + +.table { + width: 100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + color: var(--pst-color-text-base); + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ +} + +tr { + background-color: var(--pst-color-background); +} + +th { + background-color: rgb(255, 183, 27, 0.55); +} + +tr:nth-child(odd), +tr:nth-child(even) { + background-color: var(--pst-color-background); +} + +.table tr:hover td { + background-color: var(--pst-color-table-hover); +} + +div.rendered_html table.dataframe td { + color: var(--pst-color-text-base); +} + +/* +############### +Table-centered +################ +Same as table but with horizontally centered text. + +see examples. +*/ +table.table-centered { + width: 100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + text-align: center; + + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ +} + +.table-centered tr { + background-color: var(--pst-color-background); + text-align: center; +} + +.table-centered th { + background-color: rgb(255, 183, 27, 0.55); + text-align: center; +} + +.table-centered tr:nth-child(odd), +.table-centered tr:nth-child(even) { + text-align: center; + background-color: var(--pst-color-background); +} + +.table-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +table.dataframe { + table-layout: auto !important; +} + +/* +################### +longtable-centered +#################### +*/ + +table.longtable-centered { + text-align: center; +} + +.longtable-centered tr { + text-align: center; +} + +.longtable-centered th { + text-align: center; +} + +.longtable-centered tr:nth-child(odd) { + text-align: center; +} + +.longtable-centered tr:nth-child(even) { + text-align: center; +} + +table.longtable-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +/* +######### +DataFrame +######### +*/ + +.dataframe tr { + background-color: var(--pst-color-background); +} + +.dataframe tr:nth-child(odd), +.dataframe tr:nth-child(even) { + background-color: var(--pst-color-background) !important; +} + +.dataframe tr:hover td { + background-color: var(--pst-color-table-hover); +} + +/* +################### +DataFrame-centered +################### +*/ + +.dataframe-centered tr { + background-color: var(--pst-color-background); + text-align: center; +} + +.dataframe-centered tr:nth-child(odd) { + background-color: var(--pst-color-background) !important; + text-align: center; +} + +.dataframe-centered tr:nth-child(even) { + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe-centered tr:hover td { + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe thead th { + text-align: center; +} + +/* +############ +data table +############ +*/ + +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: var(--pst-color-text-base) !important; +} + +.dataTables_wrapper, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: var(--pst-color-text-base) !important; +} + +table.dataTable tbody th, +table.dataTable tbody td { + background: var(--pst-color-background); +} + +label { + color: var(--pst-color-text-base); +} + +/* +########## +Scroll-bar +########## +*/ + +body::-webkit-scrollbar { + width: 1rem; + height: 1rem; +} + +body::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +body::-webkit-scrollbar-track { + background: var(--pst-color-background); +} + +.bd-sidebar::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +.bd-sidebar::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; + visibility: hidden !important; +} + +.bd-sidebar::-webkit-scrollbar-track { + background: var(--pst-color-border); + visibility: hidden !important; +} + +.bd-toc::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +.bd-toc::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +.bd-toc::-webkit-scrollbar-track { + background: var(--pst-color-border); +} + +/* +############ +Autosummary +############ +*/ + +.autosummary tr:nth-child(odd), +.autosummary tr:nth-child(even) { + background-color: var(--pst-color-background); +} + +/* +##################### +ReST :download: links +##################### +*/ +a > code.download { + font-family: var(--pst-font-family-base); + color: var(--pst-color-link); + text-decoration: none; + font-weight: normal; +} + +/* +##################### +Sphinx gallery output +##################### +*/ +.sphx-glr-script-out .highlight pre { + background-color: var(--pst-color-codecell) !important; + color: var(--pst-color-codeout); +} + +.prev-next-area a p.prev-next-title { + color: var(--pst-color-link); + font-weight: 600; + font-size: 1.1em; +} + +.highlight .s1, +.s2, +.kc { + color: var(--pst-color-code-s1) !important; +} + +html[data-theme="dark"] .highlight .kn { + color: #e18fff; + font-weight: normal; +} + +.highlight .c1 { + color: var(--pst-color-code-c1); +} + +html[data-theme="dark"] .highlight .n { + color: #b3d7ff; +} + +html[data-theme="dark"] .highlight .nn { + color: #43d69d; + text-decoration: none; +} +/* +############### +Dropdown button +############### +*/ + +.navbar button.navbar-toggler { + margin-right: 1em; + border-color: rgb(255, 255, 255); + color: rgb(255, 255, 255); +} + +/* +#################################################### +Side column size (first and second column from left) +#################################################### +*/ + +.col-md-3 { + flex: 0 0 20%; + max-width: 20%; +} + +a.headerlink { + color: #222; +} + +@media (min-width: 1200px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1200px; + } +} + +@media (min-width: 1600px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1600px; + } +} + +/* +############################################ +Navigation column (according to side column) +############################################ +*/ +.col-lg-9 { + padding-right: 5px; + padding-left: 20px; +} +.bd-main .bd-content { + display: flex; + height: 100%; + justify-content: end; +} + +.bd-main .bd-content .bd-article-container .bd-article { + padding-left: 1rem; + padding-top: 1rem; + padding-right: 1rem; +} +.bd-header .navbar-nav li a.nav-link { + color: #ddd; +} +.bd-header .navbar-nav .dropdown button { + color: #ddd; + display: unset; +} + +/* +################################# +Syntax highlighting in code block +################################# +*/ + +html[data-theme="light"] .highlight .o { + color: #b35000; + font-weight: bold; +} + +/* +############################# +Bold font weight for **code** +############################# +*/ + +b, +strong { + font-weight: 900; +} + +.bd-header .navbar-header-items__start { + width: fit-content; + padding-right: 3rem; +} + +.navbar-nav li a:focus, +.navbar-nav li a:hover, +.navbar-nav li.current > a { + color: white !important; +} + +.navbar-nav .dropdown .dropdown-menu { + min-width: 250px; +} + +/* +########################### +Left side toc-tree hovering +########################### +*/ + +nav.bd-links .active:hover > a { + font-weight: bold; + color: var(--pst-color-text-base); + border-left: 2px solid var(--pst-color-text-base); +} + +nav.bd-links .active > a { + font-weight: bold; + color: var(--pst-color-text-muted) !important; + border-left: 2px solid var(--pst-color-text-base); + border-bottom: none !important; + padding-left: 0.5rem; +} + +nav.bd-links li > a:hover { + font-weight: 900; + color: var(--pst-color-link) !important; +} + +.bd-header .navbar-nav .dropdown button:hover { + color: white; +} + +.dropdown-item:hover { + font-weight: bold; + background-color: transparent; +} + +/* +################## +icon, button, logo +################## +*/ + +button, +input, +optgroup, +select, +textarea, +button:hover { + color: #ddd; +} + +.theme-switch-button { + border-color: #f8f9fa; +} + +button.btn.version-switcher__button { + border-color: var(--pst-color-border); + color: #ddd; +} + +button.version-switcher__button:hover { + color: #f8f8f2; +} + +button.version-switcher__button { + color: #f8f9fa; +} + +.search-button { + color: #ddd; +} + +kbd { + background-color: #f8f9fa; +} + +/* +##################################### +icon, button, logo for small screen +##################################### +*/ +@media screen and (max-width: 576px) { + html[data-theme="light"] .theme-switch-button span { + color: rgb(19, 18, 18) !important; + } + button.btn.version-switcher__button { + border-color: var(--pst-color-border); + color: var(--pst-color-text-base); + font-weight: 700; + } + button.btn.version-switcher__button { + border-color: var(--pst-color-border); + color: var(--pst-color-text-base); + } + button.version-switcher__button { + color: var(--pst-color-text-base); + } + .navbar-nav li a:focus, + .navbar-nav li a:hover, + .navbar-nav li.current > a { + color: var(--pst-color-text-base) !important; + font-weight: 700; + } + button, + input, + optgroup, + select, + textarea, + button:hover { + color: var(--pst-color-text-base); + } +} + +.theme-switch-button span { + color: #f8f9fa; +} + +.theme-switch-button span:hover { + color: var(--ansysGold); + border-color: white; +} + +.navbar-icon-links { + column-gap: 0.2rem; +} + +.search-button-field { + color: white; + background-color: transparent; +} + +.search-button-field:hover { + color: var(--pst-color-border); +} + +/* make the github logo white */ + +i.fa-github-square:before, +i.fa-square-github:before { + color: white; + font-size: 1rem; +} + +.version-switcher__menu a.list-group-item:hover { + background-color: #d09735 !important; + border-color: var(--pst-color-text-base) !important; + color: #000 !important; +} + +.version-switcher__menu a.list-group-item { + background-color: #f8f9fa; + border-color: var(--pst-color-border); + color: #000; +} + +.fa-wrench:before { + content: "\f0ad"; + color: white; +} + +.navbar-icon-links { + font-size: 1.5rem; + color: white; +} + +html[data-theme="light"] #pst-back-to-top { + background-color: var(--pst-color-link); +} +/* +############################## +image padding before and after +############################## +*/ + +img { + padding-top: 1em; + padding-bottom: 1em; +} + +html[data-theme="dark"] .bd-content img:not(.only-dark):not(.dark-light) { + background: transparent; +} + +img.logo__image { + padding-top: 0rem; + padding-bottom: 0rem; +} + +/* +########################## +Nav-bar entity right side. +########################## +*/ + +nav.bd-links li > a { + color: var(--pst-color-link); + font-size: 0.98rem; +} + +html[data-theme="light"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +html[data-theme="dark"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +.bd-toc { + padding-top: 5em; +} + +#version_switcher_button { + background-color: var(--pst-color-background); +} + +.editthispage a { + color: var(--pst-color-text-base); +} + +.list-group-item.active { + z-index: 2; + color: var(--pst-color-text-base) !important; +} + +/* +############## +Sphinx design +############## +*/ + +blockquote { + background-color: var(--pst-color-background); +} +.sd-sphinx-override, +.sd-sphinx-override * { + font-size: medium; + flex: auto; +} + +/* Sphinx-design tab */ + +/* Common styles for all screen sizes */ +.sd-tab-set > input:not(.focus-visible) + label { + outline: none; + font-size: large; + -webkit-tap-highlight-color: var(--pst-color-background) !important; + color: var(--pst-color-text-base); +} + +.sd-tab-set > input:checked + label + .sd-tab-content { + display: block; + font-size: medium; +} + +.sd-tab-set > input:checked + label + .sd-tab-content { + display: block; + font-size: 0.9rem; +} + +.sd-tab-content { + font-family: var(--pst-font-family-base); +} + +.bd-content .sd-tab-set > input:checked + label, +.bd-content .sd-tab-set > input:not(:checked) + label:hover { + color: var(--pst-color-text-base); + border-color: var(--pst-color-text-base); +} + +/* Media query for medium-sized screens */ +@media screen and (max-width: 768px) { + .sd-tab-set > input:not(.focus-visible) + label { + font-size: medium; + } +} + +/* Media query for small-sized screens */ +@media screen and (max-width: 576px) { + .sd-tab-set > input:not(.focus-visible) + label { + font-size: small; + } +} + +/* Sphinx-design card */ + +/* Common styles for all screen sizes */ +.sd-card .sd-card-text { + font-family: var(--pst-font-family-base) !important; + background-color: var(--pst-color-background) !important; +} + +.bd-content .sd-card .sd-card-header { + border: none; + background-color: transparent; + color: var(--pst-color-text-base) !important; + font-size: var(--pst-font-size-h5); + font-weight: bold; + font-family: var(--pst-font-family-base); + padding: 0.5rem 0rem 0.5rem 0rem; +} + +.sd-card .sd-card-footer .sd-card-text { + max-width: 220px; + margin-left: auto; + margin-right: auto; + font-family: var(--pst-font-family-base); +} + +.sd-card-title { + font-family: var(--pst-font-family-base-system); +} + +.bd-content .sd-card .sd-card-body, +.bd-content .sd-card .sd-card-footer, +.bd-content .sd-card .sd-card-text { + background-color: transparent; +} + +html[data-theme="dark"] .sd-shadow-sm { + box-shadow: 0 0.1rem 1rem rgba(250, 250, 250, 0.6) !important; +} + +html[data-theme="dark"] .sd-card-img-top[src*=".png"] { + filter: invert(0.82) brightness(0.8) contrast(1.2); +} + +/* Common styles for all screen sizes */ +.sd-card { + border-radius: 0; + padding: 10px 10px 10px 10px; + font-family: var(--pst-font-family-base) !important; +} + +/* Media query for medium-sized screens */ +@media screen and (max-width: 768px) { + .sd-card .sd-card-header { + font-size: var(--pst-font-size-h6); + } +} + +/* Media query for small-sized screens */ +@media screen and (max-width: 576px) { + .sd-card .sd-card-header { + font-size: var(--pst-font-size-h5); + } + .sd-card { + padding: 5px 5px 5px 5px; + } + .sd-sphinx-override, + .sd-sphinx-override * { + box-sizing: content-box !important; + } +} + +/* +Sphinx-design dropdown +*/ + +.bd-content details.sd-dropdown .sd-summary-title { + border: 1px solid var(--pst-color-text-base) !important; + color: var(--pst-color-text-base) !important; + font-family: var(monospace) !important; + font-size: medium; + text-align: left; + padding-left: 1rem; +} + +details.sd-dropdown summary.sd-card-header + div.sd-summary-content { + background-color: transparent; +} + +/* +################################# +Right side toctree color and font +################################# +*/ +.toc-entry a.nav-link { + padding: 0.125rem 1.5rem; + color: var(--pst-color-link); +} + +.toc-entry a.nav-link.active { + font-weight: bold; + color: var(--pst-color-text-base); + background-color: transparent; + border-left: 2px solid var(--pst-color-text-muted); +} + +.toc-h2 { + font-size: 0.98rem; + padding: 0.05em; +} + +.toc-h3 { + font-size: 0.96rem; +} + +.toc-h4 { + font-size: 0.9rem; +} + +.toc-entry a.nav-link:hover { + color: var(--pst-color-link); + text-decoration: none; + font-weight: 600; +} + +/* +########### +Directives +########### +*/ + +div.deprecated { + border-color: var(--pst-color-danger); + background-color: #dc354514; +} + +div.deprecated, +div.versionadded, +div.versionchanged { + background-color: transparent; +} + +.admonition, +div.admonition { + background-color: var(--pst-color-on-surface); +} + +/* Select only divisions that contain a dataframe, with enough specificity to override pydata css */ +div.nboutput + div.output_area.rendered_html.docutils.container:has(table.dataframe) { + background-color: transparent; +} + +/* +############ +Border lines +############ +*/ +.bd-sidebar-primary, +.bd-sidebar-secondary { + max-height: calc(100vh - var(--pst-header-height) - 1vh); +} + +/* +################# +search hide match +################# +*/ + +div#searchbox p.highlight-link a { + background-color: var(--pst-color-search-match); +} + +.header-article__inner { + padding: 0 1rem; +} + +.table > :not(caption) > * > * { + background-color: transparent !important; + color: var(--pst-color-text-base) !important; +} + +nav.bd-links li > a { + text-decoration: none; +} + +.bd-header .navbar-nav li a.nav-link:hover { + text-decoration: none; + font-weight: 600; +} + +a { + text-decoration: none; +} + +a:active, +a:visited, +a:visited:hover, +a:active:hover, +a:hover { + text-decoration: underline; + color: var(--pst-color-link); + font-weight: 500; +} + +a:visited, +a:visited:hover { + color: var(--pst-color-link-visted); +} diff --git a/_static/css/breadcrumbs.css b/_static/css/breadcrumbs.css new file mode 100644 index 00000000..60fe0155 --- /dev/null +++ b/_static/css/breadcrumbs.css @@ -0,0 +1,70 @@ +/* Provided by the Sphinx base theme template at build time, +styles exclusively for the ansys-sphinx-theme classes. */ + +@import "ansys-sphinx-theme.css"; + +/* +############ +breadcrumbs +############ +*/ + +#breadcrumbs-spacer { + border-right: 10rem solid var(--pst-color-background); +} + +div.related > ul { + padding: 10px 0 20px 0; +} + +*, +:after, +:before { + box-sizing: border-box; +} + +/* +########################### +vesrion warning announcement +############################ +*/ + +#announcement_msg { + display: flex; + justify-content: center; + position: relative; + width: 100%; + padding: 0.5rem 12.5%; + text-align: center; +} + +#announcement_msg :after { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color: rgb(223, 95, 114); + opacity: 0.2; + content: ""; + z-index: -1; +} + +#announcement_msg :empty { + display: none; +} + +#announcement_msg p { + font-weight: bold; + margin: auto; + color: black; +} + +html[data-theme="dark"] #announcement_msg :after { + background-color: lightpink; + opacity: 0.5; +} + +#announcement_msg a { + color: #1e6ddc; +} diff --git a/_static/css/meilisearch.css b/_static/css/meilisearch.css new file mode 100644 index 00000000..97fa91e1 --- /dev/null +++ b/_static/css/meilisearch.css @@ -0,0 +1,194 @@ +@import "https://cdn.jsdelivr.net/npm/docs-searchbar.js@latest/dist/cdn/docs-searchbar.min.css"; +@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"; + +div[data-ds-theme] .searchbox { + overflow-y: scroll; + margin: auto; +} + +.docs-searchbar-suggestion--category-header { + background-color: var(--pst-color-border); + border-radius: 7px; + text-align: left; +} + +/* Styles for screens with a width of 576px or less */ +@media screen and (max-width: 576px) { + div[data-ds-theme] .searchbox { + width: 100%; + max-width: 100%; + } + .bd-search input { + width: 100% !important; + } + + .index-select { + width: 30%; + } +} + +/* Styles for screens with a width of 1200px or less */ +@media screen and (min-width: 1200px) { + div[data-ds-theme] .searchbox { + width: 100%; + max-width: 100%; + } + + .bd-search input { + width: 600px !important; + } + .index-select { + width: 250px; + } +} +.dsb-suggestions { + width: 100%; + max-width: 140%; +} + +div[data-ds-theme] .meilisearch-autocomplete .dsb-dropdown-menu { + max-width: 200%; + min-width: 100%; + width: 140%; +} +div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion { + width: 100%; +} + +div[data-ds-theme] .searchbox input { + height: 32px; + border-radius: 8px; + font-size: 18px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 8px darkgrey; +} + +.docs-searchbar-footer { + display: none; +} + +.docs-searchbar-footer { + display: none; +} + +[class*="docs-searchbar-suggestion"] { + text-decoration: none; +} + +.docs-searchbar-suggestion--highlight { + box-shadow: none !important; +} + +.container { + display: flex; + justify-content: center; + align-items: right; +} + +div[data-ds-theme] .meilisearch-autocomplete { + text-align: center; + color: var(--pst-color-text-base); +} + +#search-bar-input { + background-color: var(--pst-color-background); + color: var(--pst-color-text-base); + font-size: var(--pst-font-size-icon); + position: relative; + padding-left: 1rem; + outline-color: var(--pst-color-border); + margin-left: 1rem; +} + +.index-select { + color: var(--pst-color-text-base); + background: var(--pst-color-background); + height: 47px; + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; + font-size: 20px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 20px var(--pst-color-border); + padding: 0 10px 0px 10px; + margin-left: 5px; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu + [class^="dsb-dataset-"] { + position: relative; + border: 1px solid #d9d9d9; + background: var(--pst-color-background); + border-radius: 4px; + padding: 0 8px 8px; +} +div[data-ds-theme] .meilisearch-autocomplete .dsb-dropdown-menu { + max-height: 600px !important; + overflow-y: auto !important; + border: 1px solid #ccc; +} + +div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion { + background: var(--pst-color-background); +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--highlight { + color: var(--pst-color-info) !important; + font-weight: 900; + background: transparent; + padding: 0 0.05em; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--subcategory-column { + width: None; + text-align: left; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--content { + display: block; +} + +div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion--title { + margin-bottom: 4px; + color: var(--pst-color-text-base); + font-size: 0.9em; + font-weight: 700; + width: 100%; +} + +/* Styling the scrollbar */ +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar-thumb { + background: var(--pst-color-text-base); + border-radius: inherit; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar-track { + background: var(--pst-color-background); +} + +.bd-search { + margin-bottom: 200px; + gap: 0em; + border: 0px solid var(--pst-color-border); +} +#search-icon { + font-size: 1.5rem; +} diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 00000000..d06a71d7 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 00000000..1378c7c1 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '0.1.dev0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: true, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 00000000..a858a410 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/fonts/SourceSansPro-Light.ttf b/_static/fonts/SourceSansPro-Light.ttf new file mode 100644 index 00000000..348871ac Binary files /dev/null and b/_static/fonts/SourceSansPro-Light.ttf differ diff --git a/_static/fonts/SourceSansPro-Regular.ttf b/_static/fonts/SourceSansPro-Regular.ttf new file mode 100644 index 00000000..b422bf43 Binary files /dev/null and b/_static/fonts/SourceSansPro-Regular.ttf differ diff --git a/_static/fonts/SourceSansPro-SemiBold.ttf b/_static/fonts/SourceSansPro-SemiBold.ttf new file mode 100644 index 00000000..2908e0d7 Binary files /dev/null and b/_static/fonts/SourceSansPro-SemiBold.ttf differ diff --git a/_static/js/download_target_blank.js b/_static/js/download_target_blank.js new file mode 100644 index 00000000..9f84c70f --- /dev/null +++ b/_static/js/download_target_blank.js @@ -0,0 +1,6 @@ +/* Add target="_blank" attribute to all hyperlinks generated by the ReST :download: directive. + * This will ensure the links open in a new tab. */ + +$(document).ready(function () { + $("a.download").attr("target", "_blank"); +}); diff --git a/_static/js/meilisearch_theme_wrap.js b/_static/js/meilisearch_theme_wrap.js new file mode 100644 index 00000000..4309eea5 --- /dev/null +++ b/_static/js/meilisearch_theme_wrap.js @@ -0,0 +1,62 @@ +require.config({ + paths: { + docsSearchBar: + "https://cdn.jsdelivr.net/npm/docs-searchbar.js@2.5.0/dist/cdn/docs-searchbar.min", + }, +}); + +require(["docsSearchBar"], function (docsSearchBar) { + document.body.style.overflow = "hidden !important"; + // Initialize the MeiliSearch bar with the given API key and host + var theSearchBar = docsSearchBar({ + hostUrl: HOST_URL, + apiKey: API_KEY, + indexUid: indexUid, + inputSelector: "#search-bar-input", + debug: true, // Set debug to true if you want to inspect the dropdown + meilisearchOptions: { + limit: 10, + }, + }); + + // Function to show the magnifier icon + function showMagnifierIcon() { + var searchIcon = document.getElementById("search-icon"); + searchIcon.classList.remove("fa-spinner", "fa-spin"); // Remove spinner classes + searchIcon.classList.add("fa-magnifying-glass"); // Add magnifier icon class + } + + // Function to show the spinner icon + function showSpinnerIcon() { + var searchIcon = document.getElementById("search-icon"); + if (searchIcon) { + searchIcon.classList.remove("fa-magnifying-glass"); // Remove magnifier icon class + searchIcon.classList.add("fa-spinner", "fa-spin"); // Add spinner classes + } + } + + document + .getElementById("search-bar-input") + .addEventListener("input", function () { + const inputValue = this.value.trim(); // Trim whitespace from input value + // Show the spinner icon only when there is input and no suggestions + if ( + inputValue && + document.querySelectorAll(".dsb-suggestion").length === 0 + ) { + showSpinnerIcon(); + } else { + // Hide the spinner icon when there are suggestions + showMagnifierIcon(); + } + }); + + // Listen for changes in the dropdown selector and update the index uid and suggestion accordingly + document + .getElementById("indexUidSelector") + .addEventListener("change", function () { + theSearchBar.indexUid = this.value; + theSearchBar.suggestionIndexUid = this.value; + theSearchBar.autocomplete.autocomplete.setVal(""); + }); +}); diff --git a/_static/js/table.js b/_static/js/table.js new file mode 100644 index 00000000..a080ead1 --- /dev/null +++ b/_static/js/table.js @@ -0,0 +1,3 @@ +$(document).ready(function () { + $("table.datatable").DataTable(); +}); diff --git a/_static/jupyter-sphinx.css b/_static/jupyter-sphinx.css new file mode 100644 index 00000000..87724dfc --- /dev/null +++ b/_static/jupyter-sphinx.css @@ -0,0 +1,123 @@ +/* Stylesheet for jupyter-sphinx + +These styles mimic the Jupyter HTML styles. + +The default CSS (Cascading Style Sheet) class structure of jupyter-sphinx +is the following: + +jupyter_container + code_cell (optional) + stderr (optional) + output (optional) + +If the code_cell is not displayed, then there is not a jupyter_container, and +the output is provided without CSS. + +This stylesheet attempts to override the defaults of all packaged Sphinx themes +to display jupter-sphinx cells in a Jupyter-like style. + +If you want to adjust the styles, add additional custom CSS to override these +styles. + +After a build, this stylesheet is loaded from ./_static/jupyter-sphinx.css . + +*/ + + +div.jupyter_container { + padding: .4em; + margin: 0 0 .4em 0; + background-color: #FFFF; + border: 1px solid #CCC; + -moz-box-shadow: 2px 2px 4px rgba(87, 87, 87, 0.2); + -webkit-box-shadow: 2px 2px 4px rgba(87, 87, 87, 0.2); + box-shadow: 2px 2px 4px rgba(87, 87, 87, 0.2); +} +.jupyter_container div.code_cell { + border: 1px solid #cfcfcf; + border-radius: 2px; + background-color: #f7f7f7; + margin: 0 0; + overflow: auto; +} + +.jupyter_container div.code_cell pre { + padding: 4px; + margin: 0 0; + background-color: #f7f7f7; + border: none; + background: none; + box-shadow: none; + -webkit-box-shadow: none; /* for nature */ + -moz-box-shadow: none; /* for nature */ +} + +.jupyter_container div.code_cell * { + margin: 0 0; +} +div.jupyter_container div.highlight { + background-color: #f7f7f7; /* for haiku */ +} +div.jupyter_container { + padding: 0; + margin: 0; +} + +/* Prevent alabaster breaking highlight alignment */ +div.jupyter_container .hll { + padding: 0; + margin: 0; +} + +/* overrides for sphinx_rtd_theme */ +.rst-content .jupyter_container div[class^='highlight'], +.document .jupyter_container div[class^='highlight'], +.rst-content .jupyter_container pre.literal-block { + border:none; + margin: 0; + padding: 0; + background: none; + padding: 3px; + background-color: transparent; +} +/* restore Mathjax CSS, as it assumes a vertical margin. */ +.jupyter_container .MathJax_Display { + margin: 1em 0em; + text-align: center; +} +.jupyter_container .stderr { + background-color: #FCC; + border: none; + padding: 3px; +} +.jupyter_container .output { + border: none; +} +.jupyter_container div.output pre { + background-color: white; + background: none; + padding: 4px; + border: none; + box-shadow: none; + -webkit-box-shadow: none; /* for nature */ + -moz-box-shadow: none; /* for nature */ +} +.jupyter_container .code_cell td.linenos { + text-align: right; + padding: 4px 4px 4px 8px; + border-right: 1px solid #cfcfcf; + color: #999; +} +.jupyter_container .output .highlight { + background-color: #ffffff; +} +/* combine sequential jupyter cells, + by moving sequential ones up higher on y-axis */ +div.jupyter_container + div.jupyter_container { + margin: -.5em 0 .4em 0; +} + +/* Fix for sphinx_rtd_theme spacing after jupyter_container #91 */ +.rst-content .jupyter_container { + margin: 0 0 24px 0; +} diff --git a/_static/jupyterlite_badge_logo.svg b/_static/jupyterlite_badge_logo.svg new file mode 100644 index 00000000..5de36d7f --- /dev/null +++ b/_static/jupyterlite_badge_logo.svg @@ -0,0 +1,3 @@ + + +launchlaunchlitelite \ No newline at end of file diff --git a/_static/language_data.js b/_static/language_data.js new file mode 100644 index 00000000..250f5665 --- /dev/null +++ b/_static/language_data.js @@ -0,0 +1,199 @@ +/* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, is available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 00000000..d96755fd Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/no_image.png b/_static/no_image.png new file mode 100644 index 00000000..8c2d48d5 Binary files /dev/null and b/_static/no_image.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 00000000..7107cec9 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pyansys-logo-black-cropped.png b/_static/pyansys-logo-black-cropped.png new file mode 100644 index 00000000..e28bc3de Binary files /dev/null and b/_static/pyansys-logo-black-cropped.png differ diff --git a/_static/pyansys-logo-white-cropped.png b/_static/pyansys-logo-white-cropped.png new file mode 100644 index 00000000..91b50f98 Binary files /dev/null and b/_static/pyansys-logo-white-cropped.png differ diff --git a/_static/pyansys_dark.png b/_static/pyansys_dark.png new file mode 100644 index 00000000..b0ff9e19 Binary files /dev/null and b/_static/pyansys_dark.png differ diff --git a/_static/pyansys_dark_square.png b/_static/pyansys_dark_square.png new file mode 100644 index 00000000..2b271562 Binary files /dev/null and b/_static/pyansys_dark_square.png differ diff --git a/_static/pyansys_light.png b/_static/pyansys_light.png new file mode 100644 index 00000000..9f31babd Binary files /dev/null and b/_static/pyansys_light.png differ diff --git a/_static/pyansys_light_square.png b/_static/pyansys_light_square.png new file mode 100644 index 00000000..3e0706a5 Binary files /dev/null and b/_static/pyansys_light_square.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 00000000..997797f2 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,152 @@ +html[data-theme="light"] .highlight pre { line-height: 125%; } +html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight .hll { background-color: #7971292e } +html[data-theme="light"] .highlight { background: #fefefe; color: #545454 } +html[data-theme="light"] .highlight .c { color: #797129 } /* Comment */ +html[data-theme="light"] .highlight .err { color: #d91e18 } /* Error */ +html[data-theme="light"] .highlight .k { color: #7928a1 } /* Keyword */ +html[data-theme="light"] .highlight .l { color: #797129 } /* Literal */ +html[data-theme="light"] .highlight .n { color: #545454 } /* Name */ +html[data-theme="light"] .highlight .o { color: #008000 } /* Operator */ +html[data-theme="light"] .highlight .p { color: #545454 } /* Punctuation */ +html[data-theme="light"] .highlight .ch { color: #797129 } /* Comment.Hashbang */ +html[data-theme="light"] .highlight .cm { color: #797129 } /* Comment.Multiline */ +html[data-theme="light"] .highlight .cp { color: #797129 } /* Comment.Preproc */ +html[data-theme="light"] .highlight .cpf { color: #797129 } /* Comment.PreprocFile */ +html[data-theme="light"] .highlight .c1 { color: #797129 } /* Comment.Single */ +html[data-theme="light"] .highlight .cs { color: #797129 } /* Comment.Special */ +html[data-theme="light"] .highlight .gd { color: #007faa } /* Generic.Deleted */ +html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="light"] .highlight .gh { color: #007faa } /* Generic.Heading */ +html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="light"] .highlight .gu { color: #007faa } /* Generic.Subheading */ +html[data-theme="light"] .highlight .kc { color: #7928a1 } /* Keyword.Constant */ +html[data-theme="light"] .highlight .kd { color: #7928a1 } /* Keyword.Declaration */ +html[data-theme="light"] .highlight .kn { color: #7928a1 } /* Keyword.Namespace */ +html[data-theme="light"] .highlight .kp { color: #7928a1 } /* Keyword.Pseudo */ +html[data-theme="light"] .highlight .kr { color: #7928a1 } /* Keyword.Reserved */ +html[data-theme="light"] .highlight .kt { color: #797129 } /* Keyword.Type */ +html[data-theme="light"] .highlight .ld { color: #797129 } /* Literal.Date */ +html[data-theme="light"] .highlight .m { color: #797129 } /* Literal.Number */ +html[data-theme="light"] .highlight .s { color: #008000 } /* Literal.String */ +html[data-theme="light"] .highlight .na { color: #797129 } /* Name.Attribute */ +html[data-theme="light"] .highlight .nb { color: #797129 } /* Name.Builtin */ +html[data-theme="light"] .highlight .nc { color: #007faa } /* Name.Class */ +html[data-theme="light"] .highlight .no { color: #007faa } /* Name.Constant */ +html[data-theme="light"] .highlight .nd { color: #797129 } /* Name.Decorator */ +html[data-theme="light"] .highlight .ni { color: #008000 } /* Name.Entity */ +html[data-theme="light"] .highlight .ne { color: #7928a1 } /* Name.Exception */ +html[data-theme="light"] .highlight .nf { color: #007faa } /* Name.Function */ +html[data-theme="light"] .highlight .nl { color: #797129 } /* Name.Label */ +html[data-theme="light"] .highlight .nn { color: #545454 } /* Name.Namespace */ +html[data-theme="light"] .highlight .nx { color: #545454 } /* Name.Other */ +html[data-theme="light"] .highlight .py { color: #007faa } /* Name.Property */ +html[data-theme="light"] .highlight .nt { color: #007faa } /* Name.Tag */ +html[data-theme="light"] .highlight .nv { color: #d91e18 } /* Name.Variable */ +html[data-theme="light"] .highlight .ow { color: #7928a1 } /* Operator.Word */ +html[data-theme="light"] .highlight .pm { color: #545454 } /* Punctuation.Marker */ +html[data-theme="light"] .highlight .w { color: #545454 } /* Text.Whitespace */ +html[data-theme="light"] .highlight .mb { color: #797129 } /* Literal.Number.Bin */ +html[data-theme="light"] .highlight .mf { color: #797129 } /* Literal.Number.Float */ +html[data-theme="light"] .highlight .mh { color: #797129 } /* Literal.Number.Hex */ +html[data-theme="light"] .highlight .mi { color: #797129 } /* Literal.Number.Integer */ +html[data-theme="light"] .highlight .mo { color: #797129 } /* Literal.Number.Oct */ +html[data-theme="light"] .highlight .sa { color: #008000 } /* Literal.String.Affix */ +html[data-theme="light"] .highlight .sb { color: #008000 } /* Literal.String.Backtick */ +html[data-theme="light"] .highlight .sc { color: #008000 } /* Literal.String.Char */ +html[data-theme="light"] .highlight .dl { color: #008000 } /* Literal.String.Delimiter */ +html[data-theme="light"] .highlight .sd { color: #008000 } /* Literal.String.Doc */ +html[data-theme="light"] .highlight .s2 { color: #008000 } /* Literal.String.Double */ +html[data-theme="light"] .highlight .se { color: #008000 } /* Literal.String.Escape */ +html[data-theme="light"] .highlight .sh { color: #008000 } /* Literal.String.Heredoc */ +html[data-theme="light"] .highlight .si { color: #008000 } /* Literal.String.Interpol */ +html[data-theme="light"] .highlight .sx { color: #008000 } /* Literal.String.Other */ +html[data-theme="light"] .highlight .sr { color: #d91e18 } /* Literal.String.Regex */ +html[data-theme="light"] .highlight .s1 { color: #008000 } /* Literal.String.Single */ +html[data-theme="light"] .highlight .ss { color: #007faa } /* Literal.String.Symbol */ +html[data-theme="light"] .highlight .bp { color: #797129 } /* Name.Builtin.Pseudo */ +html[data-theme="light"] .highlight .fm { color: #007faa } /* Name.Function.Magic */ +html[data-theme="light"] .highlight .vc { color: #d91e18 } /* Name.Variable.Class */ +html[data-theme="light"] .highlight .vg { color: #d91e18 } /* Name.Variable.Global */ +html[data-theme="light"] .highlight .vi { color: #d91e18 } /* Name.Variable.Instance */ +html[data-theme="light"] .highlight .vm { color: #797129 } /* Name.Variable.Magic */ +html[data-theme="light"] .highlight .il { color: #797129 } /* Literal.Number.Integer.Long */ +html[data-theme="dark"] .highlight pre { line-height: 125%; } +html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e } +html[data-theme="dark"] .highlight { background: #2b2b2b; color: #f8f8f2 } +html[data-theme="dark"] .highlight .c { color: #ffd900 } /* Comment */ +html[data-theme="dark"] .highlight .err { color: #ffa07a } /* Error */ +html[data-theme="dark"] .highlight .k { color: #dcc6e0 } /* Keyword */ +html[data-theme="dark"] .highlight .l { color: #ffd900 } /* Literal */ +html[data-theme="dark"] .highlight .n { color: #f8f8f2 } /* Name */ +html[data-theme="dark"] .highlight .o { color: #abe338 } /* Operator */ +html[data-theme="dark"] .highlight .p { color: #f8f8f2 } /* Punctuation */ +html[data-theme="dark"] .highlight .ch { color: #ffd900 } /* Comment.Hashbang */ +html[data-theme="dark"] .highlight .cm { color: #ffd900 } /* Comment.Multiline */ +html[data-theme="dark"] .highlight .cp { color: #ffd900 } /* Comment.Preproc */ +html[data-theme="dark"] .highlight .cpf { color: #ffd900 } /* Comment.PreprocFile */ +html[data-theme="dark"] .highlight .c1 { color: #ffd900 } /* Comment.Single */ +html[data-theme="dark"] .highlight .cs { color: #ffd900 } /* Comment.Special */ +html[data-theme="dark"] .highlight .gd { color: #00e0e0 } /* Generic.Deleted */ +html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="dark"] .highlight .gh { color: #00e0e0 } /* Generic.Heading */ +html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="dark"] .highlight .gu { color: #00e0e0 } /* Generic.Subheading */ +html[data-theme="dark"] .highlight .kc { color: #dcc6e0 } /* Keyword.Constant */ +html[data-theme="dark"] .highlight .kd { color: #dcc6e0 } /* Keyword.Declaration */ +html[data-theme="dark"] .highlight .kn { color: #dcc6e0 } /* Keyword.Namespace */ +html[data-theme="dark"] .highlight .kp { color: #dcc6e0 } /* Keyword.Pseudo */ +html[data-theme="dark"] .highlight .kr { color: #dcc6e0 } /* Keyword.Reserved */ +html[data-theme="dark"] .highlight .kt { color: #ffd900 } /* Keyword.Type */ +html[data-theme="dark"] .highlight .ld { color: #ffd900 } /* Literal.Date */ +html[data-theme="dark"] .highlight .m { color: #ffd900 } /* Literal.Number */ +html[data-theme="dark"] .highlight .s { color: #abe338 } /* Literal.String */ +html[data-theme="dark"] .highlight .na { color: #ffd900 } /* Name.Attribute */ +html[data-theme="dark"] .highlight .nb { color: #ffd900 } /* Name.Builtin */ +html[data-theme="dark"] .highlight .nc { color: #00e0e0 } /* Name.Class */ +html[data-theme="dark"] .highlight .no { color: #00e0e0 } /* Name.Constant */ +html[data-theme="dark"] .highlight .nd { color: #ffd900 } /* Name.Decorator */ +html[data-theme="dark"] .highlight .ni { color: #abe338 } /* Name.Entity */ +html[data-theme="dark"] .highlight .ne { color: #dcc6e0 } /* Name.Exception */ +html[data-theme="dark"] .highlight .nf { color: #00e0e0 } /* Name.Function */ +html[data-theme="dark"] .highlight .nl { color: #ffd900 } /* Name.Label */ +html[data-theme="dark"] .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +html[data-theme="dark"] .highlight .nx { color: #f8f8f2 } /* Name.Other */ +html[data-theme="dark"] .highlight .py { color: #00e0e0 } /* Name.Property */ +html[data-theme="dark"] .highlight .nt { color: #00e0e0 } /* Name.Tag */ +html[data-theme="dark"] .highlight .nv { color: #ffa07a } /* Name.Variable */ +html[data-theme="dark"] .highlight .ow { color: #dcc6e0 } /* Operator.Word */ +html[data-theme="dark"] .highlight .pm { color: #f8f8f2 } /* Punctuation.Marker */ +html[data-theme="dark"] .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +html[data-theme="dark"] .highlight .mb { color: #ffd900 } /* Literal.Number.Bin */ +html[data-theme="dark"] .highlight .mf { color: #ffd900 } /* Literal.Number.Float */ +html[data-theme="dark"] .highlight .mh { color: #ffd900 } /* Literal.Number.Hex */ +html[data-theme="dark"] .highlight .mi { color: #ffd900 } /* Literal.Number.Integer */ +html[data-theme="dark"] .highlight .mo { color: #ffd900 } /* Literal.Number.Oct */ +html[data-theme="dark"] .highlight .sa { color: #abe338 } /* Literal.String.Affix */ +html[data-theme="dark"] .highlight .sb { color: #abe338 } /* Literal.String.Backtick */ +html[data-theme="dark"] .highlight .sc { color: #abe338 } /* Literal.String.Char */ +html[data-theme="dark"] .highlight .dl { color: #abe338 } /* Literal.String.Delimiter */ +html[data-theme="dark"] .highlight .sd { color: #abe338 } /* Literal.String.Doc */ +html[data-theme="dark"] .highlight .s2 { color: #abe338 } /* Literal.String.Double */ +html[data-theme="dark"] .highlight .se { color: #abe338 } /* Literal.String.Escape */ +html[data-theme="dark"] .highlight .sh { color: #abe338 } /* Literal.String.Heredoc */ +html[data-theme="dark"] .highlight .si { color: #abe338 } /* Literal.String.Interpol */ +html[data-theme="dark"] .highlight .sx { color: #abe338 } /* Literal.String.Other */ +html[data-theme="dark"] .highlight .sr { color: #ffa07a } /* Literal.String.Regex */ +html[data-theme="dark"] .highlight .s1 { color: #abe338 } /* Literal.String.Single */ +html[data-theme="dark"] .highlight .ss { color: #00e0e0 } /* Literal.String.Symbol */ +html[data-theme="dark"] .highlight .bp { color: #ffd900 } /* Name.Builtin.Pseudo */ +html[data-theme="dark"] .highlight .fm { color: #00e0e0 } /* Name.Function.Magic */ +html[data-theme="dark"] .highlight .vc { color: #ffa07a } /* Name.Variable.Class */ +html[data-theme="dark"] .highlight .vg { color: #ffa07a } /* Name.Variable.Global */ +html[data-theme="dark"] .highlight .vi { color: #ffa07a } /* Name.Variable.Instance */ +html[data-theme="dark"] .highlight .vm { color: #ffd900 } /* Name.Variable.Magic */ +html[data-theme="dark"] .highlight .il { color: #ffd900 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/scripts/bootstrap.js b/_static/scripts/bootstrap.js new file mode 100644 index 00000000..bda8a602 --- /dev/null +++ b/_static/scripts/bootstrap.js @@ -0,0 +1,3 @@ +/*! For license information please see bootstrap.js.LICENSE.txt */ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{afterMain:()=>w,afterRead:()=>b,afterWrite:()=>T,applyStyles:()=>D,arrow:()=>G,auto:()=>r,basePlacements:()=>a,beforeMain:()=>v,beforeRead:()=>g,beforeWrite:()=>E,bottom:()=>n,clippingParents:()=>h,computeStyles:()=>et,createPopper:()=>St,createPopperBase:()=>Lt,createPopperLite:()=>Dt,detectOverflow:()=>gt,end:()=>c,eventListeners:()=>nt,flip:()=>_t,hide:()=>yt,left:()=>o,main:()=>y,modifierPhases:()=>C,offset:()=>wt,placements:()=>m,popper:()=>u,popperGenerator:()=>kt,popperOffsets:()=>Et,preventOverflow:()=>At,read:()=>_,reference:()=>f,right:()=>s,start:()=>l,top:()=>i,variationPlacements:()=>p,viewport:()=>d,write:()=>A});var i="top",n="bottom",s="right",o="left",r="auto",a=[i,n,s,o],l="start",c="end",h="clippingParents",d="viewport",u="popper",f="reference",p=a.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+c])}),[]),m=[].concat(a,[r]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+c])}),[]),g="beforeRead",_="read",b="afterRead",v="beforeMain",y="main",w="afterMain",E="beforeWrite",A="write",T="afterWrite",C=[g,_,b,v,y,w,E,A,T];function O(t){return t?(t.nodeName||"").toLowerCase():null}function x(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof x(t).Element||t instanceof Element}function L(t){return t instanceof x(t).HTMLElement||t instanceof HTMLElement}function S(t){return"undefined"!=typeof ShadowRoot&&(t instanceof x(t).ShadowRoot||t instanceof ShadowRoot)}const D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];L(s)&&O(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});L(n)&&O(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function $(t){return t.split("-")[0]}var I=Math.max,N=Math.min,P=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function j(){return!/^((?!chrome|android).)*safari/i.test(M())}function F(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&L(t)&&(s=t.offsetWidth>0&&P(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&P(n.height)/t.offsetHeight||1);var r=(k(t)?x(t):window).visualViewport,a=!j()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function H(t){var e=F(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function B(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&S(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return x(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(O(t))>=0}function R(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function q(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(S(t)?t.host:null)||R(t)}function V(t){return L(t)&&"fixed"!==W(t).position?t.offsetParent:null}function Y(t){for(var e=x(t),i=V(t);i&&z(i)&&"static"===W(i).position;)i=V(i);return i&&("html"===O(i)||"body"===O(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(M());if(/Trident/i.test(M())&&L(t)&&"fixed"===W(t).position)return null;var i=q(t);for(S(i)&&(i=i.host);L(i)&&["html","body"].indexOf(O(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Q(t,e,i){return I(t,N(e,i))}function X(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function U(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const G={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,l=t.name,c=t.options,h=r.elements.arrow,d=r.modifiersData.popperOffsets,u=$(r.placement),f=K(u),p=[o,s].indexOf(u)>=0?"height":"width";if(h&&d){var m=function(t,e){return X("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:U(t,a))}(c.padding,r),g=H(h),_="y"===f?i:o,b="y"===f?n:s,v=r.rects.reference[p]+r.rects.reference[f]-d[f]-r.rects.popper[p],y=d[f]-r.rects.reference[f],w=Y(h),E=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,A=v/2-y/2,T=m[_],C=E-g[p]-m[b],O=E/2-g[p]/2+A,x=Q(T,O,C),k=f;r.modifiersData[l]=((e={})[k]=x,e.centerOffset=x-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&B(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function J(t){return t.split("-")[1]}var Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tt(t){var e,r=t.popper,a=t.popperRect,l=t.placement,h=t.variation,d=t.offsets,u=t.position,f=t.gpuAcceleration,p=t.adaptive,m=t.roundOffsets,g=t.isFixed,_=d.x,b=void 0===_?0:_,v=d.y,y=void 0===v?0:v,w="function"==typeof m?m({x:b,y}):{x:b,y};b=w.x,y=w.y;var E=d.hasOwnProperty("x"),A=d.hasOwnProperty("y"),T=o,C=i,O=window;if(p){var k=Y(r),L="clientHeight",S="clientWidth";k===x(r)&&"static"!==W(k=R(r)).position&&"absolute"===u&&(L="scrollHeight",S="scrollWidth"),(l===i||(l===o||l===s)&&h===c)&&(C=n,y-=(g&&k===O&&O.visualViewport?O.visualViewport.height:k[L])-a.height,y*=f?1:-1),l!==o&&(l!==i&&l!==n||h!==c)||(T=s,b-=(g&&k===O&&O.visualViewport?O.visualViewport.width:k[S])-a.width,b*=f?1:-1)}var D,$=Object.assign({position:u},p&&Z),I=!0===m?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:P(i*s)/s||0,y:P(n*s)/s||0}}({x:b,y},x(r)):{x:b,y};return b=I.x,y=I.y,f?Object.assign({},$,((D={})[C]=A?"0":"",D[T]=E?"0":"",D.transform=(O.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",D)):Object.assign({},$,((e={})[C]=A?y+"px":"",e[T]=E?b+"px":"",e.transform="",e))}const et={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:$(e.placement),variation:J(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,tt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,tt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var it={passive:!0};const nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=x(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,it)})),a&&l.addEventListener("resize",i.update,it),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,it)})),a&&l.removeEventListener("resize",i.update,it)}},data:{}};var st={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return st[t]}))}var rt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return rt[t]}))}function lt(t){var e=x(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ct(t){return F(R(t)).left+lt(t).scrollLeft}function ht(t){var e=W(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function dt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:L(t)&&ht(t)?t:dt(q(t))}function ut(t,e){var i;void 0===e&&(e=[]);var n=dt(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=x(n),r=s?[o].concat(o.visualViewport||[],ht(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ut(q(r)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function pt(t,e,i){return e===d?ft(function(t,e){var i=x(t),n=R(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=j();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ct(t),y:l}}(t,i)):k(e)?function(t,e){var i=F(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=R(t),n=lt(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=I(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=I(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ct(t),l=-n.scrollTop;return"rtl"===W(s||i).direction&&(a+=I(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(R(t)))}function mt(t){var e,r=t.reference,a=t.element,h=t.placement,d=h?$(h):null,u=h?J(h):null,f=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2;switch(d){case i:e={x:f,y:r.y-a.height};break;case n:e={x:f,y:r.y+r.height};break;case s:e={x:r.x+r.width,y:p};break;case o:e={x:r.x-a.width,y:p};break;default:e={x:r.x,y:r.y}}var m=d?K(d):null;if(null!=m){var g="y"===m?"height":"width";switch(u){case l:e[m]=e[m]-(r[g]/2-a[g]/2);break;case c:e[m]=e[m]+(r[g]/2-a[g]/2)}}return e}function gt(t,e){void 0===e&&(e={});var o=e,r=o.placement,l=void 0===r?t.placement:r,c=o.strategy,p=void 0===c?t.strategy:c,m=o.boundary,g=void 0===m?h:m,_=o.rootBoundary,b=void 0===_?d:_,v=o.elementContext,y=void 0===v?u:v,w=o.altBoundary,E=void 0!==w&&w,A=o.padding,T=void 0===A?0:A,C=X("number"!=typeof T?T:U(T,a)),x=y===u?f:u,S=t.rects.popper,D=t.elements[E?x:y],$=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ut(q(t)),i=["absolute","fixed"].indexOf(W(t).position)>=0&&L(t)?Y(t):t;return k(i)?e.filter((function(t){return k(t)&&B(t,i)&&"body"!==O(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=pt(t,i,n);return e.top=I(s.top,e.top),e.right=N(s.right,e.right),e.bottom=N(s.bottom,e.bottom),e.left=I(s.left,e.left),e}),pt(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(D)?D:D.contextElement||R(t.elements.popper),g,b,p),P=F(t.elements.reference),M=mt({reference:P,element:S,strategy:"absolute",placement:l}),j=ft(Object.assign({},S,M)),H=y===u?j:P,z={top:$.top-H.top+C.top,bottom:H.bottom-$.bottom+C.bottom,left:$.left-H.left+C.left,right:H.right-$.right+C.right},V=t.modifiersData.offset;if(y===u&&V){var K=V[l];Object.keys(z).forEach((function(t){var e=[s,n].indexOf(t)>=0?1:-1,o=[i,n].indexOf(t)>=0?"y":"x";z[t]+=K[o]*e}))}return z}const _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,c=t.options,h=t.name;if(!e.modifiersData[h]._skip){for(var d=c.mainAxis,u=void 0===d||d,f=c.altAxis,g=void 0===f||f,_=c.fallbackPlacements,b=c.padding,v=c.boundary,y=c.rootBoundary,w=c.altBoundary,E=c.flipVariations,A=void 0===E||E,T=c.allowedAutoPlacements,C=e.options.placement,O=$(C),x=_||(O!==C&&A?function(t){if($(t)===r)return[];var e=ot(t);return[at(t),e,at(e)]}(C):[ot(C)]),k=[C].concat(x).reduce((function(t,i){return t.concat($(i)===r?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,l=i.flipVariations,c=i.allowedAutoPlacements,h=void 0===c?m:c,d=J(n),u=d?l?p:p.filter((function(t){return J(t)===d})):a,f=u.filter((function(t){return h.indexOf(t)>=0}));0===f.length&&(f=u);var g=f.reduce((function(e,i){return e[i]=gt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[$(i)],e}),{});return Object.keys(g).sort((function(t,e){return g[t]-g[e]}))}(e,{placement:i,boundary:v,rootBoundary:y,padding:b,flipVariations:A,allowedAutoPlacements:T}):i)}),[]),L=e.rects.reference,S=e.rects.popper,D=new Map,I=!0,N=k[0],P=0;P=0,B=H?"width":"height",W=gt(e,{placement:M,boundary:v,rootBoundary:y,altBoundary:w,padding:b}),z=H?F?s:o:F?n:i;L[B]>S[B]&&(z=ot(z));var R=ot(z),q=[];if(u&&q.push(W[j]<=0),g&&q.push(W[z]<=0,W[R]<=0),q.every((function(t){return t}))){N=M,I=!1;break}D.set(M,q)}if(I)for(var V=function(t){var e=k.find((function(e){var i=D.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return N=e,"break"},Y=A?3:1;Y>0&&"break"!==V(Y);Y--);e.placement!==N&&(e.modifiersData[h]._skip=!0,e.placement=N,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function vt(t){return[i,s,n,o].some((function(e){return t[e]>=0}))}const yt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=gt(e,{elementContext:"reference"}),a=gt(e,{altBoundary:!0}),l=bt(r,n),c=bt(a,s,o),h=vt(l),d=vt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,a=n.offset,l=void 0===a?[0,0]:a,c=m.reduce((function(t,n){return t[n]=function(t,e,n){var r=$(t),a=[o,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=l[0],h=l[1];return c=c||0,h=(h||0)*a,[o,s].indexOf(r)>=0?{x:h,y:c}:{x:c,y:h}}(n,e.rects,l),t}),{}),h=c[e.placement],d=h.x,u=h.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=c}},Et={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},At={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,a=t.name,c=r.mainAxis,h=void 0===c||c,d=r.altAxis,u=void 0!==d&&d,f=r.boundary,p=r.rootBoundary,m=r.altBoundary,g=r.padding,_=r.tether,b=void 0===_||_,v=r.tetherOffset,y=void 0===v?0:v,w=gt(e,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),E=$(e.placement),A=J(e.placement),T=!A,C=K(E),O="x"===C?"y":"x",x=e.modifiersData.popperOffsets,k=e.rects.reference,L=e.rects.popper,S="function"==typeof y?y(Object.assign({},e.rects,{placement:e.placement})):y,D="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(x){if(h){var j,F="y"===C?i:o,B="y"===C?n:s,W="y"===C?"height":"width",z=x[C],R=z+w[F],q=z-w[B],V=b?-L[W]/2:0,X=A===l?k[W]:L[W],U=A===l?-L[W]:-k[W],G=e.elements.arrow,Z=b&&G?H(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[F],it=tt[B],nt=Q(0,k[W],Z[W]),st=T?k[W]/2-V-nt-et-D.mainAxis:X-nt-et-D.mainAxis,ot=T?-k[W]/2+V+nt+it+D.mainAxis:U+nt+it+D.mainAxis,rt=e.elements.arrow&&Y(e.elements.arrow),at=rt?"y"===C?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(j=null==P?void 0:P[C])?j:0,ct=z+ot-lt,ht=Q(b?N(R,z+st-lt-at):R,z,b?I(q,ct):q);x[C]=ht,M[C]=ht-z}if(u){var dt,ut="x"===C?i:o,ft="x"===C?n:s,pt=x[O],mt="y"===O?"height":"width",_t=pt+w[ut],bt=pt-w[ft],vt=-1!==[i,o].indexOf(E),yt=null!=(dt=null==P?void 0:P[O])?dt:0,wt=vt?_t:pt-k[mt]-L[mt]-yt+D.altAxis,Et=vt?pt+k[mt]+L[mt]-yt-D.altAxis:bt,At=b&&vt?function(t,e,i){var n=Q(t,e,i);return n>i?i:n}(wt,pt,Et):Q(b?wt:_t,pt,b?Et:bt);x[O]=At,M[O]=At-pt}e.modifiersData[a]=M}},requiresIfExists:["offset"]};function Tt(t,e,i){void 0===i&&(i=!1);var n,s,o=L(e),r=L(e)&&function(t){var e=t.getBoundingClientRect(),i=P(e.width)/t.offsetWidth||1,n=P(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=R(e),l=F(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==O(e)||ht(a))&&(c=(n=e)!==x(n)&&L(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:lt(n)),L(e)?((h=F(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=ct(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Ct(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function xt(){for(var t=arguments.length,e=new Array(t),i=0;i$t.has(t)&&$t.get(t).get(e)||null,remove(t,e){if(!$t.has(t))return;const i=$t.get(t);i.delete(e),0===i.size&&$t.delete(t)}},Nt="transitionend",Pt=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),Mt=t=>{t.dispatchEvent(new Event(Nt))},jt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Ft=t=>jt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(Pt(t)):null,Ht=t=>{if(!jt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},Bt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),Wt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Wt(t.parentNode):null},zt=()=>{},Rt=t=>{t.offsetHeight},qt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Vt=[],Yt=()=>"rtl"===document.documentElement.dir,Kt=t=>{var e;e=()=>{const e=qt();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(Vt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Vt)t()})),Vt.push(e)):e()},Qt=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,Xt=(t,e,i=!0)=>{if(!i)return void Qt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(Nt,o),Qt(t))};e.addEventListener(Nt,o),setTimeout((()=>{s||Mt(e)}),n)},Ut=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},Gt=/[^.]*(?=\..*)\.|.*/,Jt=/\..*/,Zt=/::\d+$/,te={};let ee=1;const ie={mouseenter:"mouseover",mouseleave:"mouseout"},ne=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function se(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=se(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function re(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function ae(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=de(t);return ne.has(o)||(o=t),[n,s,o]}function le(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=ae(e,i,n);if(e in ie){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=oe(t),c=l[a]||(l[a]={}),h=re(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=se(r,e.replace(Gt,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return fe(s,{delegateTarget:r}),n.oneOff&&ue.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return fe(n,{delegateTarget:t}),i.oneOff&&ue.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function ce(t,e,i,n,s){const o=re(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function he(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&ce(t,e,i,r.callable,r.delegationSelector)}function de(t){return t=t.replace(Jt,""),ie[t]||t}const ue={on(t,e,i,n){le(t,e,i,n,!1)},one(t,e,i,n){le(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=ae(e,i,n),a=r!==e,l=oe(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))he(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(Zt,"");a&&!e.includes(s)||ce(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;ce(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=qt();let s=null,o=!0,r=!0,a=!1;e!==de(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=fe(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function fe(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function pe(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function me(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const ge={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${me(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${me(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=pe(t.dataset[n])}return e},getDataAttribute:(t,e)=>pe(t.getAttribute(`data-bs-${me(e)}`))};class _e{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=jt(e)?ge.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...jt(e)?ge.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,s]of Object.entries(e)){const e=t[n],o=jt(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${s}".`)}var i}}class be extends _e{constructor(t,e){super(),(t=Ft(t))&&(this._element=t,this._config=this._getConfig(e),It.set(this._element,this.constructor.DATA_KEY,this))}dispose(){It.remove(this._element,this.constructor.DATA_KEY),ue.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Xt(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return It.get(Ft(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const ve=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?Pt(i.trim()):null}return e},ye={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Bt(t)&&Ht(t)))},getSelectorFromElement(t){const e=ve(t);return e&&ye.findOne(e)?e:null},getElementFromSelector(t){const e=ve(t);return e?ye.findOne(e):null},getMultipleElementsFromSelector(t){const e=ve(t);return e?ye.find(e):[]}},we=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;ue.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Bt(this))return;const s=ye.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Ee=".bs.alert",Ae=`close${Ee}`,Te=`closed${Ee}`;class Ce extends be{static get NAME(){return"alert"}close(){if(ue.trigger(this._element,Ae).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),ue.trigger(this._element,Te),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Ce.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(Ce,"close"),Kt(Ce);const Oe='[data-bs-toggle="button"]';class xe extends be{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=xe.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}ue.on(document,"click.bs.button.data-api",Oe,(t=>{t.preventDefault();const e=t.target.closest(Oe);xe.getOrCreateInstance(e).toggle()})),Kt(xe);const ke=".bs.swipe",Le=`touchstart${ke}`,Se=`touchmove${ke}`,De=`touchend${ke}`,$e=`pointerdown${ke}`,Ie=`pointerup${ke}`,Ne={endCallback:null,leftCallback:null,rightCallback:null},Pe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Me extends _e{constructor(t,e){super(),this._element=t,t&&Me.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ne}static get DefaultType(){return Pe}static get NAME(){return"swipe"}dispose(){ue.off(this._element,ke)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Qt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Qt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ue.on(this._element,$e,(t=>this._start(t))),ue.on(this._element,Ie,(t=>this._end(t))),this._element.classList.add("pointer-event")):(ue.on(this._element,Le,(t=>this._start(t))),ue.on(this._element,Se,(t=>this._move(t))),ue.on(this._element,De,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const je=".bs.carousel",Fe=".data-api",He="next",Be="prev",We="left",ze="right",Re=`slide${je}`,qe=`slid${je}`,Ve=`keydown${je}`,Ye=`mouseenter${je}`,Ke=`mouseleave${je}`,Qe=`dragstart${je}`,Xe=`load${je}${Fe}`,Ue=`click${je}${Fe}`,Ge="carousel",Je="active",Ze=".active",ti=".carousel-item",ei=Ze+ti,ii={ArrowLeft:ze,ArrowRight:We},ni={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},si={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class oi extends be{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ye.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ge&&this.cycle()}static get Default(){return ni}static get DefaultType(){return si}static get NAME(){return"carousel"}next(){this._slide(He)}nextWhenVisible(){!document.hidden&&Ht(this._element)&&this.next()}prev(){this._slide(Be)}pause(){this._isSliding&&Mt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ue.one(this._element,qe,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ue.one(this._element,qe,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?He:Be;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ue.on(this._element,Ve,(t=>this._keydown(t))),"hover"===this._config.pause&&(ue.on(this._element,Ye,(()=>this.pause())),ue.on(this._element,Ke,(()=>this._maybeEnableCycle()))),this._config.touch&&Me.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ye.find(".carousel-item img",this._element))ue.on(t,Qe,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(We)),rightCallback:()=>this._slide(this._directionToOrder(ze)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Me(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ii[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ye.findOne(Ze,this._indicatorsElement);e.classList.remove(Je),e.removeAttribute("aria-current");const i=ye.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Je),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===He,s=e||Ut(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>ue.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Re).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Rt(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(Je),i.classList.remove(Je,c,l),this._isSliding=!1,r(qe)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return ye.findOne(ei,this._element)}_getItems(){return ye.find(ti,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Yt()?t===We?Be:He:t===We?He:Be}_orderToDirection(t){return Yt()?t===Be?We:ze:t===Be?ze:We}static jQueryInterface(t){return this.each((function(){const e=oi.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}ue.on(document,Ue,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=ye.getElementFromSelector(this);if(!e||!e.classList.contains(Ge))return;t.preventDefault();const i=oi.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===ge.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),ue.on(window,Xe,(()=>{const t=ye.find('[data-bs-ride="carousel"]');for(const e of t)oi.getOrCreateInstance(e)})),Kt(oi);const ri=".bs.collapse",ai=`show${ri}`,li=`shown${ri}`,ci=`hide${ri}`,hi=`hidden${ri}`,di=`click${ri}.data-api`,ui="show",fi="collapse",pi="collapsing",mi=`:scope .${fi} .${fi}`,gi='[data-bs-toggle="collapse"]',_i={parent:null,toggle:!0},bi={parent:"(null|element)",toggle:"boolean"};class vi extends be{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ye.find(gi);for(const t of i){const e=ye.getSelectorFromElement(t),i=ye.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return _i}static get DefaultType(){return bi}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>vi.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(ue.trigger(this._element,ai).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(fi),this._element.classList.add(pi),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(fi,ui),this._element.style[e]="",ue.trigger(this._element,li)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ue.trigger(this._element,ci).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Rt(this._element),this._element.classList.add(pi),this._element.classList.remove(fi,ui);for(const t of this._triggerArray){const e=ye.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(fi),ue.trigger(this._element,hi)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(ui)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ft(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(gi);for(const e of t){const t=ye.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ye.find(mi,this._config.parent);return ye.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=vi.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}ue.on(document,di,gi,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of ye.getMultipleElementsFromSelector(this))vi.getOrCreateInstance(t,{toggle:!1}).toggle()})),Kt(vi);const yi="dropdown",wi=".bs.dropdown",Ei=".data-api",Ai="ArrowUp",Ti="ArrowDown",Ci=`hide${wi}`,Oi=`hidden${wi}`,xi=`show${wi}`,ki=`shown${wi}`,Li=`click${wi}${Ei}`,Si=`keydown${wi}${Ei}`,Di=`keyup${wi}${Ei}`,$i="show",Ii='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ni=`${Ii}.${$i}`,Pi=".dropdown-menu",Mi=Yt()?"top-end":"top-start",ji=Yt()?"top-start":"top-end",Fi=Yt()?"bottom-end":"bottom-start",Hi=Yt()?"bottom-start":"bottom-end",Bi=Yt()?"left-start":"right-start",Wi=Yt()?"right-start":"left-start",zi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ri={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class qi extends be{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ye.next(this._element,Pi)[0]||ye.prev(this._element,Pi)[0]||ye.findOne(Pi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return zi}static get DefaultType(){return Ri}static get NAME(){return yi}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ue.trigger(this._element,xi,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($i),this._element.classList.add($i),ue.trigger(this._element,ki,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ue.trigger(this._element,Ci,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._popper&&this._popper.destroy(),this._menu.classList.remove($i),this._element.classList.remove($i),this._element.setAttribute("aria-expanded","false"),ge.removeDataAttribute(this._menu,"popper"),ue.trigger(this._element,Oi,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!jt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${yi.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===e)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:jt(this._config.reference)?t=Ft(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const i=this._getPopperConfig();this._popper=St(t,this._menu,i)}_isShown(){return this._menu.classList.contains($i)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Bi;if(t.classList.contains("dropstart"))return Wi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ji:Mi:e?Hi:Fi}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(ge.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Qt(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=ye.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Ht(t)));i.length&&Ut(i,e,t===Ti,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=ye.find(Ni);for(const i of e){const e=qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Ai,Ti].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Ii)?this:ye.prev(this,Ii)[0]||ye.next(this,Ii)[0]||ye.findOne(Ii,t.delegateTarget.parentNode),o=qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}ue.on(document,Si,Ii,qi.dataApiKeydownHandler),ue.on(document,Si,Pi,qi.dataApiKeydownHandler),ue.on(document,Li,qi.clearMenus),ue.on(document,Di,qi.clearMenus),ue.on(document,Li,Ii,(function(t){t.preventDefault(),qi.getOrCreateInstance(this).toggle()})),Kt(qi);const Vi="backdrop",Yi="show",Ki=`mousedown.bs.${Vi}`,Qi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Xi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ui extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Qi}static get DefaultType(){return Xi}static get NAME(){return Vi}show(t){if(!this._config.isVisible)return void Qt(t);this._append();const e=this._getElement();this._config.isAnimated&&Rt(e),e.classList.add(Yi),this._emulateAnimation((()=>{Qt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation((()=>{this.dispose(),Qt(t)}))):Qt(t)}dispose(){this._isAppended&&(ue.off(this._element,Ki),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ft(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ue.on(t,Ki,(()=>{Qt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Xt(t,this._getElement(),this._config.isAnimated)}}const Gi=".bs.focustrap",Ji=`focusin${Gi}`,Zi=`keydown.tab${Gi}`,tn="backward",en={autofocus:!0,trapElement:null},nn={autofocus:"boolean",trapElement:"element"};class sn extends _e{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return en}static get DefaultType(){return nn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ue.off(document,Gi),ue.on(document,Ji,(t=>this._handleFocusin(t))),ue.on(document,Zi,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ue.off(document,Gi))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ye.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===tn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?tn:"forward")}}const on=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",rn=".sticky-top",an="padding-right",ln="margin-right";class cn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,an,(e=>e+t)),this._setElementAttributes(on,an,(e=>e+t)),this._setElementAttributes(rn,ln,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,an),this._resetElementAttributes(on,an),this._resetElementAttributes(rn,ln)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&ge.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=ge.getDataAttribute(t,e);null!==i?(ge.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(jt(t))e(t);else for(const i of ye.find(t,this._element))e(i)}}const hn=".bs.modal",dn=`hide${hn}`,un=`hidePrevented${hn}`,fn=`hidden${hn}`,pn=`show${hn}`,mn=`shown${hn}`,gn=`resize${hn}`,_n=`click.dismiss${hn}`,bn=`mousedown.dismiss${hn}`,vn=`keydown.dismiss${hn}`,yn=`click${hn}.data-api`,wn="modal-open",En="show",An="modal-static",Tn={backdrop:!0,focus:!0,keyboard:!0},Cn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class On extends be{constructor(t,e){super(t,e),this._dialog=ye.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new cn,this._addEventListeners()}static get Default(){return Tn}static get DefaultType(){return Cn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||ue.trigger(this._element,pn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(wn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(ue.trigger(this._element,dn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(En),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){ue.off(window,hn),ue.off(this._dialog,hn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ui({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new sn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ye.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Rt(this._element),this._element.classList.add(En),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ue.trigger(this._element,mn,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){ue.on(this._element,vn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),ue.on(window,gn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),ue.on(this._element,bn,(t=>{ue.one(this._element,_n,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(wn),this._resetAdjustments(),this._scrollBar.reset(),ue.trigger(this._element,fn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ue.trigger(this._element,un).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(An)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(An),this._queueCallback((()=>{this._element.classList.remove(An),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=Yt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Yt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=On.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}ue.on(document,yn,'[data-bs-toggle="modal"]',(function(t){const e=ye.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ue.one(e,pn,(t=>{t.defaultPrevented||ue.one(e,fn,(()=>{Ht(this)&&this.focus()}))}));const i=ye.findOne(".modal.show");i&&On.getInstance(i).hide(),On.getOrCreateInstance(e).toggle(this)})),we(On),Kt(On);const xn=".bs.offcanvas",kn=".data-api",Ln=`load${xn}${kn}`,Sn="show",Dn="showing",$n="hiding",In=".offcanvas.show",Nn=`show${xn}`,Pn=`shown${xn}`,Mn=`hide${xn}`,jn=`hidePrevented${xn}`,Fn=`hidden${xn}`,Hn=`resize${xn}`,Bn=`click${xn}${kn}`,Wn=`keydown.dismiss${xn}`,zn={backdrop:!0,keyboard:!0,scroll:!1},Rn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class qn extends be{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return zn}static get DefaultType(){return Rn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||ue.trigger(this._element,Nn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new cn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Dn),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Sn),this._element.classList.remove(Dn),ue.trigger(this._element,Pn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(ue.trigger(this._element,Mn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add($n),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Sn,$n),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new cn).reset(),ue.trigger(this._element,Fn)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Ui({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ue.trigger(this._element,jn)}:null})}_initializeFocusTrap(){return new sn({trapElement:this._element})}_addEventListeners(){ue.on(this._element,Wn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ue.trigger(this._element,jn))}))}static jQueryInterface(t){return this.each((function(){const e=qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}ue.on(document,Bn,'[data-bs-toggle="offcanvas"]',(function(t){const e=ye.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;ue.one(e,Fn,(()=>{Ht(this)&&this.focus()}));const i=ye.findOne(In);i&&i!==e&&qn.getInstance(i).hide(),qn.getOrCreateInstance(e).toggle(this)})),ue.on(window,Ln,(()=>{for(const t of ye.find(In))qn.getOrCreateInstance(t).show()})),ue.on(window,Hn,(()=>{for(const t of ye.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&qn.getOrCreateInstance(t).hide()})),we(qn),Kt(qn);const Vn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Yn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Kn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Qn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Yn.has(i)||Boolean(Kn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Xn={allowList:Vn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Un={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Gn={entry:"(string|element|function|null)",selector:"(string|element)"};class Jn extends _e{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Xn}static get DefaultType(){return Un}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Gn)}_setContent(t,e,i){const n=ye.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?jt(e)?this._putElementInTemplate(Ft(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Qn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Qt(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Zn=new Set(["sanitize","allowList","sanitizeFn"]),ts="fade",es="show",is=".modal",ns="hide.bs.modal",ss="hover",os="focus",rs={AUTO:"auto",TOP:"top",RIGHT:Yt()?"left":"right",BOTTOM:"bottom",LEFT:Yt()?"right":"left"},as={allowList:Vn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},ls={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class cs extends be{constructor(t,i){if(void 0===e)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,i),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return as}static get DefaultType(){return ls}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ue.off(this._element.closest(is),ns,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ue.trigger(this._element,this.constructor.eventName("show")),e=(Wt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),ue.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.on(t,"mouseover",zt);this._queueCallback((()=>{ue.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!ue.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ue.off(t,"mouseover",zt);this._activeTrigger.click=!1,this._activeTrigger[os]=!1,this._activeTrigger[ss]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ue.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ts,es),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ts),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Jn({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ts)}_isShown(){return this.tip&&this.tip.classList.contains(es)}_createPopper(t){const e=Qt(this._config.placement,[this,t,this._element]),i=rs[e.toUpperCase()];return St(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return Qt(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...Qt(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ue.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===ss?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ss?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ue.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?os:ss]=!0,e._enter()})),ue.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?os:ss]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},ue.on(this._element.closest(is),ns,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=ge.getDataAttributes(this._element);for(const t of Object.keys(e))Zn.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ft(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=cs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Kt(cs);const hs={...cs.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ds={...cs.DefaultType,content:"(null|string|element|function)"};class us extends cs{static get Default(){return hs}static get DefaultType(){return ds}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Kt(us);const fs=".bs.scrollspy",ps=`activate${fs}`,ms=`click${fs}`,gs=`load${fs}.data-api`,_s="active",bs="[href]",vs=".nav-link",ys=`${vs}, .nav-item > ${vs}, .list-group-item`,ws={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Es={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class As extends be{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ws}static get DefaultType(){return Es}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ft(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ue.off(this._config.target,ms),ue.on(this._config.target,ms,bs,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ye.find(bs,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=ye.findOne(decodeURI(e.hash),this._element);Ht(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(_s),this._activateParents(t),ue.trigger(this._element,ps,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))ye.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(_s);else for(const e of ye.parents(t,".nav, .list-group"))for(const t of ye.prev(e,ys))t.classList.add(_s)}_clearActiveClass(t){t.classList.remove(_s);const e=ye.find(`${bs}.${_s}`,t);for(const t of e)t.classList.remove(_s)}static jQueryInterface(t){return this.each((function(){const e=As.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}ue.on(window,gs,(()=>{for(const t of ye.find('[data-bs-spy="scroll"]'))As.getOrCreateInstance(t)})),Kt(As);const Ts=".bs.tab",Cs=`hide${Ts}`,Os=`hidden${Ts}`,xs=`show${Ts}`,ks=`shown${Ts}`,Ls=`click${Ts}`,Ss=`keydown${Ts}`,Ds=`load${Ts}`,$s="ArrowLeft",Is="ArrowRight",Ns="ArrowUp",Ps="ArrowDown",Ms="Home",js="End",Fs="active",Hs="fade",Bs="show",Ws=".dropdown-toggle",zs=`:not(${Ws})`,Rs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',qs=`.nav-link${zs}, .list-group-item${zs}, [role="tab"]${zs}, ${Rs}`,Vs=`.${Fs}[data-bs-toggle="tab"], .${Fs}[data-bs-toggle="pill"], .${Fs}[data-bs-toggle="list"]`;class Ys extends be{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ue.on(this._element,Ss,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?ue.trigger(e,Cs,{relatedTarget:t}):null;ue.trigger(t,xs,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Fs),this._activate(ye.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ue.trigger(t,ks,{relatedTarget:e})):t.classList.add(Bs)}),t,t.classList.contains(Hs)))}_deactivate(t,e){t&&(t.classList.remove(Fs),t.blur(),this._deactivate(ye.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ue.trigger(t,Os,{relatedTarget:e})):t.classList.remove(Bs)}),t,t.classList.contains(Hs)))}_keydown(t){if(![$s,Is,Ns,Ps,Ms,js].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!Bt(t)));let i;if([Ms,js].includes(t.key))i=e[t.key===Ms?0:e.length-1];else{const n=[Is,Ps].includes(t.key);i=Ut(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Ys.getOrCreateInstance(i).show())}_getChildren(){return ye.find(qs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=ye.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=ye.findOne(t,i);s&&s.classList.toggle(n,e)};n(Ws,Fs),n(".dropdown-menu",Bs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Fs)}_getInnerElement(t){return t.matches(qs)?t:ye.findOne(qs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Ys.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}ue.on(document,Ls,Rs,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||Ys.getOrCreateInstance(this).show()})),ue.on(window,Ds,(()=>{for(const t of ye.find(Vs))Ys.getOrCreateInstance(t)})),Kt(Ys);const Ks=".bs.toast",Qs=`mouseover${Ks}`,Xs=`mouseout${Ks}`,Us=`focusin${Ks}`,Gs=`focusout${Ks}`,Js=`hide${Ks}`,Zs=`hidden${Ks}`,to=`show${Ks}`,eo=`shown${Ks}`,io="hide",no="show",so="showing",oo={animation:"boolean",autohide:"boolean",delay:"number"},ro={animation:!0,autohide:!0,delay:5e3};class ao extends be{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ro}static get DefaultType(){return oo}static get NAME(){return"toast"}show(){ue.trigger(this._element,to).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(io),Rt(this._element),this._element.classList.add(no,so),this._queueCallback((()=>{this._element.classList.remove(so),ue.trigger(this._element,eo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(ue.trigger(this._element,Js).defaultPrevented||(this._element.classList.add(so),this._queueCallback((()=>{this._element.classList.add(io),this._element.classList.remove(so,no),ue.trigger(this._element,Zs)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(no),super.dispose()}isShown(){return this._element.classList.contains(no)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){ue.on(this._element,Qs,(t=>this._onInteraction(t,!0))),ue.on(this._element,Xs,(t=>this._onInteraction(t,!1))),ue.on(this._element,Us,(t=>this._onInteraction(t,!0))),ue.on(this._element,Gs,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ao.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}function lo(t){"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}we(ao),Kt(ao),lo((function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new cs(t,{delay:{show:500,hide:100}})}))})),lo((function(){document.getElementById("pst-back-to-top").addEventListener("click",(function(){document.body.scrollTop=0,document.documentElement.scrollTop=0}))})),lo((function(){var t=document.getElementById("pst-back-to-top"),e=document.getElementsByClassName("bd-header")[0].getBoundingClientRect();window.addEventListener("scroll",(function(){this.oldScroll>this.scrollY&&this.scrollY>e.bottom?t.style.display="block":t.style.display="none",this.oldScroll=this.scrollY}))}))})(); +//# sourceMappingURL=bootstrap.js.map \ No newline at end of file diff --git a/_static/scripts/bootstrap.js.LICENSE.txt b/_static/scripts/bootstrap.js.LICENSE.txt new file mode 100644 index 00000000..10f979d0 --- /dev/null +++ b/_static/scripts/bootstrap.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + * Bootstrap v5.3.2 (https://getbootstrap.com/) + * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ diff --git a/_static/scripts/bootstrap.js.map b/_static/scripts/bootstrap.js.map new file mode 100644 index 00000000..e5bc1575 --- /dev/null +++ b/_static/scripts/bootstrap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/bootstrap.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,ipBCLvD,IAAI,EAAM,MACNC,EAAS,SACTC,EAAQ,QACRC,EAAO,OACPC,EAAO,OACPC,EAAiB,CAAC,EAAKJ,EAAQC,EAAOC,GACtCG,EAAQ,QACRC,EAAM,MACNC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,gBAAgBmG,UAAY,CACvC,GACF,IAuBAy+B,IArBA,WACE,IAAIE,EAAM/kC,SAAS68B,eAAe,mBAC9BmI,EAAShlC,SACVilC,uBAAuB,aAAa,GACpChnC,wBACH1D,OAAOkL,iBAAiB,UAAU,WAC5BkV,KAAKuqB,UAAYvqB,KAAKwqB,SAAWxqB,KAAKwqB,QAAUH,EAAOzsC,OACzDwsC,EAAIrpC,MAAM6wB,QAAU,QAEpBwY,EAAIrpC,MAAM6wB,QAAU,OAEtB5R,KAAKuqB,UAAYvqB,KAAKwqB,OACxB,GACF","sources":["webpack://pydata_sphinx_theme/webpack/bootstrap","webpack://pydata_sphinx_theme/webpack/runtime/define property getters","webpack://pydata_sphinx_theme/webpack/runtime/hasOwnProperty shorthand","webpack://pydata_sphinx_theme/webpack/runtime/make namespace object","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/enums.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/math.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/within.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/createPopper.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/debounce.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/popper.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/popper-lite.js","webpack://pydata_sphinx_theme/./node_modules/bootstrap/dist/js/bootstrap.esm.js","webpack://pydata_sphinx_theme/./src/pydata_sphinx_theme/assets/scripts/mixin.js","webpack://pydata_sphinx_theme/./src/pydata_sphinx_theme/assets/scripts/bootstrap.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/*!\n * Bootstrap v5.3.2 (https://getbootstrap.com/)\n * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\nimport * as Popper from '@popperjs/core';\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map();\nconst Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n const instanceMap = elementMap.get(element);\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n instanceMap.set(key, instance);\n },\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n return null;\n },\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key);\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend';\n\n/**\n * Properly escape IDs selectors to handle weird IDs\n * @param {string} selector\n * @returns {string}\n */\nconst parseSelector = selector => {\n if (selector && window.CSS && window.CSS.escape) {\n // document.querySelector needs escaping to handle IDs (html5+) containing for instance /\n selector = selector.replace(/#([^\\s\"#']+)/g, (match, id) => `#${CSS.escape(id)}`);\n }\n return selector;\n};\n\n// Shout-out Angus Croll (https://goo.gl/pxwQGp)\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n};\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n return prefix;\n};\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n};\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\nconst isElement = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n return typeof object.nodeType !== 'undefined';\n};\nconst getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object;\n }\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(parseSelector(object));\n }\n return null;\n};\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false;\n }\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';\n // Handle `details` element as its content may falsie appear visible when it is closed\n const closedDetails = element.closest('details:not([open])');\n if (!closedDetails) {\n return elementIsVisible;\n }\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n if (summary === null) {\n return false;\n }\n }\n return elementIsVisible;\n};\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n if (element.classList.contains('disabled')) {\n return true;\n }\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n};\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n if (element instanceof ShadowRoot) {\n return element;\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null;\n }\n return findShadowRoot(element.parentNode);\n};\nconst noop = () => {};\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n};\n\nconst getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n return null;\n};\nconst DOMContentLoadedCallbacks = [];\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n};\nconst isRTL = () => document.documentElement.dir === 'rtl';\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n};\nconst execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {\n return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;\n};\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n};\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement);\n\n // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n index += shouldGetNext ? 1 : -1;\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n return list[Math.max(0, Math.min(index, listLength - 1))];\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n};\nconst nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n}\nfunction getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n}\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n return fn.apply(element, [event]);\n };\n}\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n hydrateObj(event, {\n delegateTarget: target\n });\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n return fn.apply(target, [event]);\n }\n }\n };\n}\nfunction findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n}\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string';\n // TODO: tooltip passes `false` instead of selector, so we need to check\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n return [isDelegated, callable, typeEvent];\n}\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n callable = wrapFunction(callable);\n }\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n}\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n if (!fn) {\n return;\n }\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n}\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n}\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n const evt = hydrateObj(new Event(event, {\n bubbles,\n cancelable: true\n }), args);\n if (defaultPrevented) {\n evt.preventDefault();\n }\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n return evt;\n }\n};\nfunction hydrateObj(obj, meta = {}) {\n for (const [key, value] of Object.entries(meta)) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n get() {\n return value;\n }\n });\n }\n }\n return obj;\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n if (value === 'false') {\n return false;\n }\n if (value === Number(value).toString()) {\n return Number(value);\n }\n if (value === '' || value === 'null') {\n return null;\n }\n if (typeof value !== 'string') {\n return value;\n }\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n}\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n}\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n return attributes;\n },\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {};\n }\n static get DefaultType() {\n return {};\n }\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n this._typeCheckConfig(config);\n return config;\n }\n _configAfterMerge(config) {\n return config;\n }\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const [property, expectedTypes] of Object.entries(configTypes)) {\n const value = config[property];\n const valueType = isElement(value) ? 'element' : toType(value);\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.2';\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super();\n element = getElement(element);\n if (!element) {\n return;\n }\n this._element = element;\n this._config = this._getConfig(config);\n Data.set(this._element, this.constructor.DATA_KEY, this);\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n this._typeCheckConfig(config);\n return config;\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n static get VERSION() {\n return VERSION;\n }\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href');\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n selector = hrefAttribute && hrefAttribute !== '#' ? parseSelector(hrefAttribute.trim()) : null;\n }\n return selector;\n};\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n return parents;\n },\n prev(element, selector) {\n let previous = element.previousElementSibling;\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n previous = previous.previousElementSibling;\n }\n return [];\n },\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n next = next.nextElementSibling;\n }\n return [];\n },\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n },\n getSelectorFromElement(element) {\n const selector = getSelector(element);\n if (selector) {\n return SelectorEngine.findOne(selector) ? selector : null;\n }\n return null;\n },\n getElementFromSelector(element) {\n const selector = getSelector(element);\n return selector ? SelectorEngine.findOne(selector) : null;\n },\n getMultipleElementsFromSelector(element) {\n const selector = getSelector(element);\n return selector ? SelectorEngine.find(selector) : [];\n }\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n if (isDisabled(this)) {\n return;\n }\n const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target);\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]();\n });\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$f = 'alert';\nconst DATA_KEY$a = 'bs.alert';\nconst EVENT_KEY$b = `.${DATA_KEY$a}`;\nconst EVENT_CLOSE = `close${EVENT_KEY$b}`;\nconst EVENT_CLOSED = `closed${EVENT_KEY$b}`;\nconst CLASS_NAME_FADE$5 = 'fade';\nconst CLASS_NAME_SHOW$8 = 'show';\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$f;\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n if (closeEvent.defaultPrevented) {\n return;\n }\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n }\n\n // Private\n _destroyElement() {\n this._element.remove();\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n if (typeof config !== 'string') {\n return;\n }\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config](this);\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close');\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$e = 'button';\nconst DATA_KEY$9 = 'bs.button';\nconst EVENT_KEY$a = `.${DATA_KEY$9}`;\nconst DATA_API_KEY$6 = '.data-api';\nconst CLASS_NAME_ACTIVE$3 = 'active';\nconst SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\nconst EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$e;\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n});\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$d = 'swipe';\nconst EVENT_KEY$9 = '.bs.swipe';\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\nconst POINTER_TYPE_TOUCH = 'touch';\nconst POINTER_TYPE_PEN = 'pen';\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event';\nconst SWIPE_THRESHOLD = 40;\nconst Default$c = {\n endCallback: null,\n leftCallback: null,\n rightCallback: null\n};\nconst DefaultType$c = {\n endCallback: '(function|null)',\n leftCallback: '(function|null)',\n rightCallback: '(function|null)'\n};\n\n/**\n * Class definition\n */\n\nclass Swipe extends Config {\n constructor(element, config) {\n super();\n this._element = element;\n if (!element || !Swipe.isSupported()) {\n return;\n }\n this._config = this._getConfig(config);\n this._deltaX = 0;\n this._supportPointerEvents = Boolean(window.PointerEvent);\n this._initEvents();\n }\n\n // Getters\n static get Default() {\n return Default$c;\n }\n static get DefaultType() {\n return DefaultType$c;\n }\n static get NAME() {\n return NAME$d;\n }\n\n // Public\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n }\n\n // Private\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX;\n return;\n }\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX;\n }\n }\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX;\n }\n this._handleSwipe();\n execute(this._config.endCallback);\n }\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;\n }\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX);\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return;\n }\n const direction = absDeltaX / this._deltaX;\n this._deltaX = 0;\n if (!direction) {\n return;\n }\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);\n }\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));\n }\n }\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n }\n\n // Static\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$c = 'carousel';\nconst DATA_KEY$8 = 'bs.carousel';\nconst EVENT_KEY$8 = `.${DATA_KEY$8}`;\nconst DATA_API_KEY$5 = '.data-api';\nconst ARROW_LEFT_KEY$1 = 'ArrowLeft';\nconst ARROW_RIGHT_KEY$1 = 'ArrowRight';\nconst TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\nconst ORDER_NEXT = 'next';\nconst ORDER_PREV = 'prev';\nconst DIRECTION_LEFT = 'left';\nconst DIRECTION_RIGHT = 'right';\nconst EVENT_SLIDE = `slide${EVENT_KEY$8}`;\nconst EVENT_SLID = `slid${EVENT_KEY$8}`;\nconst EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;\nconst EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;\nconst EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;\nconst EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;\nconst EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\nconst CLASS_NAME_CAROUSEL = 'carousel';\nconst CLASS_NAME_ACTIVE$2 = 'active';\nconst CLASS_NAME_SLIDE = 'slide';\nconst CLASS_NAME_END = 'carousel-item-end';\nconst CLASS_NAME_START = 'carousel-item-start';\nconst CLASS_NAME_NEXT = 'carousel-item-next';\nconst CLASS_NAME_PREV = 'carousel-item-prev';\nconst SELECTOR_ACTIVE = '.active';\nconst SELECTOR_ITEM = '.carousel-item';\nconst SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;\nconst SELECTOR_ITEM_IMG = '.carousel-item img';\nconst SELECTOR_INDICATORS = '.carousel-indicators';\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\nconst KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT\n};\nconst Default$b = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n};\nconst DefaultType$b = {\n interval: '(number|boolean)',\n // TODO:v6 remove boolean support\n keyboard: 'boolean',\n pause: '(string|boolean)',\n ride: '(boolean|string)',\n touch: 'boolean',\n wrap: 'boolean'\n};\n\n/**\n * Class definition\n */\n\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._interval = null;\n this._activeElement = null;\n this._isSliding = false;\n this.touchTimeout = null;\n this._swipeHelper = null;\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n this._addEventListeners();\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle();\n }\n }\n\n // Getters\n static get Default() {\n return Default$b;\n }\n static get DefaultType() {\n return DefaultType$b;\n }\n static get NAME() {\n return NAME$c;\n }\n\n // Public\n next() {\n this._slide(ORDER_NEXT);\n }\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n prev() {\n this._slide(ORDER_PREV);\n }\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element);\n }\n this._clearInterval();\n }\n cycle() {\n this._clearInterval();\n this._updateInterval();\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);\n }\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return;\n }\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle());\n return;\n }\n this.cycle();\n }\n to(index) {\n const items = this._getItems();\n if (index > items.length - 1 || index < 0) {\n return;\n }\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n const activeIndex = this._getItemIndex(this._getActive());\n if (activeIndex === index) {\n return;\n }\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n this._slide(order, items[index]);\n }\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose();\n }\n super.dispose();\n }\n\n // Private\n _configAfterMerge(config) {\n config.defaultInterval = config.interval;\n return config;\n }\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));\n }\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());\n EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());\n }\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners();\n }\n }\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());\n }\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return;\n }\n\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause();\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n };\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n };\n this._swipeHelper = new Swipe(this._element, swipeConfig);\n }\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n const direction = KEY_TO_DIRECTION[event.key];\n if (direction) {\n event.preventDefault();\n this._slide(this._directionToOrder(direction));\n }\n }\n _getItemIndex(element) {\n return this._getItems().indexOf(element);\n }\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return;\n }\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement);\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);\n newActiveIndicator.setAttribute('aria-current', 'true');\n }\n }\n _updateInterval() {\n const element = this._activeElement || this._getActive();\n if (!element) {\n return;\n }\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n this._config.interval = elementInterval || this._config.defaultInterval;\n }\n _slide(order, element = null) {\n if (this._isSliding) {\n return;\n }\n const activeElement = this._getActive();\n const isNext = order === ORDER_NEXT;\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);\n if (nextElement === activeElement) {\n return;\n }\n const nextElementIndex = this._getItemIndex(nextElement);\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n });\n };\n const slideEvent = triggerEvent(EVENT_SLIDE);\n if (slideEvent.defaultPrevented) {\n return;\n }\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // TODO: change tests that use empty divs to avoid this check\n return;\n }\n const isCycling = Boolean(this._interval);\n this.pause();\n this._isSliding = true;\n this._setActiveIndicatorElement(nextElementIndex);\n this._activeElement = nextElement;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n triggerEvent(EVENT_SLID);\n };\n this._queueCallback(completeCallBack, activeElement, this._isAnimated());\n if (isCycling) {\n this.cycle();\n }\n }\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE);\n }\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n }\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element);\n }\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n }\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config);\n if (typeof config === 'number') {\n data.to(config);\n return;\n }\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config]();\n }\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {\n const target = SelectorEngine.getElementFromSelector(this);\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n event.preventDefault();\n const carousel = Carousel.getOrCreateInstance(target);\n const slideIndex = this.getAttribute('data-bs-slide-to');\n if (slideIndex) {\n carousel.to(slideIndex);\n carousel._maybeEnableCycle();\n return;\n }\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next();\n carousel._maybeEnableCycle();\n return;\n }\n carousel.prev();\n carousel._maybeEnableCycle();\n});\nEventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel);\n }\n});\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Carousel);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$b = 'collapse';\nconst DATA_KEY$7 = 'bs.collapse';\nconst EVENT_KEY$7 = `.${DATA_KEY$7}`;\nconst DATA_API_KEY$4 = '.data-api';\nconst EVENT_SHOW$6 = `show${EVENT_KEY$7}`;\nconst EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;\nconst EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\nconst EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\nconst EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst CLASS_NAME_SHOW$7 = 'show';\nconst CLASS_NAME_COLLAPSE = 'collapse';\nconst CLASS_NAME_COLLAPSING = 'collapsing';\nconst CLASS_NAME_COLLAPSED = 'collapsed';\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\nconst WIDTH = 'width';\nconst HEIGHT = 'height';\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\nconst SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\nconst Default$a = {\n parent: null,\n toggle: true\n};\nconst DefaultType$a = {\n parent: '(null|element)',\n toggle: 'boolean'\n};\n\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n for (const elem of toggleList) {\n const selector = SelectorEngine.getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n this._initializeChildren();\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n if (this._config.toggle) {\n this.toggle();\n }\n }\n\n // Getters\n static get Default() {\n return Default$a;\n }\n static get DefaultType() {\n return DefaultType$a;\n }\n static get NAME() {\n return NAME$b;\n }\n\n // Public\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n let activeChildren = [];\n\n // find active children\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n if (startEvent.defaultPrevented) {\n return;\n }\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n const dimension = this._getDimension();\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n this._element.style[dimension] = 0;\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n this._isTransitioning = true;\n const complete = () => {\n this._isTransitioning = false;\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$6);\n };\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n this._queueCallback(complete, this._element, true);\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);\n if (startEvent.defaultPrevented) {\n return;\n }\n const dimension = this._getDimension();\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n for (const trigger of this._triggerArray) {\n const element = SelectorEngine.getElementFromSelector(trigger);\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n this._isTransitioning = true;\n const complete = () => {\n this._isTransitioning = false;\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n EventHandler.trigger(this._element, EVENT_HIDDEN$6);\n };\n this._element.style[dimension] = '';\n this._queueCallback(complete, this._element, true);\n }\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n }\n\n // Private\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n config.parent = getElement(config.parent);\n return config;\n }\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);\n for (const element of children) {\n const selected = SelectorEngine.getElementFromSelector(element);\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);\n // remove children if greater depth\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n }\n\n // Static\n static jQueryInterface(config) {\n const _config = {};\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config]();\n }\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n});\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Collapse);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$a = 'dropdown';\nconst DATA_KEY$6 = 'bs.dropdown';\nconst EVENT_KEY$6 = `.${DATA_KEY$6}`;\nconst DATA_API_KEY$3 = '.data-api';\nconst ESCAPE_KEY$2 = 'Escape';\nconst TAB_KEY$1 = 'Tab';\nconst ARROW_UP_KEY$1 = 'ArrowUp';\nconst ARROW_DOWN_KEY$1 = 'ArrowDown';\nconst RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\nconst EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;\nconst EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;\nconst EVENT_SHOW$5 = `show${EVENT_KEY$6}`;\nconst EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;\nconst EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst CLASS_NAME_SHOW$6 = 'show';\nconst CLASS_NAME_DROPUP = 'dropup';\nconst CLASS_NAME_DROPEND = 'dropend';\nconst CLASS_NAME_DROPSTART = 'dropstart';\nconst CLASS_NAME_DROPUP_CENTER = 'dropup-center';\nconst CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';\nconst SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)';\nconst SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;\nconst SELECTOR_MENU = '.dropdown-menu';\nconst SELECTOR_NAVBAR = '.navbar';\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav';\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\nconst PLACEMENT_TOPCENTER = 'top';\nconst PLACEMENT_BOTTOMCENTER = 'bottom';\nconst Default$9 = {\n autoClose: true,\n boundary: 'clippingParents',\n display: 'dynamic',\n offset: [0, 2],\n popperConfig: null,\n reference: 'toggle'\n};\nconst DefaultType$9 = {\n autoClose: '(boolean|string)',\n boundary: '(string|element)',\n display: 'string',\n offset: '(array|string|function)',\n popperConfig: '(null|object|function)',\n reference: '(string|element|object)'\n};\n\n/**\n * Class definition\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._popper = null;\n this._parent = this._element.parentNode; // dropdown wrapper\n // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);\n this._inNavbar = this._detectNavbar();\n }\n\n // Getters\n static get Default() {\n return Default$9;\n }\n static get DefaultType() {\n return DefaultType$9;\n }\n static get NAME() {\n return NAME$a;\n }\n\n // Public\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return;\n }\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);\n if (showEvent.defaultPrevented) {\n return;\n }\n this._createPopper();\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n this._element.focus();\n this._element.setAttribute('aria-expanded', true);\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n this._element.classList.add(CLASS_NAME_SHOW$6);\n EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);\n }\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return;\n }\n const relatedTarget = {\n relatedTarget: this._element\n };\n this._completeHide(relatedTarget);\n }\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n super.dispose();\n }\n update() {\n this._inNavbar = this._detectNavbar();\n if (this._popper) {\n this._popper.update();\n }\n }\n\n // Private\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n if (this._popper) {\n this._popper.destroy();\n }\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n this._element.setAttribute('aria-expanded', 'false');\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);\n }\n _getConfig(config) {\n config = super._getConfig(config);\n if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$a.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n return config;\n }\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n let referenceElement = this._element;\n if (this._config.reference === 'parent') {\n referenceElement = this._parent;\n } else if (isElement(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n const popperConfig = this._getPopperConfig();\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);\n }\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW$6);\n }\n _getPlacement() {\n const parentDropdown = this._parent;\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n }\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER;\n }\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER;\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null;\n }\n _getOffset() {\n const {\n offset\n } = this._config;\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n return offset;\n }\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n };\n\n // Disable Popper if we have a static display or Dropdown is in Navbar\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n return {\n ...defaultBsPopperConfig,\n ...execute(this._config.popperConfig, [defaultBsPopperConfig])\n };\n }\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));\n if (!items.length) {\n return;\n }\n\n // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n if (typeof config !== 'string') {\n return;\n }\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config]();\n });\n }\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {\n return;\n }\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle);\n if (!context || context._config.autoClose === false) {\n continue;\n }\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n }\n\n // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n const relatedTarget = {\n relatedTarget: context._element\n };\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n context._completeHide(relatedTarget);\n }\n }\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n\n const isInput = /input|textarea/i.test(event.target.tagName);\n const isEscapeEvent = event.key === ESCAPE_KEY$2;\n const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return;\n }\n if (isInput && !isEscapeEvent) {\n return;\n }\n event.preventDefault();\n\n // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n if (isUpOrDownEvent) {\n event.stopPropagation();\n instance.show();\n instance._selectMenuItem(event);\n return;\n }\n if (instance._isShown()) {\n // else is escape and we check if it is shown\n event.stopPropagation();\n instance.hide();\n getToggleButton.focus();\n }\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n});\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Dropdown);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$9 = 'backdrop';\nconst CLASS_NAME_FADE$4 = 'fade';\nconst CLASS_NAME_SHOW$5 = 'show';\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;\nconst Default$8 = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n};\n\nconst DefaultType$8 = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n};\n\n/**\n * Class definition\n */\n\nclass Backdrop extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n }\n\n // Getters\n static get Default() {\n return Default$8;\n }\n static get DefaultType() {\n return DefaultType$8;\n }\n static get NAME() {\n return NAME$9;\n }\n\n // Public\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n this._append();\n const element = this._getElement();\n if (this._config.isAnimated) {\n reflow(element);\n }\n element.classList.add(CLASS_NAME_SHOW$5);\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n }\n dispose() {\n if (!this._isAppended) {\n return;\n }\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n this._element.remove();\n this._isAppended = false;\n }\n\n // Private\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n this._element = backdrop;\n }\n return this._element;\n }\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement);\n return config;\n }\n _append() {\n if (this._isAppended) {\n return;\n }\n const element = this._getElement();\n this._config.rootElement.append(element);\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$8 = 'focustrap';\nconst DATA_KEY$5 = 'bs.focustrap';\nconst EVENT_KEY$5 = `.${DATA_KEY$5}`;\nconst EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;\nconst EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;\nconst TAB_KEY = 'Tab';\nconst TAB_NAV_FORWARD = 'forward';\nconst TAB_NAV_BACKWARD = 'backward';\nconst Default$7 = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n};\n\nconst DefaultType$7 = {\n autofocus: 'boolean',\n trapElement: 'element'\n};\n\n/**\n * Class definition\n */\n\nclass FocusTrap extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n }\n\n // Getters\n static get Default() {\n return Default$7;\n }\n static get DefaultType() {\n return DefaultType$7;\n }\n static get NAME() {\n return NAME$8;\n }\n\n // Public\n activate() {\n if (this._isActive) {\n return;\n }\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n deactivate() {\n if (!this._isActive) {\n return;\n }\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$5);\n }\n\n // Private\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n const elements = SelectorEngine.focusableChildren(trapElement);\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\nconst SELECTOR_STICKY_CONTENT = '.sticky-top';\nconst PROPERTY_PADDING = 'padding-right';\nconst PROPERTY_MARGIN = 'margin-right';\n\n/**\n * Class definition\n */\n\nclass ScrollBarHelper {\n constructor() {\n this._element = document.body;\n }\n\n // Public\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n hide() {\n const width = this.getWidth();\n this._disableOverFlow();\n // give padding to element to balance the hidden scrollbar width\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n isOverflowing() {\n return this.getWidth() > 0;\n }\n\n // Private\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n this._element.style.overflow = 'hidden';\n }\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n this._saveInitialAttribute(element, styleProperty);\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty);\n // We only want to remove the property if the value is `null`; the value can also be zero\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n Manipulator.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n _applyManipulationCallback(selector, callBack) {\n if (isElement(selector)) {\n callBack(selector);\n return;\n }\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel);\n }\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$7 = 'modal';\nconst DATA_KEY$4 = 'bs.modal';\nconst EVENT_KEY$4 = `.${DATA_KEY$4}`;\nconst DATA_API_KEY$2 = '.data-api';\nconst ESCAPE_KEY$1 = 'Escape';\nconst EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;\nconst EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;\nconst EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;\nconst EVENT_SHOW$4 = `show${EVENT_KEY$4}`;\nconst EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;\nconst EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;\nconst EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;\nconst EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;\nconst CLASS_NAME_OPEN = 'modal-open';\nconst CLASS_NAME_FADE$3 = 'fade';\nconst CLASS_NAME_SHOW$4 = 'show';\nconst CLASS_NAME_STATIC = 'modal-static';\nconst OPEN_SELECTOR$1 = '.modal.show';\nconst SELECTOR_DIALOG = '.modal-dialog';\nconst SELECTOR_MODAL_BODY = '.modal-body';\nconst SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\nconst Default$6 = {\n backdrop: true,\n focus: true,\n keyboard: true\n};\nconst DefaultType$6 = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n};\n\n/**\n * Class definition\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n this._addEventListeners();\n }\n\n // Getters\n static get Default() {\n return Default$6;\n }\n static get DefaultType() {\n return DefaultType$6;\n }\n static get NAME() {\n return NAME$7;\n }\n\n // Public\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {\n relatedTarget\n });\n if (showEvent.defaultPrevented) {\n return;\n }\n this._isShown = true;\n this._isTransitioning = true;\n this._scrollBar.hide();\n document.body.classList.add(CLASS_NAME_OPEN);\n this._adjustDialog();\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n if (hideEvent.defaultPrevented) {\n return;\n }\n this._isShown = false;\n this._isTransitioning = true;\n this._focustrap.deactivate();\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n dispose() {\n EventHandler.off(window, EVENT_KEY$4);\n EventHandler.off(this._dialog, EVENT_KEY$4);\n this._backdrop.dispose();\n this._focustrap.deactivate();\n super.dispose();\n }\n handleUpdate() {\n this._adjustDialog();\n }\n\n // Private\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n this._element.style.display = 'block';\n this._element.removeAttribute('aria-hidden');\n this._element.setAttribute('aria-modal', true);\n this._element.setAttribute('role', 'dialog');\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n reflow(this._element);\n this._element.classList.add(CLASS_NAME_SHOW$4);\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$4, {\n relatedTarget\n });\n };\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (event.key !== ESCAPE_KEY$1) {\n return;\n }\n if (this._config.keyboard) {\n this.hide();\n return;\n }\n this._triggerBackdropTransition();\n });\n EventHandler.on(window, EVENT_RESIZE$1, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n if (this._element !== event.target || this._element !== event2.target) {\n return;\n }\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n return;\n }\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n _hideModal() {\n this._element.style.display = 'none';\n this._element.setAttribute('aria-hidden', true);\n this._element.removeAttribute('aria-modal');\n this._element.removeAttribute('role');\n this._isTransitioning = false;\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n this._resetAdjustments();\n this._scrollBar.reset();\n EventHandler.trigger(this._element, EVENT_HIDDEN$4);\n });\n }\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);\n if (hideEvent.defaultPrevented) {\n return;\n }\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY;\n // return if the following background transition hasn't yet completed\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n this._element.classList.add(CLASS_NAME_STATIC);\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n this._element.focus();\n }\n\n /**\n * The following methods are used to handle overflowing modals\n */\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const scrollbarWidth = this._scrollBar.getWidth();\n const isBodyOverflowing = scrollbarWidth > 0;\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n }\n\n // Static\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n if (typeof config !== 'string') {\n return;\n }\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config](relatedTarget);\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = SelectorEngine.getElementFromSelector(this);\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n EventHandler.one(target, EVENT_SHOW$4, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n EventHandler.one(target, EVENT_HIDDEN$4, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n });\n\n // avoid conflict when clicking modal toggler while another one is open\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n});\nenableDismissTrigger(Modal);\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Modal);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$6 = 'offcanvas';\nconst DATA_KEY$3 = 'bs.offcanvas';\nconst EVENT_KEY$3 = `.${DATA_KEY$3}`;\nconst DATA_API_KEY$1 = '.data-api';\nconst EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;\nconst ESCAPE_KEY = 'Escape';\nconst CLASS_NAME_SHOW$3 = 'show';\nconst CLASS_NAME_SHOWING$1 = 'showing';\nconst CLASS_NAME_HIDING = 'hiding';\nconst CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\nconst OPEN_SELECTOR = '.offcanvas.show';\nconst EVENT_SHOW$3 = `show${EVENT_KEY$3}`;\nconst EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;\nconst EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;\nconst EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;\nconst EVENT_RESIZE = `resize${EVENT_KEY$3}`;\nconst EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;\nconst SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\nconst Default$5 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n};\nconst DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n};\n\n/**\n * Class definition\n */\n\nclass Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._addEventListeners();\n }\n\n // Getters\n static get Default() {\n return Default$5;\n }\n static get DefaultType() {\n return DefaultType$5;\n }\n static get NAME() {\n return NAME$6;\n }\n\n // Public\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n if (showEvent.defaultPrevented) {\n return;\n }\n this._isShown = true;\n this._backdrop.show();\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n this._element.setAttribute('aria-modal', true);\n this._element.setAttribute('role', 'dialog');\n this._element.classList.add(CLASS_NAME_SHOWING$1);\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n this._element.classList.add(CLASS_NAME_SHOW$3);\n this._element.classList.remove(CLASS_NAME_SHOWING$1);\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n this._queueCallback(completeCallBack, this._element, true);\n }\n hide() {\n if (!this._isShown) {\n return;\n }\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n if (hideEvent.defaultPrevented) {\n return;\n }\n this._focustrap.deactivate();\n this._element.blur();\n this._isShown = false;\n this._element.classList.add(CLASS_NAME_HIDING);\n this._backdrop.hide();\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);\n this._element.removeAttribute('aria-modal');\n this._element.removeAttribute('role');\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n };\n this._queueCallback(completeCallback, this._element, true);\n }\n dispose() {\n this._backdrop.dispose();\n this._focustrap.deactivate();\n super.dispose();\n }\n\n // Private\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n this.hide();\n };\n\n // 'static' option will be translated to true, and booleans will keep their value\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n if (this._config.keyboard) {\n this.hide();\n return;\n }\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n });\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n if (typeof config !== 'string') {\n return;\n }\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config](this);\n });\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = SelectorEngine.getElementFromSelector(this);\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n if (isDisabled(this)) {\n return;\n }\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n });\n\n // avoid conflict when clicking a toggler of an offcanvas, while another is open\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n});\nEventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n});\nEventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n});\nenableDismissTrigger(Offcanvas);\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Offcanvas);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n// js-docs-start allow-list\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\nconst DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n};\n// js-docs-end allow-list\n\nconst uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38\n */\n// eslint-disable-next-line unicorn/better-regex\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));\n }\n return true;\n }\n\n // Check if a regular expression validates the attribute.\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));\n};\nfunction sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml);\n }\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase();\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n }\n }\n return createdDocument.body.innerHTML;\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$5 = 'TemplateFactory';\nconst Default$4 = {\n allowList: DefaultAllowlist,\n content: {},\n // { selector : text , selector2 : text2 , }\n extraClass: '',\n html: false,\n sanitize: true,\n sanitizeFn: null,\n template: '
'\n};\nconst DefaultType$4 = {\n allowList: 'object',\n content: 'object',\n extraClass: '(string|function)',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n template: 'string'\n};\nconst DefaultContentType = {\n entry: '(string|element|function|null)',\n selector: '(string|element)'\n};\n\n/**\n * Class definition\n */\n\nclass TemplateFactory extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n }\n\n // Getters\n static get Default() {\n return Default$4;\n }\n static get DefaultType() {\n return DefaultType$4;\n }\n static get NAME() {\n return NAME$5;\n }\n\n // Public\n getContent() {\n return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);\n }\n hasContent() {\n return this.getContent().length > 0;\n }\n changeContent(content) {\n this._checkContent(content);\n this._config.content = {\n ...this._config.content,\n ...content\n };\n return this;\n }\n toHtml() {\n const templateWrapper = document.createElement('div');\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template);\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector);\n }\n const template = templateWrapper.children[0];\n const extraClass = this._resolvePossibleFunction(this._config.extraClass);\n if (extraClass) {\n template.classList.add(...extraClass.split(' '));\n }\n return template;\n }\n\n // Private\n _typeCheckConfig(config) {\n super._typeCheckConfig(config);\n this._checkContent(config.content);\n }\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({\n selector,\n entry: content\n }, DefaultContentType);\n }\n }\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n if (!templateElement) {\n return;\n }\n content = this._resolvePossibleFunction(content);\n if (!content) {\n templateElement.remove();\n return;\n }\n if (isElement(content)) {\n this._putElementInTemplate(getElement(content), templateElement);\n return;\n }\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content);\n return;\n }\n templateElement.textContent = content;\n }\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;\n }\n _resolvePossibleFunction(arg) {\n return execute(arg, [this]);\n }\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = '';\n templateElement.append(element);\n return;\n }\n templateElement.textContent = element.textContent;\n }\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$4 = 'tooltip';\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\nconst CLASS_NAME_FADE$2 = 'fade';\nconst CLASS_NAME_MODAL = 'modal';\nconst CLASS_NAME_SHOW$2 = 'show';\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\nconst EVENT_MODAL_HIDE = 'hide.bs.modal';\nconst TRIGGER_HOVER = 'hover';\nconst TRIGGER_FOCUS = 'focus';\nconst TRIGGER_CLICK = 'click';\nconst TRIGGER_MANUAL = 'manual';\nconst EVENT_HIDE$2 = 'hide';\nconst EVENT_HIDDEN$2 = 'hidden';\nconst EVENT_SHOW$2 = 'show';\nconst EVENT_SHOWN$2 = 'shown';\nconst EVENT_INSERTED = 'inserted';\nconst EVENT_CLICK$1 = 'click';\nconst EVENT_FOCUSIN$1 = 'focusin';\nconst EVENT_FOCUSOUT$1 = 'focusout';\nconst EVENT_MOUSEENTER = 'mouseenter';\nconst EVENT_MOUSELEAVE = 'mouseleave';\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n};\nconst Default$3 = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 6],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '
' + '
' + '
' + '
',\n title: '',\n trigger: 'hover focus'\n};\nconst DefaultType$3 = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n};\n\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n super(element, config);\n\n // Private\n this._isEnabled = true;\n this._timeout = 0;\n this._isHovered = null;\n this._activeTrigger = {};\n this._popper = null;\n this._templateFactory = null;\n this._newContent = null;\n\n // Protected\n this.tip = null;\n this._setListeners();\n if (!this._config.selector) {\n this._fixTitle();\n }\n }\n\n // Getters\n static get Default() {\n return Default$3;\n }\n static get DefaultType() {\n return DefaultType$3;\n }\n static get NAME() {\n return NAME$4;\n }\n\n // Public\n enable() {\n this._isEnabled = true;\n }\n disable() {\n this._isEnabled = false;\n }\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n toggle() {\n if (!this._isEnabled) {\n return;\n }\n this._activeTrigger.click = !this._activeTrigger.click;\n if (this._isShown()) {\n this._leave();\n return;\n }\n this._enter();\n }\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n if (this._element.getAttribute('data-bs-original-title')) {\n this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));\n }\n this._disposePopper();\n super.dispose();\n }\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n if (!(this._isWithContent() && this._isEnabled)) {\n return;\n }\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));\n const shadowRoot = findShadowRoot(this._element);\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n }\n\n // TODO: v6 remove this or make it optional\n this._disposePopper();\n const tip = this._getTipElement();\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'));\n const {\n container\n } = this._config;\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));\n }\n this._popper = this._createPopper(tip);\n tip.classList.add(CLASS_NAME_SHOW$2);\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));\n if (this._isHovered === false) {\n this._leave();\n }\n this._isHovered = false;\n };\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n hide() {\n if (!this._isShown()) {\n return;\n }\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));\n if (hideEvent.defaultPrevented) {\n return;\n }\n const tip = this._getTipElement();\n tip.classList.remove(CLASS_NAME_SHOW$2);\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n this._isHovered = null; // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n if (!this._isHovered) {\n this._disposePopper();\n }\n this._element.removeAttribute('aria-describedby');\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));\n };\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n update() {\n if (this._popper) {\n this._popper.update();\n }\n }\n\n // Protected\n _isWithContent() {\n return Boolean(this._getTitle());\n }\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());\n }\n return this.tip;\n }\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml();\n\n // TODO: remove this check in v6\n if (!tip) {\n return null;\n }\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);\n // TODO: v6 the following can be achieved with CSS only\n tip.classList.add(`bs-${this.constructor.NAME}-auto`);\n const tipId = getUID(this.constructor.NAME).toString();\n tip.setAttribute('id', tipId);\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n return tip;\n }\n setContent(content) {\n this._newContent = content;\n if (this._isShown()) {\n this._disposePopper();\n this.show();\n }\n }\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content);\n } else {\n this._templateFactory = new TemplateFactory({\n ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n });\n }\n return this._templateFactory;\n }\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n };\n }\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');\n }\n\n // Private\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n _isAnimated() {\n return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);\n }\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);\n }\n _createPopper(tip) {\n const placement = execute(this._config.placement, [this, tip, this._element]);\n const attachment = AttachmentMap[placement.toUpperCase()];\n return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n _getOffset() {\n const {\n offset\n } = this._config;\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n return offset;\n }\n _resolvePossibleFunction(arg) {\n return execute(arg, [this._element]);\n }\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement);\n }\n }]\n };\n return {\n ...defaultBsPopperConfig,\n ...execute(this._config.popperConfig, [defaultBsPopperConfig])\n };\n }\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n context.toggle();\n });\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n context._enter();\n });\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n context._leave();\n });\n }\n }\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n }\n _fixTitle() {\n const title = this._element.getAttribute('title');\n if (!title) {\n return;\n }\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title);\n }\n this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility\n this._element.removeAttribute('title');\n }\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true;\n return;\n }\n this._isHovered = true;\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show();\n }\n }, this._config.delay.show);\n }\n _leave() {\n if (this._isWithActiveTrigger()) {\n return;\n }\n this._isHovered = false;\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide();\n }\n }, this._config.delay.hide);\n }\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(handler, timeout);\n }\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true);\n }\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute];\n }\n }\n config = {\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n this._typeCheckConfig(config);\n return config;\n }\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container);\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n return config;\n }\n _getDelegateConfig() {\n const config = {};\n for (const [key, value] of Object.entries(this._config)) {\n if (this.constructor.Default[key] !== value) {\n config[key] = value;\n }\n }\n config.selector = false;\n config.trigger = 'manual';\n\n // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n return config;\n }\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n this._popper = null;\n }\n if (this.tip) {\n this.tip.remove();\n this.tip = null;\n }\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n if (typeof config !== 'string') {\n return;\n }\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config]();\n });\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tooltip);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$3 = 'popover';\nconst SELECTOR_TITLE = '.popover-header';\nconst SELECTOR_CONTENT = '.popover-body';\nconst Default$2 = {\n ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '
' + '
' + '

' + '
' + '
',\n trigger: 'click'\n};\nconst DefaultType$2 = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n};\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n static get DefaultType() {\n return DefaultType$2;\n }\n static get NAME() {\n return NAME$3;\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent();\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n };\n }\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n if (typeof config !== 'string') {\n return;\n }\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n data[config]();\n });\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n\n/**\n * Constants\n */\n\nconst NAME$2 = 'scrollspy';\nconst DATA_KEY$2 = 'bs.scrollspy';\nconst EVENT_KEY$2 = `.${DATA_KEY$2}`;\nconst DATA_API_KEY = '.data-api';\nconst EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\nconst EVENT_CLICK = `click${EVENT_KEY$2}`;\nconst EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\nconst CLASS_NAME_ACTIVE$1 = 'active';\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\nconst SELECTOR_TARGET_LINKS = '[href]';\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\nconst SELECTOR_NAV_LINKS = '.nav-link';\nconst SELECTOR_NAV_ITEMS = '.nav-item';\nconst SELECTOR_LIST_ITEMS = '.list-group-item';\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;\nconst SELECTOR_DROPDOWN = '.dropdown';\nconst SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\nconst Default$1 = {\n offset: null,\n // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n};\nconst DefaultType$1 = {\n offset: '(number|null)',\n // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n};\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n\n // this._element is the observablesContainer and config.target the menu links wrapper\n this._targetLinks = new Map();\n this._observableSections = new Map();\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;\n this._activeTarget = null;\n this._observer = null;\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n };\n this.refresh(); // initialize\n }\n\n // Getters\n static get Default() {\n return Default$1;\n }\n static get DefaultType() {\n return DefaultType$1;\n }\n static get NAME() {\n return NAME$2;\n }\n\n // Public\n refresh() {\n this._initializeTargetsAndObservables();\n this._maybeEnableSmoothScroll();\n if (this._observer) {\n this._observer.disconnect();\n } else {\n this._observer = this._getNewObserver();\n }\n for (const section of this._observableSections.values()) {\n this._observer.observe(section);\n }\n }\n dispose() {\n this._observer.disconnect();\n super.dispose();\n }\n\n // Private\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body;\n\n // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));\n }\n return config;\n }\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return;\n }\n\n // unregister any previous listeners\n EventHandler.off(this._config.target, EVENT_CLICK);\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash);\n if (observableSection) {\n event.preventDefault();\n const root = this._rootElement || window;\n const height = observableSection.offsetTop - this._element.offsetTop;\n if (root.scrollTo) {\n root.scrollTo({\n top: height,\n behavior: 'smooth'\n });\n return;\n }\n\n // Chrome 60 doesn't support `scrollTo`\n root.scrollTop = height;\n }\n });\n }\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n };\n return new IntersectionObserver(entries => this._observerCallback(entries), options);\n }\n\n // The logic of selection\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop;\n this._process(targetElement(entry));\n };\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;\n this._previousScrollData.parentScrollTop = parentScrollTop;\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null;\n this._clearActiveClass(targetElement(entry));\n continue;\n }\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;\n // if we are scrolling down, pick the bigger offsetTop\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry);\n // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n if (!parentScrollTop) {\n return;\n }\n continue;\n }\n\n // if we are scrolling up, pick the smallest offsetTop\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry);\n }\n }\n }\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map();\n this._observableSections = new Map();\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue;\n }\n const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);\n\n // ensure that the observableSection exists & is visible\n if (isVisible(observableSection)) {\n this._targetLinks.set(decodeURI(anchor.hash), anchor);\n this._observableSections.set(anchor.hash, observableSection);\n }\n }\n }\n _process(target) {\n if (this._activeTarget === target) {\n return;\n }\n this._clearActiveClass(this._config.target);\n this._activeTarget = target;\n target.classList.add(CLASS_NAME_ACTIVE$1);\n this._activateParents(target);\n EventHandler.trigger(this._element, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);\n return;\n }\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both
    and