.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/structural_engineering/stability/plot_04_johnson_parabola.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_structural_engineering_stability_plot_04_johnson_parabola.py: Johnson's parabola (1893) ========================= Euler's hyperbola overestimates the strength of stocky columns, which yield or buckle inelastically, and tests scattered below it. J. B. Johnson and his co-authors, in *The Theory and Practice of Modern Framed Structures* (1893), fitted a parabola that starts at the yield stress and meets Euler's curve tangentially at half of it (:func:`~engineeringkit.structural_engineering.johnson_critical_stress`), at the transition slenderness :math:`C_c = \sqrt{2\pi^2E/\sigma_y}`. The AISC column formula used the same parabola for decades. End conditions enter through the effective length :math:`KL` (:func:`~engineeringkit.structural_engineering.effective_length_factor`). The example draws the design curve and checks that the two branches meet with the same slope. .. GENERATED FROM PYTHON SOURCE LINES 20-25 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.structural_engineering import effective_length_factor, johnson_critical_stress .. GENERATED FROM PYTHON SOURCE LINES 26-28 The design curve ---------------- .. GENERATED FROM PYTHON SOURCE LINES 28-47 .. code-block:: Python E, sy = 200e9, 250e6 Cc = np.sqrt(2 * np.pi**2 * E / sy) slenderness = np.linspace(1, 250, 500) sigma = johnson_critical_stress(sy, E, slenderness) print(f"transition slenderness Cc = {Cc:.1f}, where the critical stress is {johnson_critical_stress(sy, E, Cc) / 1e6:.0f} MPa") h = 1e-4 left = (johnson_critical_stress(sy, E, Cc - h) - johnson_critical_stress(sy, E, Cc - 2 * h)) / h right = (johnson_critical_stress(sy, E, Cc + 2 * h) - johnson_critical_stress(sy, E, Cc + h)) / h assert np.isclose(left, right, rtol=1e-4) fig, ax = plt.subplots(figsize=(6, 4)) ax.plot(slenderness, sigma / 1e6, label="Johnson + Euler") ax.plot(slenderness, np.pi**2 * E / slenderness**2 / 1e6, "--", label="Euler alone") ax.axvline(Cc, color="gray", lw=0.5) ax.set(xlabel="slenderness KL/r", ylabel="critical stress [MPa]", ylim=(0, 300)) ax.legend() fig.tight_layout() .. image-sg:: /api/gallery/structural_engineering/stability/images/sphx_glr_plot_04_johnson_parabola_001.png :alt: plot 04 johnson parabola :srcset: /api/gallery/structural_engineering/stability/images/sphx_glr_plot_04_johnson_parabola_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none transition slenderness Cc = 125.7, where the critical stress is 125 MPa .. GENERATED FROM PYTHON SOURCE LINES 48-50 The same strut with four end conditions --------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 50-58 .. code-block:: Python L, r = 3.0, 0.03 for ends in ("fixed-fixed", "fixed-pinned", "pinned-pinned", "fixed-free"): K = effective_length_factor(ends) print(f"{ends:14s} K = {K:.3f} KL/r = {K * L / r:6.1f} sigma_cr = {johnson_critical_stress(sy, E, K * L / r) / 1e6:6.1f} MPa") assert np.isclose(np.tan(np.pi / effective_length_factor("fixed-pinned")), np.pi / effective_length_factor("fixed-pinned")) plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none fixed-fixed K = 0.500 KL/r = 50.0 sigma_cr = 230.2 MPa fixed-pinned K = 0.699 KL/r = 69.9 sigma_cr = 211.3 MPa pinned-pinned K = 1.000 KL/r = 100.0 sigma_cr = 170.8 MPa fixed-free K = 2.000 KL/r = 200.0 sigma_cr = 49.3 MPa .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.084 seconds) .. _sphx_glr_download_api_gallery_structural_engineering_stability_plot_04_johnson_parabola.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/structural_engineering/stability/plot_04_johnson_parabola.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_johnson_parabola.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_johnson_parabola.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_johnson_parabola.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_