Coverage for pyrc \ core \ materials.py: 72%
58 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
1# -------------------------------------------------------------------------------
2# Copyright (C) 2026 Joel Kimmich, Tim Jourdan
3# ------------------------------------------------------------------------------
4# License
5# This file is part of PyRC, distributed under GPL-3.0-or-later.
6# ------------------------------------------------------------------------------
8from pyrc.core.components.templates import Fluid, Solid, CompositeMaterialSolid
11class Air(Fluid):
12 def __init__(self):
13 # values at 20 °C: https://stoffdaten-online.de/luft/
14 super().__init__(
15 name="air", density=1.189, heat_capacity=1.006e3, thermal_conductivity=25.87e-3, kin_viscosity=15.32e-6
16 )
19class Water(Fluid):
20 def __init__(self):
21 # values at 20 °C: https://de.scribd.com/document/705897719/Tabela-A-9
22 super().__init__(
23 name="water",
24 density=998.0,
25 heat_capacity=4182,
26 thermal_conductivity=0.598,
27 kin_viscosity=1.002e-3 / 998.0,
28 prandtl_number=7.01,
29 )
32class Metal(Solid):
33 def __init__(self):
34 # generic metal - no real template
35 super().__init__(
36 name="Metal",
37 density=3000, # kg/m^3,
38 heat_capacity=900e3, # J/(kg*K)
39 thermal_conductivity=40, # W/(m*K)
40 )
43class EPS032(Solid):
44 def __init__(self):
45 # https://knauf.com/api/download-center/v1/assets/cf95bd43-57c8-4261-a11d-0e206a8927c2?download=true&country=de
46 super().__init__(
47 name="EPS_032",
48 density=20,
49 # kg/m^3, https://teamce.com.au/wp-content/themes/cecsgroup/_datasheets/concrete-formwork/styrene-insulation/Polystyrene.pdf
50 heat_capacity=1.450e3, # J/(kg*K)
51 thermal_conductivity=0.032, # W/(m*K)
52 )
55class SandLimeBrick(Solid):
56 def __init__(self):
57 # https://www.kalksandstein.de/produkte-daten-und-fakten/stoffwerte/
58 super().__init__(
59 name="Sand_Lime_Brick",
60 density=2.0e3, # kg/m^3
61 heat_capacity=0.88e3,
62 # J/(kg*K), https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
63 thermal_conductivity=1.1, # W/(m*K)
64 )
67class Concrete(Solid):
68 def __init__(self):
69 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
70 # https://www.schweizer-fn.de/stoff/wleit_isolierung/wleit_isolierung.php
71 super().__init__(
72 name="Concrete",
73 density=2.0e3, # kg/m^3
74 heat_capacity=1.0e3, # J/(kg*K)
75 thermal_conductivity=1.6, # W/(m*K)
76 )
79class Plaster(Solid):
80 def __init__(self):
81 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
82 # "Verputz"
83 # https://www.schweizer-fn.de/stoff/wleit_isolierung/wleit_isolierung.php
84 # "Kalkzementputz Maschinenputz"
85 super().__init__(
86 name="Plaster",
87 density=1.5e3, # kg/m^3
88 heat_capacity=0.8e3, # J/(kg*K)
89 thermal_conductivity=0.6, # W/(m*K)
90 )
93class Clinker(Solid):
94 def __init__(self):
95 # https://materialarchiv.ch/de/ma:material_1263?type=all
96 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
97 super().__init__(
98 name="Clinker",
99 density=2.2e3, # kg/m^3
100 heat_capacity=900, # J/(kg*K)
101 thermal_conductivity=1.2, # W/(m*K)
102 )
105class Wood(Solid):
106 def __init__(self):
107 # https://de.wikipedia.org/wiki/Brettsperrholz
108 super().__init__(name="Glass", density=500, heat_capacity=1610, thermal_conductivity=0.14)
111class SodaLimeGlass(Solid):
112 def __init__(self):
113 # https://en.wikipedia.org/wiki/Soda%E2%80%93lime_glass
114 super().__init__(name="Glass", density=2520, heat_capacity=720, thermal_conductivity=1)
117class PolyvinylChloride(Solid):
118 def __init__(self):
119 # ISO 10077-2 appendix D table D.1
120 # heat capacity: https://materials.fsri.org/materialdetail/polyvinyl-chloride-pvc
121 super().__init__(name="PVC", density=1390, heat_capacity=1020, thermal_conductivity=0.17)
124class WindowGlass(CompositeMaterialSolid):
125 def __init__(self, part_air=0.077, part_glass=0.008):
126 super().__init__(
127 name="WindowGlass",
128 materials=[Air(), SodaLimeGlass()],
129 ratios=[part_air, part_glass],
130 thermal_conductivity=0.34989,
131 )
134class WindowFrame(CompositeMaterialSolid):
135 def __init__(self):
136 super().__init__(
137 name="WindowFrame",
138 materials=[Air(), PolyvinylChloride()],
139 ratios=[0.9, 0.1],
140 thermal_conductivity=0.47176, # with alpha_i = 7.3 and alpha_amb = 25 the U value is 2,8 like ISO 10077-2
141 )
144class WoodWall(CompositeMaterialSolid):
145 def __init__(self):
146 super().__init__(
147 name="WoodWall",
148 materials=[Air(), Wood()],
149 ratios=[0.8, 0.2],
150 )
153class WindowHallway(CompositeMaterialSolid):
154 def __init__(self):
155 glas_ratio = 0.6 / 11.5
156 super().__init__(
157 name="WindowHallway",
158 materials=[Air(), WindowGlass()],
159 ratios=[1 - glas_ratio, glas_ratio],
160 )
163class WindowInBetween(CompositeMaterialSolid):
164 def __init__(self):
165 metal_ratio = 0.003 / 0.085
166 super().__init__(
167 name="WindowHallway",
168 materials=[EPS032(), Metal()],
169 ratios=[1 - metal_ratio, metal_ratio],
170 )
173class Cladding(CompositeMaterialSolid):
174 def __init__(self):
175 wood_ratio = 1.6 / 20
176 super().__init__(
177 name="WindowHallway",
178 materials=[Air(), Wood()],
179 ratios=[1 - wood_ratio, wood_ratio],
180 )
183class MetalWater(CompositeMaterialSolid):
184 def __init__(self, metal_ratio=1.8 / 16):
185 super().__init__(
186 name=f"MetalWater_{metal_ratio:.5g}",
187 materials=[Metal(), Water()],
188 ratios=[metal_ratio, 1 - metal_ratio],
189 )