Skip to main content

PFDavg calculation

Project description

Introduction

PyPFD is a Python library designed to calculate the Probability of Failure on Demand (PFD) in accordance with the international safety standards IEC 61508 and IEC 61511. It provides a way to estimate the reliability of Safety Devices, making it easier for engineers and safety professionals to perform consistent SIS assessments.

It allows you to evaluate PFDavg for various architectures (1oo1, 1oo2, 2oo2, 2oo3, 1oo3, and KooN using a general formula).

The library provides the following formulas:

PyPFDRBDAvg:

pfd_RBD_avg_1oo1(λ_du, λ_dd, T1_month, MTTR)

pfd_RBD_avg_1oo1_pt(λ_du, λ_dd, T1_month, T2_month, PDC, MTTR)

pfd_RBD_avg_1oo2(λ_du, λ_dd, β, βd, T1_month, MTTR)

pfd_RBD_avg_1oo2_pt(λ_du, λ_dd, β, βd, T1_month, T2_month, PDC, MTTR)

pfd_RBD_avg_1oo3(λ_du, λ_dd, β, βd, T1_month, MTTR)

pfd_RBD_avg_2oo2(λ_du, λ_dd, T1_month, MTTR)

pfd_RBD_avg_2oo2_pt(λ_du, λ_dd, T1_month, T2_month, PDC, MTTR)

pfd_RBD_avg_2oo3(λ_du, λ_dd, β, βd, T1_month, MTTR)

pfd_RBD_avg_KooN(K, N, λ_du, λ_dd, β, βd, T1_month, MTTR)

PyPFDMarkov:

pfd_Mkv_avg_1oo1_2pt(λ_du: float,λ_dd: float,λ_s: float,T_pt1_month: float,T_pt2_month: float,T1_month: float,PDC1: float,PDC2: float,MTTR: float)

pfd_Mkv_avg_1oo2(λ_du: float,λ_dd: float,λ_su: float,λ_sd: float,β:float, βd:float,T1_month: float,MTTR:float)

pfd_plot_Mkv_avg_1oo1_2pt(λ_du: float,λ_dd: float,λ_s: float,T_pt1_month: float,T_pt2_month: float,T1_month: float,PDC1: float,PDC2: float,MTTR: float,interval:int)

pfd_plot_Mkv_avg_1oo2(λ_du: float,λ_dd: float,λ_su: float,λ_sd: float,β:float, βd:float,T1_month: float,MTTR:float,interval:int)

PyPFDN2595:

pfd_N2595_avg_MooN(M:int,N:int,λ_du:float,λ_dd:float,β:float,T1_month:float,MTTR:float) -> float:

pfd_N2595_avg_1oo1_1pt(λ_du:float,λ_dd:float,PTC:float,TI_month:float,MT_month:float,MTTR:float) -> float:

pfd_N2595_avg_1oo2_1pt(λ_du:float,λ_dd:float,β:float,TI_month:float,MT_month:float,PTC:float,MTTR:float) -> float:

pfd_N2595_avg_2oo2_1pt(λ_du:float,λ_dd:float,PTC:float,TI_month:float,MT_month:float,MTTR:float) -> float:

pfd_N2595_avg_2oo3_1pt(λ_du:float,λ_dd:float,β:float,TI_month:float,MT_month:float,PTC:float,MTTR:float) -> float:

Parameters:

λ_du = dangerous undetected failure rate per hour

λ_dd = dangerous detected failure rate per hour

β = common cause for safe failure in %

βd = common cause for unsafe failure in %

T1_month = test interval in months (with PDC effectiveness)

T2_month or MT_month = test interval in months for "as good as new" condition

PDC = partial diagnostic coverage of the test (% capable of revealing dangerous undetected failures)

MTTR = mean time to repair

All formulas assume identical devices. For combinations of different devices or different test intervals, see the formulas below (currently in development and not validated yet):

def pfhKooN(K, N, λ_d, β, T1_month): def pfd_avg_1oo2_dif(λ_du1, λ_dd1, T1_month1, MTTR1, β1, βd1, λ_du2, λ_dd2, T1_month2, MTTR2, β2, βd2):

def pfd_avg_2oo3_dif(λ_du1, λ_dd1, T1_month1, MTTR1, β1, βd1, λ_du2, λ_dd2, T1_month2, MTTR2, β2, βd2, λ_du3, λ_dd3, T1_month3, MTTR3, β3, βd3):

def pfd_avg_1oo3_dif(λ_du1, λ_dd1, T1_month1, MTTR1, β1, βd1, λ_du2, λ_dd2, T1_month2, MTTR2, β2, βd2, λ_du3, λ_dd3, T1_month3, MTTR3, β3, βd3):

Roadmap

-Test and validate all existing formulas.

-Create a GitHub repository explaining the logic behind the formulas.

-Develop default reliability data for common devices (Analog Transmitters, Valves, and Logic Solvers).

Highlights

-These formulas, combined with xlwings Lite in Excel, provide an efficient and user-friendly way to perform SIS assessments.

-If you need a specific architecture not present in the library, feel free to contact me for assistance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypfd-2026.0.0.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypfd-2026.0.0.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pypfd-2026.0.0.3.tar.gz.

File metadata

  • Download URL: pypfd-2026.0.0.3.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pypfd-2026.0.0.3.tar.gz
Algorithm Hash digest
SHA256 5d001f3844c1f962e339b83a12f7c24810b12bf2339bb6a48771dbc556e7a5b5
MD5 40aaf6c5d541b888b53600f37d1ba62b
BLAKE2b-256 c4885fa1a025dc94acca7fe466000d333ae3d8ffe0647ca0eff263edda1dc5f9

See more details on using hashes here.

File details

Details for the file pypfd-2026.0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pypfd-2026.0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pypfd-2026.0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d43b57a2816144734ce4b1931ab1288556fb8e6aa092715db66d709c952893ae
MD5 6ab788d6b132ff8bba5398d3ed3e5021
BLAKE2b-256 b6fdcf8295652727b7ecfc055b2e38591329bc36cbc8d023323b814ddc347042

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page