class_failure_rate_calculation.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 
6  PHM Gui Failure Rate Calculation Class
7 
8 """
9 
11  """
12  Failure Rate Calculation Class
13  """
14  @classmethod
15  def failure_rate_calculation_using_operating_load_func(cls, failure_rate, p_value, p_0):
16  """
17  λ = λ0 * (P / P0) ^ 3
18  """
19  result = float(failure_rate * pow(float(p_value / p_0), 3))
20 
21  return result
22 
23  @classmethod
24  def failure_rate_calculation_using_temperature_func(cls, failure_rate, temperature_value, t_0):
25  """
26  λ = λ0 * (2 ^ ((T - T0) / 10))
27  """
28  result = float(float(failure_rate) * pow(2, float(float(temperature_value - t_0) / 10)))
29 
30  return result
31 
32  @classmethod
33  def failure_rate_calculation_using_operating_load_and_temperature_func(cls, failure_rate, p_value, p_0, temperature_value, t_0):
34  """
35  λ = λ0 * ((P / P0) ^ 3) * (2 ^ ((T - T0) / 10))
36  """
37  result = float(failure_rate * pow((p_value / p_0), 3) * pow(2, float(float(temperature_value - t_0) / 10)))
38 
39  return result
40 
41  @classmethod
43  """
44  Calculation of serial failure rate list
45  """
46  failure_rate_of_serial_value = 0.0
47 
48  if serial_fr_list:
49  for item in serial_fr_list:
50  if float(item) != 0.0 and str(item) != "None":
51  failure_rate_of_serial_value += float(item)
52 
53  return float(failure_rate_of_serial_value)
54 
55 
56  def component_parallel_failure_rate_calculation(self, parallel_fr_list):
57  """
58  Calculation of parallel failure rate list
59  """
60  failure_rate_of_parallel_value = float(0.0)
61  result = 0.0
62 
63  if parallel_fr_list:
64  for item in parallel_fr_list:
65  if float(item) != 0.0 and str(item) != "None":
66  failure_rate_of_parallel_value += float(item)
67 
68  result = float(failure_rate_of_parallel_value) * float(self.parallel_count_calculate_func(len(parallel_fr_list)))
69 
70  else:
71  result = float(failure_rate_of_parallel_value)
72 
73  return float(result)
74 
75  @classmethod
76  def parallel_count_calculate_func(cls, parallel_count):
77  """
78  Calculation of parallel element count
79  """
80  if parallel_count == 0:
81  result = 1
82 
83  else:
84  count = float(0.0)
85 
86  for number in range(int(parallel_count)):
87  count += float(1 / (float(number) + 1))
88 
89  result = pow(count, (-1))
90 
91  return result
def failure_rate_calculation_using_operating_load_and_temperature_func(cls, failure_rate, p_value, p_0, temperature_value, t_0)


phm_hazard_rate_calculation
Author(s):
autogenerated on Thu Aug 13 2020 16:41:45