mabuseif commited on
Commit
297bc15
·
verified ·
1 Parent(s): 1ed2aaa

Upload m_c_data.py

Browse files
Files changed (1) hide show
  1. app/m_c_data.py +178 -0
app/m_c_data.py ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ HVAC Load Calculator - Materials, Fenestrations, and Constructions Data Module
3
+
4
+ This module centralizes all default materials, fenestrations, and constructions data for the
5
+ HVAC Load Calculator application. It provides sample data that can be imported by other modules.
6
+
7
+ Developed by: Dr Majed Abuseif, Deakin University
8
+ © 2025
9
+ """
10
+
11
+ import logging
12
+ from typing import Dict, List, Any
13
+
14
+ # Configure logging
15
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
16
+ logger = logging.getLogger(__name__)
17
+
18
+ # Sample Materials Data
19
+ # Each material has properties including thermal conductivity, density, specific heat,
20
+ # embodied carbon, and cost information
21
+ SAMPLE_MATERIALS = {
22
+ "Brick": {
23
+ "name": "Brick",
24
+ "type": "opaque",
25
+ "category": "Masonry",
26
+ "thermal_conductivity": 0.72, # W/m·K
27
+ "density": 1920, # kg/m³
28
+ "specific_heat": 840, # J/kg·K
29
+ "thickness_range": {
30
+ "min": 0.09, # m
31
+ "max": 0.24, # m
32
+ "default": 0.11 # m
33
+ },
34
+ "embodied_carbon": 0.24, # kgCO2e/kg
35
+ "cost": {
36
+ "material": 85.0, # $/m³
37
+ "labor": 45.0, # $/m²
38
+ "replacement_years": 50 # years
39
+ },
40
+ "description": "Standard clay brick for exterior walls"
41
+ },
42
+ "Concrete": {
43
+ "name": "Concrete",
44
+ "type": "opaque",
45
+ "category": "Masonry",
46
+ "thermal_conductivity": 1.4, # W/m·K
47
+ "density": 2300, # kg/m³
48
+ "specific_heat": 880, # J/kg·K
49
+ "thickness_range": {
50
+ "min": 0.10, # m
51
+ "max": 0.30, # m
52
+ "default": 0.15 # m
53
+ },
54
+ "embodied_carbon": 0.11, # kgCO2e/kg
55
+ "cost": {
56
+ "material": 120.0, # $/m³
57
+ "labor": 55.0, # $/m²
58
+ "replacement_years": 75 # years
59
+ },
60
+ "description": "Standard concrete for structural elements"
61
+ }
62
+ }
63
+
64
+ # Sample Fenestrations Data
65
+ # Each fenestration has properties including U-value, SHGC, visible transmittance,
66
+ # embodied carbon, and cost information
67
+ SAMPLE_FENESTRATIONS = {
68
+ "Double Glazed Window": {
69
+ "name": "Double Glazed Window",
70
+ "type": "window",
71
+ "u_value": 2.8, # W/m²·K
72
+ "shgc": 0.7, # Solar Heat Gain Coefficient
73
+ "visible_transmittance": 0.74,
74
+ "embodied_carbon": 25.0, # kgCO2e/m²
75
+ "cost": {
76
+ "material": 350.0, # $/m²
77
+ "labor": 120.0, # $/m²
78
+ "replacement_years": 30 # years
79
+ },
80
+ "description": "Standard double glazed window with air gap"
81
+ },
82
+ "Solid Wood Door": {
83
+ "name": "Solid Wood Door",
84
+ "type": "door",
85
+ "u_value": 2.2, # W/m²·K
86
+ "solar_absorptivity": 0.7,
87
+ "embodied_carbon": 15.0, # kgCO2e/m²
88
+ "cost": {
89
+ "material": 280.0, # $/m²
90
+ "labor": 150.0, # $/m²
91
+ "replacement_years": 25 # years
92
+ },
93
+ "description": "Standard solid wood exterior door"
94
+ }
95
+ }
96
+
97
+ # Sample Constructions Data
98
+ # Each construction is a multi-layer assembly with properties including layers,
99
+ # overall U-value, thermal mass, and embodied carbon
100
+ SAMPLE_CONSTRUCTIONS = {
101
+ "Brick Wall with Insulation": {
102
+ "name": "Brick Wall with Insulation",
103
+ "type": "wall",
104
+ "layers": [
105
+ {
106
+ "material": "Brick",
107
+ "thickness": 0.11 # m
108
+ },
109
+ {
110
+ "material": "Mineral Wool Insulation",
111
+ "thickness": 0.05 # m
112
+ },
113
+ {
114
+ "material": "Gypsum Board",
115
+ "thickness": 0.013 # m
116
+ }
117
+ ],
118
+ "u_value": 0.45, # W/m²·K
119
+ "thermal_mass": 220.0, # kJ/m²·K
120
+ "embodied_carbon": 75.0, # kgCO2e/m²
121
+ "cost": {
122
+ "material": 95.0, # $/m²
123
+ "labor": 65.0, # $/m²
124
+ "replacement_years": 50 # years
125
+ },
126
+ "description": "Standard brick wall with mineral wool insulation and gypsum board interior finish"
127
+ },
128
+ "Concrete Floor": {
129
+ "name": "Concrete Floor",
130
+ "type": "floor",
131
+ "layers": [
132
+ {
133
+ "material": "Concrete",
134
+ "thickness": 0.15 # m
135
+ },
136
+ {
137
+ "material": "XPS Insulation",
138
+ "thickness": 0.05 # m
139
+ }
140
+ ],
141
+ "u_value": 0.55, # W/m²·K
142
+ "thermal_mass": 330.0, # kJ/m²·K
143
+ "embodied_carbon": 65.0, # kgCO2e/m²
144
+ "cost": {
145
+ "material": 85.0, # $/m²
146
+ "labor": 45.0, # $/m²
147
+ "replacement_years": 75 # years
148
+ },
149
+ "description": "Standard concrete floor with XPS insulation"
150
+ }
151
+ }
152
+
153
+ def get_default_materials() -> Dict[str, Any]:
154
+ """
155
+ Get the default materials data.
156
+
157
+ Returns:
158
+ Dict of material name to material properties
159
+ """
160
+ return SAMPLE_MATERIALS
161
+
162
+ def get_default_fenestrations() -> Dict[str, Any]:
163
+ """
164
+ Get the default fenestrations data.
165
+
166
+ Returns:
167
+ Dict of fenestration name to fenestration properties
168
+ """
169
+ return SAMPLE_FENESTRATIONS
170
+
171
+ def get_default_constructions() -> Dict[str, Any]:
172
+ """
173
+ Get the default constructions data.
174
+
175
+ Returns:
176
+ Dict of construction name to construction properties
177
+ """
178
+ return SAMPLE_CONSTRUCTIONS