ladybug-tools-in2 / standards-measure

Other
0 stars 0 forks source link

Sample Code for Constructions #2

Open chriswmackey opened 5 years ago

chriswmackey commented 5 years ago

This is a second priority behind https://github.com/ladybug-tools-in2/standards-measure/issues/1

I am guessing that each standard (different versions of ASHRAE 90.1, IECC in different climate zones) has a default construction set (correct me if I am wrong here). So maybe the sample code could be something like this:

exterior_walls = {}
exterior_roofs = {}
slabs_on_grade = {}
exposed_floors = {}
underground_walls = {}
underground_floors = {}
exterior_windows = {}

for standard in all_standards:
        for climate_zone in climate_zones:
                exterior_walls[standard][climate_zone] = get_construction()
                exterior_roofs[standard][climate_zone] = get_construction()
                slabs_on_grade[standard][climate_zone] = get_construction()
                exposed_floors[standard][climate_zone] = get_construction()
                underground_walls [standard][climate_zone] = get_construction()
                underground_floors[standard][climate_zone] = get_construction()
                exterior_windows[standard][climate_zone] = get_construction()

The get_construction() part should be replaced with code that actually gets the construction name and materials from the gem. I realize that not all standards have climate zones so maybe we just start with ASHRAE 90.1 and IECC (or, if you have an idea about how to do this for other standards, that would be great.

chriswmackey commented 5 years ago

I should also say that the categories for the different surface types (exterior_walls, exterior_roofs, etc.) can change if there is an important surface type that I am forgetting.

Other possible categories could be:

exterior_skylight = {}
exterior_door = {}
exterior_glass_door = {}

I was thinking that the following constructions do not vary by standard but always have the same default construction:

interior_window
interior_wall
air_wall
mdahlhausen commented 5 years ago

example code for constructions