Skip to content

Commit

Permalink
fix(volume): Update WUFI Volume mode
Browse files Browse the repository at this point in the history
- change WUFI vis-volume mode
  • Loading branch information
ed-p-may committed Jun 17, 2024
1 parent 010ae31 commit 0165b5b
Show file tree
Hide file tree
Showing 12 changed files with 10,254 additions and 10,230 deletions.
20 changes: 13 additions & 7 deletions PHX/model/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
from collections import defaultdict
from dataclasses import dataclass, field
from functools import reduce
from typing import (Any, ClassVar, Dict, Generator, List, NamedTuple, Optional,
Sequence, Set, Union, ValuesView)
from typing import Any, ClassVar, Dict, Generator, List, NamedTuple, Optional, Sequence, Set, Union, ValuesView

from PHX.model import elec_equip, geometry, spaces
from PHX.model.components import (PhxApertureElement, PhxComponentAperture,
PhxComponentOpaque,
PhxComponentThermalBridge)
from PHX.model.enums.building import (AttachedZoneType, SpecificHeatCapacity,
ZoneType)
from PHX.model.components import PhxApertureElement, PhxComponentAperture, PhxComponentOpaque, PhxComponentThermalBridge
from PHX.model.enums.building import (
AttachedZoneType,
SpecificHeatCapacity,
ZoneType,
WufiVolumeGrossMode,
WufiVolumeNetMode,
WufiWeightedFloorAreaMode,
)
from PHX.model.hvac import collection
from PHX.model.programs import occupancy

Expand All @@ -26,8 +29,11 @@
class PhxZone:
_count: ClassVar[int] = 0
display_name: str = ""
volume_gross_mode: WufiVolumeGrossMode = WufiVolumeGrossMode.FROM_VISUALIZED_COMPONENTS
volume_gross: float = 0.0
volume_net_mode: WufiVolumeNetMode = WufiVolumeNetMode.USER_DEFINED
volume_net: float = 0.0
weighted_floor_area_mode: WufiWeightedFloorAreaMode = WufiWeightedFloorAreaMode.USER_DEFINED
weighted_net_floor_area: float = 0.0
clearance_height: float = 2.5
res_occupant_quantity: float = 0.0
Expand Down
18 changes: 18 additions & 0 deletions PHX/model/enums/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ class SpecificHeatCapacity(Enum):
MASSIVE = 3


class WufiVolumeGrossMode(Enum):
USER_DEFINED = 6
FROM_VISUALIZED_COMPONENTS = 7


class WufiVolumeNetMode(Enum):
ESTIMATED_FROM_GROSS = 4
FROM_GROSS_AND_COMPONETS = 5
USER_DEFINED = 6
FROM_VISUALIZED_COMPONENTS = 7


class WufiWeightedFloorAreaMode(Enum):
FROM_VISUALIZED_GEOMETRY = 2
ESTIMATED_FROM_GROSS_VOLUME = 4
USER_DEFINED = 6


class ZoneType(Enum):
SIMULATED = 1
ATTACHED = 2
Expand Down
6 changes: 3 additions & 3 deletions PHX/to_WUFI_XML/xml_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ def wufi_spaces(_z: building.PhxZone) -> List[spaces.PhxSpace]:
for i, sp in enumerate(_z.spaces)
],
),
XML_Node("GrossVolume_Selection", 6),
XML_Node("GrossVolume_Selection", _z.volume_gross_mode.value),
XML_Node("GrossVolume", _z.volume_gross),
XML_Node("NetVolume_Selection", 6),
XML_Node("NetVolume_Selection", _z.volume_net_mode.value),
XML_Node("NetVolume", _z.volume_net),
XML_Node("FloorArea_Selection", 6),
XML_Node("FloorArea_Selection", _z.weighted_floor_area_mode.value),
XML_Node("FloorArea", _z.icfa_override or _z.weighted_net_floor_area),
XML_Node("ClearanceHeight_Selection", 1),
XML_Node("ClearanceHeight", _z.clearance_height),
Expand Down
12 changes: 6 additions & 6 deletions tests/_regenerated_xml/_la_mora.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29590,7 +29590,7 @@
<LightingFullLoadHours>0</LightingFullLoadHours>
</LoadsLighting>
</LoadsLightingsPH>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>18701.049473978037</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>12548.384213274</NetVolume>
Expand Down Expand Up @@ -29812,7 +29812,7 @@
<RoomsVentilation count="0"/>
<LoadsPersonsPH count="0"/>
<LoadsLightingsPH count="0"/>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>0.0</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>0.0</NetVolume>
Expand Down Expand Up @@ -29840,7 +29840,7 @@
<RoomsVentilation count="0"/>
<LoadsPersonsPH count="0"/>
<LoadsLightingsPH count="0"/>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>0.0</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>0.0</NetVolume>
Expand Down Expand Up @@ -60528,7 +60528,7 @@
<LightingFullLoadHours>0</LightingFullLoadHours>
</LoadsLighting>
</LoadsLightingsPH>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>18701.049473978037</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>12548.384213274</NetVolume>
Expand Down Expand Up @@ -60750,7 +60750,7 @@
<RoomsVentilation count="0"/>
<LoadsPersonsPH count="0"/>
<LoadsLightingsPH count="0"/>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>0.0</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>0.0</NetVolume>
Expand Down Expand Up @@ -60778,7 +60778,7 @@
<RoomsVentilation count="0"/>
<LoadsPersonsPH count="0"/>
<LoadsLightingsPH count="0"/>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>0.0</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>0.0</NetVolume>
Expand Down
2 changes: 1 addition & 1 deletion tests/_regenerated_xml/_ridgeway.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49912,7 +49912,7 @@ https://airtable.com/shr0OvkasxXJlqLHj
<LightingFullLoadHours>0</LightingFullLoadHours>
</LoadsLighting>
</LoadsLightingsPH>
<GrossVolume_Selection>6</GrossVolume_Selection>
<GrossVolume_Selection>7</GrossVolume_Selection>
<GrossVolume>26616.5842412238</GrossVolume>
<NetVolume_Selection>6</NetVolume_Selection>
<NetVolume>18513.25432507126</NetVolume>
Expand Down
Binary file modified tests/_source_gh/hbph_test_models.gh
Binary file not shown.
Loading

0 comments on commit 0165b5b

Please sign in to comment.