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.4.tar.gz (8.6 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.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypfd-2026.0.0.4.tar.gz
  • Upload date:
  • Size: 8.6 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.4.tar.gz
Algorithm Hash digest
SHA256 f8c448acbaa9790fc84f22505b2c72bd1d9e57e1f56ee5029baa7c9f50cd5dce
MD5 a6ffaded5886f371487a107769376e65
BLAKE2b-256 1874fa4e908a986513900d6e56f65a87b845ae0b340790ef7f23af12ee0a3e8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypfd-2026.0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c097c7cff98b5f33555d0c9f3fe80417abdbd2572dc39263d96226ce2efdbe52
MD5 5c50cc0d11c1b483bdb3379c97a07e45
BLAKE2b-256 20c795cee9f3adf331e9ceed7f3574224e35c3eb08ce45c4c9728e63822c4d3a

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