mabuseif commited on
Commit
f3a5611
verified
1 Parent(s): 141fa97

Update app/materials_library.py

Browse files
Files changed (1) hide show
  1. app/materials_library.py +4 -4
app/materials_library.py CHANGED
@@ -76,10 +76,10 @@ class Material:
76
  return "High"
77
 
78
  def get_u_value(self) -> float:
79
- # Calculate U-value: U = 1 / (R_si + ( / d) + R_se) (W/m虏路K)
80
- if self.default_thickness > 0:
81
- r_value = R_SI + (self.conductivity / self.default_thickness) + R_SE
82
- return 1.0 / r_value if r_value > 0 else 0.0
83
  return 0.0
84
 
85
  class GlazingMaterial:
 
76
  return "High"
77
 
78
  def get_u_value(self) -> float:
79
+ # Calculate U-value: U = 1 / (R_si + (d / ) + R_se) (W/m虏路K)
80
+ if self.default_thickness > 0 and self.conductivity > 0:
81
+ r_value = R_SI + (self.default_thickness / self.conductivity) + R_SE
82
+ return 1.0 / r_value
83
  return 0.0
84
 
85
  class GlazingMaterial: