Add abstract Interface class as well as Point and Linear subclasses
This commit is contained in:
+28
-1
@@ -12,7 +12,13 @@ class Layer:
|
||||
return self.thickness / self.thermal_coefficient
|
||||
|
||||
|
||||
class Surface(ABC):
|
||||
class Interface(ABC):
|
||||
@property
|
||||
@abstractmethod
|
||||
def HT(self) -> float: ...
|
||||
|
||||
|
||||
class Surface(Interface):
|
||||
def __init__(self, name: str, area: float):
|
||||
self.name = name
|
||||
self.area = area
|
||||
@@ -26,6 +32,27 @@ class Surface(ABC):
|
||||
return self.U * self.area
|
||||
|
||||
|
||||
class LinearThermalBridge(Interface):
|
||||
def __init__(self, name: str, length: float, psi: float):
|
||||
self.name = name
|
||||
self.length = length
|
||||
self.psi = psi
|
||||
|
||||
@property
|
||||
def HT(self) -> float:
|
||||
return self.psi * self.length
|
||||
|
||||
|
||||
class PointThermalBridge(Interface):
|
||||
def __init__(self, name: str, chi: float):
|
||||
self.name = name
|
||||
self.chi = chi
|
||||
|
||||
@property
|
||||
def HT(self) -> float:
|
||||
return self.chi
|
||||
|
||||
|
||||
class LayeredSurface(Surface):
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user