mabuseif commited on
Commit
37923dd
·
verified ·
1 Parent(s): 303e513

Update data/ashrae_tables.py

Browse files
Files changed (1) hide show
  1. data/ashrae_tables.py +67 -0
data/ashrae_tables.py CHANGED
@@ -233,6 +233,73 @@ class ASHRAETables:
233
  return df
234
  except Exception as e:
235
  raise Exception(f"Error loading latitude correction table: {str(e)}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
 
237
  def _load_occupancy_heat_gain_table(self) -> pd.DataFrame:
238
  """
 
233
  return df
234
  except Exception as e:
235
  raise Exception(f"Error loading latitude correction table: {str(e)}")
236
+
237
+ def _load_thermal_properties(self) -> pd.DataFrame:
238
+ """
239
+ Load thermal properties for wall and roof groups based on ASHRAE Handbook—Fundamentals (2017, Chapter 18).
240
+ Returns: DataFrame with columns 'group' (wall/roof group), 'type' (wall/roof), 'U_value' (Btu/h-ft²-°F).
241
+ """
242
+ try:
243
+ # U-values (overall heat transfer coefficients) for wall and roof groups
244
+ # Values are approximate; adjust based on ASHRAE Chapter 18 or project data
245
+ data = [
246
+ {'group': 'A', 'type': 'wall', 'U_value': 0.20}, # Light construction
247
+ {'group': 'B', 'type': 'wall', 'U_value': 0.15},
248
+ {'group': 'C', 'type': 'wall', 'U_value': 0.12},
249
+ {'group': 'D', 'type': 'wall', 'U_value': 0.10},
250
+ {'group': 'E', 'type': 'wall', 'U_value': 0.08},
251
+ {'group': 'F', 'type': 'wall', 'U_value': 0.06},
252
+ {'group': 'G', 'type': 'wall', 'U_value': 0.05},
253
+ {'group': 'H', 'type': 'wall', 'U_value': 0.04}, # Heavy construction
254
+ {'group': 'A', 'type': 'roof', 'U_value': 0.25}, # Light construction
255
+ {'group': 'B', 'type': 'roof', 'U_value': 0.20},
256
+ {'group': 'C', 'type': 'roof', 'U_value': 0.15},
257
+ {'group': 'D', 'type': 'roof', 'U_value': 0.12},
258
+ {'group': 'E', 'type': 'roof', 'U_value': 0.10},
259
+ {'group': 'F', 'type': 'roof', 'U_value': 0.08},
260
+ {'group': 'G', 'type': 'roof', 'U_value': 0.06} # Heavy construction
261
+ ]
262
+ return pd.DataFrame(data)
263
+ except Exception as e:
264
+ raise Exception(f"Error loading thermal properties table: {str(e)}")
265
+
266
+ def _load_roof_classifications(self) -> pd.DataFrame:
267
+ """
268
+ Load roof classification data based on ASHRAE Handbook—Fundamentals (2017, Chapter 18).
269
+ Returns: DataFrame with columns 'group' (roof group), 'description', 'mass' (lb/ft²).
270
+ """
271
+ try:
272
+ # Roof classifications with approximate mass per unit area
273
+ # Values are placeholders; adjust based on ASHRAE or project data
274
+ data = [
275
+ {'group': 'A', 'description': 'Light metal deck, minimal insulation', 'mass': 5.0},
276
+ {'group': 'B', 'description': 'Light metal deck, moderate insulation', 'mass': 10.0},
277
+ {'group': 'C', 'description': 'Concrete slab, light insulation', 'mass': 20.0},
278
+ {'group': 'D', 'description': 'Concrete slab, moderate insulation', 'mass': 30.0},
279
+ {'group': 'E', 'description': 'Heavy concrete, light insulation', 'mass': 40.0},
280
+ {'group': 'F', 'description': 'Heavy concrete, moderate insulation', 'mass': 50.0},
281
+ {'group': 'G', 'description': 'Heavy concrete, high insulation', 'mass': 60.0}
282
+ ]
283
+ return pd.DataFrame(data)
284
+ except Exception as e:
285
+ raise Exception(f"Error loading roof classifications table: {str(e)}")
286
+
287
+ def _load_fenestration_correction(self) -> Dict[str, float]:
288
+ """
289
+ Load fenestration correction factors based on ASHRAE Handbook—Fundamentals (2017, Chapter 18).
290
+ Returns: Dictionary mapping fenestration types to correction factors (dimensionless).
291
+ """
292
+ try:
293
+ # Correction factors for fenestration (e.g., glazing types)
294
+ # Values are placeholders; adjust based on ASHRAE or project data
295
+ return {
296
+ 'Standard': 1.0, # Baseline glazing
297
+ 'Low-E': 0.85, # Low-emissivity glazing
298
+ 'Tinted': 0.90, # Tinted glazing
299
+ 'Reflective': 0.80 # Reflective coating
300
+ }
301
+ except Exception as e:
302
+ raise Exception(f"Error loading fenestration correction table: {str(e)}")
303
 
304
  def _load_occupancy_heat_gain_table(self) -> pd.DataFrame:
305
  """