.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/materials/plot_materials_models.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 or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_materials_plot_materials_models.py: Voigt and Reuss composite bounds ================================ Compute an inspectable engineering model using SI inputs. See the linked domain guide for assumptions and benchmark checks. .. GENERATED FROM PYTHON SOURCE LINES 8-24 .. image-sg:: /api/gallery/materials/images/sphx_glr_plot_materials_models_001.png :alt: plot materials models :srcset: /api/gallery/materials/images/sphx_glr_plot_materials_models_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.materials import rule_of_mixtures_E_longitudinal, rule_of_mixtures_E_transverse fraction = np.linspace(0, 1, 101) upper = [rule_of_mixtures_E_longitudinal(200e9, 3e9, f) / 1e9 for f in fraction] lower = [rule_of_mixtures_E_transverse(200e9, 3e9, f) / 1e9 for f in fraction] fig, ax = plt.subplots() ax.plot(fraction, upper, label="longitudinal / Voigt") ax.plot(fraction, lower, label="transverse / Reuss") ax.set(xlabel="fibre volume fraction", ylabel="modulus [GPa]") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.086 seconds) .. _sphx_glr_download_api_gallery_materials_plot_materials_models.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../lite/lab/index.html?path=api/gallery/materials/plot_materials_models.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_materials_models.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_materials_models.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_materials_models.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_