91 lines
2.0 KiB
Python
91 lines
2.0 KiB
Python
|
import helpers.assumptions as assumptions
|
||
|
|
||
|
|
||
|
class ThermalOpening:
|
||
|
def __init__(self):
|
||
|
self._area = None
|
||
|
self._openable_ratio = None
|
||
|
self._conductivity_w_mk = None
|
||
|
self._frame_ratio = assumptions.frame_ratio
|
||
|
self._g_value = None
|
||
|
self._thickness_m = None
|
||
|
self._inside_reflectance = None
|
||
|
self._outside_reflectance = None
|
||
|
self._u_value = None
|
||
|
|
||
|
@property
|
||
|
def area(self):
|
||
|
return self._area
|
||
|
|
||
|
@area.setter
|
||
|
def area(self, value):
|
||
|
self._area = value
|
||
|
|
||
|
@property
|
||
|
def openable_ratio(self):
|
||
|
raise Exception('Not implemented')
|
||
|
|
||
|
@openable_ratio.setter
|
||
|
def openable_ratio(self, value):
|
||
|
raise Exception('Not implemented')
|
||
|
|
||
|
@property
|
||
|
def conductivity_w_mk(self):
|
||
|
return self._conductivity_w_mk
|
||
|
|
||
|
@conductivity_w_mk.setter
|
||
|
def conductivity_w_mk(self, value):
|
||
|
self._conductivity_w_mk = value
|
||
|
|
||
|
@property
|
||
|
def frame_ratio(self):
|
||
|
return self._frame_ratio
|
||
|
|
||
|
@frame_ratio.setter
|
||
|
def frame_ratio(self, value):
|
||
|
self._frame_ratio = value
|
||
|
|
||
|
@property
|
||
|
def g_value(self):
|
||
|
return self._g_value
|
||
|
|
||
|
@g_value.setter
|
||
|
def g_value(self, value):
|
||
|
self._g_value = value
|
||
|
|
||
|
@property
|
||
|
def thickness_m(self):
|
||
|
return self._thickness_m
|
||
|
|
||
|
@thickness_m.setter
|
||
|
def thickness_m(self, value):
|
||
|
self._thickness_m = value
|
||
|
|
||
|
@property
|
||
|
def inside_reflectance(self):
|
||
|
return self._inside_reflectance
|
||
|
|
||
|
@inside_reflectance.setter
|
||
|
def inside_reflectance(self, value):
|
||
|
self._inside_reflectance = value
|
||
|
|
||
|
@property
|
||
|
def outside_reflectance(self):
|
||
|
return self._outside_reflectance
|
||
|
|
||
|
@outside_reflectance.setter
|
||
|
def outside_reflectance(self, value):
|
||
|
self._outside_reflectance = value
|
||
|
|
||
|
@property
|
||
|
def u_value(self):
|
||
|
if self._u_value is None:
|
||
|
try:
|
||
|
h_i = assumptions.h_i
|
||
|
h_e = assumptions.h_e
|
||
|
r_value = 1 / h_i + 1 / h_e + float(self.conductivity_w_mk) / float(self.thickness_m)
|
||
|
self._u_value = 1 / r_value
|
||
|
except TypeError:
|
||
|
Exception('Thermal opening is not initialized')
|
||
|
return self._u_value
|