Spaces:
Sleeping
Sleeping
| """ | |
| BuildSustain - Materials, Fenestrations, and Constructions Data Module | |
| This module provides default materials, fenestrations, and constructions data for the BuildSustain application. | |
| Developed by: Dr Majed Abuseif, Deakin University | |
| © 2025 | |
| """ | |
| import logging | |
| from typing import Dict, List, Any | |
| # Configure logging | |
| logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
| logger = logging.getLogger(__name__) | |
| # Default values | |
| DEFAULT_MATERIAL_PROPERTIES = { | |
| "absorptivity": 0.5, | |
| "emissivity": 0.925, | |
| "thickness_range": {"min": 0.01, "max": 0.5} | |
| } | |
| DEFAULT_WINDOW_PROPERTIES = {"h_o": 17.8} | |
| DEFAULT_DOOR_PROPERTIES = {"emissivity": 0.925} | |
| # Sample Materials Data | |
| SAMPLE_MATERIALS = { | |
| name: { | |
| "type": "opaque", | |
| "category": category, | |
| "thermal_properties": { | |
| "conductivity": data[0], | |
| "density": data[1], | |
| "specific_heat": data[2] | |
| }, | |
| "thickness_range": {**DEFAULT_MATERIAL_PROPERTIES["thickness_range"], "default": data[3]}, | |
| "embodied_carbon": data[4], | |
| "absorptivity": data[5] if len(data) > 5 else DEFAULT_MATERIAL_PROPERTIES["absorptivity"], | |
| "emissivity": data[6] if len(data) > 6 else DEFAULT_MATERIAL_PROPERTIES["emissivity"], | |
| "cost": { | |
| "material": data[7] if len(data) > 7 else 10.0, | |
| "labor": (data[7] * 0.5) if len(data) > 7 else 5.0, | |
| "replacement_years": 50 if category in ["Structural", "Sub-Structural"] else 40 if category == "Finishing" else 30 | |
| }, | |
| "description": f"{name} for {category.lower()} applications" | |
| } for name, category, data in [ | |
| ("F04 Wall air space resistance", "Insulation", [0.01, 1.0, 1000.0, 0.01, 0.01, 0.5, 0.925, 0.5]), | |
| ("F05 Ceiling air space resistance", "Insulation", [0.01, 1.0, 1000.0, 0.01, 0.01, 0.5, 0.925, 0.5]), | |
| ("F06 EIFS finish", "Finishing", [0.72, 1856.0, 840.0, 0.0095, 0.3, 0.5, 0.925, 17.6]), | |
| ("F07 25mm stucco", "Finishing", [0.72, 1856.0, 840.0, 0.0254, 0.2, 0.6, 0.91, 14.1]), | |
| ("F08 Metal surface", "Sub-Structural", [45.28, 7824.0, 500.0, 0.001, 2.2, 0.7, 0.075, 25.0]), | |
| ("F09 25mm cement plaster", "Finishing", [0.72, 1856.0, 840.0, 0.0254, 0.2, 0.6, 0.91, 14.1]), | |
| ("F10 13mm gypsum board", "Finishing", [0.16, 800.0, 1090.0, 0.0127, 0.25, 0.4, 0.925, 5.1]), | |
| ("F11 16mm gypsum board", "Finishing", [0.16, 800.0, 1090.0, 0.0159, 0.25, 0.4, 0.925, 6.4]), | |
| ("F12 19mm gypsum board", "Finishing", [0.16, 800.0, 1090.0, 0.0191, 0.25, 0.4, 0.925, 7.6]), | |
| ("F13 13mm cement plaster", "Finishing", [0.72, 1856.0, 840.0, 0.0127, 0.2, 0.6, 0.91, 7.1]), | |
| ("F14 13mm lime plaster", "Finishing", [0.72, 1600.0, 840.0, 0.0127, 0.2, 0.5, 0.90, 6.1]), | |
| ("F15 22mm cement plaster", "Finishing", [0.72, 1856.0, 840.0, 0.0222, 0.2, 0.6, 0.91, 12.4]), | |
| ("F16 Acoustic tile", "Finishing", [0.06, 368.0, 590.0, 0.0191, 1.0, 0.4, 0.925, 14.0]), | |
| ("F17 13mm slag", "Finishing", [0.16, 960.0, 1090.0, 0.0127, 0.2, 0.5, 0.925, 1.0]), | |
| ("F18 25mm slag", "Finishing", [0.16, 960.0, 1090.0, 0.0254, 0.2, 0.5, 0.925, 1.9]), | |
| ("G01 13mm gypsum board", "Finishing", [0.16, 800.0, 1090.0, 0.0127, 0.25, 0.4, 0.925, 5.1]), | |
| ("G01a 19mm gypsum board", "Finishing", [0.16, 800.0, 1090.0, 0.0191, 0.25, 0.4, 0.925, 7.6]), | |
| ("G02 25mm cement plaster", "Finishing", [0.72, 1856.0, 840.0, 0.0254, 0.2, 0.6, 0.91, 14.1]), | |
| ("G03 13mm lime plaster", "Finishing", [0.72, 1600.0, 840.0, 0.0127, 0.25, 0.5, 0.90, 6.1]), | |
| ("G04 13mm cement plaster", "Finishing", [0.72, 1856.0, 840.0, 0.0127, 0.2, 0.6, 0.91, 7.1]), | |
| ("G05 25mm wood", "Sub-Structural", [0.15, 608.0, 1630.0, 0.0254, 0.3, 0.5, 0.925, 15.4]), | |
| ("G06 19mm wood", "Sub-Structural", [0.15, 608.0, 1630.0, 0.0191, 0.3, 0.5, 0.925, 11.6]), | |
| ("I01 25mm insulation board", "Insulation", [0.03, 43.0, 1210.0, 0.0254, 2.5, 0.5, 0.925, 1.1]), | |
| ("I02 50mm insulation board", "Insulation", [0.03, 43.0, 1210.0, 0.0508, 2.5, 0.5, 0.925, 2.2]), | |
| ("I03 75mm insulation board", "Insulation", [0.03, 43.0, 1210.0, 0.0762, 2.5, 0.5, 0.925, 3.3]), | |
| ("M01 100mm brick", "Structural", [0.89, 1920.0, 790.0, 0.1016, 0.3, 0.7, 0.93, 19.5]), | |
| ("M02 100mm face brick", "Structural", [1.33, 2000.0, 790.0, 0.1016, 0.3, 0.7, 0.93, 20.3]), | |
| ("M03 150mm brick", "Structural", [0.89, 1920.0, 790.0, 0.1524, 0.3, 0.7, 0.93, 29.3]), | |
| ("M04 200mm concrete block", "Structural", [0.51, 800.0, 920.0, 0.2032, 0.2, 0.65, 0.925, 13.0]), | |
| ("M05 200mm concrete block", "Structural", [1.11, 1280.0, 920.0, 0.2032, 0.2, 0.65, 0.925, 20.8]), | |
| ("M06 150mm concrete block", "Structural", [0.51, 800.0, 920.0, 0.1524, 0.2, 0.65, 0.925, 9.8]), | |
| ("M07 100mm concrete block", "Structural", [0.51, 800.0, 920.0, 0.1016, 0.2, 0.65, 0.925, 6.5]), | |
| ("M08 150mm concrete block", "Structural", [1.11, 1280.0, 920.0, 0.1524, 0.2, 0.65, 0.925, 15.6]), | |
| ("M09 100mm concrete block", "Structural", [1.11, 1280.0, 920.0, 0.1016, 0.2, 0.65, 0.925, 10.4]), | |
| ("M10 100mm lightweight concrete", "Structural", [0.53, 1280.0, 840.0, 0.1016, 0.15, 0.65, 0.925, 7.8]), | |
| ("M11 100mm lightweight concrete", "Structural", [0.53, 1280.0, 840.0, 0.1016, 0.15, 0.65, 0.925, 7.8]), | |
| ("M12 150mm lightweight concrete", "Structural", [0.53, 1280.0, 840.0, 0.1524, 0.15, 0.65, 0.925, 11.7]), | |
| ("M13 200mm lightweight concrete", "Structural", [0.53, 1280.0, 840.0, 0.2032, 0.15, 0.65, 0.925, 15.6]), | |
| ("M14 100mm heavyweight concrete", "Structural", [1.95, 2240.0, 900.0, 0.1016, 0.2, 0.65, 0.925, 18.2]), | |
| ("M14a 100mm heavyweight concrete", "Structural", [1.95, 2240.0, 900.0, 0.1016, 0.2, 0.65, 0.925, 18.2]), | |
| ("M15 200mm heavyweight concrete", "Structural", [1.95, 2240.0, 900.0, 0.2032, 0.2, 0.65, 0.925, 36.4]), | |
| ("M16 300mm heavyweight concrete", "Structural", [1.95, 2240.0, 900.0, 0.3048, 0.2, 0.65, 0.925, 54.6]), | |
| ("M17 100mm stone", "Structural", [2.10, 2240.0, 880.0, 0.1016, 0.2, 0.7, 0.925, 22.8]), | |
| ("M18 150mm stone", "Structural", [2.10, 2240.0, 880.0, 0.1524, 0.2, 0.7, 0.925, 34.1]), | |
| ("M19 100mm limestone", "Structural", [1.80, 2320.0, 880.0, 0.1016, 0.2, 0.6, 0.925, 23.6]), | |
| ("M20 150mm limestone", "Structural", [1.80, 2320.0, 880.0, 0.1524, 0.2, 0.6, 0.925, 35.4]), | |
| ("M21 200mm limestone", "Structural", [1.80, 2320.0, 880.0, 0.2032, 0.2, 0.6, 0.925, 47.1]), | |
| ("M22 100mm granite", "Structural", [2.80, 2640.0, 880.0, 0.1016, 0.2, 0.7, 0.925, 26.8]), | |
| ("M23 150mm granite", "Structural", [2.80, 2640.0, 880.0, 0.1524, 0.2, 0.7, 0.925, 40.2]), | |
| ("M24 200mm granite", "Structural", [2.80, 2640.0, 880.0, 0.2032, 0.2, 0.7, 0.925, 53.6]), | |
| ("M25 100mm marble", "Structural", [2.50, 2720.0, 880.0, 0.1016, 0.2, 0.6, 0.925, 27.6]), | |
| ("M26 150mm marble", "Structural", [2.50, 2720.0, 880.0, 0.1524, 0.2, 0.6, 0.925, 41.4]), | |
| ("M27 200mm marble", "Structural", [2.50, 2720.0, 880.0, 0.2032, 0.2, 0.6, 0.925, 55.3]) | |
| ] | |
| } | |
| # Sample Fenestrations Data | |
| SAMPLE_FENESTRATIONS = { | |
| **{ | |
| name: { | |
| "type": "window", | |
| "performance": { | |
| "u_value": data[0], | |
| "shgc": data[1], | |
| "visible_transmittance": data[1] * 0.7 | |
| }, | |
| "embodied_carbon": data[2], | |
| "h_o": data[3] if len(data) > 3 else DEFAULT_WINDOW_PROPERTIES["h_o"], | |
| "cost": { | |
| "material": data[4] if len(data) > 4 else 100.0, | |
| "labor": (data[4] * 0.3) if len(data) > 4 else 30.0, | |
| "replacement_years": 30 | |
| }, | |
| "description": f"{name} glazing for window applications" | |
| } for name, data in [ | |
| ("Single Clear 3mm", [5.8, 0.81, 25.0, 17.8, 50.0]), | |
| ("Single Clear 6mm", [5.7, 0.78, 28.0, 17.8, 60.0]), | |
| ("Single Tinted 6mm", [5.7, 0.55, 30.0, 17.8, 70.0]), | |
| ("Double Clear 6mm/13mm Air", [2.7, 0.70, 40.0, 17.8, 100.0]), | |
| ("Double Low-E 6mm/13mm Air", [1.5, 0.60, 45.0, 17.8, 120.0]), | |
| ("Double Tinted 6mm/13mm Air", [2.7, 0.45, 42.0, 17.8, 110.0]), | |
| ("Double Low-E 6mm/13mm Argon", [1.5, 0.55, 48.0, 17.8, 130.0]), | |
| ("Triple Clear 4mm/12mm Air", [1.8, 0.62, 55.0, 17.8, 150.0]), | |
| ("Triple Low-E 4mm/12mm Argon", [0.9, 0.50, 60.0, 17.8, 180.0]), | |
| ("Single Low-E Reflective 6mm", [5.6, 0.35, 35.0, 13.0, 90.0]), | |
| ("Double Reflective 6mm/13mm Air", [2.5, 0.30, 50.0, 13.0, 140.0]), | |
| ("Electrochromic 6mm/13mm Air", [2.0, 0.40, 70.0, 17.8, 200.0]) | |
| ] | |
| }, | |
| } | |
| # Sample Constructions Data | |
| SAMPLE_CONSTRUCTIONS = { | |
| name: { | |
| "type": c_type, | |
| "layers": layers, | |
| "u_value": data[0], | |
| "embodied_carbon": data[1], | |
| "absorptivity": data[2], | |
| "cost": { | |
| "material": data[3], | |
| "labor": data[3] * 0.5, | |
| "replacement_years": 75 if c_type in ["roof", "floor"] else 50 | |
| }, | |
| "description": f"{name} for {c_type.lower()} applications" | |
| } for name, c_type, layers, data in [ | |
| ("Light Exterior Wall", "wall", [ | |
| {"material": "F08 Metal surface", "thickness": 0.001}, | |
| {"material": "I02 50mm insulation board", "thickness": 0.0508}, | |
| {"material": "F04 Wall air space resistance", "thickness": 0.01}, | |
| {"material": "G01a 19mm gypsum board", "thickness": 0.0191} | |
| ], [0.39, 7.85, 0.7, 25.1]), | |
| ("Light Roof/Ceiling", "roof", [ | |
| {"material": "M11 100mm lightweight concrete", "thickness": 0.1016}, | |
| {"material": "F05 Ceiling air space resistance", "thickness": 0.01}, | |
| {"material": "F16 Acoustic tile", "thickness": 0.0191} | |
| ], [0.48, 9.45, 0.65, 22.9]), | |
| ("Light Floor", "floor", [ | |
| {"material": "F16 Acoustic tile", "thickness": 0.0191}, | |
| {"material": "F05 Ceiling air space resistance", "thickness": 0.01}, | |
| {"material": "M11 100mm lightweight concrete", "thickness": 0.1016} | |
| ], [0.48, 9.45, 0.65, 22.9]), | |
| ("Heavy Exterior Wall", "wall", [ | |
| {"material": "M01 100mm brick", "thickness": 0.1016}, | |
| {"material": "I02 50mm insulation board", "thickness": 0.0508}, | |
| {"material": "F04 Wall air space resistance", "thickness": 0.01}, | |
| {"material": "G01 13mm gypsum board", "thickness": 0.0127} | |
| ], [0.45, 8.5, 0.7, 26.8]), | |
| ("Heavy Roof/Ceiling", "roof", [ | |
| {"material": "M15 200mm heavyweight concrete", "thickness": 0.2032}, | |
| {"material": "F05 Ceiling air space resistance", "thickness": 0.01}, | |
| {"material": "F10 13mm gypsum board", "thickness": 0.0127} | |
| ], [0.35, 10.2, 0.65, 35.6]), | |
| ("Heavy Floor", "floor", [ | |
| {"material": "M15 200mm heavyweight concrete", "thickness": 0.2032}, | |
| {"material": "F05 Ceiling air space resistance", "thickness": 0.01}, | |
| {"material": "F16 Acoustic tile", "thickness": 0.0191} | |
| ], [0.35, 10.2, 0.65, 35.6]), | |
| ("Insulated Wall", "wall", [ | |
| {"material": "F07 25mm stucco", "thickness": 0.0254}, | |
| {"material": "I03 75mm insulation board", "thickness": 0.0762}, | |
| {"material": "F04 Wall air space resistance", "thickness": 0.01}, | |
| {"material": "G01a 19mm gypsum board", "thickness": 0.0191} | |
| ], [0.30, 9.0, 0.6, 22.5]), | |
| ("Metal Clad Wall", "wall", [ | |
| {"material": "F08 Metal surface", "thickness": 0.001}, | |
| {"material": "I02 50mm insulation board", "thickness": 0.0508}, | |
| {"material": "G05 25mm wood", "thickness": 0.0254} | |
| ], [0.38, 8.0, 0.7, 24.5]), | |
| ("Concrete Wall", "wall", [ | |
| {"material": "M14 100mm heavyweight concrete", "thickness": 0.1016}, | |
| {"material": "I01 25mm insulation board", "thickness": 0.0254}, | |
| {"material": "F10 13mm gypsum board", "thickness": 0.0127} | |
| ], [0.50, 7.5, 0.65, 20.0]) | |
| ] | |
| } | |
| # Getter Functions | |
| def get_default_materials() -> Dict[str, Any]: | |
| """Returns the default materials dictionary.""" | |
| logger.debug("Retrieving default materials") | |
| return SAMPLE_MATERIALS | |
| def get_default_fenestrations() -> Dict[str, Any]: | |
| """Returns the default fenestrations dictionary.""" | |
| logger.debug("Retrieving default fenestrations") | |
| return SAMPLE_FENESTRATIONS | |
| def get_default_constructions() -> Dict[str, Any]: | |
| """Returns the default constructions dictionary.""" | |
| logger.debug("Retrieving default constructions") | |
| return SAMPLE_CONSTRUCTIONS |