How to convert MTTF to PFH in Python using UliEngineering

You can easily convert MTTF (Mean Time To Failure) to PFH (Probability of Failure per Hour) using the UliEngineering Python library:

MTTF_to_PFH.py
from UliEngineering.Reliability.Conversion import *
from UliEngineering.EngineerIO import *

# Convert 1,000,000 hours to PFH
pfh = MTTF_to_PFH("1000000h")
print(f"1,000,000 h = {pfh:.2e} PFH")

# Convert 100,000 hours to PFH
pfh = MTTF_to_PFH("100000h")
print(f"100,000 h = {pfh:.2e} PFH")

Example output

MTTF_to_PFH_output.txt
1,000,000 h = 1.00e-06 PFH
100,000 h = 1.00e-05 PFH

PFH is the probability of failure per hour. The conversion uses the formula: $PFH = \frac{1}{MTTF}$.


Check out similar posts by category: Reliability, Python