class_mechanical_equipment.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 
6  PHM Gui Mechanical Equipment Class
7 
8 """
9 
10 import math
11 
13  """
14  λM = (λM,B * CSF) + λWI + λBS + λST + λAS + λBE + λGR + λC
15 
16  λM = Total failure rate for the motor system, failures/million hours
17 
18  λM,B = Base failure rate of motor, failures/million hours
19 
20  CSF = Motor load service factor
21 
22  λWI = Failure rate of electric motor windings, failures/million hours
23 
24  λBS = Failure rate of brushes, 3.2 failures/million hours/brush
25 
26  λST = Failure rate of the stator housing, 0.001 failures/million hours
27 
28  λSH = Failure rate of the armature shaft, failures/million hours
29 
30  λBE = Failure rate of bearings, failures/million hours
31 
32  λGR = Failure rate of gears, failures/million hours
33 
34  λC = Failure rate of capacitor, failures/million hours
35  """
36 
37  def __init__(self):
38  # Private System Attribute
39  self.__lambda_sp = 0.0 # spring
40  self.__lambda_gr = 0.0 # gears
41  self.__lambda_be = 0.0 # bearing
42  self.__lambda_ac = 0.0 # actuator
43  self.__lambda_sh = 0.0 # shaft
45  self.__lambda_cp = 0.0 # mechanical coupling
46  self.__lambda_bat = 0.0 # battery
47 
48  self.__em_lambda_c = 0.0 # capacitor
49 
50  # Public System Attribute
51  self.lambda_m_b = 1.0
52  self.c_sf = 1.0
53 
54 # COMPONENTS' ATTRIBUTES - START -
55  # SPRING ATTRIBUTES - START -
56  self.sp_lambda_sp_b = 23.8
57  self.sp_c_g = 1.0
58  self.sp_c_y = 1.0
59  self.sp_c_m = 1.0
60  self.sp_c_r = 1.0
61 
62  self.sp_c_dw = 1.0
63  self.sp_c_dc = 1.0
64  self.sp_c_n = 1.0
65  self.sp_c_l = 1.0
66  self.sp_c_k = 1.0
67  self.__sp_c_cs = 1.0
68  # SPRING ATTRIBUTES - END -
69 
70  # ELECTRIC MOTORS ATTRIBUTES - START -
71  # Private Attributes
72  self.__em_lambda_m_b = 1.0
73  self.__em_c_sf = 1.0
74  self.__em_lambda_wi_b = 1.0
75  self.__em_c_t = 1.0
76  self.__em_c_v = 1.0
77  self.__em_v_u = 0.0
78  self.__em_c_alt = 1.0
79 
80  self.__em_lambda_bs = 3.2 # constant
81  self.__em_lambda_st = 0.001 # constant
82  self.__em_lambda_wi = 0.0
83 
84  # Public Attributes
85  self.em_motor_phase = 0
86  self.em_v_d = 0.0
87  self.em_v_r = 1.0
88 
89  # ELECTRIC MOTORS ATTRIBUTES - END -
90 
91  # SHAFT ATTRIBUTES - START -
92  # Private Shaft Attribute
93  self.__sh_lambda_sh_b = 1.0
94  self.__sh_c_t = 1.0
95  self.__sh_c_dy = 1.0
96  self.__sh_c_sc = 1.0
97  self.__sh_c_sc_r = 0.0
98  self.__sh_c_f = 1.0
99 
100  # Public Shaft Attribute
101  self.sh_c_sc_g = 1.0
102  # SHAFT ATTRIBUTES - END -
103 
104  # BEARING ATTRIBUTES - START -
105  # Private Bearing Attribute
106  self.__be_lambda_be_b = 1.0
107  self.__be_c_y = 1.0
108  self.__be_c_r = 1.0
109  self.__be_c_v = 1.0
110  self.__be_c_cw = 1.0
111  self.__be_c_t = 1.0
112  # Public Bearing Attribute
113  self.be_c_sf = 1.0
114  self.be_c_c = 1.0
115  # BEARING ATTRIBUTES - END -
116 
117  # GEAR ATTRIBUTES - START -
118  # Private Gear Attribute
119  self.__gr_lambda_gr_b = 1.0
120  self.__gr_c_gs = 1.0
121  self.__gr_c_gp = 1.0
122  self.__gr_c_ga = 1.0
123  self.__gr_c_gl = 1.0
124  self.__gr_c_gt = 1.0
125  # Public Gear Attribute
126  self.gr_c_gv = 1.0
127  # GEAR ATTRIBUTES - END -
128 
129  # ACTUATOR ATTRIBUTES - START -
130  self.__ac_lambda_ac_b = 1.0
131  self.__ac_c_cp = 1.0
132  self.__ac_c_t = 1.0
133 
134  self.ac_gama = 1.0
135  self.ac_k_2 = float(17.7 * pow(10, 3))
136  self.ac_f_y = 1.0
137  self.ac_n_o = 1.0
138  self.ac_c_h = 1.0
139 
140  self.ac_c_s = 1.0
141  self.ac_c_n = 1.0
142 
143  self.ac_t_a = 25.2
144  # ACTUATOR ATTRIBUTES - END -
145 
146  # MECHANICAL COUPLINGS ATTRIBUTES - START -
147  self.cp_lambda_cp_b = 5.0
148  self.__lambda_se = 0.0
149  self.cp_c_sf = 1.0
150  self.cp_lambda_h = 0.001
151  # MECHANICAL COUPLINGS ATTRIBUTES - END -
152 
153  # BATTERY ATTRIBUTES - START -
154  self.bat_lambda_0 = 1.0
155  # BATTERY ATTRIBUTES - START -
156 # COMPONENTS' ATTRIBUTES - END -
157 
158  # Get Main Functions
159  def get_sp_lambda(self):
160  """
161  get __lambda_sp attribute function
162  """
163  return self.__lambda_sp
164 
165 
166  def get_gr_lambda(self):
167  """
168  get __lambda_gr attribute function
169  """
170  return self.__lambda_gr
171 
172 
173  def get_be_lambda(self):
174  """
175  get __lambda_be attribute function
176  """
177  return self.__lambda_be
178 
179 
180  def get_ac_lambda(self):
181  """
182  get __lambda_ac attribute function
183  """
184  return self.__lambda_ac
185 
186 
187  def get_sh_lambda(self):
188  """
189  get __lambda_sh attribute function
190  """
191  return self.__lambda_sh
192 
193 
194  def get_em_lambda(self):
195  """
196  get __electric_motor_system_failure_rate attribute function
197  """
199 
200 
201  def get_cp_lambda(self):
202  """
203  get __lambda_cp attribute function
204  """
205  return self.__lambda_cp
206 
207 
208  def get_bat_lambda(self):
209  """
210  get __lambda_bat attribute function
211  """
212  return self.__lambda_bat
213 
214 
215 # GET COMPONENTS' FUNCTIONS - START -
216 
217  # GET SPRING FUNCTIONS - START -
218  def get_sp_c_dw(self):
219  """
220  get sp_c_dw attribute function
221  """
222  return self.sp_c_dw
223 
224 
225  def get_sp_c_dc(self):
226  """
227  get sp_c_dc attribute function
228  """
229  return self.sp_c_dc
230 
231 
232  def get_sp_c_n(self):
233  """
234  get sp_c_n attribute function
235  """
236  return self.sp_c_n
237 
238 
239  def get_sp_c_l(self):
240  """
241  get sp_c_l attribute function
242  """
243  return self.sp_c_l
244 
245 
246  def get_sp_c_k(self):
247  """
248  get sp_c_k attribute function
249  """
250  return self.sp_c_k
251 
252 
253  def get_sp_c_cs(self):
254  """
255  get __sp_c_cs attribute function
256  """
257  return self.__sp_c_cs
258  # GET SPRING FUNCTIONS - END -
259 
260  # GET GEAR FUNCTIONS - START -
262  """
263  get __gr_lambda_gr_b attribute function
264  """
265  return self.__gr_lambda_gr_b
266 
267 
268  def get_gr_c_gs(self):
269  """
270  get __gr_c_gs attribute function
271  """
272  return self.__gr_c_gs
273 
274 
275  def get_gr_c_gp(self):
276  """
277  get __gr_c_gp attribute function
278  """
279  return self.__gr_c_gp
280 
281 
282  def get_gr_c_ga(self):
283  """
284  get __gr_c_ga attribute function
285  """
286  return self.__gr_c_ga
287 
288 
289  def get_gr_c_gl(self):
290  """
291  get __gr_c_gl attribute function
292  """
293  return self.__gr_c_gl
294 
295 
296  def get_gr_c_gt(self):
297  """
298  get __gr_c_gt attribute function
299  """
300  return self.__gr_c_gt
301 
302  # GET GEAR FUNCTIONS - END -
303 
304  # GET ACTUATOR FUNCTIONS - START -
305 
306  def get_ac_c_h(self):
307  """
308  get ac_c_h attribute function
309  """
310  return self.ac_c_h
311 
312 
314  """
315  get __ac_lambda_ac_b attribute function
316  """
317  return self.__ac_lambda_ac_b
318 
319 
320  def get_ac_c_cp(self):
321  """
322  get __ac_c_cp attribute function
323  """
324  return self.__ac_c_cp
325  # GET ACTUATOR FUNCTIONS - END -
326 
327  # GET BEARING FUNCTIONS - START -
328 
330  """
331  get __be_lambda_be_b attribute function
332  """
333  return self.__be_lambda_be_b
334 
335 
336  def get_be_c_y(self):
337  """
338  get __be_c_y attribute function
339  """
340  return self.__be_c_y
341 
342 
343  def get_be_c_r(self):
344  """
345  get __be_c_r attribute function
346  """
347  return self.__be_c_r
348 
349 
350  def get_be_c_cw(self):
351  """
352  get __be_c_cw attribute function
353  """
354  return self.__be_c_cw
355 
356 
357  def get_be_c_t(self):
358  """
359  get __be_c_t attribute function
360  """
361  return self.__be_c_t
362 
363 
364  def get_be_c_v(self):
365  """
366  get __be_c_v attribute function
367  """
368  return self.__be_c_v
369 
370  # GET BEARING FUNCTIONS - END -
371 
372  # GET SHAFT FUNCTIONS - START -
373 
375  """
376  get __sh_lambda_sh_b attribute function
377  """
378  return self.__sh_lambda_sh_b
379 
380 
381  def get_sh_c_t(self):
382  """
383  get __sh_c_t attribute function
384  """
385  return self.__sh_c_t
386 
387 
388  def get_sh_c_sc_r(self):
389  """
390  get __sh_c_sc_r attribute function
391  """
392  return self.__sh_c_sc_r
393 
394 
395  def get_sh_c_sc_g(self):
396  """
397  get sh_c_sc_g attribute function
398  """
399  return self.sh_c_sc_g
400 
401 
402  def get_sh_c_sc(self):
403  """
404  get __sh_c_sc attribute function
405  """
406  return self.__sh_c_sc
407 
408 
409  def get_sh_c_dy(self):
410  """
411  get __sh_c_dy attribute function
412  """
413  return self.__sh_c_dy
414 
415  def get_sh_c_f(self):
416  """
417  get __sh_c_f attribute function
418  """
419  return self.__sh_c_f
420 
421  # GET SHAFT FUNCTIONS - END -
422 
423  # GET ELECTRIC MOTORS FUNCTIONS - START -
424 
426  """
427  get __em_lambda_wi_b attribute function
428  """
429  return self.__em_lambda_wi_b
430 
431 
432  def get_em_c_t(self):
433  """
434  get __em_c_t attribute function
435  """
436  return self.__em_c_t
437 
438 
439  def get_em_c_v(self):
440  """
441  get __em_c_v attribute function
442  """
443  return self.__em_c_v
444 
445 
446  def get_em_v_u(self):
447  """
448  get __em_v_u attribute function
449  """
450  return self.__em_v_u
451 
452 
453  def get_em_c_alt(self):
454  """
455  get __em_c_alt attribute function
456  """
457  return self.__em_c_alt
458 
459 
461  """
462  get __em_lambda_wi attribute function
463  """
464  return self.__em_lambda_wi
465 
466 
467  def get_em_lambda_c(self):
468  """
469  get __em_lambda_c attribute function
470  """
471  return self.__em_lambda_c
472 
473  # GET ELECTRIC MOTORS FUNCTIONS - END -
474 
475 # GET COMPONENTS' FUNCTIONS - END -
476 
477 
478 # COMPONENTS' FORMULAS - START -
479 
480  # SPRING FORMULAS - START -
481  def lambda_sp_func(self):
482  """
483  calculate __lambda_sp attribute function
484  """
485  self.__lambda_sp = float(self.sp_lambda_sp_b * self.sp_c_g * self.sp_c_dw * self.sp_c_dc * self.sp_c_n * self.sp_c_y * self.sp_c_l * self.sp_c_k * self.__sp_c_cs * self.sp_c_r * self.sp_c_m) / float(pow(10, 6))
486 
487 
488  def sp_c_dw_func(self, d_w):
489  """
490  calculate sp_c_dw attribute function
491  """
492  self.sp_c_dw = float(pow((d_w / 0.085), 3))
493 
494 
495  def sp_c_dc_func(self, d_c):
496  """
497  calculate sp_c_dc attribute function
498  """
499  self.sp_c_dc = float(pow(0.58 / d_c, 6))
500 
501 
502  def sp_c_n_func(self, n_a):
503  """
504  calculate sp_c_n attribute function
505  """
506  self.sp_c_n = float(pow(14 / n_a, 3))
507 
508 
509  def sp_c_l_func(self, l_1, l_2):
510  """
511  calculate sp_c_l attribute function
512  """
513  self.sp_c_l = float(pow((l_1 - l_2) / 1.07, 3))
514 
515 
516  def sp_c_k_func(self, d_c, d_w):
517  """
518  calculate sp_c_k attribute function
519  """
520  r_value = float(d_c / d_w)
521  k_w = float(((4 * r_value - 1) / (4 * r_value + 1)) + (0.616 / r_value))
522  self.sp_c_k = float(pow(k_w / 1.219, 3))
523 
524 
525  def sp_c_cs_func(self, c_r):
526  """
527  calculate __sp_c_cs attribute function
528  """
529  if c_r <= 30:
530  result = float(0.1)
531 
532  elif c_r <= 300:
533  result = float(c_r / 300)
534 
535  else:
536  result = float(pow(c_r / 300, 3))
537 
538  self.__sp_c_cs = result
539 
540  # SPRING FORMULAS - END -
541 
542  # BEARING FORMULAS - START -
543  def lambda_be_func(self):
544  """
545  λBE = λBE,B * C_Y * C_R * C_V * C_CW * C_t * C_SF * C_C
546 
547  λBE = Failure rate of bearing, failures/million hours
548 
549  λBE,B = Base failure rate, failures/million hours
550 
551  C_Y = Multiplying factor applied load
552 
553  C_R = Life adjustment factor for reliability
554 
555  C_V = Multiplying factor for lubricant
556 
557  C_CW = Multiplying factor for water contaminant level
558 
559  C_t = Multiplying factor for operating temperature
560 
561  C_SF = Multiplying factor for operating service conditions
562 
563  C_C = Multiplying factor for lubrication contamination level
564 
565  """
566 
567  self.__lambda_be = float(self.__be_lambda_be_b * self.__be_c_y * self.__be_c_r * self.__be_c_v * self.__be_c_cw * self.__be_c_t * self.be_c_sf * self.be_c_c) / float(pow(10, 6))
568 
569 
570  def be_lambda_be_b_func(self, y_value, l_s, l_a, n_value, h_value):
571  """
572  λBE,B = 1 / L_10_h
573 
574  L_10 = (10^6 / 60 * n)* (L_S / L_A)^y
575 
576  y:constant 3 for ball bearings, 3.3 for roller bearings,
577 
578  L_S dynamic load rating of bearing, ıbf,
579 
580  L_A equivalent radial load on bearing, ıbf, L_10 bearing life with reliability 90%,
581  millions of revolutions,
582 
583  n: operation speed, revolutions/min.
584  """
585 
586  if str(n_value) != "None":
587  l_10 = self.bearing_l_10_func(y_value, l_s, l_a, n_value)
588 
589  result = float(1 / (l_10 * h_value))
590 
591  else:
592  result = 1.0
593 
594  self.__be_lambda_be_b = result
595 
596  @classmethod
597  def bearing_l_10_func(cls, y_value, l_s, l_a, n_value):
598  """
599  L_10 = (10^6 / 60 * n)* (L_S / L_A)^y
600  """
601 
602  result = float((pow(10, 6) / (60 * n_value)) * pow((l_s / l_a), y_value))
603 
604  return result
605 
606 
607  def be_c_y_func(self, y_value, l_a, l_s):
608  """
609  C_Y = (L_A / LS)^y
610 
611  y:constant 3 for ball bearings, 3.3 for roller bearings,
612 
613  L_S dynamic load rating of bearing, ıbf,
614 
615  L_A equivalent radial load on bearing, ıbf, L_10 bearing life with reliability 90%,
616  millions of revolutions,
617  """
618  self.__be_c_y = float(pow((l_a / l_s), y_value))
619 
620 
621  def be_c_r_func(self, r_value, select):
622  """
623  C_R = (0.223) / ln(100 / R)^(2/3)
624 
625  R = ?
626  """
627 
628  if select:
629  self.__be_c_r = float(float(0.223) / float(pow(math.log(float(100) / float(r_value)), (2/3))))
630 
631  else:
632  self.__be_c_r = 1.0
633 
634 
635  def be_c_v_func(self, v_o, v_l, select):
636  """
637  C_V = (V_O / V_L)^0.54
638 
639  V_O= Viscosity of specification fluid
640 
641  V_L= Viscosity of lubricant used
642  """
643 
644  if select:
645  self.__be_c_v = float(pow((v_o / v_l), (0.54)))
646 
647  else:
648  self.__be_c_v = 1.0
649 
650 
651  def be_c_cw_func(self, cw_value, select):
652  """
653  C_CW = 1.0 + 25.50CW - 16.25 CW^2
654 
655  CW = Percentage of water in the lubricant
656  """
657  if select:
658  if cw_value > 0.8:
659  result = 11.00
660 
661  else:
662  result = float(1.0 + (25.50 * cw_value) - (16.25 * pow(cw_value, 2)))
663 
664  else:
665  result = 1.0
666 
667  self.__be_c_cw = result
668 
669 
670  def be_c_t_func(self, t_0):
671  """
672  C_T = (T_0 / 183)^3
673 
674  T_0 = Operating Temperature of the Bearing (℃)
675  """
676 
677  if t_0 < 183:
678  result = 1.0
679 
680  else:
681  result = float(pow((t_0 / 183), 3))
682 
683  self.__be_c_t = result
684 
685  # BEARING FORMULAS - END -
686 
687  # GEAR FORMULAS - START -
688 
689  def lambda_gr_func(self):
690  """
691  λGR = λGR,B * C_GS * C_GP * C_GA * C_GL * C_GT * C_GV
692 
693  λGR = Failure rate of gear under specific operation, failures/millionoperating hours
694 
695  λGR,B = Base failure rate of gear, failures/million operating hours
696 
697  C_GS = Multiplying factor considering speed deviation with respect todesign
698 
699  C_GP = Multiplying factor considering actual gear loading with respectto design
700 
701  C_GA = Multiplying factor considering misalignment
702 
703  C_GL = Multiplying factor considering lubrication deviation with respectto design
704 
705  C_GT = Multiplying factor considering the operating temperature
706 
707  C_GV = Multiplying factor considering the AGMA Service Factor
708  """
709 
710  self.__lambda_gr = float(self.__gr_lambda_gr_b * self.__gr_c_gs * self.__gr_c_gp * self.__gr_c_ga * self.__gr_c_gl * self.__gr_c_gt * self.gr_c_gv) / float(pow(10, 6))
711 
712 
713  def gr_lambda_gr_b_func(self, rpm_value, revolutions, select):
714  """
715  λGR,B = RPM * 60 * 1 / design life(revolutions)
716  """
717  if select:
718  self.__gr_lambda_gr_b = float(rpm_value * 60 * (1 / revolutions))
719 
720  else:
721  self.__gr_lambda_gr_b = 1.0
722 
723 
724  def c_gs_func(self, v_o, v_d, select):
725  """
726  C_GS = k + (Vo / Vd)^0.7
727 
728  k = constant(1.0)
729 
730  Vo = Operating Speed, RPM
731 
732  Vd = Design Speed, RPM
733  """
734  if select:
735  self.__gr_c_gs = float(1.0 + pow((v_o / v_d), 0.7))
736 
737  else:
738  self.__gr_c_gs = 1.0
739 
740 
741  def c_gp_func(self, l_o, l_d, select):
742  """
743  C_GP = ((Lo / Ld) / k)^4.69
744 
745  k = constant(0.5)
746 
747  Lo = Operating Load, lbs
748 
749  Ld = Design Load, lbs
750  """
751  if select:
752  self.__gr_c_gp = float(0.5 + pow(((l_o / l_d) / 0.5), 4.69))
753 
754  else:
755  self.__gr_c_gp = 1.0
756 
757 
758  def c_ga_func(self, a_e, select):
759  """
760  C_GA = (AE / 0.006)^2.36
761 
762  AE = Misalignment angle in radians
763  """
764  if select:
765  self.__gr_c_ga = float(pow((a_e / 0.006), 2.36))
766 
767  else:
768  self.__gr_c_ga = 1.0
769 
770 
771 
772  def c_gl_func(self, v_o, v_l, select):
773  """
774  C_GL = k + (Vo / Vl)^0.54
775 
776  Vo = Viscosity of specification lubricant, lb-min/in2
777 
778  Vl = Viscosity of lubricant used, lb-min/in2
779 
780  k = constant(1.0)
781 
782  NOT: k değeri dökümanda yok!
783  """
784  if select:
785  self.__gr_c_gl = float(1.0 + pow((v_o / v_l), 0.54))
786 
787  else:
788  self.__gr_c_gl = 1.0
789 
790 
791  def c_gt_func(self, t_at):
792  """
793  C_GT= (460 + T_AT) / 620
794 
795  T_AT= Operating temperature, ℉
796  """
797 
798  if t_at <= 160:
799  result = 1.0
800 
801  else:
802  result = float((460 + t_at) / 620)
803 
804  self.__gr_c_gt = result
805 
806  # GEAR FORMULAS - END -
807 
808  # ACTUATOR FORMULAS - START -
809 
810  def lambda_ac_func(self):
811  """
812  calculate __lambda_ac attribute function
813  """
814  self.__lambda_ac = float(self.__ac_lambda_ac_b * self.__ac_c_cp * self.__ac_c_t) / float(pow(10, 6))
815 
816 
817  def ac_n_o_func(self, w_a, d_1, d_2, mu_1, mu_2, e_1, e_2):
818  """
819  calculate ac_n_o attribute function
820  """
821  self.ac_n_o = float(self.ac_k_2 * pow((self.ac_gama * self.ac_f_y) / pow((float(w_a) * (pow((d_1 - d_2) / (d_1 * d_2), 2))) / pow(((1 - pow(mu_1, 2)) / e_1) - ((1 - pow(mu_2, 2)) / e_2), 2), 1/3), 9))
822 
823 
825  """
826  calculate __ac_lambda_ac_b attribute function
827  """
828  self.__ac_lambda_ac_b = float(pow(10, 6) / self.ac_n_o)
829 
830 
831  def ac_c_h_func(self, h_p, h_c, select):
832  """
833  calculate ac_c_h attribute function
834  """
835  if select:
836  self.ac_c_h = float(h_p / h_c)
837 
838  else:
839  self.ac_c_h = 1.0
840 
841 
842  def ac_c_s_func(self, filter_size):
843  """
844  calculate ac_c_s attribute function
845  """
846  self.ac_c_s = float(filter_size / 10)
847 
848 
849  def ac_c_cp_func(self, select):
850  """
851  calculate __ac_c_cp attribute function
852  """
853  if select:
854  self.__ac_c_cp = float(self.ac_c_h * self.ac_c_s * self.ac_c_n)
855  else:
856  self.__ac_c_cp = 1.0
857 
858 
859  def ac_c_t(self, teta, t_a, time_value):
860  """
861  calculate __ac_c_t attribute function
862  """
863  self.__ac_c_t = float(pow(math.e, (teta / self.ac_t_a) * (1 - t_a / time_value)))
864 
865  # ACTUATOR FORMULAS - END -
866 
867  # ELECTRIC MOTORS FORMULAS - START -
868 
870  """
871  calculate __electric_motor_system_failure_rate attribute function
872  """
873  electric_motor_failure_rate = self.electric_motor_failure_rate_func()
874  self.__electric_motor_system_failure_rate = float(electric_motor_failure_rate * float((1.0 / pow(10, 6))))
875 
876 
878  """
879  λM = (λM,B * CSF) + λWI + λBS + λST + λSH + λBE + λGR + λC
880  """
881 
882  self.__em_lambda_m_b = self.lambda_m_b
883  self.__em_c_sf = self.c_sf
884 
885  if self.__em_lambda_m_b == 1.0 and self.__em_c_sf == 1.0:
886  temp_value = 0.0
887 
888  else:
889  temp_value = self.__em_lambda_m_b * self.__em_c_sf
890 
891  result = float(temp_value) + float(self.__em_lambda_wi + self.__em_lambda_bs + self.__em_lambda_st + self.__lambda_sh + self.__lambda_be + self.__lambda_gr + self.__em_lambda_c)
892 
893  return result
894 
895 
897  """
898  λWI = λWI,B * C_T * C_V * C_alt
899 
900  λWI,B = Base failure rate of the electric motor windings, failures/millionhours
901 
902  C_T = Multiplying factor which considers the effects of ambient temperature
903  on the base failure rate
904 
905  C_V = Multiplying factor which considers the effects of electrical source voltage
906  variations
907 
908  C_alt = Multiplying factor which considers the effects of operation at high altitudes
909  """
910 
911  self.__em_lambda_wi = float(self.__em_lambda_wi_b * self.__em_c_t * self.__em_c_v * self.__em_c_alt)
912 
913 
915  """
916  λWI,B = (1.0 * 10^6) / L_I
917 
918  L_I = Expected winding life, hours
919  """
920 
921  self.__em_lambda_wi_b = float((1.0 * pow(10, 6)) / l_i)
922 
923 
924  def elec_mot_c_t_func(self, t_0):
925  """
926  C_T = 2^((T_0 - 40) / 10)
927 
928  T_0 = Ambient temperature surrounding motor with motor running atexpected
929  full load conditions, oC
930  """
931  if str(t_0) != "None":
932  self.__em_c_t = float(pow(2, ((float(t_0) - 40) / 10)))
933 
934  else:
935  self.__em_c_t = 1.0
936 
937 
938  def elec_mot_c_v_func(self, v_d, v_r, v_u, select):
939  """
940  Single Phase Motors -> C_V = 2^(10 * (V_D / V_R)
941 
942  V_D = Difference between rated and actual voltage
943 
944  V_R = Rated voltage
945 
946  Three Phase Motors -> C_V = 1 + (0.40 * V_U)^2.5
947  """
948  if select:
949  if self.em_motor_phase == 1:
950  result = pow(2, 10 * (float(v_d) / float(v_r)))
951 
952  elif self.em_motor_phase == 3:
953  result = float(1 + pow(0.40 * float(v_u), 2.5))
954 
955  else:
956  result = 1.0
957 
958  else:
959  result = 1.0
960 
961  self.__em_c_v = result
962 
963 
964  def elec_mot_v_u_func(self, greatest_voltage_difference, average_phase_voltage, select):
965  """
966  calculate __em_v_u attribute function
967  """
968  if select:
969  self.__em_v_u = float(100 * (greatest_voltage_difference / average_phase_voltage))
970 
971  else:
972  self.__em_v_u = 1.0
973 
974 
975  def elec_mot_alt_func(self, altitude):
976  """
977  Calt = Multiplying factor which considers the effects of operation athigh altitudes
978 
979  C_alt= 1.00 + 8*10^-5(a-3300 ft)
980 
981  #Altitude = ft
982  """
983 
984  if altitude <= 3300:
985  result = 1.0
986 
987  else:
988  result = float(1.00 + (8 * pow(10, -5)) * (altitude - 3300))
989 
990  self.__em_c_alt = result
991 
992 
993  def elec_mot_lambda_c_func(self, value):
994  """
995  calculate __em_lambda_c attribute function
996  """
997  self.__em_lambda_c = value
998 
999  # ELECTRIC MOTORS FORMULAS - END -
1000 
1001  # SHAFTS MOTORS FORMULAS - START -
1002 
1003  def lambda_sh_func(self):
1004  """
1005  λSH = λSH,B * C_f * C_T * C_DY * C_SC
1006 
1007  λSH = Shaft failure rate, failures/million cycles
1008 
1009  λSH,B = Shaft base failure rate, failures/million cycles
1010 
1011  C_f = Shaft surface finish multiplying factor
1012 
1013  C_T = Material temperature multiplying factor
1014 
1015  C_DY = Shaft displacement multiplying factor
1016 
1017  C_SC = Stress concentration factor for shaft discontinuities
1018  """
1019 
1020  self.__lambda_sh = float(self.__sh_lambda_sh_b * self.__sh_c_f * self.__sh_c_t * self.__sh_c_dy * self.__sh_c_sc) / float(pow(10, 6))
1021 
1022 
1023  def sh_lambda_sh_b_func(self, n_value):
1024  """
1025  λSH,B = 1 / N
1026 
1027  N = Number of cycles to failure at application stress level, SED
1028 
1029  SED = Material endurance limit, lbs/in2
1030  """
1031 
1032  self.__sh_lambda_sh_b = float(1 / n_value)
1033 
1034 
1035  def sh_c_f_func(self, t_s, select):
1036  """
1037  calculate __sh_c_f attribute function
1038  """
1039  if select == 0:
1040  result = float(t_s)
1041 
1042  elif select == 1:
1043  result = self.sh_c_f_hot_rolled(float(t_s))
1044 
1045  elif select == 2:
1046  result = self.sh_c_f_macined(float(t_s))
1047 
1048  elif select == 3:
1049  result = self.sh_c_f_forged(float(t_s))
1050 
1051  else:
1052  result = 1.0
1053 
1054  self.__sh_c_f = result
1055 
1056  @classmethod
1057  def sh_c_f_hot_rolled(cls, t_s):
1058  """
1059  c_f = 0.94 - 0.0046 x Ts + 8.37 x 10^-6 x (Ts)^2
1060 
1061  Ts = Tensile strength of material, kpsi
1062  """
1063 
1064  result = float(0.94 - (0.0046 * t_s) + 8.37 * pow(10, -6) * pow(t_s, 2))
1065 
1066  return result
1067 
1068  @classmethod
1069  def sh_c_f_macined(cls, t_s):
1070  """
1071  c_f = 1.07 - 0.0051 x Ts + 2.21 x 10^-5 x (Ts )^2 - 3.57 x 10^-8 x (Ts)^3
1072 
1073  Ts = Tensile strength of material, kpsi
1074  """
1075 
1076  result = float(1.07 - 0.0051 * t_s + 2.21 * pow(10, -5) * pow(t_s, 2) - 3.57 * pow(10, -8) * pow(t_s, 3))
1077 
1078  return result
1079 
1080  @classmethod
1081  def sh_c_f_forged(cls, t_s):
1082  """
1083  c_f = 0.75 - 4.06 x 10^-3 x Ts + 7.58 x 10^-6 x (Ts)^2
1084 
1085  Ts = Tensile strength of material, kpsi
1086  """
1087 
1088  result = float(0.75 - 4.06 * pow(10, -3) * t_s + 7.58 * pow(10, -6) * pow(t_s, 2))
1089 
1090  return result
1091 
1092 
1093  def sh_c_t_func(self, t_at):
1094  """
1095  C_T= (460+T_AT) / 620
1096 
1097  #T_AT= Operating temperature (℉)
1098  """
1099 
1100  if t_at < 160:
1101  result = 1.0
1102 
1103  else:
1104  result = float((460 + t_at) / 620)
1105 
1106  self.__sh_c_t = result
1107 
1108 
1109  def sh_c_dy_func(self, e_value, f_value, b_value, sections_dict):
1110  """
1111  CDY= ((0.0043 * F) / Eb) * [(X^3 /I_X) + (L^3 / I_L) + (M^3 / I_M) + (N^3 / I_N)]
1112 
1113  E = Modulus of elasticity of shaft material, lbs/in2
1114 
1115  F = Fluid radial unbalance force or load weight, lb
1116 
1117  I = Shaft moment of inertia (πd4/64) -> shaft_moment_of_inertia_func(d) fonksiyonu
1118 
1119  b = Specified shaft deflection, in
1120 
1121  e = E_b
1122 
1123  X, L, M, N = Length of shaft section
1124  """
1125  try:
1126  section_names = list(sections_dict.keys())
1127  constant = (0.0043 * f_value) / (e_value * b_value)
1128  result = 0
1129 
1130  for item in section_names:
1131  length = float(sections_dict[str(item)]['length'])
1132  inertia = float(sections_dict[str(item)]['I'])
1133  result += float(pow(length, 3) / inertia)
1134 
1135  self.__sh_c_dy = constant * result
1136 
1137  except Exception as err:
1138  print(err)
1139 
1140  @classmethod
1141  def shaft_moment_of_inertia_func(cls, d_value):
1142  """
1143  I = (π * d * 4) / 64
1144  """
1145  result = float((math.pi * d_value * 4) / 64)
1146 
1147  return result
1148 
1149 
1150  def sh_c_sc_func(self):
1151  """
1152  C_SC = C_SC,R + C_SC,G
1153 
1154  CSC,R = Stress concentration factor due to transition between shaft sections
1155 
1156  CSC,G = Stress concentration factor due to shaft grooves
1157 
1158  C_SC,R -> sh_c_sc_r_func(r, bd, sd)
1159  """
1160 
1161  self.__sh_c_sc = float(self.__sh_c_sc_r + self.sh_c_sc_g)
1162 
1163 
1164  def sh_c_sc_r_func(self, r_value, b_d, s_d, select):
1165  """
1166  CSC,R= ((0.3)/(r / s_d))^0.2 * (b_d / s_d)^(1-(r/s_d))
1167 
1168  r = Radius of fillet, in
1169 
1170  b_d = Initial shaft diameter,
1171 
1172  s_d = Transitioned shaft diameter
1173  """
1174  if select:
1175  result = float(pow((0.3) / (r_value / s_d), (0.2)) * pow((b_d / s_d), ((1.0) - (r_value / s_d))))
1176 
1177  else:
1178  result = 1.0
1179 
1180  self.__sh_c_sc_r = result
1181 
1182  # SHAFTS MOTORS FORMULAS - END -
1183 
1184  # MECHANICAL COUPLINGS MOTORS FORMULAS - START -
1185 
1186  def lambda_cp_func(self):
1187  """
1188  calculate __lambda_cp attribute function
1189  """
1190  self.__lambda_cp = ((float(self.cp_lambda_cp_b) * float(self.cp_c_sf)) + float(self.__lambda_gr) + float(self.__lambda_se) + float(self.cp_lambda_h)) / float(pow(10, 6))
1191 
1192  # MECHANICAL COUPLINGS MOTORS FORMULAS - END -
1193 
1194  # BATTERY FORMULAS - START -
1195 
1196  def lambda_bat_func(self):
1197  """
1198  calculate __lambda_bat attribute function
1199  """
1200  self.__lambda_bat = float(self.bat_lambda_0 * pow(10, -9))
1201 
1202  # BATTERY FORMULAS - END -
1203 
1204 # COMPONENTS' FORMULAS - END -
def elec_mot_v_u_func(self, greatest_voltage_difference, average_phase_voltage, select)


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