.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/Normality_rule.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_auto_examples_Normality_rule.py: ============================================================== Illustrate the normality rule in the principle stresses space ============================================================== The example shows how to illustrate the normality rule based on the 3D representation the yield surface .. GENERATED FROM PYTHON SOURCE LINES 10-12 Plot the yield surface ---------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 12-16 .. code-block:: Python from elasticipy.yield_criteria import MohrCoulomb mc = MohrCoulomb(2, -20) fig=mc.plot3D(xrange=(-6, 6), yrange=(-6, 6), zrange=(-6, 6)) .. GENERATED FROM PYTHON SOURCE LINES 17-19 Plot the surface normals ---------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 19-31 .. code-block:: Python from elasticipy.tensors.stress_strain import StressTensor tensile_stress_x = StressTensor.tensile([1,0,0], 1) tensile_stress_y = StressTensor.tensile([0,1,0], 1) biaxial_tension = tensile_stress_x + tensile_stress_y tension_compress = tensile_stress_x - tensile_stress_y fig = mc.draw_surface_normal(fig, tensile_stress_x, color='black', auto_scale=True, label='Tensile x') fig = mc.draw_surface_normal(fig, tensile_stress_y, color='gray', auto_scale=True, label='Tensile y') fig = mc.draw_surface_normal(fig, biaxial_tension, color='blue', auto_scale=True, label='Biaxial tension') mc.draw_surface_normal(fig, tension_compress, color='green', auto_scale=True, label='Tensile/compression') .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 32-35 .. Notes:: The `auto_scale=True` option automatically scales the provided stress so that the yield surface is reached. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.796 seconds) .. _sphx_glr_download_auto_examples_Normality_rule.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Normality_rule.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Normality_rule.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Normality_rule.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_