Skip to content

Commit

Permalink
fix(components): Window Naming
Browse files Browse the repository at this point in the history
- Update Window Naming for merged apertures
- Add standard 0.1m window 'inset' depth
- Update Honeybee dependency versions
  • Loading branch information
ed-p-may authored Feb 27, 2023
2 parents 888673c + ea9001c commit 4a48cce
Show file tree
Hide file tree
Showing 9 changed files with 373 additions and 367 deletions.
8 changes: 6 additions & 2 deletions PHX/model/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def add_elements(self, _elements: Collection[PhxApertureElement]) -> None:

return None

def __add__(self, other) -> PhxComponentAperture:
def __add__(self, other: PhxComponentAperture) -> PhxComponentAperture:
"""Merge with another Component into a single new Component.
Arguments:
Expand All @@ -258,7 +258,11 @@ def __add__(self, other) -> PhxComponentAperture:
continue
setattr(new_compo, attr_name, attr_val)

new_compo.display_name = "Merged_Component"
if self.window_type.display_name == other.window_type.display_name:
new_compo.display_name = self.window_type.display_name
else:
new_compo.display_name = "Merged_Aperture_Component"

new_compo.elements = self.elements + other.elements
for element in new_compo.elements:
element.host = new_compo
Expand Down
1 change: 1 addition & 0 deletions PHX/to_WUFI_XML/xml_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def _PhxComponentAperture(_c: building.PhxComponentAperture) -> List[xml_writabl
"IdentNrPolygons",
[XML_Node("IdentNr", n, "index", i) for i, n in enumerate(_c.polygon_ids)],
),
XML_Node("DepthWindowReveal", 0.1016, "unit", "m"),
]


Expand Down
50 changes: 25 additions & 25 deletions _testing_to_PHPP.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/tests/_source_hbjson/Default_Model_Single_Zone.hbjson"
)
SOURCE_FILE = pathlib.Path(
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/sample/hbjson/HarmsDavis_230201.hbjson"
"/Users/em/Dropbox/bldgtyp-00/00_PH_Tools/PHX/sample/hbjson/Arapahoe_Cir_230206.hbjson"
)

if __name__ == "__main__":
Expand Down Expand Up @@ -49,30 +49,30 @@

with phpp_conn.xl.in_silent_mode():
phpp_conn.xl.unprotect_all_sheets()
# phpp_conn.write_certification_config(phx_project)
# phpp_conn.write_climate_data(phx_project)
# phpp_conn.write_project_constructions(phx_project)
# phpp_conn.write_project_tfa(phx_project)
# phpp_conn.write_project_opaque_surfaces(phx_project)
# phpp_conn.write_project_thermal_bridges(phx_project)
# phpp_conn.write_project_window_components(phx_project)
# phpp_conn.write_project_window_surfaces(phx_project)
# phpp_conn.write_project_window_shading(phx_project)
# phpp_conn.write_project_ventilation_components(phx_project)
# phpp_conn.write_project_ventilators(phx_project)
# phpp_conn.write_project_spaces(phx_project)
# phpp_conn.write_project_ventilation_type(phx_project)
# phpp_conn.write_project_airtightness(phx_project)
# phpp_conn.write_project_volume(phx_project)
# phpp_conn.write_project_hot_water(phx_project)
# phpp_conn.write_project_res_elec_appliances(phx_project)
# phpp_conn.write_non_res_utilization_profiles(phx_project)
# phpp_conn.write_non_res_space_lighting(phx_project)
# phpp_conn.write_non_res_IHG(phx_project)
phpp_conn.write_certification_config(phx_project)
phpp_conn.write_climate_data(phx_project)
phpp_conn.write_project_constructions(phx_project)
phpp_conn.write_project_tfa(phx_project)
phpp_conn.write_project_opaque_surfaces(phx_project)
phpp_conn.write_project_thermal_bridges(phx_project)
phpp_conn.write_project_window_components(phx_project)
phpp_conn.write_project_window_surfaces(phx_project)
phpp_conn.write_project_window_shading(phx_project)
phpp_conn.write_project_ventilation_components(phx_project)
phpp_conn.write_project_ventilators(phx_project)
phpp_conn.write_project_spaces(phx_project)
phpp_conn.write_project_ventilation_type(phx_project)
phpp_conn.write_project_airtightness(phx_project)
phpp_conn.write_project_volume(phx_project)
phpp_conn.write_project_hot_water(phx_project)
phpp_conn.write_project_res_elec_appliances(phx_project)
phpp_conn.write_non_res_utilization_profiles(phx_project)
phpp_conn.write_non_res_space_lighting(phx_project)
phpp_conn.write_non_res_IHG(phx_project)

# TODO: add custom any-range writer (User-Determined)

# phpp_conn.activate_variant_assemblies()
# phpp_conn.activate_variant_windows()
# phpp_conn.activate_variant_ventilation()
# phpp_conn.activate_variant_additional_vent()
phpp_conn.activate_variant_assemblies()
phpp_conn.activate_variant_windows()
phpp_conn.activate_variant_ventilation()
phpp_conn.activate_variant_additional_vent()
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
honeybee-core>=1.54.2
honeybee-energy>=1.95.6
honeybee-core>=1.54.33
honeybee-energy>=1.99.8
honeybee-ph
PH-units
pydantic
Expand Down
4 changes: 2 additions & 2 deletions tests/_reference_xml/Default_Model_Single_Zone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<Components count="3">
<Component index="0">
<IdentNr>5</IdentNr>
<Name>Room_5_eca51267..Face4</Name>
<Name>Room_5_b777e995..Face4</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>12</IdentNrColorI>
Expand All @@ -219,7 +219,7 @@
</Component>
<Component index="1">
<IdentNr>6</IdentNr>
<Name>Room_5_eca51267..Face5</Name>
<Name>Room_5_b777e995..Face5</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>7</IdentNrColorI>
Expand Down
39 changes: 20 additions & 19 deletions tests/_reference_xml/Multi_Room_Complete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@
</Component>
<Component index="3">
<IdentNr>48</IdentNr>
<Name>Merged_Component</Name>
<Name>Generic Double Pane</Name>
<Visual>true</Visual>
<Type>2</Type>
<IdentNrColorI>4</IdentNrColorI>
Expand All @@ -660,10 +660,11 @@
<IdentNr index="4">12</IdentNr>
<IdentNr index="5">14</IdentNr>
</IdentNrPolygons>
<DepthWindowReveal unit="m">0.1016</DepthWindowReveal>
</Component>
<Component index="4">
<IdentNr>49</IdentNr>
<Name>Shade_cf2a3d1d</Name>
<Name>Shade_3f430a24</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>1</IdentNrColorI>
Expand All @@ -679,7 +680,7 @@
</Component>
<Component index="5">
<IdentNr>50</IdentNr>
<Name>Shade_0392da13</Name>
<Name>Shade_532bd2ca</Name>
<Visual>true</Visual>
<Type>1</Type>
<IdentNrColorI>1</IdentNrColorI>
Expand Down Expand Up @@ -825,58 +826,58 @@
<ExhaustVents count="0"/>
<ThermalBridges count="8">
<ThermalBridge index="0">
<Name>_unnamed_bldg_segment__10b9e866</Name>
<Name>_unnamed_bldg_segment__0e1a8441</Name>
<Type>-15</Type>
<Length>18.0</Length>
<Length>10.733126291998989</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="1">
<Name>_unnamed_bldg_segment__3739e0c5</Name>
<Name>_unnamed_bldg_segment__0e2e3c0f</Name>
<Type>-15</Type>
<Length>16.0</Length>
<Length>18.0</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="2">
<Name>_unnamed_bldg_segment__5003cb60</Name>
<Name>_unnamed_bldg_segment__40041adf</Name>
<Type>-15</Type>
<Length>9.391485505499118</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="3">
<Name>_unnamed_bldg_segment__59e4f062</Name>
<Name>_unnamed_bldg_segment__467dd3a3</Name>
<Type>-15</Type>
<Length>10.733126291998989</Length>
<Length>14.0</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="4">
<Name>_unnamed_bldg_segment__996ea535</Name>
<Name>_unnamed_bldg_segment__5c6164b2</Name>
<Type>-15</Type>
<Length>22.0</Length>
<Length>13.416407864998739</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="5">
<Name>_unnamed_bldg_segment__b1a78444</Name>
<Name>_unnamed_bldg_segment__74755e38</Name>
<Type>-15</Type>
<Length>9.391485505499118</Length>
<Length>22.0</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="6">
<Name>_unnamed_bldg_segment__dffb00ef</Name>
<Name>_unnamed_bldg_segment__a2ff4bdb</Name>
<Type>-15</Type>
<Length>13.416407864998739</Length>
<Length>9.391485505499118</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
<ThermalBridge index="7">
<Name>_unnamed_bldg_segment__f44dd335</Name>
<Name>_unnamed_bldg_segment__a7714530</Name>
<Type>-15</Type>
<Length>14.0</Length>
<Length>16.0</Length>
<PsiValue>0.01</PsiValue>
<IdentNrOptionalClimate>-1</IdentNrOptionalClimate>
</ThermalBridge>
Expand Down Expand Up @@ -1166,7 +1167,7 @@
</PH_Parameters>
</Device>
<Device index="1">
<Name>e4eb3e8d-ae0f-4648-855e-98d6cf77b828</Name>
<Name>767c92e3-223a-4ba8-a8ce-40932465d9e6</Name>
<IdentNr>1</IdentNr>
<SystemType>5</SystemType>
<TypeDevice>5</TypeDevice>
Expand Down
Loading

0 comments on commit 4a48cce

Please sign in to comment.