.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/materials/fatigue/plot_03_palmgren_miner.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_fatigue_plot_03_palmgren_miner.py: Palmgren and Miner's cumulative damage (1945) ============================================= Real loads vary in amplitude. Arvid Palmgren (1924), estimating the lives of ball bearings, assumed that each cycle at amplitude :math:`\sigma_i` uses up a fraction :math:`1/N_i` of the life, and Milton Miner (1945) confirmed the rule on riveted aluminium joints for aircraft: failure comes when :math:`D = \sum n_i/N_i` reaches 1 (:func:`~engineeringkit.materials.miner_damage`). The example applies it to a block load spectrum and reduces the spectrum to one equivalent amplitude. .. GENERATED FROM PYTHON SOURCE LINES 15-20 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.materials import basquin_cycles, miner_damage .. GENERATED FROM PYTHON SOURCE LINES 21-27 A load spectrum --------------- One block of service is 10,000 cycles: a few large ones and many small. The S-N curve gives the life at each amplitude; the block's damage is the sum of the fractions. .. GENERATED FROM PYTHON SOURCE LINES 27-37 .. code-block:: Python sigma_f, b = 900e6, -0.09 amplitude = np.array([450e6, 380e6, 320e6, 260e6]) per_block = np.array([20.0, 300.0, 2680.0, 7000.0]) lives = basquin_cycles(amplitude, sigma_f, b) damage = miner_damage(per_block, lives) print(f"damage per block {damage:.4f}; life {1 / damage:.1f} blocks = {per_block.sum() / damage:.3g} cycles") for s, n, N in zip(amplitude, per_block, lives): print(f" {s / 1e6:.0f} MPa: {n:6.0f} cycles of {N:9.3g} -> {100 * n / N / damage:4.1f}% of the damage") .. rst-class:: sphx-glr-script-out .. code-block:: none damage per block 0.1287; life 7.8 blocks = 7.77e+04 cycles 450 MPa: 20 cycles of 1.11e+03 -> 14.1% of the damage 380 MPa: 300 cycles of 7.24e+03 -> 32.2% of the damage 320 MPa: 2680 cycles of 4.89e+04 -> 42.6% of the damage 260 MPa: 7000 cycles of 4.91e+05 -> 11.1% of the damage .. GENERATED FROM PYTHON SOURCE LINES 38-47 The equivalent constant amplitude --------------------------------- With Basquin's law the damage of a cycle grows as :math:`\sigma^{k}`, :math:`k = -1/b`. The whole spectrum then does the same damage as :math:`\sum n_i` cycles at :math:`\sigma_{eq} = (\sum n_i\sigma_i^k / \sum n_i)^{1/k}`. Miner's sum ignores the order: high-low and low-high sequences give the same answer, although tests show high-low is usually worse. .. GENERATED FROM PYTHON SOURCE LINES 47-61 .. code-block:: Python k = -1 / b sigma_eq = (np.sum(per_block * amplitude**k) / per_block.sum()) ** (1 / k) equivalent = miner_damage([per_block.sum()], [basquin_cycles(sigma_eq, sigma_f, b)]) print(f"equivalent amplitude {sigma_eq / 1e6:.1f} MPa") assert np.isclose(equivalent, damage) assert np.isclose(miner_damage(per_block[::-1], lives[::-1]), damage) fig, ax = plt.subplots(figsize=(6, 3.8)) ax.bar([f"{s / 1e6:.0f}" for s in amplitude], per_block / lives / damage) ax.set(xlabel="stress amplitude [MPa]", ylabel="share of damage", title=f"Damage per block, equivalent amplitude {sigma_eq / 1e6:.0f} MPa") fig.tight_layout() plt.show() .. image-sg:: /api/gallery/materials/fatigue/images/sphx_glr_plot_03_palmgren_miner_001.png :alt: Damage per block, equivalent amplitude 307 MPa :srcset: /api/gallery/materials/fatigue/images/sphx_glr_plot_03_palmgren_miner_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none equivalent amplitude 306.9 MPa .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.026 seconds) .. _sphx_glr_download_api_gallery_materials_fatigue_plot_03_palmgren_miner.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/fatigue/plot_03_palmgren_miner.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_palmgren_miner.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_palmgren_miner.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_palmgren_miner.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_