Coverage for pyrc \ core \ materials.py: 72%
61 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-07 08:20 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-07 08:20 +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=400, # J/(kg*K)
39 thermal_conductivity=40, # W/(m*K)
40 )
43class Copper(Solid):
44 def __init__(self):
45 super().__init__(
46 name="Copper",
47 density=8935, # kg/m^3,
48 heat_capacity=385, # J/(kg*K)
49 thermal_conductivity=400, # W/(m*K)
50 )
53class EPS032(Solid):
54 def __init__(self):
55 # https://knauf.com/api/download-center/v1/assets/cf95bd43-57c8-4261-a11d-0e206a8927c2?download=true&country=de
56 super().__init__(
57 name="EPS_032",
58 density=20,
59 # kg/m^3, https://teamce.com.au/wp-content/themes/cecsgroup/_datasheets/concrete-formwork/styrene-insulation/Polystyrene.pdf
60 heat_capacity=1.450e3, # J/(kg*K)
61 thermal_conductivity=0.032, # W/(m*K)
62 )
65class SandLimeBrick(Solid):
66 def __init__(self):
67 # https://www.kalksandstein.de/produkte-daten-und-fakten/stoffwerte/
68 super().__init__(
69 name="Sand_Lime_Brick",
70 density=2.0e3, # kg/m^3
71 heat_capacity=0.88e3,
72 # J/(kg*K), https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
73 thermal_conductivity=1.1, # W/(m*K)
74 )
77class Concrete(Solid):
78 def __init__(self):
79 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
80 # https://www.schweizer-fn.de/stoff/wleit_isolierung/wleit_isolierung.php
81 super().__init__(
82 name="Concrete",
83 density=2.0e3, # kg/m^3
84 heat_capacity=1.0e3, # J/(kg*K)
85 thermal_conductivity=1.6, # W/(m*K)
86 )
89class Plaster(Solid):
90 def __init__(self):
91 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
92 # "Verputz"
93 # https://www.schweizer-fn.de/stoff/wleit_isolierung/wleit_isolierung.php
94 # "Kalkzementputz Maschinenputz"
95 super().__init__(
96 name="Plaster",
97 density=1.5e3, # kg/m^3
98 heat_capacity=0.8e3, # J/(kg*K)
99 thermal_conductivity=0.6, # W/(m*K)
100 )
103class Clinker(Solid):
104 def __init__(self):
105 # https://materialarchiv.ch/de/ma:material_1263?type=all
106 # https://www.schweizer-fn.de/stoff/wkapazitaet/wkapazitaet_baustoff_erde.php
107 super().__init__(
108 name="Clinker",
109 density=2.2e3, # kg/m^3
110 heat_capacity=900, # J/(kg*K)
111 thermal_conductivity=1.2, # W/(m*K)
112 )
115class Wood(Solid):
116 def __init__(self):
117 # https://de.wikipedia.org/wiki/Brettsperrholz
118 super().__init__(name="Glass", density=500, heat_capacity=1610, thermal_conductivity=0.14)
121class SodaLimeGlass(Solid):
122 def __init__(self):
123 # https://en.wikipedia.org/wiki/Soda%E2%80%93lime_glass
124 super().__init__(name="Glass", density=2520, heat_capacity=720, thermal_conductivity=1)
127class PolyvinylChloride(Solid):
128 def __init__(self):
129 # ISO 10077-2 appendix D table D.1
130 # heat capacity: https://materials.fsri.org/materialdetail/polyvinyl-chloride-pvc
131 super().__init__(name="PVC", density=1390, heat_capacity=1020, thermal_conductivity=0.17)
134class WindowGlass(CompositeMaterialSolid):
135 def __init__(self, part_air=0.077, part_glass=0.008):
136 super().__init__(
137 name="WindowGlass",
138 materials=[Air(), SodaLimeGlass()],
139 ratios=[part_air, part_glass],
140 thermal_conductivity=0.34989,
141 )
144class WindowFrame(CompositeMaterialSolid):
145 def __init__(self):
146 super().__init__(
147 name="WindowFrame",
148 materials=[Air(), PolyvinylChloride()],
149 ratios=[0.9, 0.1],
150 thermal_conductivity=0.47176, # with alpha_i = 7.3 and alpha_amb = 25 the U value is 2,8 like ISO 10077-2
151 )
154class WoodWall(CompositeMaterialSolid):
155 def __init__(self):
156 super().__init__(
157 name="WoodWall",
158 materials=[Air(), Wood()],
159 ratios=[0.8, 0.2],
160 )
163class WindowHallway(CompositeMaterialSolid):
164 def __init__(self):
165 glas_ratio = 0.6 / 11.5
166 super().__init__(
167 name="WindowHallway",
168 materials=[Air(), WindowGlass()],
169 ratios=[1 - glas_ratio, glas_ratio],
170 )
173class WindowInBetween(CompositeMaterialSolid):
174 def __init__(self):
175 metal_ratio = 0.003 / 0.085
176 super().__init__(
177 name="WindowHallway",
178 materials=[EPS032(), Metal()],
179 ratios=[1 - metal_ratio, metal_ratio],
180 )
183class Cladding(CompositeMaterialSolid):
184 def __init__(self):
185 wood_ratio = 1.6 / 20
186 super().__init__(
187 name="WindowHallway",
188 materials=[Air(), Wood()],
189 ratios=[1 - wood_ratio, wood_ratio],
190 )
193class MetalWater(CompositeMaterialSolid):
194 def __init__(self, metal_ratio=1.8 / 16):
195 super().__init__(
196 name=f"MetalWater_{metal_ratio:.5g}",
197 materials=[Metal(), Water()],
198 ratios=[metal_ratio, 1 - metal_ratio],
199 )