From b7d126f28ce6db7a6ff228ad84d90c9700955244 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 27 Apr 2020 16:39:01 -0400 Subject: [PATCH] docs(samples): Add samples for dynamic radiance geometry --- .../model/model_radiance_dynamic_states.json | 1835 +++++++++++++++++ .../state/aperture_state_abridged_bsdf.json | 90 + ...perture_state_abridged_electrochromic.json | 4 + .../state/aperture_state_abridged_shades.json | 81 + samples/state/shade_state_abridged_snow.json | 4 + .../shade_state_abridged_tree_foliage.json | 79 + scripts/sample_model.py | 166 +- scripts/sample_state.py | 92 + 8 files changed, 2312 insertions(+), 39 deletions(-) create mode 100644 samples/model/model_radiance_dynamic_states.json create mode 100644 samples/state/aperture_state_abridged_bsdf.json create mode 100644 samples/state/aperture_state_abridged_electrochromic.json create mode 100644 samples/state/aperture_state_abridged_shades.json create mode 100644 samples/state/shade_state_abridged_snow.json create mode 100644 samples/state/shade_state_abridged_tree_foliage.json create mode 100644 scripts/sample_state.py diff --git a/samples/model/model_radiance_dynamic_states.json b/samples/model/model_radiance_dynamic_states.json new file mode 100644 index 0000000..d84397b --- /dev/null +++ b/samples/model/model_radiance_dynamic_states.json @@ -0,0 +1,1835 @@ +{ + "type": "Model", + "identifier": "Tiny_House", + "display_name": "Tiny_House", + "units": "Meters", + "properties": { + "type": "ModelProperties", + "energy": { + "type": "ModelEnergyProperties", + "terrain_type": "City", + "construction_sets": [ + { + "type": "ConstructionSetAbridged", + "identifier": "Default Generic Construction Set", + "wall_set": { + "type": "WallConstructionSetAbridged", + "exterior_construction": "Generic Exterior Wall", + "interior_construction": "Generic Interior Wall", + "ground_construction": "Generic Underground Wall" + }, + "floor_set": { + "type": "FloorConstructionSetAbridged", + "exterior_construction": "Generic Exposed Floor", + "interior_construction": "Generic Interior Floor", + "ground_construction": "Generic Ground Slab" + }, + "roof_ceiling_set": { + "type": "RoofCeilingConstructionSetAbridged", + "exterior_construction": "Generic Roof", + "interior_construction": "Generic Interior Ceiling", + "ground_construction": "Generic Underground Roof" + }, + "aperture_set": { + "type": "ApertureConstructionSetAbridged", + "window_construction": "Generic Double Pane", + "interior_construction": "Generic Single Pane", + "skylight_construction": "Generic Double Pane", + "operable_construction": "Generic Double Pane" + }, + "door_set": { + "type": "DoorConstructionSetAbridged", + "exterior_construction": "Generic Exterior Door", + "interior_construction": "Generic Interior Door", + "exterior_glass_construction": "Generic Double Pane", + "interior_glass_construction": "Generic Single Pane", + "overhead_construction": "Generic Exterior Door" + }, + "shade_construction": "Generic Shade", + "air_boundary_construction": "Generic Air Boundary" + } + ], + "global_construction_set": "Default Generic Construction Set", + "constructions": [ + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Exposed Floor", + "layers": [ + "Generic Painted Metal", + "Generic Ceiling Air Gap", + "Generic 50mm Insulation", + "Generic LW Concrete" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Roof", + "layers": [ + "Generic Roof Membrane", + "Generic 50mm Insulation", + "Generic LW Concrete", + "Generic Ceiling Air Gap", + "Generic Acoustic Tile" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Ground Slab", + "layers": [ + "Generic 50mm Insulation", + "Generic HW Concrete" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Interior Floor", + "layers": [ + "Generic Acoustic Tile", + "Generic Ceiling Air Gap", + "Generic LW Concrete" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Exterior Wall", + "layers": [ + "Generic Brick", + "Generic LW Concrete", + "Generic 50mm Insulation", + "Generic Wall Air Gap", + "Generic Gypsum Board" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Interior Ceiling", + "layers": [ + "Generic LW Concrete", + "Generic Ceiling Air Gap", + "Generic Acoustic Tile" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Exterior Door", + "layers": [ + "Generic Painted Metal", + "Generic 25mm Insulation", + "Generic Painted Metal" + ] + }, + { + "type": "WindowConstructionAbridged", + "identifier": "Generic Double Pane", + "layers": [ + "Generic Low-e Glass", + "Generic Window Air Gap", + "Generic Clear Glass" + ] + }, + { + "type": "ShadeConstruction", + "identifier": "Generic Shade", + "solar_reflectance": 0.35, + "visible_reflectance": 0.35, + "is_specular": false + }, + { + "type": "WindowConstructionAbridged", + "identifier": "Generic Single Pane", + "layers": [ + "Generic Clear Glass" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Underground Wall", + "layers": [ + "Generic 50mm Insulation", + "Generic HW Concrete", + "Generic Wall Air Gap", + "Generic Gypsum Board" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Underground Roof", + "layers": [ + "Generic 50mm Insulation", + "Generic HW Concrete", + "Generic Ceiling Air Gap", + "Generic Acoustic Tile" + ] + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Interior Door", + "layers": [ + "Generic 25mm Wood" + ] + }, + { + "type": "AirBoundaryConstructionAbridged", + "identifier": "Generic Air Boundary", + "air_mixing_per_area": 0.1, + "air_mixing_schedule": "Always On" + }, + { + "type": "OpaqueConstructionAbridged", + "identifier": "Generic Interior Wall", + "layers": [ + "Generic Gypsum Board", + "Generic Wall Air Gap", + "Generic Gypsum Board" + ] + } + ], + "materials": [ + { + "type": "EnergyMaterial", + "identifier": "Generic 25mm Insulation", + "roughness": "MediumRough", + "thickness": 0.05, + "conductivity": 0.03, + "density": 43.0, + "specific_heat": 1210.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.7, + "visible_absorptance": 0.7 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Brick", + "roughness": "MediumRough", + "thickness": 0.1, + "conductivity": 0.9, + "density": 1920.0, + "specific_heat": 790.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.65, + "visible_absorptance": 0.65 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic 25mm Wood", + "roughness": "MediumSmooth", + "thickness": 0.0254, + "conductivity": 0.15, + "density": 608.0, + "specific_heat": 1630.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.5, + "visible_absorptance": 0.5 + }, + { + "type": "EnergyWindowMaterialGas", + "identifier": "Generic Window Air Gap", + "thickness": 0.0127, + "gas_type": "Air" + }, + { + "type": "EnergyWindowMaterialGlazing", + "identifier": "Generic Clear Glass", + "thickness": 0.006, + "solar_transmittance": 0.77, + "solar_reflectance": 0.07, + "solar_reflectance_back": 0.07, + "visible_transmittance": 0.88, + "visible_reflectance": 0.08, + "visible_reflectance_back": 0.08, + "infrared_transmittance": 0.0, + "emissivity": 0.84, + "emissivity_back": 0.84, + "conductivity": 1.0, + "dirt_correction": 1.0, + "solar_diffusing": false + }, + { + "type": "EnergyMaterial", + "identifier": "Generic 50mm Insulation", + "roughness": "MediumRough", + "thickness": 0.05, + "conductivity": 0.03, + "density": 43.0, + "specific_heat": 1210.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.7, + "visible_absorptance": 0.7 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic HW Concrete", + "roughness": "MediumRough", + "thickness": 0.2, + "conductivity": 1.95, + "density": 2240.0, + "specific_heat": 900.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.8, + "visible_absorptance": 0.8 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Gypsum Board", + "roughness": "MediumSmooth", + "thickness": 0.0127, + "conductivity": 0.16, + "density": 800.0, + "specific_heat": 1090.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.5, + "visible_absorptance": 0.5 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic LW Concrete", + "roughness": "MediumRough", + "thickness": 0.1, + "conductivity": 0.53, + "density": 1280.0, + "specific_heat": 840.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.8, + "visible_absorptance": 0.8 + }, + { + "type": "EnergyWindowMaterialGlazing", + "identifier": "Generic Low-e Glass", + "thickness": 0.006, + "solar_transmittance": 0.45, + "solar_reflectance": 0.36, + "solar_reflectance_back": 0.36, + "visible_transmittance": 0.71, + "visible_reflectance": 0.21, + "visible_reflectance_back": 0.21, + "infrared_transmittance": 0.0, + "emissivity": 0.84, + "emissivity_back": 0.047, + "conductivity": 1.0, + "dirt_correction": 1.0, + "solar_diffusing": false + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Acoustic Tile", + "roughness": "MediumSmooth", + "thickness": 0.02, + "conductivity": 0.06, + "density": 368.0, + "specific_heat": 590.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.2, + "visible_absorptance": 0.2 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Wall Air Gap", + "roughness": "Smooth", + "thickness": 0.1, + "conductivity": 0.667, + "density": 1.28, + "specific_heat": 1000.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.7, + "visible_absorptance": 0.7 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Ceiling Air Gap", + "roughness": "Smooth", + "thickness": 0.1, + "conductivity": 0.556, + "density": 1.28, + "specific_heat": 1000.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.7, + "visible_absorptance": 0.7 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Roof Membrane", + "roughness": "MediumRough", + "thickness": 0.01, + "conductivity": 0.16, + "density": 1120.0, + "specific_heat": 1460.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.65, + "visible_absorptance": 0.65 + }, + { + "type": "EnergyMaterial", + "identifier": "Generic Painted Metal", + "roughness": "Smooth", + "thickness": 0.0015, + "conductivity": 45.0, + "density": 7690.0, + "specific_heat": 410.0, + "thermal_absorptance": 0.9, + "solar_absorptance": 0.5, + "visible_absorptance": 0.5 + } + ], + "hvacs": [], + "program_types": [], + "schedules": [ + { + "type": "ScheduleRulesetAbridged", + "identifier": "Always On", + "day_schedules": [ + { + "type": "ScheduleDay", + "identifier": "Always On_Day Schedule", + "values": [ + 1.0 + ], + "times": [ + [ + 0, + 0 + ] + ], + "interpolate": false + } + ], + "default_day_schedule": "Always On_Day Schedule", + "schedule_type_limit": "Fractional" + } + ], + "schedule_type_limits": [ + { + "type": "ScheduleTypeLimit", + "identifier": "Fractional", + "lower_limit": 0.0, + "upper_limit": 1.0, + "numeric_type": "Continuous", + "unit_type": "Dimensionless" + } + ] + }, + "radiance": { + "type": "ModelRadianceProperties", + "modifier_sets": [ + { + "type": "ModifierSetAbridged", + "identifier": "Generic_Interior_Visible_Modifier_Set", + "wall_set": { + "interior_modifier": "generic_wall_0.50", + "exterior_modifier": "generic_wall_0.50", + "type": "WallModifierSetAbridged" + }, + "floor_set": { + "interior_modifier": "generic_floor_0.20", + "exterior_modifier": "generic_floor_0.20", + "type": "FloorModifierSetAbridged" + }, + "roof_ceiling_set": { + "interior_modifier": "generic_ceiling_0.80", + "exterior_modifier": "generic_ceiling_0.80", + "type": "RoofCeilingModifierSetAbridged" + }, + "aperture_set": { + "interior_modifier": "generic_interior_window_vis_0.88", + "skylight_modifier": "generic_exterior_window_vis_0.64", + "operable_modifier": "generic_exterior_window_vis_0.64", + "type": "ApertureModifierSetAbridged", + "window_modifier": "generic_exterior_window_vis_0.64" + }, + "door_set": { + "interior_modifier": "generic_opaque_door_0.50", + "interior_glass_modifier": "generic_interior_window_vis_0.88", + "overhead_modifier": "generic_opaque_door_0.50", + "exterior_glass_modifier": "generic_exterior_window_vis_0.64", + "exterior_modifier": "generic_opaque_door_0.50", + "type": "DoorModifierSetAbridged" + }, + "shade_set": { + "interior_modifier": "generic_interior_shade_0.50", + "exterior_modifier": "generic_exterior_shade_0.35", + "type": "ShadeModifierSetAbridged" + }, + "air_boundary_modifier": "air_boundary" + } + ], + "global_modifier_set": "Generic_Interior_Visible_Modifier_Set", + "modifiers": [ + { + "modifier": null, + "type": "plastic", + "identifier": "generic_interior_shade_0.50", + "r_reflectance": 0.5, + "g_reflectance": 0.5, + "b_reflectance": 0.5, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_floor_0.20", + "r_reflectance": 0.2, + "g_reflectance": 0.2, + "b_reflectance": 0.2, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "custom_triple_pane_0.3", + "r_transmissivity": 0.3272140103902576, + "g_transmissivity": 0.3272140103902576, + "b_transmissivity": 0.3272140103902576, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "ElectrochromicState3", + "r_transmissivity": 0.15272298493612294, + "g_transmissivity": 0.15272298493612294, + "b_transmissivity": 0.15272298493612294, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_opaque_door_0.50", + "r_reflectance": 0.5, + "g_reflectance": 0.5, + "b_reflectance": 0.5, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "indoor_light_shelf_0.70", + "r_reflectance": 0.7, + "g_reflectance": 0.7, + "b_reflectance": 0.7, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "outdoor_light_shelf_0.5", + "r_reflectance": 0.5, + "g_reflectance": 0.5, + "b_reflectance": 0.5, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_exterior_shade_0.35", + "r_reflectance": 0.35, + "g_reflectance": 0.35, + "b_reflectance": 0.35, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "trans", + "identifier": "SummerLeaves", + "r_reflectance": 0.3, + "g_reflectance": 0.3, + "b_reflectance": 0.3, + "specularity": 0.0, + "roughness": 0.1, + "transmitted_diff": 0.15, + "transmitted_spec": 0.15, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "ElectrochromicState4", + "r_transmissivity": 0.010907888742458781, + "g_transmissivity": 0.010907888742458781, + "b_transmissivity": 0.010907888742458781, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "generic_exterior_window_vis_0.64", + "r_transmissivity": 0.6975761815384331, + "g_transmissivity": 0.6975761815384331, + "b_transmissivity": 0.6975761815384331, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "grass", + "r_reflectance": 0.3, + "g_reflectance": 0.3, + "b_reflectance": 0.3, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "snow", + "r_reflectance": 0.7, + "g_reflectance": 0.7, + "b_reflectance": 0.7, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "ElectrochromicState2", + "r_transmissivity": 0.2945034602948791, + "g_transmissivity": 0.2945034602948791, + "b_transmissivity": 0.2945034602948791, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_wall_0.50", + "r_reflectance": 0.5, + "g_reflectance": 0.5, + "b_reflectance": 0.5, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_ceiling_0.80", + "r_reflectance": 0.8, + "g_reflectance": 0.8, + "b_reflectance": 0.8, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + }, + { + "modifier": null, + "type": "trans", + "identifier": "WinterLeaves", + "r_reflectance": 0.1, + "g_reflectance": 0.1, + "b_reflectance": 0.1, + "specularity": 0.0, + "roughness": 0.1, + "transmitted_diff": 0.1, + "transmitted_spec": 0.6, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "air_boundary", + "r_transmissivity": 1.0, + "g_transmissivity": 1.0, + "b_transmissivity": 1.0, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "generic_interior_window_vis_0.88", + "r_transmissivity": 0.9584154328610596, + "g_transmissivity": 0.9584154328610596, + "b_transmissivity": 0.9584154328610596, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "glass", + "identifier": "ElectrochromicState1", + "r_transmissivity": 0.43621953425431875, + "g_transmissivity": 0.43621953425431875, + "b_transmissivity": 0.43621953425431875, + "refraction_index": null, + "dependencies": [] + }, + { + "modifier": null, + "type": "plastic", + "identifier": "generic_context_0.20", + "r_reflectance": 0.2, + "g_reflectance": 0.2, + "b_reflectance": 0.2, + "specularity": 0.0, + "roughness": 0.0, + "dependencies": [] + } + ] + } + }, + "rooms": [ + { + "type": "Room", + "identifier": "Tiny_House_Zone", + "display_name": "Tiny_House_Zone", + "properties": { + "type": "RoomPropertiesAbridged", + "energy": { + "type": "RoomEnergyPropertiesAbridged" + }, + "radiance": { + "type": "RoomRadiancePropertiesAbridged" + } + }, + "faces": [ + { + "type": "Face", + "identifier": "Tiny_House_Zone_Bottom", + "display_name": "Tiny_House_Zone_Bottom", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 10.0, + 0.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 5.0, + 0.0, + 0.0 + ] + ] + }, + "face_type": "Floor", + "boundary_condition": { + "type": "Ground" + } + }, + { + "type": "Face", + "identifier": "Tiny_House_Zone_Front", + "display_name": "Tiny_House_Zone_Front", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 10.0, + 3.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 0.0, + 10.0, + 0.0 + ], + [ + 0.0, + 10.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + }, + "apertures": [ + { + "type": "Aperture", + "identifier": "Front_Aperture", + "display_name": "Front_Aperture", + "properties": { + "type": "AperturePropertiesAbridged", + "energy": { + "type": "ApertureEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ApertureRadiancePropertiesAbridged", + "modifier": "custom_triple_pane_0.3" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 4.5, + 10.0, + 2.5 + ], + [ + 4.5, + 10.0, + 1.0 + ], + [ + 2.5, + 10.0, + 1.0 + ], + [ + 2.5, + 10.0, + 2.5 + ] + ] + }, + "is_operable": false, + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + } + ], + "doors": [ + { + "type": "Door", + "identifier": "Front_Door", + "display_name": "Front_Door", + "properties": { + "type": "DoorPropertiesAbridged", + "energy": { + "type": "DoorEnergyPropertiesAbridged" + }, + "radiance": { + "type": "DoorRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 2.0, + 10.0, + 2.5 + ], + [ + 2.0, + 10.0, + 0.1 + ], + [ + 1.0, + 10.0, + 0.1 + ], + [ + 1.0, + 10.0, + 2.5 + ] + ] + }, + "is_glass": false, + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + } + ], + "outdoor_shades": [ + { + "type": "Shade", + "identifier": "Tiny_House_Zone_Front_OutOverhang0", + "display_name": "Tiny_House_Zone_Front_OutOverhang0", + "properties": { + "type": "ShadePropertiesAbridged", + "energy": { + "type": "ShadeEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ShadeRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 10.0, + 2.9999998999999997 + ], + [ + 5.0, + 10.0, + 2.9999998999999997 + ], + [ + 5.0, + 10.25, + 2.9999998999999997 + ], + [ + 0.0, + 10.25, + 2.9999998999999997 + ] + ] + } + } + ] + }, + { + "type": "Face", + "identifier": "Tiny_House_Zone_Right", + "display_name": "Tiny_House_Zone_Right", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 0.0, + 3.0 + ], + [ + 5.0, + 0.0, + 0.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 5.0, + 10.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Surface", + "boundary_condition_objects": [ + "Tiny_Garage_Left", + "Tiny_Garage" + ] + }, + "apertures": [ + { + "type": "Aperture", + "identifier": "Tiny_House_Zone_Right_Glz0", + "display_name": "Tiny_House_Zone_Right_Glz0", + "properties": { + "type": "AperturePropertiesAbridged", + "energy": { + "type": "ApertureEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ApertureRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 3.41886116991581, + 1.974341649025257 + ], + [ + 5.0, + 3.41886116991581, + 1.025658350974743 + ], + [ + 5.0, + 6.58113883008419, + 1.025658350974743 + ], + [ + 5.0, + 6.58113883008419, + 1.974341649025257 + ] + ] + }, + "is_operable": false, + "boundary_condition": { + "type": "Surface", + "boundary_condition_objects": [ + "Tiny_Garage_Left_Glz0", + "Tiny_Garage_Left", + "Tiny_Garage" + ] + } + } + ] + }, + { + "type": "Face", + "identifier": "Tiny_House_Zone_Back", + "display_name": "Tiny_House_Zone_Back", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 3.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 5.0, + 0.0, + 0.0 + ], + [ + 5.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + }, + "apertures": [ + { + "type": "Aperture", + "identifier": "Tiny_House_Zone_Back_Glz0", + "display_name": "Tiny_House_Zone_Back_Glz0", + "properties": { + "type": "AperturePropertiesAbridged", + "energy": { + "type": "ApertureEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ApertureRadiancePropertiesAbridged", + "dynamic_group_identifier": "ElectrochromicWindow", + "states": [ + { + "type": "RadianceSubFaceStateAbridged", + "modifier": "ElectrochromicState1" + }, + { + "type": "RadianceSubFaceStateAbridged", + "modifier": "ElectrochromicState2" + }, + { + "type": "RadianceSubFaceStateAbridged", + "modifier": "ElectrochromicState3", + "shades": [ + { + "type": "Shade", + "identifier": "outdoor_awning", + "display_name": "outdoor_awning", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 2.0 + ], + [ + 5.0, + 0.0, + 2.0 + ], + [ + 5.0, + 2.0, + 2.0 + ], + [ + 0.0, + 2.0, + 2.0 + ] + ] + } + } + ] + }, + { + "type": "RadianceSubFaceStateAbridged", + "modifier": "ElectrochromicState4", + "shades": [ + { + "type": "Shade", + "identifier": "outdoor_awning", + "display_name": "outdoor_awning", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 2.0 + ], + [ + 5.0, + 0.0, + 2.0 + ], + [ + 5.0, + 2.0, + 2.0 + ], + [ + 0.0, + 2.0, + 2.0 + ] + ] + } + } + ] + } + ] + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.7322330470336311, + 0.0, + 2.5606601717798214 + ], + [ + 0.7322330470336311, + 0.0, + 0.4393398282201786 + ], + [ + 4.267766952966369, + 0.0, + 0.4393398282201786 + ], + [ + 4.267766952966369, + 0.0, + 2.5606601717798214 + ] + ] + }, + "is_operable": false, + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + } + ] + }, + { + "type": "Face", + "identifier": "Tiny_House_Zone_Left", + "display_name": "Tiny_House_Zone_Left", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 10.0, + 3.0 + ], + [ + 0.0, + 10.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + }, + { + "type": "Face", + "identifier": "Tiny_House_Zone_Top", + "display_name": "Tiny_House_Zone_Top", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 0.0, + 3.0 + ], + [ + 5.0, + 10.0, + 3.0 + ], + [ + 0.0, + 10.0, + 3.0 + ], + [ + 0.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "RoofCeiling", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + } + ], + "indoor_shades": [ + { + "type": "Shade", + "identifier": "indoor_light_shelf", + "display_name": "indoor_light_shelf", + "properties": { + "type": "ShadePropertiesAbridged", + "energy": { + "type": "ShadeEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "dynamic_group_identifier": "DynamicLightShelf", + "states": [ + { + "type": "RadianceShadeStateAbridged", + "modifier": "outdoor_light_shelf_0.5" + }, + { + "type": "RadianceShadeStateAbridged", + "modifier": "indoor_light_shelf_0.70" + } + ] + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 2.0 + ], + [ + -1.0, + 0.0, + 2.0 + ], + [ + -1.0, + 2.0, + 2.0 + ], + [ + 0.0, + 2.0, + 2.0 + ] + ] + } + } + ] + }, + { + "type": "Room", + "identifier": "Tiny_Garage", + "display_name": "Tiny_Garage", + "properties": { + "type": "RoomPropertiesAbridged", + "energy": { + "type": "RoomEnergyPropertiesAbridged" + }, + "radiance": { + "type": "RoomRadiancePropertiesAbridged" + } + }, + "faces": [ + { + "type": "Face", + "identifier": "Tiny_Garage_Bottom", + "display_name": "Tiny_Garage_Bottom", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 0.0, + 0.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 10.0, + 10.0, + 0.0 + ], + [ + 10.0, + 0.0, + 0.0 + ] + ] + }, + "face_type": "Floor", + "boundary_condition": { + "type": "Ground" + } + }, + { + "type": "Face", + "identifier": "Tiny_Garage_Front", + "display_name": "Tiny_Garage_Front", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 10.0, + 10.0, + 3.0 + ], + [ + 10.0, + 10.0, + 0.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 5.0, + 10.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + }, + { + "type": "Face", + "identifier": "Tiny_Garage_Right", + "display_name": "Tiny_Garage_Right", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 10.0, + 0.0, + 3.0 + ], + [ + 10.0, + 0.0, + 0.0 + ], + [ + 10.0, + 10.0, + 0.0 + ], + [ + 10.0, + 10.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + }, + { + "type": "Face", + "identifier": "Tiny_Garage_Back", + "display_name": "Tiny_Garage_Back", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 0.0, + 3.0 + ], + [ + 5.0, + 0.0, + 0.0 + ], + [ + 10.0, + 0.0, + 0.0 + ], + [ + 10.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + }, + { + "type": "Face", + "identifier": "Tiny_Garage_Left", + "display_name": "Tiny_Garage_Left", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 10.0, + 3.0 + ], + [ + 5.0, + 10.0, + 0.0 + ], + [ + 5.0, + 0.0, + 0.0 + ], + [ + 5.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "Wall", + "boundary_condition": { + "type": "Surface", + "boundary_condition_objects": [ + "Tiny_House_Zone_Right", + "Tiny_House_Zone" + ] + }, + "apertures": [ + { + "type": "Aperture", + "identifier": "Tiny_Garage_Left_Glz0", + "display_name": "Tiny_Garage_Left_Glz0", + "properties": { + "type": "AperturePropertiesAbridged", + "energy": { + "type": "ApertureEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ApertureRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 5.0, + 6.58113883008419, + 1.974341649025257 + ], + [ + 5.0, + 6.58113883008419, + 1.025658350974743 + ], + [ + 5.0, + 3.41886116991581, + 1.025658350974743 + ], + [ + 5.0, + 3.41886116991581, + 1.974341649025257 + ] + ] + }, + "is_operable": false, + "boundary_condition": { + "type": "Surface", + "boundary_condition_objects": [ + "Tiny_House_Zone_Right_Glz0", + "Tiny_House_Zone_Right", + "Tiny_House_Zone" + ] + } + } + ] + }, + { + "type": "Face", + "identifier": "Tiny_Garage_Top", + "display_name": "Tiny_Garage_Top", + "properties": { + "type": "FacePropertiesAbridged", + "energy": { + "type": "FaceEnergyPropertiesAbridged" + }, + "radiance": { + "type": "FaceRadiancePropertiesAbridged" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 10.0, + 0.0, + 3.0 + ], + [ + 10.0, + 10.0, + 3.0 + ], + [ + 5.0, + 10.0, + 3.0 + ], + [ + 5.0, + 0.0, + 3.0 + ] + ] + }, + "face_type": "RoofCeiling", + "boundary_condition": { + "type": "Outdoors", + "sun_exposure": true, + "wind_exposure": true, + "view_factor": { + "type": "Autocalculate" + } + } + } + ] + } + ], + "orphaned_shades": [ + { + "type": "Shade", + "identifier": "Ground", + "display_name": "Ground", + "properties": { + "type": "ShadePropertiesAbridged", + "energy": { + "type": "ShadeEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "dynamic_group_identifier": "SeasonalGround", + "states": [ + { + "type": "RadianceShadeStateAbridged", + "modifier": "grass" + }, + { + "type": "RadianceShadeStateAbridged", + "modifier": "snow" + } + ] + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + -10.0, + 0.0 + ], + [ + 10.0, + -10.0, + 0.0 + ], + [ + 10.0, + 0.0, + 0.0 + ], + [ + 0.0, + 0.0, + 0.0 + ] + ] + } + }, + { + "type": "Shade", + "identifier": "Tree_Canopy", + "display_name": "Tree_Canopy", + "properties": { + "type": "ShadePropertiesAbridged", + "energy": { + "type": "ShadeEnergyPropertiesAbridged" + }, + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "dynamic_group_identifier": "DeciduousTree", + "states": [ + { + "type": "RadianceShadeStateAbridged", + "modifier": "SummerLeaves" + }, + { + "type": "RadianceShadeStateAbridged", + "modifier": "WinterLeaves" + } + ] + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 3.2679491924311224, + -4.0, + 4.0 + ], + [ + 5.0, + -5.0, + 4.0 + ], + [ + 6.732050807568877, + -4.000000000000001, + 4.0 + ], + [ + 6.732050807568878, + -2.000000000000001, + 4.0 + ], + [ + 5.000000000000002, + -1.0, + 4.0 + ], + [ + 3.2679491924311233, + -1.9999999999999987, + 4.0 + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/samples/state/aperture_state_abridged_bsdf.json b/samples/state/aperture_state_abridged_bsdf.json new file mode 100644 index 0000000..be8b31e --- /dev/null +++ b/samples/state/aperture_state_abridged_bsdf.json @@ -0,0 +1,90 @@ +{ + "type": "RadianceSubFaceStateAbridged", + "modifier": "klemsfull", + "vmtx_geometry": { + "type": "Face3D", + "boundary": [ + [ + 1.0, + -0.025, + 0.0 + ], + [ + 1.0, + -0.025, + 3.0 + ], + [ + 0.0, + -0.025, + 3.0 + ], + [ + 0.0, + -0.025, + 0.0 + ] + ], + "plane": { + "type": "Plane", + "n": [ + -0.0, + -1.0, + -0.0 + ], + "o": [ + 0.0, + -0.025, + 0.0 + ], + "x": [ + -1.0, + 0.0, + -0.0 + ] + } + }, + "dmtx_geometry": { + "type": "Face3D", + "boundary": [ + [ + 1.0, + 0.025, + 0.0 + ], + [ + 1.0, + 0.025, + 3.0 + ], + [ + 0.0, + 0.025, + 3.0 + ], + [ + 0.0, + 0.025, + 0.0 + ] + ], + "plane": { + "type": "Plane", + "n": [ + -0.0, + -1.0, + -0.0 + ], + "o": [ + 0.0, + 0.025, + 0.0 + ], + "x": [ + -1.0, + 0.0, + -0.0 + ] + } + } +} \ No newline at end of file diff --git a/samples/state/aperture_state_abridged_electrochromic.json b/samples/state/aperture_state_abridged_electrochromic.json new file mode 100644 index 0000000..bc3d9ac --- /dev/null +++ b/samples/state/aperture_state_abridged_electrochromic.json @@ -0,0 +1,4 @@ +{ + "type": "RadianceSubFaceStateAbridged", + "modifier": "ElectrochromicGlass4" +} \ No newline at end of file diff --git a/samples/state/aperture_state_abridged_shades.json b/samples/state/aperture_state_abridged_shades.json new file mode 100644 index 0000000..19dc0d1 --- /dev/null +++ b/samples/state/aperture_state_abridged_shades.json @@ -0,0 +1,81 @@ +{ + "type": "RadianceSubFaceStateAbridged", + "modifier": "DiffusingShade", + "shades": [ + { + "type": "Shade", + "identifier": "RectangleShade1", + "display_name": "RectangleShade1", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "modifier": "ShadeMat" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 0.0 + ], + [ + 2.0, + 0.0, + 0.0 + ], + [ + 2.0, + 2.0, + 0.0 + ], + [ + 0.0, + 2.0, + 0.0 + ] + ] + } + }, + { + "type": "Shade", + "identifier": "RectangleShade2", + "display_name": "RectangleShade2", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "modifier": "ShadeMat" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 2.0 + ], + [ + 2.0, + 0.0, + 0.0 + ], + [ + 2.0, + 2.0, + 2.0 + ], + [ + 0.0, + 2.0, + 2.0 + ] + ] + } + } + ], + "modifier_direct": "DiffusingShadeDirect" +} \ No newline at end of file diff --git a/samples/state/shade_state_abridged_snow.json b/samples/state/shade_state_abridged_snow.json new file mode 100644 index 0000000..784e915 --- /dev/null +++ b/samples/state/shade_state_abridged_snow.json @@ -0,0 +1,4 @@ +{ + "type": "RadianceShadeStateAbridged", + "modifier": "SnowMaterial" +} \ No newline at end of file diff --git a/samples/state/shade_state_abridged_tree_foliage.json b/samples/state/shade_state_abridged_tree_foliage.json new file mode 100644 index 0000000..39e7f4f --- /dev/null +++ b/samples/state/shade_state_abridged_tree_foliage.json @@ -0,0 +1,79 @@ +{ + "type": "RadianceShadeStateAbridged", + "shades": [ + { + "type": "Shade", + "identifier": "tree_foliage1", + "display_name": "tree_foliage1", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "modifier": "TreeTrans1" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 5.0 + ], + [ + 2.0, + 0.0, + 5.0 + ], + [ + 2.0, + 2.0, + 5.0 + ], + [ + 0.0, + 2.0, + 5.0 + ] + ] + } + }, + { + "type": "Shade", + "identifier": "tree_foliage2", + "display_name": "tree_foliage2", + "properties": { + "type": "ShadePropertiesAbridged", + "radiance": { + "type": "ShadeRadiancePropertiesAbridged", + "modifier": "TreeTrans2" + } + }, + "geometry": { + "type": "Face3D", + "boundary": [ + [ + 0.0, + 0.0, + 5.0 + ], + [ + -2.0, + 0.0, + 5.0 + ], + [ + -2.0, + 2.0, + 5.0 + ], + [ + 0.0, + 2.0, + 5.0 + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/scripts/sample_model.py b/scripts/sample_model.py index a4404b7..db73f84 100644 --- a/scripts/sample_model.py +++ b/scripts/sample_model.py @@ -25,7 +25,8 @@ generic_double_pane from honeybee_radiance.modifierset import ModifierSet -from honeybee_radiance.modifier.material import Glass, Plastic +from honeybee_radiance.modifier.material import Glass, Plastic, Trans +from honeybee_radiance.state import RadianceShadeState, RadianceSubFaceState from ladybug_geometry.geometry3d.pointvector import Point3D, Vector3D from ladybug_geometry.geometry3d.plane import Plane @@ -178,42 +179,6 @@ def model_complete_multi_zone_office(directory): json.dump(model.to_dict(), fp, indent=4) -def model_complete_multiroom_radiance(directory): - triple_pane = Glass.from_single_transmittance('Triple_Pane_0.35', 0.35) - first_floor = Room.from_box('First_Floor', 10, 10, 3, origin=Point3D(0, 0, 0)) - second_floor = Room.from_box('Second_Floor', 10, 10, 3, origin=Point3D(0, 0, 3)) - for face in first_floor[1:5]: - face.apertures_by_ratio(0.2, 0.01) - face.apertures[0].properties.radiance.modifier = triple_pane - for face in second_floor[1:5]: - face.apertures_by_ratio(0.2, 0.01) - - pts_1 = [Point3D(0, 0, 6), Point3D(0, 10, 6), Point3D(10, 10, 6), Point3D(10, 0, 6)] - pts_2 = [Point3D(0, 0, 6), Point3D(5, 0, 9), Point3D(5, 10, 9), Point3D(0, 10, 6)] - pts_3 = [Point3D(10, 0, 6), Point3D(10, 10, 6), Point3D(5, 10, 9), Point3D(5, 0, 9)] - pts_4 = [Point3D(0, 0, 6), Point3D(10, 0, 6), Point3D(5, 0, 9)] - pts_5 = [Point3D(10, 10, 6), Point3D(0, 10, 6), Point3D(5, 10, 9)] - face_1 = Face('AtticFace1', Face3D(pts_1)) - face_2 = Face('AtticFace2', Face3D(pts_2)) - face_3 = Face('AtticFace3', Face3D(pts_3)) - face_4 = Face('AtticFace4', Face3D(pts_4)) - face_5 = Face('AtticFace5', Face3D(pts_5)) - attic = Room('Attic', [face_1, face_2, face_3, face_4, face_5], 0.01, 1) - - mod_set = ModifierSet('Attic_Modifier_Set') - polyiso = Plastic.from_single_reflectance('PolyIso', 0.45) - mod_set.roof_ceiling_set.exterior_modifier = polyiso - attic.properties.radiance.modifier_set = mod_set - - Room.solve_adjacency([first_floor, second_floor, attic], 0.01) - - model = Model('Multi_Room_Radiance_House', [first_floor, second_floor, attic]) - - dest_file = os.path.join(directory, 'model_complete_multiroom_radiance.json') - with open(dest_file, 'w') as fp: - json.dump(model.to_dict(), fp, indent=4) - - def model_complete_patient_room(directory): pat_room_program = \ prog_type_lib.program_type_by_identifier('2013::Hospital::ICU_PatRm') @@ -450,6 +415,124 @@ def model_energy_properties_office(directory): json.dump(model_dict['properties']['energy'], fp, indent=4) +def model_complete_multiroom_radiance(directory): + triple_pane = Glass.from_single_transmittance('Triple_Pane_0.35', 0.35) + first_floor = Room.from_box('First_Floor', 10, 10, 3, origin=Point3D(0, 0, 0)) + second_floor = Room.from_box('Second_Floor', 10, 10, 3, origin=Point3D(0, 0, 3)) + for face in first_floor[1:5]: + face.apertures_by_ratio(0.2, 0.01) + face.apertures[0].properties.radiance.modifier = triple_pane + for face in second_floor[1:5]: + face.apertures_by_ratio(0.2, 0.01) + + pts_1 = [Point3D(0, 0, 6), Point3D(0, 10, 6), Point3D(10, 10, 6), Point3D(10, 0, 6)] + pts_2 = [Point3D(0, 0, 6), Point3D(5, 0, 9), Point3D(5, 10, 9), Point3D(0, 10, 6)] + pts_3 = [Point3D(10, 0, 6), Point3D(10, 10, 6), Point3D(5, 10, 9), Point3D(5, 0, 9)] + pts_4 = [Point3D(0, 0, 6), Point3D(10, 0, 6), Point3D(5, 0, 9)] + pts_5 = [Point3D(10, 10, 6), Point3D(0, 10, 6), Point3D(5, 10, 9)] + face_1 = Face('AtticFace1', Face3D(pts_1)) + face_2 = Face('AtticFace2', Face3D(pts_2)) + face_3 = Face('AtticFace3', Face3D(pts_3)) + face_4 = Face('AtticFace4', Face3D(pts_4)) + face_5 = Face('AtticFace5', Face3D(pts_5)) + attic = Room('Attic', [face_1, face_2, face_3, face_4, face_5], 0.01, 1) + + mod_set = ModifierSet('Attic_Modifier_Set') + polyiso = Plastic.from_single_reflectance('PolyIso', 0.45) + mod_set.roof_ceiling_set.exterior_modifier = polyiso + attic.properties.radiance.modifier_set = mod_set + + Room.solve_adjacency([first_floor, second_floor, attic], 0.01) + + model = Model('Multi_Room_Radiance_House', [first_floor, second_floor, attic]) + + dest_file = os.path.join(directory, 'model_complete_multiroom_radiance.json') + with open(dest_file, 'w') as fp: + json.dump(model.to_dict(), fp, indent=4) + + +def model_radiance_dynamic_states(directory): + room = Room.from_box('Tiny_House_Zone', 5, 10, 3) + garage = Room.from_box('Tiny_Garage', 5, 10, 3, origin=Point3D(5, 0, 0)) + + south_face = room[3] + south_face.apertures_by_ratio(0.5, 0.01) + shd1 = Shade.from_vertices( + 'outdoor_awning', [[0, 0, 2], [5, 0, 2], [5, 2, 2], [0, 2, 2]]) + + ecglass1 = Glass.from_single_transmittance('ElectrochromicState1', 0.4) + ecglass2 = Glass.from_single_transmittance('ElectrochromicState2', 0.27) + ecglass3 = Glass.from_single_transmittance('ElectrochromicState3', 0.14) + ecglass4 = Glass.from_single_transmittance('ElectrochromicState4', 0.01) + + tint1 = RadianceSubFaceState(ecglass1) + tint2 = RadianceSubFaceState(ecglass2) + tint3 = RadianceSubFaceState(ecglass3, [shd1]) + tint4 = RadianceSubFaceState(ecglass4, [shd1.duplicate()]) + states = (tint1, tint2, tint3, tint4) + south_face.apertures[0].properties.radiance.dynamic_group_identifier = \ + 'ElectrochromicWindow' + south_face.apertures[0].properties.radiance.states = states + + shd2 = Shade.from_vertices( + 'indoor_light_shelf', [[0, 0, 2], [-1, 0, 2], [-1, 2, 2], [0, 2, 2]]) + ref_1 = Plastic.from_single_reflectance('outdoor_light_shelf_0.5', 0.5) + ref_2 = Plastic.from_single_reflectance('indoor_light_shelf_0.70', 0.7) + light_shelf_1 = RadianceShadeState(ref_1) + light_shelf_2 = RadianceShadeState(ref_2) + shelf_states = (light_shelf_1, light_shelf_2) + shd2.properties.radiance.dynamic_group_identifier = 'DynamicLightShelf' + shd2.properties.radiance.states = shelf_states + room.add_indoor_shade(shd2) + + north_face = room[1] + north_face.overhang(0.25, indoor=False) + door_verts = [Point3D(2, 10, 0.1), Point3D(1, 10, 0.1), + Point3D(1, 10, 2.5), Point3D(2, 10, 2.5)] + door = Door('Front_Door', Face3D(door_verts)) + north_face.add_door(door) + + aperture_verts = [Point3D(4.5, 10, 1), Point3D(2.5, 10, 1), + Point3D(2.5, 10, 2.5), Point3D(4.5, 10, 2.5)] + aperture = Aperture('Front_Aperture', Face3D(aperture_verts)) + triple_pane = Glass.from_single_transmittance('custom_triple_pane_0.3', 0.3) + aperture.properties.radiance.modifier = triple_pane + north_face.add_aperture(aperture) + + tree_canopy_geo = Face3D.from_regular_polygon( + 6, 2, Plane(Vector3D(0, 0, 1), Point3D(5, -3, 4))) + tree_canopy = Shade('Tree_Canopy', tree_canopy_geo) + sum_tree_trans = Trans.from_single_reflectance('SummerLeaves', 0.3, 0.0, 0.1, 0.15, 0.15) + win_tree_trans = Trans.from_single_reflectance('WinterLeaves', 0.1, 0.0, 0.1, 0.1, 0.6) + summer = RadianceShadeState(sum_tree_trans) + winter = RadianceShadeState(win_tree_trans) + tree_canopy.properties.radiance.dynamic_group_identifier = 'DeciduousTree' + tree_canopy.properties.radiance.states = (summer, winter) + + ground_geo = Face3D.from_rectangle(10, 10, Plane(o=Point3D(0, -10, 0))) + ground = Shade('Ground', ground_geo) + grass = Plastic.from_single_reflectance('grass', 0.3) + snow = Plastic.from_single_reflectance('snow', 0.7) + summer_ground = RadianceShadeState(grass) + winter_ground = RadianceShadeState(snow) + ground.properties.radiance.dynamic_group_identifier = 'SeasonalGround' + ground.properties.radiance.states = (summer_ground, winter_ground) + + east_face = room[2] + east_face.apertures_by_ratio(0.1, 0.01) + west_face = garage[4] + west_face.apertures_by_ratio(0.1, 0.01) + Room.solve_adjacency([room, garage], 0.01) + + model = Model('Tiny_House', [room, garage], orphaned_shades=[ground, tree_canopy]) + + model_dict = model.to_dict() + + dest_file = os.path.join(directory, 'model_radiance_dynamic_states.json') + with open(dest_file, 'w') as fp: + json.dump(model_dict, fp, indent=4) + + def model_5vertex_sub_faces(directory): room = Room.from_box('TinyHouseZone', 5, 10, 3) north_face = room[1] @@ -470,6 +553,9 @@ def model_5vertex_sub_faces(directory): json.dump(model_dict, fp, indent=4) + + + # run all functions within the file master_dir = os.path.split(os.path.dirname(__file__))[0] sample_directory = os.path.join(master_dir, 'samples', 'model') @@ -480,11 +566,13 @@ def model_5vertex_sub_faces(directory): model_complete_patient_room(sample_directory) model_complete_office_floor(sample_directory) -model_complete_multiroom_radiance(sample_directory) - model_energy_shoe_box(sample_directory) model_energy_detailed_loads(sample_directory) model_energy_fixed_interval(sample_directory) model_energy_no_program(sample_directory) model_energy_properties_office(sample_directory) model_5vertex_sub_faces(sample_directory) + + +model_complete_multiroom_radiance(sample_directory) +model_radiance_dynamic_states(sample_directory) diff --git a/scripts/sample_state.py b/scripts/sample_state.py new file mode 100644 index 0000000..4308d10 --- /dev/null +++ b/scripts/sample_state.py @@ -0,0 +1,92 @@ +# coding=utf-8 +from __future__ import division + +from honeybee_radiance.state import RadianceShadeState, RadianceSubFaceState +from honeybee_radiance.modifier.material import Plastic, Glass, Trans, BSDF + +from honeybee.shade import Shade +from honeybee.aperture import Aperture +from ladybug_geometry.geometry3d.pointvector import Point3D +from ladybug_geometry.geometry3d.face import Face3D + +import os +import json + + +def shade_state_abridged_snow(directory): + snow_mod = Plastic.from_single_reflectance('SnowMaterial', 0.7) + snow = RadianceShadeState(snow_mod) + + dest_file = os.path.join(directory, 'shade_state_abridged_snow.json') + with open(dest_file, 'w') as fp: + json.dump(snow.to_dict(abridged=True), fp, indent=4) + + +def shade_state_abridged_tree_foliage(directory): + shd1 = Shade.from_vertices( + 'tree_foliage1', [[0, 0, 5], [2, 0, 5], [2, 2, 5], [0, 2, 5]]) + shd2 = Shade.from_vertices( + 'tree_foliage2', [[0, 0, 5], [-2, 0, 5], [-2, 2, 5], [0, 2, 5]]) + trans1 = Glass.from_single_transmittance('TreeTrans1', 0.5) + trans2 = Glass.from_single_transmittance('TreeTrans2', 0.27) + shd1.properties.radiance.modifier = trans1 + shd2.properties.radiance.modifier = trans2 + tr4 = RadianceShadeState(shades=[shd1, shd2]) + + dest_file = os.path.join(directory, 'shade_state_abridged_tree_foliage.json') + with open(dest_file, 'w') as fp: + json.dump(tr4.to_dict(abridged=True), fp, indent=4) + + +def aperture_state_abridged_electrochromic(directory): + ecglass4 = Glass.from_single_transmittance('ElectrochromicGlass4', 0.01) + tint4 = RadianceSubFaceState(ecglass4) + + dest_file = os.path.join(directory, 'aperture_state_abridged_electrochromic.json') + with open(dest_file, 'w') as fp: + json.dump(tint4.to_dict(abridged=True), fp, indent=4) + + +def aperture_state_abridged_shades(directory): + mod = Trans('DiffusingShade', 0.7, 0.7, 0.7, 0.01, 0, 0.45, 0.01) + mod_dir = Glass.from_single_transmittance('DiffusingShadeDirect', 0.03) + mod_shd = Plastic('ShadeMat', 0.65, 0.65, 0.65) + pts_1 = (Point3D(0, 0, 0), Point3D(2, 0, 0), Point3D(2, 2, 0), Point3D(0, 2, 0)) + pts_2 = (Point3D(0, 0, 2), Point3D(2, 0, 0), Point3D(2, 2, 2), Point3D(0, 2, 2)) + shade1 = Shade('RectangleShade1', Face3D(pts_1)) + shade2 = Shade('RectangleShade2', Face3D(pts_2)) + shade1.properties.radiance.modifier = mod_shd + shade2.properties.radiance.modifier = mod_shd + rad_state = RadianceSubFaceState(mod, [shade1, shade2]) + rad_state.modifier_direct = mod_dir + + dest_file = os.path.join(directory, 'aperture_state_abridged_shades.json') + with open(dest_file, 'w') as fp: + json.dump(rad_state.to_dict(abridged=True), fp, indent=4) + + +def aperture_state_abridged_bsdf(directory): + relative_path = './scripts/bsdf/klemsfull.xml' + mod = BSDF(relative_path) + shd_state = RadianceSubFaceState(mod) + + pts = (Point3D(0, 0, 0), Point3D(0, 0, 3), Point3D(1, 0, 3), Point3D(1, 0, 0)) + ap = Aperture('TestWindow', Face3D(pts)) + ap.properties.radiance.dynamic_group_identifier = 'DynamicShdWindow' + ap.properties.radiance.states = [shd_state] + shd_state.gen_geos_from_tmtx_thickness(0.05) + + dest_file = os.path.join(directory, 'aperture_state_abridged_bsdf.json') + with open(dest_file, 'w') as fp: + json.dump(shd_state.to_dict(abridged=True), fp, indent=4) + + +# run all functions within the file +master_dir = os.path.split(os.path.dirname(__file__))[0] +sample_directory = os.path.join(master_dir, 'samples', 'state') + +shade_state_abridged_snow(sample_directory) +shade_state_abridged_tree_foliage(sample_directory) +aperture_state_abridged_electrochromic(sample_directory) +aperture_state_abridged_shades(sample_directory) +aperture_state_abridged_bsdf(sample_directory)