Early explorations of calculation primitives
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
# Thermal conductivity λ in W/(m·K) (min, max)
|
||||||
|
THERMAL_CONDUCTIVITY = {
|
||||||
|
"brick": (0.22, 0.81),
|
||||||
|
"concrete": (1.3, 1.3),
|
||||||
|
"reinforced_concrete": (1.7, 1.7),
|
||||||
|
"plaster": (0.52, 0.52),
|
||||||
|
"pir": (0.021, 0.026),
|
||||||
|
"pur": (0.022, 0.028),
|
||||||
|
"xps": (0.028, 0.044),
|
||||||
|
"mineral_wool": (0.031, 0.044),
|
||||||
|
}
|
||||||
|
|
||||||
|
THERMAL_CONDUCTIVITY_LOW = {k: v[0] for k, v in THERMAL_CONDUCTIVITY.items()}
|
||||||
|
THERMAL_CONDUCTIVITY_HIGH = {k: v[1] for k, v in THERMAL_CONDUCTIVITY.items()}
|
||||||
|
|
||||||
|
|
||||||
|
# Surface resistances in m²K/W
|
||||||
|
RSI_HORIZONTAL = 0.13
|
||||||
|
RSI_UPWARD = 0.10
|
||||||
|
RSI_DOWNWARD = 0.17
|
||||||
|
RSE = 0.04
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Layer:
|
||||||
|
thermal_coefficient: float
|
||||||
|
thickness: float
|
||||||
|
|
||||||
|
@property
|
||||||
|
def R(self):
|
||||||
|
return self.thickness / self.thermal_coefficient
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Interface(ABC):
|
||||||
|
name: str
|
||||||
|
area: float
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def U(self) -> float: ...
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class LayeredInterface(Interface):
|
||||||
|
layers: list[Layer]
|
||||||
|
r_surface_1: float
|
||||||
|
r_surface_2: float
|
||||||
|
|
||||||
|
@property
|
||||||
|
def U(self) -> float:
|
||||||
|
R_layers = sum(layer.R for layer in self.layers)
|
||||||
|
R = self.r_surface_1 + R_layers + self.r_surface_2
|
||||||
|
return 1 / R
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class FixedUInterface(Interface):
|
||||||
|
u_value: float
|
||||||
|
|
||||||
|
@property
|
||||||
|
def U(self) -> float:
|
||||||
|
return self.u_value
|
||||||
Reference in New Issue
Block a user