.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/reliability/risk/plot_04_mil_p_1629_fmea.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_reliability_risk_plot_04_mil_p_1629_fmea.py: MIL-P-1629's failure mode and effects analysis (1949) ===================================================== The US military procedure MIL-P-1629, *Procedures for Performing a Failure Mode, Effects and Criticality Analysis* (9 November 1949), asked designers to go through a system part by part, list each way the part can fail, trace the effect of each failure and classify it by its consequence for the mission and for safety. NASA used the method on Apollo, and the automotive industry later made it routine, ranking each mode by a *risk priority number*, severity times occurrence times detection, each scored from 1 to 10 (:func:`~engineeringkit.reliability.risk_priority_number`, :func:`~engineeringkit.reliability.fmea_ranking`). Where failure rates are known the military standard's criticality number :math:`C_m = \beta\alpha\lambda_p t` (:func:`~engineeringkit.reliability.failure_mode_criticality`) ranks modes by expected losses instead. .. GENERATED FROM PYTHON SOURCE LINES 21-26 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.reliability import failure_mode_criticality, fmea_ranking .. GENERATED FROM PYTHON SOURCE LINES 27-31 An FMEA of a centrifugal pump ----------------------------- (severity, occurrence, detection) for each failure mode. .. GENERATED FROM PYTHON SOURCE LINES 31-48 .. code-block:: Python modes = { "mechanical seal leak": (6, 6, 3), "bearing seizure": (8, 3, 5), "impeller erosion": (5, 4, 7), "motor winding short": (9, 2, 4), "coupling misalignment": (4, 5, 5), "cavitation": (5, 5, 6), "casing crack": (10, 1, 6), } fmea = fmea_ranking(modes) for name, s, o, d, rpn in zip(fmea.modes, fmea.severity, fmea.occurrence, fmea.detection, fmea.rpn): print(f"{name:22s} S={s:2d} O={o:2d} D={d:2d} RPN={rpn:4d}") fig, ax = fmea.plot() fig.set_size_inches(7, 4) fig.tight_layout() .. image-sg:: /api/gallery/reliability/risk/images/sphx_glr_plot_04_mil_p_1629_fmea_001.png :alt: FMEA Pareto chart :srcset: /api/gallery/reliability/risk/images/sphx_glr_plot_04_mil_p_1629_fmea_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none cavitation S= 5 O= 5 D= 6 RPN= 150 impeller erosion S= 5 O= 4 D= 7 RPN= 140 bearing seizure S= 8 O= 3 D= 5 RPN= 120 mechanical seal leak S= 6 O= 6 D= 3 RPN= 108 coupling misalignment S= 4 O= 5 D= 5 RPN= 100 motor winding short S= 9 O= 2 D= 4 RPN= 72 casing crack S=10 O= 1 D= 6 RPN= 60 .. GENERATED FROM PYTHON SOURCE LINES 49-54 What the RPN hides ------------------ The casing crack has the lowest RPN but a severity of 10. Because the scores are ordinal, a high severity is reviewed whatever its product. .. GENERATED FROM PYTHON SOURCE LINES 54-58 .. code-block:: Python critical = [name for name, s in zip(fmea.modes, fmea.severity) if s >= 9] print("modes reviewed for severity alone:", critical) .. rst-class:: sphx-glr-script-out .. code-block:: none modes reviewed for severity alone: ['motor winding short', 'casing crack'] .. GENERATED FROM PYTHON SOURCE LINES 59-65 Criticality numbers from failure rates -------------------------------------- The seal of a pump with :math:`\lambda_p` = 50 failures per million hours fails by leaking (60% of failures, of which 20% stop the mission) or by sudden rupture (40%, all of which stop it); the mission is 2000 h. .. GENERATED FROM PYTHON SOURCE LINES 65-74 .. code-block:: Python leak, rupture = failure_mode_criticality(np.array([0.6, 0.4]), np.array([0.2, 1.0]), 50e-6, 2000.0) print(f"criticality: leak {leak:.3f}, rupture {rupture:.3f} expected losses per mission") assert fmea.modes[0] == "cavitation" and fmea.rpn[0] == 150 assert "casing crack" in critical and fmea.modes[-1] == "casing crack" assert np.isclose(leak + rupture, 50e-6 * 2000 * (0.6 * 0.2 + 0.4)) plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none criticality: leak 0.012, rupture 0.040 expected losses per mission .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.165 seconds) .. _sphx_glr_download_api_gallery_reliability_risk_plot_04_mil_p_1629_fmea.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/reliability/risk/plot_04_mil_p_1629_fmea.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_mil_p_1629_fmea.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_mil_p_1629_fmea.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_mil_p_1629_fmea.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_