From 51f4d8d2b6331c880576376b758afb4d61fa29dd Mon Sep 17 00:00:00 2001 From: omicron Date: Mon, 8 Jun 2026 14:47:36 +0200 Subject: [PATCH] Add boundary condition coefficient to Surface HT calculation --- interfaces.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/interfaces.py b/interfaces.py index f504561..e251378 100644 --- a/interfaces.py +++ b/interfaces.py @@ -19,9 +19,10 @@ class Interface(ABC): class Surface(Interface): - def __init__(self, name: str, area: float): + def __init__(self, name: str, area: float, b: float = 1.0): self.name = name self.area = area + self.b = b @property @abstractmethod @@ -29,7 +30,7 @@ class Surface(Interface): @property def HT(self) -> float: - return self.U * self.area + return self.b * self.U * self.area class LinearThermalBridge(Interface): @@ -61,8 +62,9 @@ class LayeredSurface(Surface): layers: list[Layer], r_surface_1: float, r_surface_2: float, + b: float = 1.0, ): - super().__init__(name, area) + super().__init__(name, area, b) self.layers = layers self.r_surface_1 = r_surface_1 self.r_surface_2 = r_surface_2 @@ -75,8 +77,8 @@ class LayeredSurface(Surface): class FixedUSurface(Surface): - def __init__(self, name: str, area: float, u_value: float): - super().__init__(name, area) + def __init__(self, name: str, area: float, u_value: float, b: float = 1.0): + super().__init__(name, area, b) self.u_value = u_value @property