.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/Yield_surfaces.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_Yield_surfaces.py: =========================================================== Plot the Tresca hexagon and the von Mises ellipse =========================================================== We plot the elastic domain, with respect to the von Mises and Tresca criteria, on one single Matplotlib axis. .. note:: This somehow replicates the figure shown on wikipedia to illustrate the difference between those criteria (see `here `_). .. GENERATED FROM PYTHON SOURCE LINES 14-25 .. image-sg:: /auto_examples/images/sphx_glr_Yield_surfaces_001.png :alt: Yield surfaces :srcset: /auto_examples/images/sphx_glr_Yield_surfaces_001.png :class: sphx-glr-single-img .. code-block:: Python from elasticipy.yield_criteria import VonMisesCriterion, TrescaCriterion sigma_y = 100 # yield stress mises = VonMisesCriterion(yield_stress=sigma_y) tresca = TrescaCriterion(yield_stress=sigma_y) fig, ax = mises.plot2D() fig, ax = tresca.plot2D(fig=fig, ax=ax, color='blue') ax.legend() fig.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.543 seconds) .. _sphx_glr_download_auto_examples_Yield_surfaces.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Yield_surfaces.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Yield_surfaces.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Yield_surfaces.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_