diff --git a/PHX/from_HBJSON/cleanup.py b/PHX/from_HBJSON/cleanup.py index be74936..d514422 100644 --- a/PHX/from_HBJSON/cleanup.py +++ b/PHX/from_HBJSON/cleanup.py @@ -6,13 +6,25 @@ from typing import List, Union, Tuple from functools import partial -from honeybee import room, face -from honeybee.boundarycondition import Outdoors, Ground -from honeybee_energy.boundarycondition import Adiabatic -from honeybee_energy.load import infiltration, people, equipment, hotwater +try: # import the core honeybee dependencies + from honeybee.typing import clean_ep_string +except ImportError as e: + raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e)) + +try: + from honeybee import room, face + from honeybee.boundarycondition import Outdoors, Ground + from honeybee_energy.boundarycondition import Adiabatic + from honeybee_energy import shw + from honeybee_energy.load import people, equipment, infiltration + from honeybee_energy.schedule.ruleset import ScheduleRuleset + from honeybee_energy.lib.scheduletypelimits import schedule_type_limit_by_identifier +except ImportError as e: + raise ImportError('\nFailed to import honeybee_energy:\n\t{}'.format(e)) from PHX.model import project + HB_BC = Union[Outdoors, Ground, Adiabatic] @@ -81,7 +93,7 @@ def merge_occupancies(_hb_rooms: List[room.Room]) -> people.People: # Build up the new object's attributes total_floor_area = sum(rm.floor_area for rm in _hb_rooms) - new_hb_ppl = _hb_rooms[0].properties.energy.people.duplicate() + new_hb_ppl = _hb_rooms[0].properties.energy.people.duplicate() # type: ignore new_hb_ppl.people_per_area = total_hb_people / total_floor_area new_hb_ppl.properties.ph.number_bedrooms = total_ph_bedrooms new_hb_ppl.properties.ph.number_people = total_ph_people @@ -128,25 +140,39 @@ def merge_infiltrations(_hb_rooms: List[room.Room]) -> infiltration.Infiltration return new_infil -def merge_shw(_hb_rooms: List[room.Room]) -> hotwater.ServiceHotWater: - """ +def merge_shw(_hb_rooms: List[room.Room]) -> shw.SHWSystem: + """Merge together several Honeybee-Energy SHW System System objects. Arguments: ---------- - * + * _hb_rooms (List[room.Room]): The list of Honeybee Rooms to get the + SHW System System from. Returns: -------- - * + * (shw.SHWSystem): A single new Honeybee-Energy + SHW System System Object. """ - new_shw: hotwater.ServiceHotWater = _hb_rooms[0].properties.energy.shw.duplicate() - # -- Merge the SHWSystemPhProperties - new_prop = sum(hb_room.properties.energy.shw.properties.ph for hb_room in _hb_rooms) - new_shw.properties._ph = new_prop + # -- Find the first HBE SHWSystem System in the list of HB-Rooms, and use that as the 'base' + for room in _hb_rooms: + if room.properties.energy.shw: #type: ignore + new_shw: shw.SHWSystem = room.properties.energy.shw.duplicate() # type: ignore + break + else: + # -- If no SHWSystem found anywhere, return a new default HBE SHWSystem System + return shw.SHWSystem( + identifier=clean_ep_string('_default_shw_system_'), + equipment_type='Electric_WaterHeater', + ) + + # -- Merge the SHWSystemPhProperties and then apply it to the new HBE SHWSystem System + new_prop = sum(hb_room.properties.energy.shw.properties.ph for hb_room in _hb_rooms) # type: ignore + new_shw.properties._ph = new_prop # type: ignore return new_shw + def merge_elec_equip(_hb_rooms: List[room.Room]) -> equipment.ElectricEquipment: """Returns a new HB-ElectricEquipment-Obj with it's values set from a list of input HB-Rooms. diff --git a/PHX/model/hvac/collection.py b/PHX/model/hvac/collection.py index 9b8e259..2285b46 100644 --- a/PHX/model/hvac/collection.py +++ b/PHX/model/hvac/collection.py @@ -88,9 +88,9 @@ def get_mech_device_by_id(self, _id_num: int) -> hvac.PhxMechanicalDevice: * (hvac.PhxMechanicalDevice): The Mechanical Device found with the matching ID-Number. Or Error if not found. """ - for sys in self._devices.values(): - if sys.id_num == _id_num: - return sys + for device in self._devices.values(): + if device.id_num == _id_num: + return device raise NoVentUnitFoundError(_id_num) diff --git a/PHX/model/hvac/ventilation.py b/PHX/model/hvac/ventilation.py index 7660e87..8ecff52 100644 --- a/PHX/model/hvac/ventilation.py +++ b/PHX/model/hvac/ventilation.py @@ -52,7 +52,10 @@ class PhxDeviceVentilator(PhxDeviceVentilation): device_type: DeviceType = field(init=False, default=DeviceType.VENTILATION) params: PhxDeviceVentilatorParams = field( default_factory=PhxDeviceVentilatorParams) - + + def __post_init__(self): + super().__post_init__() + def __add__(self, other: PhxDeviceVentilator) -> PhxDeviceVentilator: base = super().__add__(other) new_obj = self.__class__.from_kwargs(**vars(base)) diff --git a/_testing_to_WUFI.py b/_testing_to_WUFI.py index f3c694b..f24cd9b 100644 --- a/_testing_to_WUFI.py +++ b/_testing_to_WUFI.py @@ -3,7 +3,6 @@ """DEV SANDBOX: convert an HBJSON file over to WUFI XML format.""" -import importlib import pathlib from rich import print @@ -12,34 +11,20 @@ from PHX.to_WUFI_XML import xml_builder, xml_txt_to_file from PHX.model import (building, project, geometry, schedules, certification, constructions, elec_equip, components) +from tests.conftest import _reload_phx_classes, _reset_phx_class_counters SOURCE_DIR = pathlib.Path("tests", "_source_hbjson") -SOURCE_DIR = pathlib.Path("sample", "hbjson") source_file_names = [ - # "Multi_Room_Complete.hbjson", - "220819_Chapman.hbjson", + "Default_Model_Single_Zone.hbjson", + "Multi_Room_Complete.hbjson", ] SOURCE_FILES = [pathlib.Path(SOURCE_DIR, n) for n in source_file_names] TARGET_DIR = pathlib.Path("tests", "_reference_xml") -def reload_PHX(): - """Reload all the PHX model modules to reset counters. This is only needed - so that the tests align when converting multiple models in one run.""" - importlib.reload(geometry) - importlib.reload(building) - importlib.reload(project) - importlib.reload(geometry) - importlib.reload(schedules) - importlib.reload(certification) - importlib.reload(constructions) - importlib.reload(elec_equip) - importlib.reload(components) - - - def generate_xml_file(_source: pathlib.Path, _target_dir: pathlib.Path): # -- Re-set all the PHX modules (counters) - reload_PHX() + _reload_phx_classes() + _reset_phx_class_counters() target_file = pathlib.Path(_target_dir, _source.stem + '.xml') diff --git a/pyproject.toml b/pyproject.toml index 3354576..3151b57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ filterwarnings = [ [tool.coverage.run] # --- For testing... -command_line = "-m pytest tests" +command_line = "-m pytest . tests/test_to_WUFI_xml" source = ["honeybee_ph"] # --- branch = true diff --git a/requirements.txt b/requirements.txt index 5bf5f67..a1f1037 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ honeybee-core>=1.51.11 honeybee-energy>=1.91.16 honeybee-schema>=1.50.2 honeybee-standards>=2.0.5 +honeybee-ph>=1.2.2 ladybug-core>=0.39.55 ladybug-geometry>=1.24.2 ladybug-geometry-polyskel>=1.3.55 diff --git a/tests/_reference_xml/Default_Model_Single_Zone.xml b/tests/_reference_xml/Default_Model_Single_Zone.xml new file mode 100644 index 0000000..0e5d13e --- /dev/null +++ b/tests/_reference_xml/Default_Model_Single_Zone.xml @@ -0,0 +1,695 @@ + + + 48 + 48 + 3.2.0.1 + 3 + 2 + + 0 + false + + None + + + + + + + + + + + + + + + + + + + + + + + + + Generic Office Ventilation + 1 + 7.0 + 52.0 + 5.71 + 0.98 + 0.71 + 0.85 + 1.99 + 0.78 + 15.59 + 0.71 + + + + + + 1 + Unnamed_Bldg_Segment + + + + + + 27 + 5.0 + 4.0 + 0.0 + + + 28 + 5.0 + 0.0 + 0.0 + + + 29 + 0.0 + 0.0 + 0.0 + + + 30 + 0.0 + 4.0 + 0.0 + + + 33 + 0.0 + 4.0 + 3.0 + + + 34 + 0.0 + 0.0 + 3.0 + + + 35 + 5.0 + 0.0 + 3.0 + + + 36 + 5.0 + 4.0 + 3.0 + + + + + 5 + 0.0 + 0.0 + -1.0 + + 27 + 28 + 29 + 30 + + + + + 6 + 0.0 + 0.0 + 1.0 + + 33 + 34 + 35 + 36 + + + + + 1 + 0.0 + -1.0 + 0.0 + + 34 + 29 + 28 + 35 + + + + + 2 + 1.0 + 0.0 + 0.0 + + 35 + 28 + 27 + 36 + + + + + 3 + 0.0 + 1.0 + -0.0 + + 36 + 27 + 30 + 33 + + + + + 4 + -1.0 + 0.0 + 0.0 + + 33 + 30 + 29 + 34 + + + + + + + + + 5 + Room_5_70f07d3f..Face4 + true + 1 + 12 + 12 + 1 + -2 + -1 + 2 + -1 + + 5 + + + + 6 + Room_5_70f07d3f..Face5 + true + 1 + 7 + 8 + 1 + -1 + -1 + 3 + -1 + + 6 + + + + 9 + Merged_Component + true + 1 + 2 + 2 + 1 + -1 + -1 + 1 + -1 + + 1 + 2 + 3 + 4 + + + + + + Unnamed_Bldg_Segment + 1 + 1 + + 6 + 60.0 + 6 + 0 + 6 + 0 + 1 + 2.5 + 2 + 132 + 1 + 0 + 0 + + + + + + 1 + 40.6 + -73.8 + None + -4 + -2 + 0.2 + 0.1 + 0.9 + 0.66 + 350 + 48 + + 1 + 8.0 + 4.0 + 40.6 + -73.8 + 3.0 + -4 + 1 + 2 + 1000 + 2000 + 3 + 0.05 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 6 + + 1.1 + 1.1 + 1.1 + 1.1 + 0.2 + 1.8 + 1.7 + 0.8 + 1.1 + 1.5 + 0.7 + 1.1 + 1.5 + 0.8 + 1.1 + 1.5 + + + 309.9966 + 250.0171 + 270.0102 + 439.9864 + 53.4289 + 680.0068 + 250.0171 + 239.9864 + 319.9932 + 409.9966 + -70.0102 + 129.9898 + 319.9932 + 100 + 250.0171 + 409.9966 + + + + + 3 + 2 + 15.0 + 15.0 + 10.0 + 10.0 + + + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 1 + 0.81576 + + + + 6 + 5 + + + + + + + + + Ideal Air System + 1 + 1 + + + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + + + + + + true + true + + + + + + + + + 1 + Generic Exterior Wall + 2 + 2 + + + 0.1 + + Generic Brick + 0.9 + 1920.0 + 0.95 + 790.0 + 1.0 + 0.0 + + + + 0.1 + + Generic LW Concrete + 0.53 + 1280.0 + 0.95 + 840.0 + 1.0 + 0.0 + + + + 0.05 + + Generic 50mm Insulation + 0.03 + 43.0 + 0.95 + 1210.0 + 1.0 + 0.0 + + + + 0.1 + + Generic Wall Air Gap + 0.667 + 1.28 + 0.95 + 1000.0 + 1.0 + 0.0 + + + + 0.0127 + + Generic Gypsum Board + 0.16 + 800.0 + 0.95 + 1090.0 + 1.0 + 0.0 + + + + + + 2 + Generic Ground Slab + 2 + 2 + + + 0.05 + + Generic 50mm Insulation + 0.03 + 43.0 + 0.95 + 1210.0 + 1.0 + 0.0 + + + + 0.2 + + Generic HW Concrete + 1.95 + 2240.0 + 0.95 + 900.0 + 1.0 + 0.0 + + + + + + 3 + Generic Roof + 2 + 2 + + + 0.01 + + Generic Roof Membrane + 0.16 + 1120.0 + 0.95 + 1460.0 + 1.0 + 0.0 + + + + 0.05 + + Generic 50mm Insulation + 0.03 + 43.0 + 0.95 + 1210.0 + 1.0 + 0.0 + + + + 0.1 + + Generic LW Concrete + 0.53 + 1280.0 + 0.95 + 840.0 + 1.0 + 0.0 + + + + 0.1 + + Generic Ceiling Air Gap + 0.556 + 1.28 + 0.95 + 1000.0 + 1.0 + 0.0 + + + + 0.02 + + Generic Acoustic Tile + 0.06 + 368.0 + 0.95 + 590.0 + 1.0 + 0.0 + + + + + + + diff --git a/tests/_reference_xml/Multi_Room_Complete.xml b/tests/_reference_xml/Multi_Room_Complete.xml index 330bf54..da03eec 100644 --- a/tests/_reference_xml/Multi_Room_Complete.xml +++ b/tests/_reference_xml/Multi_Room_Complete.xml @@ -56,7 +56,7 @@ - + 3 0.0 @@ -154,295 +154,175 @@ 2.5062305899 - 27 - 0.0 - 4.0 - 3.0 - - - 28 - 0.0 - 4.0 - 0.0 - - - 29 - 0.0 - 0.0 - 0.0 - - - 30 - 0.0 - 0.0 - 3.0 - - 33 0.0 3.3416407865 2.5062305899 - + 34 0.0 3.3416407865 0.4937694101 - + 35 0.0 0.6583592135 0.4937694101 - + 36 0.0 0.6583592135 2.5062305899 - - 39 - 5.0 - 4.0 - 0.0 - - - 40 - 5.0 - 0.0 - 0.0 - - - 41 - 0.0 - 0.0 - 0.0 - - - 42 - 0.0 - 4.0 - 0.0 - - - 45 - 0.0 - 4.0 - 3.0 - - - 46 - 0.0 - 0.0 - 3.0 - - - 47 - 5.0 - 0.0 - 3.0 - - - 48 - 5.0 - 4.0 - 3.0 - - - 51 - 5.0 - 0.0 - 3.0 - - - 52 - 5.0 - 0.0 - 0.0 - - + 53 12.0 0.0 0.0 - + 54 12.0 0.0 3.0 - + 57 6.1521286236 0.0 2.5062305899 - + 58 6.1521286236 0.0 0.4937694101 - + 59 10.8478713764 0.0 0.4937694101 - + 60 10.8478713764 0.0 2.5062305899 - - 63 - 12.0 - 0.0 - 3.0 - - - 64 - 12.0 - 0.0 - 0.0 - - + 65 12.0 4.0 0.0 - + 66 12.0 4.0 3.0 - + 69 12.0 0.6583592135 2.5062305899 - + 70 12.0 0.6583592135 0.4937694101 - + 71 12.0 3.3416407865 0.4937694101 - + 72 12.0 3.3416407865 2.5062305899 - - 75 - 12.0 - 4.0 - 3.0 - - - 76 - 12.0 - 4.0 - 0.0 - - - 77 - 5.0 - 4.0 - 0.0 - - - 78 - 5.0 - 4.0 - 3.0 - - + 81 10.8478713764 4.0 2.5062305899 - + 82 10.8478713764 4.0 0.4937694101 - + 83 6.1521286236 4.0 0.4937694101 - + 84 6.1521286236 4.0 2.5062305899 - - 87 - 12.0 - 4.0 - 0.0 - - - 88 - 12.0 + + 99 + 0.0 0.0 - 0.0 + 3.0 - - 89 - 5.0 - 0.0 - 0.0 + + 100 + 0.0 + -1.0 + 3.0 - - 90 + + 101 5.0 - 4.0 - 0.0 + -1.0 + 3.0 - - 93 + + 102 5.0 - 4.0 + 0.0 3.0 - - 94 + + 105 5.0 0.0 3.0 - - 95 + + 106 + 5.0 + -1.0 + 3.0 + + + 107 12.0 - 0.0 + -1.0 3.0 - - 96 + + 108 12.0 - 4.0 + 0.0 3.0 - + 1 0.0 @@ -479,10 +359,10 @@ 0.0 0.0 - 27 - 28 - 29 - 30 + 18 + 17 + 4 + 3 6 @@ -494,8 +374,8 @@ -1.0 0.0 - 51 - 52 + 6 + 5 53 54 @@ -509,8 +389,8 @@ 0.0 0.0 - 63 - 64 + 54 + 53 65 66 @@ -524,10 +404,10 @@ 1.0 -0.0 - 75 - 76 - 77 - 78 + 66 + 65 + 16 + 15 14 @@ -539,10 +419,10 @@ 0.0 -1.0 - 39 - 40 - 41 - 42 + 16 + 5 + 4 + 17 @@ -552,10 +432,10 @@ 0.0 -1.0 - 87 - 88 - 89 - 90 + 65 + 53 + 5 + 16 @@ -565,10 +445,10 @@ 0.0 1.0 - 45 - 46 - 47 - 48 + 18 + 3 + 6 + 15 @@ -578,10 +458,10 @@ 0.0 1.0 - 93 - 94 - 95 - 96 + 15 + 6 + 54 + 66 @@ -663,10 +543,36 @@ + + 17 + -0.0 + 0.0 + 1.0 + + 99 + 100 + 101 + 102 + + + + + 18 + -0.0 + 0.0 + 1.0 + + 105 + 106 + 107 + 108 + + + - + 41 Merged_Component @@ -743,6 +649,38 @@ 14 + + 49 + Shade_e67e28da + true + 1 + 1 + 1 + -1 + -1 + -1 + -1 + -1 + + 17 + + + + 50 + Shade_b24a0fd7 + true + 1 + 1 + 1 + -1 + -1 + -1 + -1 + -1 + + 18 + + @@ -751,10 +689,10 @@ 1 - 101-Room_27 + 101-Room_7 99 1 - 1 + 0 1 9.0 2.5 @@ -762,10 +700,10 @@ 14.2 - 102-Room_28 + 102-Room_8 99 1 - 1 + 0 1 9.0 2.5 @@ -863,7 +801,7 @@ 1 40.6 -73.8 - None + 0.0 -4 -2 0.2 @@ -874,8 +812,8 @@ 48 1 - 8 - 4 + 8.0 + 4.0 40.6 -73.8 3.0 @@ -887,141 +825,141 @@ 3 0.05 - 1.2 - -0.2 - 5.6 - 10.9 - 16.1 - 21.7 - 25.0 - 24.8 - 19.9 - 14.0 - 7.3 - 3.3 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - -4.3 - -7.4 - 0.3 - 4.7 - 9.1 - 15.8 - 20.3 - 17.1 - 13.2 - 7.9 - 2.1 - -2.8 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - -17.4 - -20.0 - -10.9 - -4.8 - 1.0 - 9.8 - 14.5 - 8.4 - 5.8 - -2.8 - -8.6 - -11.4 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 21 - 29 - 34 - 39 - 56 - 60 - 59 - 50 - 34 - 30 - 20 - 16 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 32 - 46 - 57 - 65 - 82 - 76 - 78 - 84 - 60 - 54 - 33 - 28 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 83 - 106 - 103 - 86 - 80 - 73 - 78 - 104 - 97 - 129 - 87 - 87 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 48 - 70 - 92 - 95 - 114 - 121 - 120 - 130 - 91 - 94 - 47 - 45 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - 50 - 72 - 111 - 133 - 170 - 176 - 177 - 182 - 124 - 109 - 62 - 46 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 - -6.7 - 46 - 80 - 200 - 113 - 121 - -4.2 - 16 - 22 - 46 - 26 - 38 - 26.1 - 64 - 106 - 132 - 159 - 230 - 26.1 - 64 - 106 - 132 - 159 - 230 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 6 1.1 @@ -1105,10 +1043,10 @@ 1.0 - + Ventilator: 83%-HR, 0%-MR - 1 + 0 1 1 false @@ -1132,8 +1070,39 @@ + 5679498c-665d-4c93-b6db-8dc5f7af8b01 + 1 + 5 + 5 + false + true + false + false + false + false + + None + None + true + None + None + None + 5 + + + 1.0 + 0.0 + 1 + + + 1.0 + 0.0 + 1 + + + _unnamed_hw_tank_ - 3 + 1 8 8 false diff --git a/tests/_source_gh/hbph_test_models.gh b/tests/_source_gh/hbph_test_models.gh index e1ef53d..270869e 100644 Binary files a/tests/_source_gh/hbph_test_models.gh and b/tests/_source_gh/hbph_test_models.gh differ diff --git a/tests/_source_hbjson/Default_Model_Single_Zone.hbjson b/tests/_source_hbjson/Default_Model_Single_Zone.hbjson index 92794a5..b1e2a0f 100644 --- a/tests/_source_hbjson/Default_Model_Single_Zone.hbjson +++ b/tests/_source_hbjson/Default_Model_Single_Zone.hbjson @@ -41,95 +41,82 @@ "PHIUS2021_cooling_load": 10.0 }, "name": "Unnamed_Bldg_Segment", - "identifier": "66516290-ad55-4f1c-a0da-6b9292e017a3", + "identifier": "b206f525-9dcb-4783-83ba-1f34707cc89d", "site": { - "location": { - "site_elevation": null, - "latitude": 40.600000000000001, - "longitude": -73.799999999999997, - "hours_from_UTC": -4, - "climate_zone": 1 - }, "climate": { - "monthly_radiation_west": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "peak_heating_1": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "peak_cooling_2": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "monthly_radiation_east": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "peak_cooling_1": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "monthly_temperature_air": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_temperature_dewpoint": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 + "monthly_radiation": { + "east": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "south": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "north": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "dde4ec10-0856-471e-ab6a-1497c81d3c38", + "display_name": "dde4ec10-0856-471e-ab6a-1497c81d3c38", + "glob": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "west": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, "ground": { "depth_groundwater": 3, @@ -138,93 +125,145 @@ "ground_heat_capacity": 1000, "flow_rate_groundwater": 0.050000000000000003 }, - "average_wind_speed": 4, - "monthly_radiation_global": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_temperature_ground": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 + "average_wind_speed": 4.0, + "peak_loads": { + "heat_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "afbb8579-a55a-40b2-ae39-f20749133097", + "display_name": "afbb8579-a55a-40b2-ae39-f20749133097", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "heat_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "f6ad9304-630e-4f11-9731-fb8c75647006", + "display_name": "f6ad9304-630e-4f11-9731-fb8c75647006", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "cooling_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "beda02ba-0366-4843-9ebf-ebffb3ae5bb0", + "display_name": "beda02ba-0366-4843-9ebf-ebffb3ae5bb0", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "identifier": "92ee49a9-c69c-4a2f-88fa-acfee7d490e9", + "display_name": "92ee49a9-c69c-4a2f-88fa-acfee7d490e9", + "cooling_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "464f2e4b-c743-4a17-96e0-66a11cbfaf4c", + "display_name": "464f2e4b-c743-4a17-96e0-66a11cbfaf4c", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + } }, - "peak_heating_2": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 + "monthly_temps": { + "air_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "sky_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "ground_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "7d65259e-8d60-4c31-9a31-c59d712ae230", + "display_name": "7d65259e-8d60-4c31-9a31-c59d712ae230", + "dewpoints": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, + "identifier": "ada1321f-d4b5-4c2a-bb82-3759f7865610", "display_name": "New York", - "summer_daily_temperature_swing": 8, - "monthly_temperature_sky": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_radiation_north": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "station_elevation": 0.0, - "monthly_radiation_south": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - } + "summer_daily_temperature_swing": 8.0, + "station_elevation": 0.0 + }, + "location": { + "site_elevation": null, + "latitude": 40.600000000000001, + "longitude": -73.799999999999997, + "hours_from_UTC": -4, + "identifier": "79787d3b-8014-486a-8386-b6732e4ef115", + "display_name": "79787d3b-8014-486a-8386-b6732e4ef115", + "climate_zone": 1 }, + "identifier": "bd7d7f5a-d547-44e3-83b4-ff3ee59125ab", + "display_name": "bd7d7f5a-d547-44e3-83b4-ff3ee59125ab", "phpp_library_codes": { - "phpp_dataset_name": "US0055b-New York", - "phpp_country_code": "US-United States of America", - "phpp_region_code": "New York" + "country_code": "US-United States of America", + "region_code": "New York", + "dataset_name": "US0055b-New York", + "identifier": "e30b8c9c-3d6a-4088-a032-58c215f359d3", + "display_name": "US0055b-New York" } }, "phi_certification": { @@ -284,7 +323,7 @@ }, "type": "IdealAirSystemProperties" }, - "identifier": "Room_15_af779748 Ideal Loads Air System", + "identifier": "Room_5_70f07d3f Ideal Loads Air System", "cooling_air_temperature": 13.0, "demand_controlled_ventilation": false, "cooling_limit": { @@ -2165,18 +2204,18 @@ } }, "version": "1.50.2", - "identifier": "unnamed_b551bdb4", + "identifier": "unnamed_b9b727df", "display_name": "unnamed", "rooms": [ { "properties": { "ph": { "type": "RoomPhPropertiesAbridged", - "ph_bldg_segment_id": "66516290-ad55-4f1c-a0da-6b9292e017a3", + "ph_bldg_segment_id": "b206f525-9dcb-4783-83ba-1f34707cc89d", "spaces": [] }, "energy": { - "hvac": "Room_15_af779748 Ideal Loads Air System", + "hvac": "Room_5_70f07d3f Ideal Loads Air System", "type": "RoomEnergyPropertiesAbridged", "program_type": "Generic Office Program" }, @@ -2185,8 +2224,8 @@ "type": "RoomRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748", - "display_name": "Room_15", + "identifier": "Room_5_70f07d3f", + "display_name": "Room_5", "faces": [ { "boundary_condition": { @@ -2254,8 +2293,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face0", - "display_name": "Room_15_af779748..Face0", + "identifier": "Room_5_70f07d3f..Face0", + "display_name": "Room_5_70f07d3f..Face0", "type": "Face" }, { @@ -2324,8 +2363,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face1", - "display_name": "Room_15_af779748..Face1", + "identifier": "Room_5_70f07d3f..Face1", + "display_name": "Room_5_70f07d3f..Face1", "type": "Face" }, { @@ -2394,8 +2433,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face2", - "display_name": "Room_15_af779748..Face2", + "identifier": "Room_5_70f07d3f..Face2", + "display_name": "Room_5_70f07d3f..Face2", "type": "Face" }, { @@ -2464,8 +2503,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face3", - "display_name": "Room_15_af779748..Face3", + "identifier": "Room_5_70f07d3f..Face3", + "display_name": "Room_5_70f07d3f..Face3", "type": "Face" }, { @@ -2529,8 +2568,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face4", - "display_name": "Room_15_af779748..Face4", + "identifier": "Room_5_70f07d3f..Face4", + "display_name": "Room_5_70f07d3f..Face4", "type": "Face" }, { @@ -2599,8 +2638,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_15_af779748..Face5", - "display_name": "Room_15_af779748..Face5", + "identifier": "Room_5_70f07d3f..Face5", + "display_name": "Room_5_70f07d3f..Face5", "type": "Face" } ], diff --git a/tests/_source_hbjson/Default_Room_Single_Zone.json b/tests/_source_hbjson/Default_Room_Single_Zone.json index 864f79d..1d6fe6c 100644 --- a/tests/_source_hbjson/Default_Room_Single_Zone.json +++ b/tests/_source_hbjson/Default_Room_Single_Zone.json @@ -41,95 +41,82 @@ "PHIUS2021_cooling_load": 10.0 }, "name": "Unnamed_Bldg_Segment", - "identifier": "56c57b6b-a1d0-4816-959b-655cb8e56faa", + "identifier": "df53b363-b310-42c6-abeb-2a0428fbf606", "site": { - "location": { - "site_elevation": null, - "latitude": 40.600000000000001, - "longitude": -73.799999999999997, - "hours_from_UTC": -4, - "climate_zone": 1 - }, "climate": { - "monthly_radiation_west": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "peak_heating_1": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "peak_cooling_2": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "monthly_radiation_east": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "peak_cooling_1": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 - }, - "monthly_temperature_air": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_temperature_dewpoint": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 + "monthly_radiation": { + "east": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "south": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "north": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "dde4ec10-0856-471e-ab6a-1497c81d3c38", + "display_name": "dde4ec10-0856-471e-ab6a-1497c81d3c38", + "glob": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "west": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, "ground": { "depth_groundwater": 3, @@ -138,93 +125,145 @@ "ground_heat_capacity": 1000, "flow_rate_groundwater": 0.050000000000000003 }, - "average_wind_speed": 4, - "monthly_radiation_global": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_temperature_ground": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 + "average_wind_speed": 4.0, + "peak_loads": { + "heat_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "afbb8579-a55a-40b2-ae39-f20749133097", + "display_name": "afbb8579-a55a-40b2-ae39-f20749133097", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "heat_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "f6ad9304-630e-4f11-9731-fb8c75647006", + "display_name": "f6ad9304-630e-4f11-9731-fb8c75647006", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "cooling_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "beda02ba-0366-4843-9ebf-ebffb3ae5bb0", + "display_name": "beda02ba-0366-4843-9ebf-ebffb3ae5bb0", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "identifier": "92ee49a9-c69c-4a2f-88fa-acfee7d490e9", + "display_name": "92ee49a9-c69c-4a2f-88fa-acfee7d490e9", + "cooling_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "464f2e4b-c743-4a17-96e0-66a11cbfaf4c", + "display_name": "464f2e4b-c743-4a17-96e0-66a11cbfaf4c", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + } }, - "peak_heating_2": { - "temp": 0, - "rad_global": 0, - "rad_east": 0, - "rad_west": 0, - "rad_south": 0, - "rad_north": 0 + "monthly_temps": { + "air_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "sky_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "ground_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "7d65259e-8d60-4c31-9a31-c59d712ae230", + "display_name": "7d65259e-8d60-4c31-9a31-c59d712ae230", + "dewpoints": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, + "identifier": "ada1321f-d4b5-4c2a-bb82-3759f7865610", "display_name": "New York", - "summer_daily_temperature_swing": 8, - "monthly_temperature_sky": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "monthly_radiation_north": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "station_elevation": 0.0, - "monthly_radiation_south": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - } + "summer_daily_temperature_swing": 8.0, + "station_elevation": 0.0 + }, + "location": { + "site_elevation": null, + "latitude": 40.600000000000001, + "longitude": -73.799999999999997, + "hours_from_UTC": -4, + "identifier": "79787d3b-8014-486a-8386-b6732e4ef115", + "display_name": "79787d3b-8014-486a-8386-b6732e4ef115", + "climate_zone": 1 }, + "identifier": "1b55ee01-95d3-475e-82ca-d0a914c63fe1", + "display_name": "1b55ee01-95d3-475e-82ca-d0a914c63fe1", "phpp_library_codes": { - "phpp_dataset_name": "US0055b-New York", - "phpp_country_code": "US-United States of America", - "phpp_region_code": "New York" + "country_code": "US-United States of America", + "region_code": "New York", + "dataset_name": "US0055b-New York", + "identifier": "e30b8c9c-3d6a-4088-a032-58c215f359d3", + "display_name": "US0055b-New York" } }, "phi_certification": { @@ -280,7 +319,7 @@ }, "type": "IdealAirSystemProperties" }, - "identifier": "Room_16_f71ed374 Ideal Loads Air System", + "identifier": "Room_6_9ae7fae6 Ideal Loads Air System", "cooling_air_temperature": 13.0, "demand_controlled_ventilation": false, "cooling_limit": { @@ -1645,8 +1684,8 @@ "type": "RoomRadianceProperties" } }, - "identifier": "Room_16_f71ed374", - "display_name": "Room_16", + "identifier": "Room_6_9ae7fae6", + "display_name": "Room_6", "faces": [ { "boundary_condition": { @@ -1714,8 +1753,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face0", - "display_name": "Room_16_f71ed374..Face0", + "identifier": "Room_6_9ae7fae6..Face0", + "display_name": "Room_6_9ae7fae6..Face0", "type": "Face" }, { @@ -1784,8 +1823,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face1", - "display_name": "Room_16_f71ed374..Face1", + "identifier": "Room_6_9ae7fae6..Face1", + "display_name": "Room_6_9ae7fae6..Face1", "type": "Face" }, { @@ -1854,8 +1893,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face2", - "display_name": "Room_16_f71ed374..Face2", + "identifier": "Room_6_9ae7fae6..Face2", + "display_name": "Room_6_9ae7fae6..Face2", "type": "Face" }, { @@ -1924,8 +1963,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face3", - "display_name": "Room_16_f71ed374..Face3", + "identifier": "Room_6_9ae7fae6..Face3", + "display_name": "Room_6_9ae7fae6..Face3", "type": "Face" }, { @@ -1989,8 +2028,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face4", - "display_name": "Room_16_f71ed374..Face4", + "identifier": "Room_6_9ae7fae6..Face4", + "display_name": "Room_6_9ae7fae6..Face4", "type": "Face" }, { @@ -2059,8 +2098,8 @@ "type": "FaceRadianceProperties" } }, - "identifier": "Room_16_f71ed374..Face5", - "display_name": "Room_16_f71ed374..Face5", + "identifier": "Room_6_9ae7fae6..Face5", + "display_name": "Room_6_9ae7fae6..Face5", "type": "Face" } ], diff --git a/tests/_source_hbjson/Multi_Room_Complete.hbjson b/tests/_source_hbjson/Multi_Room_Complete.hbjson index 1c7799d..ab34937 100644 --- a/tests/_source_hbjson/Multi_Room_Complete.hbjson +++ b/tests/_source_hbjson/Multi_Room_Complete.hbjson @@ -60,8 +60,8 @@ "type": "ShadeRadiancePropertiesAbridged" } }, - "identifier": "Shade_2d4ac338", - "display_name": "Shade_2d4ac338", + "identifier": "Shade_e67e28da", + "display_name": "Shade_e67e28da", "type": "Shade" }, { @@ -122,8 +122,8 @@ "type": "ShadeRadiancePropertiesAbridged" } }, - "identifier": "Shade_2ffc6c21", - "display_name": "Shade_2ffc6c21", + "identifier": "Shade_b24a0fd7", + "display_name": "Shade_b24a0fd7", "type": "Shade" } ], @@ -132,7 +132,7 @@ "bldg_segments": [ { "thermal_bridges": { - "17080c74-939a-4ff2-8c49-458c7dc5e466": { + "fbf61e12-672c-4f21-9e06-2e1785424f74": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -170,11 +170,53 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "17080c74-939a-4ff2-8c49-458c7dc5e466", + "identifier": "fbf61e12-672c-4f21-9e06-2e1785424f74", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "e12be2a8-4bf8-4352-84d2-9923b1605298": { + "48c8cb9b-8bdb-43af-8c98-892be65a1fa5": { + "id_num": 0, + "psi_value": 0.01, + "user_data": {}, + "geometry": { + "vertices": [ + [ + 12.0, + 0.65835921350012616, + 0.49376941012509468 + ], + [ + 12.0, + 3.3416407864998741, + 0.49376941012509468 + ], + [ + 12.0, + 3.3416407864998741, + 2.5062305898749053 + ], + [ + 12.0, + 0.65835921350012616, + 2.5062305898749053 + ], + [ + 12.0, + 0.65835921350012616, + 0.49376941012509468 + ] + ], + "type": "Polyline3D" + }, + "fRsi_value": 0.75, + "_group_type": { + "value": "15-AMBIENT" + }, + "identifier": "48c8cb9b-8bdb-43af-8c98-892be65a1fa5", + "display_name": "_unnamed_bldg_segment_", + "quantity": 1 + }, + "73e5078d-3a8e-4b58-a1b1-e47dc57a3b48": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -212,11 +254,11 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "e12be2a8-4bf8-4352-84d2-9923b1605298", + "identifier": "73e5078d-3a8e-4b58-a1b1-e47dc57a3b48", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "32cc9ab8-48b8-4f7b-bc2d-8076b02ccd72": { + "e291798b-7f75-422b-8137-af63544b0164": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -254,39 +296,39 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "32cc9ab8-48b8-4f7b-bc2d-8076b02ccd72", + "identifier": "e291798b-7f75-422b-8137-af63544b0164", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "b646f08d-cdce-413f-9a2c-53ef8e2ffa08": { + "eddfcbf3-d2d9-40cb-beef-ae0958bb76dc": { "id_num": 0, "psi_value": 0.01, "user_data": {}, "geometry": { "vertices": [ [ - 12.0, - 0.65835921350012616, + 0.0, + 3.3416407864998741, 0.49376941012509468 ], [ - 12.0, - 3.3416407864998741, + 0.0, + 0.65835921350012616, 0.49376941012509468 ], [ - 12.0, - 3.3416407864998741, + 0.0, + 0.65835921350012616, 2.5062305898749053 ], [ - 12.0, - 0.65835921350012616, + 0.0, + 3.3416407864998741, 2.5062305898749053 ], [ - 12.0, - 0.65835921350012616, + 0.0, + 3.3416407864998741, 0.49376941012509468 ] ], @@ -296,11 +338,11 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "b646f08d-cdce-413f-9a2c-53ef8e2ffa08", + "identifier": "eddfcbf3-d2d9-40cb-beef-ae0958bb76dc", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "0bdfa6d3-f05b-47c7-8f35-f7c84147bf1c": { + "85b39f90-4d1c-4805-93df-90b2a5ccff81": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -338,11 +380,11 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "0bdfa6d3-f05b-47c7-8f35-f7c84147bf1c", + "identifier": "85b39f90-4d1c-4805-93df-90b2a5ccff81", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "cec59983-7f4e-4001-a26c-b8c35000cd1d": { + "47cc0255-7201-45ca-b0ae-bf58b0c9205a": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -350,28 +392,28 @@ "vertices": [ [ 0.0, - 3.3416407864998741, - 0.49376941012509468 + 0.0, + 3.0 ], [ + 5.0, 0.0, - 0.65835921350012616, - 0.49376941012509468 + 3.0 ], [ - 0.0, - 0.65835921350012616, - 2.5062305898749053 + 5.0, + 4.0, + 3.0 ], [ 0.0, - 3.3416407864998741, - 2.5062305898749053 + 4.0, + 3.0 ], [ 0.0, - 3.3416407864998741, - 0.49376941012509468 + 0.0, + 3.0 ] ], "type": "Polyline3D" @@ -380,11 +422,11 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "cec59983-7f4e-4001-a26c-b8c35000cd1d", + "identifier": "47cc0255-7201-45ca-b0ae-bf58b0c9205a", "display_name": "_unnamed_bldg_segment_", "quantity": 1 }, - "63b9bf09-7965-4bbc-a678-6ccfdab443af": { + "073024a1-3b18-498f-ba11-5e4b3379938e": { "id_num": 0, "psi_value": 0.01, "user_data": {}, @@ -422,49 +464,7 @@ "_group_type": { "value": "15-AMBIENT" }, - "identifier": "63b9bf09-7965-4bbc-a678-6ccfdab443af", - "display_name": "_unnamed_bldg_segment_", - "quantity": 1 - }, - "d74b902f-3844-4381-8fca-98d0ffee905b": { - "id_num": 0, - "psi_value": 0.01, - "user_data": {}, - "geometry": { - "vertices": [ - [ - 0.0, - 0.0, - 3.0 - ], - [ - 5.0, - 0.0, - 3.0 - ], - [ - 5.0, - 4.0, - 3.0 - ], - [ - 0.0, - 4.0, - 3.0 - ], - [ - 0.0, - 0.0, - 3.0 - ] - ], - "type": "Polyline3D" - }, - "fRsi_value": 0.75, - "_group_type": { - "value": "15-AMBIENT" - }, - "identifier": "d74b902f-3844-4381-8fca-98d0ffee905b", + "identifier": "073024a1-3b18-498f-ba11-5e4b3379938e", "display_name": "_unnamed_bldg_segment_", "quantity": 1 } @@ -585,95 +585,82 @@ "PHIUS2021_cooling_load": 10.0 }, "name": "_unnamed_bldg_segment_", - "identifier": "b142e1eb-e509-4917-aa86-450057d2354b", + "identifier": "bb782a01-2057-4e57-bb7a-c7841bd6f491", "site": { - "location": { - "site_elevation": null, - "latitude": 40.600000000000001, - "longitude": -73.799999999999997, - "hours_from_UTC": -4, - "climate_zone": 1 - }, "climate": { - "monthly_radiation_west": { - "february": 70, - "july": 120, - "october": 94, - "december": 45, - "august": 130, - "april": 95, - "september": 91, - "january": 48, - "march": 92, - "may": 114, - "june": 121, - "november": 47 - }, - "peak_heating_1": { - "temp": -6.7000000000000002, - "rad_global": 121, - "rad_east": 80, - "rad_west": 113, - "rad_south": 200, - "rad_north": 46 - }, - "peak_cooling_2": { - "temp": 26.100000000000001, - "rad_global": 230, - "rad_east": 106, - "rad_west": 159, - "rad_south": 132, - "rad_north": 64 - }, - "monthly_radiation_east": { - "february": 46, - "july": 78, - "october": 54, - "december": 28, - "august": 84, - "april": 65, - "september": 60, - "january": 32, - "march": 57, - "may": 82, - "june": 76, - "november": 33 - }, - "peak_cooling_1": { - "temp": 26.100000000000001, - "rad_global": 230, - "rad_east": 106, - "rad_west": 159, - "rad_south": 132, - "rad_north": 64 - }, - "monthly_temperature_air": { - "february": -0.20000000000000001, - "july": 25.0, - "october": 14.0, - "december": 3.2999999999999998, - "august": 24.800000000000001, - "april": 10.9, - "september": 19.899999999999999, - "january": 1.2, - "march": 5.5999999999999996, - "may": 16.100000000000001, - "june": 21.699999999999999, - "november": 7.2999999999999998 - }, - "monthly_temperature_dewpoint": { - "february": -7.4000000000000004, - "july": 20.300000000000001, - "october": 7.9000000000000004, - "december": -2.7999999999999998, - "august": 17.100000000000001, - "april": 4.7000000000000002, - "september": 13.199999999999999, - "january": -4.2999999999999998, - "march": 0.29999999999999999, - "may": 9.0999999999999996, - "june": 15.800000000000001, - "november": 2.1000000000000001 + "monthly_radiation": { + "east": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "south": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "north": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "7919d7fe-fc0b-402e-b517-20be6824f32f", + "display_name": "7919d7fe-fc0b-402e-b517-20be6824f32f", + "glob": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "west": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, "ground": { "depth_groundwater": 3, @@ -682,93 +669,145 @@ "ground_heat_capacity": 1000, "flow_rate_groundwater": 0.050000000000000003 }, - "average_wind_speed": 4, - "monthly_radiation_global": { - "february": 72, - "july": 177, - "october": 109, - "december": 46, - "august": 182, - "april": 133, - "september": 124, - "january": 50, - "march": 111, - "may": 170, - "june": 176, - "november": 62 - }, - "monthly_temperature_ground": { - "february": 0, - "july": 0, - "october": 0, - "december": 0, - "august": 0, - "april": 0, - "september": 0, - "january": 0, - "march": 0, - "may": 0, - "june": 0, - "november": 0 - }, - "peak_heating_2": { - "temp": -4.2000000000000002, - "rad_global": 38, - "rad_east": 22, - "rad_west": 26, - "rad_south": 46, - "rad_north": 16 - }, - "display_name": "New York", - "summer_daily_temperature_swing": 8, - "monthly_temperature_sky": { - "february": -20.0, - "july": 14.5, - "october": -2.7999999999999998, - "december": -11.4, - "august": 8.4000000000000004, - "april": -4.7999999999999998, - "september": 5.7999999999999998, - "january": -17.399999999999999, - "march": -10.9, - "may": 1.0, - "june": 9.8000000000000007, - "november": -8.5999999999999996 + "average_wind_speed": 4.0, + "peak_loads": { + "heat_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "a7690646-4271-4e0f-8283-89a5e983e66a", + "display_name": "a7690646-4271-4e0f-8283-89a5e983e66a", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "heat_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "7833a962-e75d-4074-9716-fe4f39d7f326", + "display_name": "7833a962-e75d-4074-9716-fe4f39d7f326", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "cooling_load_1": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "6e11c6e4-7da5-46d4-9792-d7a31e72a153", + "display_name": "6e11c6e4-7da5-46d4-9792-d7a31e72a153", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + }, + "identifier": "e9cfbc3b-b8e1-4b18-b5c2-b6cf95cdc39f", + "display_name": "e9cfbc3b-b8e1-4b18-b5c2-b6cf95cdc39f", + "cooling_load_2": { + "temp": 0.0, + "rad_global": 0.0, + "rad_east": 0.0, + "dewpoint": null, + "rad_west": 0.0, + "ground_temp": null, + "identifier": "35bfd2d3-55e8-4be6-afd0-9f6ae24cc445", + "display_name": "35bfd2d3-55e8-4be6-afd0-9f6ae24cc445", + "rad_south": 0.0, + "rad_north": 0.0, + "sky_temp": null + } }, - "monthly_radiation_north": { - "february": 29, - "july": 59, - "october": 30, - "december": 16, - "august": 50, - "april": 39, - "september": 34, - "january": 21, - "march": 34, - "may": 56, - "june": 60, - "november": 20 + "monthly_temps": { + "air_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "sky_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "ground_temps": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + }, + "identifier": "72a305f1-de27-409a-8d95-42fa8635819f", + "display_name": "72a305f1-de27-409a-8d95-42fa8635819f", + "dewpoints": { + "february": 0.0, + "july": 0.0, + "october": 0.0, + "december": 0.0, + "august": 0.0, + "april": 0.0, + "september": 0.0, + "january": 0.0, + "march": 0.0, + "may": 0.0, + "june": 0.0, + "november": 0.0 + } }, - "station_elevation": 0.0, - "monthly_radiation_south": { - "february": 106, - "july": 78, - "october": 129, - "december": 87, - "august": 104, - "april": 86, - "september": 97, - "january": 83, - "march": 103, - "may": 80, - "june": 73, - "november": 87 - } + "identifier": "087d2fb1-3fd9-440d-b68e-da42f74b2dd1", + "display_name": "New York_177b9270", + "summer_daily_temperature_swing": 8.0, + "station_elevation": 0.0 + }, + "location": { + "site_elevation": 0.0, + "latitude": 40.600000000000001, + "longitude": -73.799999999999997, + "hours_from_UTC": -4, + "identifier": "700520fb-9db1-4512-9b18-fd930112b306", + "display_name": "New_York", + "climate_zone": 1 }, + "identifier": "8085351d-22ea-4736-b540-f980d76cc5d6", + "display_name": "_unnamed_", "phpp_library_codes": { - "phpp_dataset_name": "US0055b-New York", - "phpp_country_code": "US-United States of America", - "phpp_region_code": "New York" + "country_code": "US-United States of America", + "region_code": "New York", + "dataset_name": "US0055b-New York", + "identifier": "c8f427a5-9387-4a4b-ad33-ae48815628b7", + "display_name": "US0055b-New York" } }, "phi_certification": { @@ -918,14 +957,14 @@ "duct_02": null, "duct_01": null, "name": "Test Vent System", - "identifier": "1d87adfc-564e-4dd9-959c-d92faeb50a08" + "identifier": "95cbccdc-4844-4561-a543-ce47e951ad79" }, "cooling_systems": [], "type": "IdealAirSystemPhProperties" }, "type": "IdealAirSystemProperties" }, - "identifier": "Room_27_8b34e8e0 Ideal Loads Air System", + "identifier": "Room_7_fdfe6144 Ideal Loads Air System", "cooling_air_temperature": 13.0, "demand_controlled_ventilation": true, "cooling_limit": { @@ -960,14 +999,14 @@ "duct_02": null, "duct_01": null, "name": "Test Vent System", - "identifier": "1d87adfc-564e-4dd9-959c-d92faeb50a08" + "identifier": "95cbccdc-4844-4561-a543-ce47e951ad79" }, "cooling_systems": [], "type": "IdealAirSystemPhProperties" }, "type": "IdealAirSystemProperties" }, - "identifier": "Room_28_06f7b7a7 Ideal Loads Air System", + "identifier": "Room_8_179a1177 Ideal Loads Air System", "cooling_air_temperature": 13.0, "demand_controlled_ventilation": true, "cooling_limit": { @@ -1016,9 +1055,25 @@ "heater_efficiency": 1.0, "properties": { "ph": { + "id_num": 0, + "recirc_piping": {}, + "branch_piping": {}, + "heaters": { + "1136": { + "heater_type": "PhSHWHeaterHeatPump", + "annual_system_perf_ratio": null, + "in_conditioned_space": true, + "identifier": "5679498c-665d-4c93-b6db-8dc5f7af8b01", + "display_name": "5679498c-665d-4c93-b6db-8dc5f7af8b01", + "percent_coverage": 1.0, + "annual_COP": null, + "annual_energy_factor": null + } + }, "tank_1": { "standby_losses": 4.0, "solar_losses": 0.0, + "user_data": {}, "solar_connection": false, "room_temp": 20, "water_temp": 60, @@ -1028,18 +1083,18 @@ }, "in_conditioned_space": true, "storage_capacity": 300, - "quantity": 1, + "identifier": "c38d0558-3a58-4a07-b673-9cd52f652e64", "display_name": "_unnamed_hw_tank_", + "quantity": 1, "storage_loss_rate": 0.0 }, - "type": "SHWSystemPhProperties", - "id_num": 0, - "heaters": {} + "type": "SHWSystemPhProperties" }, "type": "SHWSystemProperties" }, - "identifier": "SHW System_15b9bc82", + "identifier": "SHW System_1239da4c", "ambient_condition": 22.0, + "display_name": "SHW System_1239da4c", "type": "SHWSystem" } ], @@ -2927,14 +2982,14 @@ } }, "version": "1.50.2", - "identifier": "unnamed_7c1a0984", + "identifier": "unnamed_8f68954a", "display_name": "unnamed", "rooms": [ { "properties": { "ph": { "type": "RoomPhPropertiesAbridged", - "ph_bldg_segment_id": "b142e1eb-e509-4917-aa86-450057d2354b", + "ph_bldg_segment_id": "bb782a01-2057-4e57-bb7a-c7841bd6f491", "spaces": [ { "volumes": [ @@ -3317,13 +3372,13 @@ }, "type": "SpaceProperties" }, - "name": "Room_27", + "name": "Room_7", "quantity": 1 } ] }, "energy": { - "shw": "SHW System_15b9bc82", + "shw": "SHW System_1239da4c", "program_type": "Generic Office Program", "service_hot_water": { "flow_per_area": 5.0000000000000004e-06, @@ -3331,10 +3386,10 @@ "latent_fraction": 0.050000000000000003, "target_temperature": 60.0, "schedule": "Always On", - "identifier": "Room_27_8b34e8e0_service_hot_water", + "identifier": "Room_7_fdfe6144_service_hot_water", "type": "ServiceHotWaterAbridged" }, - "hvac": "Room_27_8b34e8e0 Ideal Loads Air System", + "hvac": "Room_7_fdfe6144 Ideal Loads Air System", "electric_equipment": { "radiant_fraction": 0.5, "latent_fraction": 0.0, @@ -3342,7 +3397,7 @@ "ph": { "equipment_collection": { "equipment_set": { - "c9d964c8-55d0-482d-8d3f-19766e21f756": { + "5c95feae-d47e-4f12-a9cb-4331ba4d4b7c": { "energy_demand_per_use": 1.1000000000000001, "reference_quantity": 1, "reference_energy_norm": 2, @@ -3353,7 +3408,7 @@ "capacity": 0.12740000000000001, "in_conditioned_space": true, "modified_energy_factor": 2.7000000000000002, - "identifier": "c9d964c8-55d0-482d-8d3f-19766e21f756", + "identifier": "5c95feae-d47e-4f12-a9cb-4331ba4d4b7c", "display_name": "Laundry - washer", "quantity": 1, "combined_energy_factor": 0, @@ -3362,21 +3417,7 @@ }, "energy_demand": 0 }, - "7c894f07-0ad3-40b6-b1ce-b3be0f8b744a": { - "energy_demand_per_use": 1.0, - "reference_quantity": 4, - "reference_energy_norm": 1, - "user_data": {}, - "equipment_type": "PhFridgeFreezer", - "comment": "default", - "in_conditioned_space": true, - "identifier": "7c894f07-0ad3-40b6-b1ce-b3be0f8b744a", - "display_name": "Kitchen fridge/freeze combo", - "quantity": 1, - "combined_energy_factor": 0, - "energy_demand": 0 - }, - "8230e207-69a4-4f54-ba71-efe3411f9bab": { + "4e2f9223-4f85-4b68-a170-83a0a24e07f3": { "energy_demand_per_use": 0.25, "reference_quantity": 1, "reference_energy_norm": 1, @@ -3384,7 +3425,7 @@ "equipment_type": "PhCooktop", "comment": "default", "in_conditioned_space": true, - "identifier": "8230e207-69a4-4f54-ba71-efe3411f9bab", + "identifier": "4e2f9223-4f85-4b68-a170-83a0a24e07f3", "display_name": "Kitchen cooking", "quantity": 1, "combined_energy_factor": 0, @@ -3393,26 +3434,21 @@ "value": "1-ELECTRICITY" } }, - "2f81b09d-53e0-44af-8f8f-366d1cbd5306": { - "energy_demand_per_use": 1.1000000000000001, - "reference_quantity": 1, - "reference_energy_norm": 2, + "a68ac7c8-9f32-4a14-ab6f-dba9f18bc7f4": { + "energy_demand_per_use": 1.0, + "reference_quantity": 4, + "reference_energy_norm": 1, "user_data": {}, - "equipment_type": "PhDishwasher", - "capacity_type": 1, + "equipment_type": "PhFridgeFreezer", "comment": "default", - "capacity": 12, "in_conditioned_space": true, - "identifier": "2f81b09d-53e0-44af-8f8f-366d1cbd5306", - "display_name": "Kitchen dishwasher", + "identifier": "a68ac7c8-9f32-4a14-ab6f-dba9f18bc7f4", + "display_name": "Kitchen fridge/freeze combo", "quantity": 1, "combined_energy_factor": 0, - "_water_connection": { - "value": "2-COLD WATER CONNECTION" - }, "energy_demand": 0 }, - "e70dfc6e-06fc-4721-b156-337f85c6a251": { + "ff2cf9a7-e6b9-4000-a154-284604d6787e": { "energy_demand_per_use": 3.5, "reference_quantity": 1, "reference_energy_norm": 2, @@ -3422,7 +3458,7 @@ "comment": "default", "gas_consumption": 0, "in_conditioned_space": true, - "identifier": "e70dfc6e-06fc-4721-b156-337f85c6a251", + "identifier": "ff2cf9a7-e6b9-4000-a154-284604d6787e", "display_name": "Laundry - dryer", "quantity": 1, "_dryer_type": { @@ -3432,6 +3468,25 @@ "gas_efficiency_factor": 2.6699999999999999, "energy_demand": 0, "field_utilization_factor_type": 1 + }, + "df6f9007-f728-42bd-8823-238bb6891ada": { + "energy_demand_per_use": 1.1000000000000001, + "reference_quantity": 1, + "reference_energy_norm": 2, + "user_data": {}, + "equipment_type": "PhDishwasher", + "capacity_type": 1, + "comment": "default", + "capacity": 12, + "in_conditioned_space": true, + "identifier": "df6f9007-f728-42bd-8823-238bb6891ada", + "display_name": "Kitchen dishwasher", + "quantity": 1, + "combined_energy_factor": 0, + "_water_connection": { + "value": "2-COLD WATER CONNECTION" + }, + "energy_demand": 0 } } }, @@ -3441,7 +3496,7 @@ }, "lost_fraction": 0.0, "schedule": "Generic Office Equipment", - "identifier": "Generic Office Equipment_9a458541", + "identifier": "Generic Office Equipment_3ec1bc39", "watts_per_area": 10.33, "type": "ElectricEquipmentAbridged" }, @@ -3452,8 +3507,8 @@ "type": "RoomRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0", - "display_name": "Room_27", + "identifier": "Room_7_fdfe6144", + "display_name": "Room_7", "faces": [ { "boundary_condition": { @@ -3566,15 +3621,16 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.10000000000000009, - "o_reveal": 0.10000000000000032, + "d_over": 0.10000000000000053, + "o_reveal": 0.10000000000000001, "d_hori": null, - "o_over": 0.10000000000000003, - "d_reveal": 0.10000000000000031 + "o_over": 0.10000000000000034, + "d_reveal": 0.099999999999999867 }, "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -3585,8 +3641,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face0_Glz0", - "display_name": "Room_27_8b34e8e0..Face0_Glz0", + "identifier": "Room_7_fdfe6144..Face0_Glz0", + "display_name": "Room_7_fdfe6144..Face0_Glz0", "is_operable": false, "type": "Aperture" } @@ -3604,15 +3660,15 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face0", - "display_name": "Room_27_8b34e8e0..Face0", + "identifier": "Room_7_fdfe6144..Face0", + "display_name": "Room_7_fdfe6144..Face0", "type": "Face" }, { "boundary_condition": { "boundary_condition_objects": [ - "Room_28_06f7b7a7..Face3", - "Room_28_06f7b7a7" + "Room_8_179a1177..Face3", + "Room_8_179a1177" ], "type": "Surface" }, @@ -3673,8 +3729,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face1", - "display_name": "Room_27_8b34e8e0..Face1", + "identifier": "Room_7_fdfe6144..Face1", + "display_name": "Room_7_fdfe6144..Face1", "type": "Face" }, { @@ -3788,15 +3844,16 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.10000000000000009, + "d_over": 0.099999999999999645, "o_reveal": 0.10000000000000009, "d_hori": null, - "o_over": 0.1000000000000001, + "o_over": 0.10000000000000007, "d_reveal": 0.10000000000000053 }, "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -3807,8 +3864,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face2_Glz0", - "display_name": "Room_27_8b34e8e0..Face2_Glz0", + "identifier": "Room_7_fdfe6144..Face2_Glz0", + "display_name": "Room_7_fdfe6144..Face2_Glz0", "is_operable": false, "type": "Aperture" } @@ -3826,8 +3883,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face2", - "display_name": "Room_27_8b34e8e0..Face2", + "identifier": "Room_7_fdfe6144..Face2", + "display_name": "Room_7_fdfe6144..Face2", "type": "Face" }, { @@ -3941,15 +3998,16 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.10000000000000053, + "d_over": 0.099999999999999645, "o_reveal": 0.10000000000000002, "d_hori": null, - "o_over": 0.10000000000000034, + "o_over": 0.10000000000000005, "d_reveal": 0.1000000000000001 }, "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -3960,8 +4018,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face3_Glz0", - "display_name": "Room_27_8b34e8e0..Face3_Glz0", + "identifier": "Room_7_fdfe6144..Face3_Glz0", + "display_name": "Room_7_fdfe6144..Face3_Glz0", "is_operable": false, "type": "Aperture" } @@ -3979,8 +4037,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face3", - "display_name": "Room_27_8b34e8e0..Face3", + "identifier": "Room_7_fdfe6144..Face3", + "display_name": "Room_7_fdfe6144..Face3", "type": "Face" }, { @@ -4044,8 +4102,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face4", - "display_name": "Room_27_8b34e8e0..Face4", + "identifier": "Room_7_fdfe6144..Face4", + "display_name": "Room_7_fdfe6144..Face4", "type": "Face" }, { @@ -4114,8 +4172,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_27_8b34e8e0..Face5", - "display_name": "Room_27_8b34e8e0..Face5", + "identifier": "Room_7_fdfe6144..Face5", + "display_name": "Room_7_fdfe6144..Face5", "type": "Face" } ], @@ -4125,7 +4183,7 @@ "properties": { "ph": { "type": "RoomPhPropertiesAbridged", - "ph_bldg_segment_id": "b142e1eb-e509-4917-aa86-450057d2354b", + "ph_bldg_segment_id": "bb782a01-2057-4e57-bb7a-c7841bd6f491", "spaces": [ { "volumes": [ @@ -4508,13 +4566,13 @@ }, "type": "SpaceProperties" }, - "name": "Room_28", + "name": "Room_8", "quantity": 1 } ] }, "energy": { - "shw": "SHW System_15b9bc82", + "shw": "SHW System_1239da4c", "program_type": "Generic Office Program", "service_hot_water": { "flow_per_area": 3.5714285714285718e-06, @@ -4522,10 +4580,10 @@ "latent_fraction": 0.050000000000000003, "target_temperature": 60.0, "schedule": "Always On", - "identifier": "Room_28_06f7b7a7_service_hot_water", + "identifier": "Room_8_179a1177_service_hot_water", "type": "ServiceHotWaterAbridged" }, - "hvac": "Room_28_06f7b7a7 Ideal Loads Air System", + "hvac": "Room_8_179a1177 Ideal Loads Air System", "electric_equipment": { "radiant_fraction": 0.5, "latent_fraction": 0.0, @@ -4533,7 +4591,7 @@ "ph": { "equipment_collection": { "equipment_set": { - "c9d964c8-55d0-482d-8d3f-19766e21f756": { + "5c95feae-d47e-4f12-a9cb-4331ba4d4b7c": { "energy_demand_per_use": 1.1000000000000001, "reference_quantity": 1, "reference_energy_norm": 2, @@ -4544,7 +4602,7 @@ "capacity": 0.12740000000000001, "in_conditioned_space": true, "modified_energy_factor": 2.7000000000000002, - "identifier": "c9d964c8-55d0-482d-8d3f-19766e21f756", + "identifier": "5c95feae-d47e-4f12-a9cb-4331ba4d4b7c", "display_name": "Laundry - washer", "quantity": 1, "combined_energy_factor": 0, @@ -4553,21 +4611,7 @@ }, "energy_demand": 0 }, - "7c894f07-0ad3-40b6-b1ce-b3be0f8b744a": { - "energy_demand_per_use": 1.0, - "reference_quantity": 4, - "reference_energy_norm": 1, - "user_data": {}, - "equipment_type": "PhFridgeFreezer", - "comment": "default", - "in_conditioned_space": true, - "identifier": "7c894f07-0ad3-40b6-b1ce-b3be0f8b744a", - "display_name": "Kitchen fridge/freeze combo", - "quantity": 1, - "combined_energy_factor": 0, - "energy_demand": 0 - }, - "8230e207-69a4-4f54-ba71-efe3411f9bab": { + "4e2f9223-4f85-4b68-a170-83a0a24e07f3": { "energy_demand_per_use": 0.25, "reference_quantity": 1, "reference_energy_norm": 1, @@ -4575,7 +4619,7 @@ "equipment_type": "PhCooktop", "comment": "default", "in_conditioned_space": true, - "identifier": "8230e207-69a4-4f54-ba71-efe3411f9bab", + "identifier": "4e2f9223-4f85-4b68-a170-83a0a24e07f3", "display_name": "Kitchen cooking", "quantity": 1, "combined_energy_factor": 0, @@ -4584,26 +4628,21 @@ "value": "1-ELECTRICITY" } }, - "2f81b09d-53e0-44af-8f8f-366d1cbd5306": { - "energy_demand_per_use": 1.1000000000000001, - "reference_quantity": 1, - "reference_energy_norm": 2, + "a68ac7c8-9f32-4a14-ab6f-dba9f18bc7f4": { + "energy_demand_per_use": 1.0, + "reference_quantity": 4, + "reference_energy_norm": 1, "user_data": {}, - "equipment_type": "PhDishwasher", - "capacity_type": 1, + "equipment_type": "PhFridgeFreezer", "comment": "default", - "capacity": 12, "in_conditioned_space": true, - "identifier": "2f81b09d-53e0-44af-8f8f-366d1cbd5306", - "display_name": "Kitchen dishwasher", + "identifier": "a68ac7c8-9f32-4a14-ab6f-dba9f18bc7f4", + "display_name": "Kitchen fridge/freeze combo", "quantity": 1, "combined_energy_factor": 0, - "_water_connection": { - "value": "2-COLD WATER CONNECTION" - }, "energy_demand": 0 }, - "e70dfc6e-06fc-4721-b156-337f85c6a251": { + "ff2cf9a7-e6b9-4000-a154-284604d6787e": { "energy_demand_per_use": 3.5, "reference_quantity": 1, "reference_energy_norm": 2, @@ -4613,7 +4652,7 @@ "comment": "default", "gas_consumption": 0, "in_conditioned_space": true, - "identifier": "e70dfc6e-06fc-4721-b156-337f85c6a251", + "identifier": "ff2cf9a7-e6b9-4000-a154-284604d6787e", "display_name": "Laundry - dryer", "quantity": 1, "_dryer_type": { @@ -4623,6 +4662,25 @@ "gas_efficiency_factor": 2.6699999999999999, "energy_demand": 0, "field_utilization_factor_type": 1 + }, + "df6f9007-f728-42bd-8823-238bb6891ada": { + "energy_demand_per_use": 1.1000000000000001, + "reference_quantity": 1, + "reference_energy_norm": 2, + "user_data": {}, + "equipment_type": "PhDishwasher", + "capacity_type": 1, + "comment": "default", + "capacity": 12, + "in_conditioned_space": true, + "identifier": "df6f9007-f728-42bd-8823-238bb6891ada", + "display_name": "Kitchen dishwasher", + "quantity": 1, + "combined_energy_factor": 0, + "_water_connection": { + "value": "2-COLD WATER CONNECTION" + }, + "energy_demand": 0 } } }, @@ -4632,7 +4690,7 @@ }, "lost_fraction": 0.0, "schedule": "Generic Office Equipment", - "identifier": "Generic Office Equipment_9a458541", + "identifier": "Generic Office Equipment_3ec1bc39", "watts_per_area": 10.33, "type": "ElectricEquipmentAbridged" }, @@ -4643,8 +4701,8 @@ "type": "RoomRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7", - "display_name": "Room_28", + "identifier": "Room_8_179a1177", + "display_name": "Room_8", "faces": [ { "boundary_condition": { @@ -4757,15 +4815,16 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.099999999999999645, - "o_reveal": 0.10000000000000001, + "d_over": 0.10000000000000053, + "o_reveal": 0.10000000000000031, "d_hori": null, - "o_over": 0.099999999999999992, + "o_over": 0.10000000000000034, "d_reveal": 0.099999999999999631 }, "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -4776,8 +4835,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face0_Glz0", - "display_name": "Room_28_06f7b7a7..Face0_Glz0", + "identifier": "Room_8_179a1177..Face0_Glz0", + "display_name": "Room_8_179a1177..Face0_Glz0", "is_operable": false, "type": "Aperture" } @@ -4795,8 +4854,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face0", - "display_name": "Room_28_06f7b7a7..Face0", + "identifier": "Room_8_179a1177..Face0", + "display_name": "Room_8_179a1177..Face0", "type": "Face" }, { @@ -4910,7 +4969,7 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.10000000000000053, + "d_over": 0.10000000000000009, "o_reveal": 0.099999999999999631, "d_hori": null, "o_over": 0.099999999999999631, @@ -4919,6 +4978,7 @@ "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -4929,8 +4989,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face1_Glz0", - "display_name": "Room_28_06f7b7a7..Face1_Glz0", + "identifier": "Room_8_179a1177..Face1_Glz0", + "display_name": "Room_8_179a1177..Face1_Glz0", "is_operable": false, "type": "Aperture" } @@ -4948,8 +5008,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face1", - "display_name": "Room_28_06f7b7a7..Face1", + "identifier": "Room_8_179a1177..Face1", + "display_name": "Room_8_179a1177..Face1", "type": "Face" }, { @@ -5063,7 +5123,7 @@ "id_num": 0, "shading_dims": { "h_hori": null, - "d_over": 0.10000000000000009, + "d_over": 0.10000000000000053, "o_reveal": 0.10000000000000007, "d_hori": null, "o_over": 0.1000000000000001, @@ -5072,6 +5132,7 @@ "inset_dist": 0.10000000000000001, "winter_shading_factor": null, "summer_shading_factor": null, + "variant_type": "_unnamed_type_", "type": "AperturePhPropertiesAbridged" }, "energy": { @@ -5082,8 +5143,8 @@ "type": "ApertureRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face2_Glz0", - "display_name": "Room_28_06f7b7a7..Face2_Glz0", + "identifier": "Room_8_179a1177..Face2_Glz0", + "display_name": "Room_8_179a1177..Face2_Glz0", "is_operable": false, "type": "Aperture" } @@ -5101,15 +5162,15 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face2", - "display_name": "Room_28_06f7b7a7..Face2", + "identifier": "Room_8_179a1177..Face2", + "display_name": "Room_8_179a1177..Face2", "type": "Face" }, { "boundary_condition": { "boundary_condition_objects": [ - "Room_27_8b34e8e0..Face1", - "Room_27_8b34e8e0" + "Room_7_fdfe6144..Face1", + "Room_7_fdfe6144" ], "type": "Surface" }, @@ -5170,8 +5231,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face3", - "display_name": "Room_28_06f7b7a7..Face3", + "identifier": "Room_8_179a1177..Face3", + "display_name": "Room_8_179a1177..Face3", "type": "Face" }, { @@ -5235,8 +5296,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face4", - "display_name": "Room_28_06f7b7a7..Face4", + "identifier": "Room_8_179a1177..Face4", + "display_name": "Room_8_179a1177..Face4", "type": "Face" }, { @@ -5305,8 +5366,8 @@ "type": "FaceRadiancePropertiesAbridged" } }, - "identifier": "Room_28_06f7b7a7..Face5", - "display_name": "Room_28_06f7b7a7..Face5", + "identifier": "Room_8_179a1177..Face5", + "display_name": "Room_8_179a1177..Face5", "type": "Face" } ], diff --git a/tests/conftest.py b/tests/conftest.py index 43a748a..78ff96f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -63,12 +63,28 @@ def _reset_phx_class_counters(): components.PhxComponentBase._count = 0 elec_equip.PhxElectricalDevice._count = 0 - PhxRoomVentilation._count = 0 + elec_equip.PhxDeviceDishwasher._count = 0 + elec_equip.PhxDeviceClothesWasher._count = 0 + elec_equip.PhxDeviceClothesDryer._count = 0 + elec_equip.PhxDeviceRefrigerator._count = 0 + elec_equip.PhxDeviceFreezer._count = 0 + elec_equip.PhxDeviceFridgeFreezer._count = 0 + elec_equip.PhxDeviceCooktop._count = 0 + elec_equip.PhxDeviceMEL._count = 0 + elec_equip.PhxDeviceLightingInterior._count = 0 + elec_equip.PhxDeviceLightingExterior._count = 0 + elec_equip.PhxDeviceLightingGarage._count = 0 + elec_equip.PhxDeviceCustomElec._count = 0 + elec_equip.PhxDeviceCustomLighting._count = 0 + elec_equip.PhxDeviceCustomMEL._count = 0 + _base.PhxMechanicalDevice._count = 0 - _base.PhxMechanicalSubSystem._count = 0 - collection.PhxMechanicalSystemCollection._count = 0 + PhxRoomVentilation._count = 0 + ventilation.PhxDeviceVentilation._count = 0 + ventilation.PhxDeviceVentilator._count = 0 + cooling.PhxCoolingDevice._count = 0 cooling.PhxCoolingVentilation._count = 0 cooling.PhxCoolingRecirculation._count = 0 @@ -127,51 +143,17 @@ def reset_class_counters(): ), ( Path('tests', '_source_hbjson', - 'Default_Room_Multiple_Zones_with_Apertures_Single_BldgSegment.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Multiple_Zones_with_Apertures_Single_BldgSegment.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Multiple_Zones_with_Apertures.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Multiple_Zones_with_Apertures.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Single_Zone_with_Apertures.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Single_Zone_with_Apertures.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Single_Zone_with_Shades.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Single_Zone_with_Shades.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Multiple_Zones_with_Apertures_default_Climate.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Multiple_Zones_with_Apertures_default_Climate.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Single_Zone_with_Rooms.hbjson'), - Path('tests', '_reference_xml', - 'Default_Room_Single_Zone_with_Rooms.xml') - ), - ( - Path('tests', '_source_hbjson', - 'Default_Room_Single_Zone_with_Ventilation.hbjson'), + 'Multi_Room_Complete.hbjson'), Path('tests', '_reference_xml', - 'Default_Room_Single_Zone_with_Ventilation.xml') + 'Multi_Room_Complete.xml') ), ]) def to_xml_reference_cases(request): """Yields file-paths to reference test-cases""" _reload_phx_classes() + _reset_phx_class_counters() try: yield request.param finally: _reload_phx_classes() + _reset_phx_class_counters() diff --git a/tests/test_from_HBJSON/test_create_project/test_convert_hbjson_to_PHX_Project.py b/tests/test_from_HBJSON/test_create_project/test_convert_hbjson_to_PHX_Project.py index 95cda4f..ee8f355 100644 --- a/tests/test_from_HBJSON/test_create_project/test_convert_hbjson_to_PHX_Project.py +++ b/tests/test_from_HBJSON/test_create_project/test_convert_hbjson_to_PHX_Project.py @@ -6,8 +6,7 @@ @pytest.mark.parametrize("filename,results", [ ('Default_Model_Single_Zone.hbjson', None), - ('Default_Room_Single_Zone_with_Apertures.hbjson', None), - ('Default_Room_Single_Zone_with_Shades.hbjson', None), + ('Multi_Room_Complete.hbjson', None), ]) def test_convert_model_PhxProject(filename, results): file_path = Path('tests', '_source_hbjson', filename) diff --git a/tests/test_from_HBJSON/test_read_HBJSON_file/test_convert_hbjson_dict_to_hb_model.py b/tests/test_from_HBJSON/test_read_HBJSON_file/test_convert_hbjson_dict_to_hb_model.py index bbf7d12..f7152c6 100644 --- a/tests/test_from_HBJSON/test_read_HBJSON_file/test_convert_hbjson_dict_to_hb_model.py +++ b/tests/test_from_HBJSON/test_read_HBJSON_file/test_convert_hbjson_dict_to_hb_model.py @@ -55,8 +55,7 @@ def hb_rooms_are_equal(hb_room_1, hb_room_2): @pytest.mark.parametrize("filename,results", [ ('Default_Model_Single_Zone.hbjson', None), - ('Default_Room_Single_Zone_with_Apertures.hbjson', None), - ('Default_Room_Single_Zone_with_Shades.hbjson', None), + ('Multi_Room_Complete.hbjson', None), ]) def test_read_default_single_zone_model_no_conversion(filename, results): file_path = Path('tests', '_source_hbjson', filename) @@ -72,5 +71,5 @@ def test_read_default_single_zone_model_no_conversion(filename, results): assert m1.units == m2.units assert m1.tolerance == m2.tolerance assert m1.angle_tolerance == m2.angle_tolerance - for room1, room2 in zip(sorted(m1.rooms), sorted(m2.rooms)): + for room1, room2 in zip(sorted(m1.rooms, key=lambda r: r.display_name), sorted(m2.rooms, key=lambda r: r.display_name)): assert hb_rooms_are_equal(room1, room2) diff --git a/tests/test_model/test_hvac/test_base.py b/tests/test_model/test_hvac/test_base.py index 6131bbf..ba17af8 100644 --- a/tests/test_model/test_hvac/test_base.py +++ b/tests/test_model/test_hvac/test_base.py @@ -141,32 +141,3 @@ def test_add_mixed_PhxMechanicalEquipment(reset_class_counters): assert mech_equip_4.usage_profile.ventilation == True assert mech_equip_4.usage_profile.humidification == False assert mech_equip_4.usage_profile.dehumidification == True - - -def test_default_PhxMechanicalSubSystem(reset_class_counters): - sys_1 = _base.PhxMechanicalSubSystem() - sys_2 = _base.PhxMechanicalSubSystem() - - assert sys_1 != sys_2 - assert sys_1.id_num == 1 - assert sys_1.system_type == hvac.DeviceType.ELECTRIC - assert str(sys_1) - assert repr(sys_1) - - assert sys_2.id_num == 2 - assert sys_2.system_type == hvac.DeviceType.ELECTRIC - assert str(sys_2) - assert repr(sys_2) - - -def test_set_PhxMechanicalSubSystem_identifier(reset_class_counters): - sys_1 = _base.PhxMechanicalSubSystem() - - sys_1.identifier = 'this is a test' - assert sys_1.identifier == 'this is a test' - - sys_1.identifier = 12 - assert sys_1.identifier == '12' - - sys_1.identifier = None - assert sys_1.identifier == '12' diff --git a/tests/test_model/test_hvac/test_collection.py b/tests/test_model/test_hvac/test_collection.py index 4a90c1c..249c90c 100644 --- a/tests/test_model/test_hvac/test_collection.py +++ b/tests/test_model/test_hvac/test_collection.py @@ -1,5 +1,5 @@ -from PHX.model.hvac import _base, collection, heating, cooling, water, ventilation - +from PHX.model.hvac import collection, heating, cooling, water, ventilation +import pytest def test_default_PhxMechanicalEquipmentCollection(reset_class_counters): c1 = collection.PhxMechanicalSystemCollection() @@ -8,26 +8,60 @@ def test_default_PhxMechanicalEquipmentCollection(reset_class_counters): assert c1.id_num == 1 assert c2.id_num == 2 + assert not c1.devices + assert not c2.devices -def test_add_subsystem(reset_class_counters): +def test_get_mech_device_by_key(reset_class_counters): c1 = collection.PhxMechanicalSystemCollection() - sys = _base.PhxMechanicalSubSystem() - c1.add_new_mech_subsystem(sys.identifier, sys) - - assert c1.subsystem_in_collection(sys.identifier) - assert not c1.subsystem_in_collection('not_a_key') + vent_device = ventilation.PhxDeviceVentilator() + c1.add_new_mech_device(vent_device.identifier, vent_device) + assert c1.device_in_collection(vent_device.identifier) + d = c1.get_mech_device_by_key(vent_device.identifier) + assert d == vent_device -def test_get_subsystem_None_key(reset_class_counters): +def test_get_mech_device_by_NONE_key(reset_class_counters): c1 = collection.PhxMechanicalSystemCollection() - sys = c1.get_mech_subsystem_by_key("") + sys = c1.get_mech_device_by_key("") assert sys is None +def test_get_mech_device_by_id(reset_class_counters): + c1 = collection.PhxMechanicalSystemCollection() + vent_device = ventilation.PhxDeviceVentilator() + c1.add_new_mech_device(vent_device.identifier, vent_device) + + assert c1.device_in_collection(vent_device.identifier) + d = c1.get_mech_device_by_id(vent_device.id_num) + assert d == vent_device + +def test_get_mech_device_by_NONE_id(reset_class_counters): + c1 = collection.PhxMechanicalSystemCollection() + with pytest.raises(collection.NoVentUnitFoundError): + c1.get_mech_device_by_id(999_999_999) + +# -- Ventilation +def test_add_ventilation_device(reset_class_counters): + c1 = collection.PhxMechanicalSystemCollection() + vent_device = ventilation.PhxDeviceVentilator() + c1.add_new_mech_device(vent_device.identifier, vent_device) + + assert c1.device_in_collection(vent_device.identifier) + assert not c1.device_in_collection('not_a_key') -def test_get_subsystem(reset_class_counters): +def test_get_ventilation_device(): c1 = collection.PhxMechanicalSystemCollection() - sys_1 = _base.PhxMechanicalSubSystem() - c1.add_new_mech_subsystem(sys_1.identifier, sys_1) - sys_2 = c1.get_mech_subsystem_by_key(sys_1.identifier) + vent_device = ventilation.PhxDeviceVentilator() + c1.add_new_mech_device(vent_device.identifier, vent_device) + + assert vent_device in c1.ventilation_devices + +# TODO: Finish Mech Collection Tests +# -- Heating + +# -- Cooling + +# -- DHW + +# -- DHW Recric Piping - assert sys_1 == sys_2 +# -- DHW Branch Piping \ No newline at end of file diff --git a/tests/test_model/test_project/test_Variant.py b/tests/test_model/test_project/test_Variant.py index ae22567..5ffdf45 100644 --- a/tests/test_model/test_project/test_Variant.py +++ b/tests/test_model/test_project/test_Variant.py @@ -8,7 +8,15 @@ def test_blank_variant(reset_class_counters): assert str(var) assert not var.graphics3D assert not var.building - assert not var.mech_systems.subsystems - assert not var.mech_systems.cooling_subsystems + assert not var.mech_systems.devices + assert not var.mech_systems.ventilation_devices + assert not var.mech_systems.space_heating_devices + assert not var.mech_systems.cooling_devices + assert not var.mech_systems.dhw_heating_devices + assert not var.mech_systems.dhw_tank_devices + assert not var.mech_systems.dhw_branch_piping + assert not var.mech_systems.dhw_branch_piping_segments_by_diam + assert not var.mech_systems.dhw_recirc_piping + assert not var.mech_systems.dhw_recirc_piping_segments_by_diam assert var.id_num == 1 assert project.PhxVariant._count == 1 diff --git a/tests/test_to_WUFI_xml/test_climate/test_PhxLocation.py b/tests/test_to_WUFI_xml/test_climate/test_PhxLocation.py index 50e8d1c..df5171b 100644 --- a/tests/test_to_WUFI_xml/test_climate/test_PhxLocation.py +++ b/tests/test_to_WUFI_xml/test_climate/test_PhxLocation.py @@ -7,101 +7,102 @@ def test_default_PhxLocation(reset_class_counters): l1 = phx_site.PhxSite() result = generate_WUFI_XML_from_object(l1, _header="") + assert xml_string_to_list(result) == [ - '1', - '40.6', - '-73.8', - '3.0', - '-4', - '-2', - '0.2', - '0.1', - '0.9', - '0.66', - '350', - '48', - '', - '1', - '8.0', - '4.0', - '40.6', - '-73.8', - '3.0', - '-4', - '1', - '2', - '1000', - '2000', - '3', - '0.05', - '', - '', - '', - '', - '', - '', - '', - '', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '6', - '', - '1.1', - '1.1', - '1.1', - '1.1', - '0.2', - '1.8', - '1.7', - '0.8', - '1.1', - '1.5', - '0.7', - '1.1', - '1.5', - '0.8', - '1.1', - '1.5', - '', - '', - '309.9966', - '250.0171', - '270.0102', - '439.9864', - '53.4289', - '680.0068', - '250.0171', - '239.9864', - '319.9932', - '409.9966', - '-70.0102', - '129.9898', - '319.9932', - '100', - '250.0171', - '409.9966', - '', - '' - ] + '1', + '40.6', + '-73.8', + 'None', + '-4', + '-2', + '0.2', + '0.1', + '0.9', + '0.66', + '350', + '48', + '', + '1', + '8.0', + '4.0', + '40.6', + '-73.8', + '3.0', + '-4', + '1', + '2', + '1000', + '2000', + '3', + '0.05', + '', + '', + '', + '', + '', + '', + '', + '', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '0', + '6', + '', + '1.1', + '1.1', + '1.1', + '1.1', + '0.2', + '1.8', + '1.7', + '0.8', + '1.1', + '1.5', + '0.7', + '1.1', + '1.5', + '0.8', + '1.1', + '1.5', + '', + '', + '309.9966', + '250.0171', + '270.0102', + '439.9864', + '53.4289', + '680.0068', + '250.0171', + '239.9864', + '319.9932', + '409.9966', + '-70.0102', + '129.9898', + '319.9932', + '100', + '250.0171', + '409.9966', + '', + '' + ] \ No newline at end of file diff --git a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingDehumidification.py b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingDehumidification.py index 4124fc2..52c8410 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingDehumidification.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingDehumidification.py @@ -1,14 +1,12 @@ -from PHX.model.hvac import cooling, _base, collection +from PHX.model.hvac import cooling, collection from PHX.to_WUFI_XML.xml_builder import generate_WUFI_XML_from_object from tests.test_to_WUFI_xml._utils import xml_string_to_list def test_default_PhxCoolingDehumidification(reset_class_counters): d1 = cooling.PhxCoolingDehumidification() - sys = _base.PhxMechanicalSubSystem() - sys.device = d1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(d1.identifier, d1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingPanel.py b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingPanel.py index f3a94b5..61e137f 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingPanel.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingPanel.py @@ -5,10 +5,8 @@ def test_default_PhxCoolingPanel(reset_class_counters): d1 = cooling.PhxCoolingPanel() - sys = _base.PhxMechanicalSubSystem() - sys.device = d1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(d1.identifier, d1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingRecirculation.py b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingRecirculation.py index ea38cf8..702fe04 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingRecirculation.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingRecirculation.py @@ -5,10 +5,8 @@ def test_default_PhxCoolingRecirculation(reset_class_counters): d1 = cooling.PhxCoolingRecirculation() - sys = _base.PhxMechanicalSubSystem() - sys.device = d1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(d1.identifier, d1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingVentilation.py b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingVentilation.py index 3b57a4b..9bab12a 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingVentilation.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_cooling/test_PhxCoolingVentilation.py @@ -5,10 +5,8 @@ def test_default_PhxCoolingVentilation(reset_class_counters): d1 = cooling.PhxCoolingVentilation() - sys = _base.PhxMechanicalSubSystem() - sys.device = d1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(d1.identifier, d1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerFossil.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerFossil.py index 807f636..f3a2d60 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerFossil.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerFossil.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterBoilerFossil(reset_class_counters): h1 = heating.PhxHeaterBoilerFossil() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerWood.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerWood.py index 9aac21c..259519a 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerWood.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterBoilerWood.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterBoilerWood(reset_class_counters): h1 = heating.PhxHeaterBoilerWood() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterDistrictHeat.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterDistrictHeat.py index ab9ee3c..fa934d9 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterDistrictHeat.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterDistrictHeat.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterDistrictHeat(reset_class_counters): h1 = heating.PhxHeaterDistrictHeat() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterElectric.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterElectric.py index 6f7f622..4ab9d56 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterElectric.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterElectric.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterElectric(reset_class_counters): h1 = heating.PhxHeaterElectric() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpAnnual.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpAnnual.py index b418cfd..8d1ea35 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpAnnual.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpAnnual.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterHeatPumpAnnual(reset_class_counters): h1 = heating.PhxHeaterHeatPumpAnnual() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpCombined.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpCombined.py index b04b2f1..4aa7576 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpCombined.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpCombined.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterHeatPumpCombined(reset_class_counters): h1 = heating.PhxHeaterHeatPumpCombined() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpHotWater.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpHotWater.py index 15fc085..05313b6 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpHotWater.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpHotWater.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterHeatPumpHotWater(reset_class_counters): h1 = heating.PhxHeaterHeatPumpHotWater() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpMonthly.py b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpMonthly.py index e0fbb37..4aa9a94 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpMonthly.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_heating/test_PhxHeaterHeatPumpMonthly.py @@ -6,10 +6,8 @@ def test_default_PhxHeaterHeatPumpMonthly(reset_class_counters): h1 = heating.PhxHeaterHeatPumpMonthly() h1.usage_profile.space_heating = True - sys = _base.PhxMechanicalSubSystem() - sys.device = h1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(h1.identifier, h1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_ventilation/test_PhxVentilator.py b/tests/test_to_WUFI_xml/test_hvac/test_ventilation/test_PhxVentilator.py index 7c360a7..9c30d89 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_ventilation/test_PhxVentilator.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_ventilation/test_PhxVentilator.py @@ -5,10 +5,8 @@ def test_default_PhxRoomVentilation(reset_class_counters): v1 = ventilation.PhxDeviceVentilator() - sys = _base.PhxMechanicalSubSystem() - sys.device = v1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(v1.identifier, v1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_hvac/test_water/test_PhxHotWaterTank.py b/tests/test_to_WUFI_xml/test_hvac/test_water/test_PhxHotWaterTank.py index 2ef815a..33f42dd 100644 --- a/tests/test_to_WUFI_xml/test_hvac/test_water/test_PhxHotWaterTank.py +++ b/tests/test_to_WUFI_xml/test_hvac/test_water/test_PhxHotWaterTank.py @@ -5,10 +5,8 @@ def test_default_PhxHotWaterTank(reset_class_counters): t1 = water.PhxHotWaterTank() - sys = _base.PhxMechanicalSubSystem() - sys.device = t1 coll = collection.PhxMechanicalSystemCollection() - coll.add_new_mech_subsystem(sys.identifier, sys) + coll.add_new_mech_device(t1.identifier, t1) result = generate_WUFI_XML_from_object(coll, _header="") assert xml_string_to_list(result) == [ '', diff --git a/tests/test_to_WUFI_xml/test_project/test_PhxVariant.py b/tests/test_to_WUFI_xml/test_project/test_PhxVariant.py index 4cafd97..6425674 100644 --- a/tests/test_to_WUFI_xml/test_project/test_PhxVariant.py +++ b/tests/test_to_WUFI_xml/test_project/test_PhxVariant.py @@ -23,7 +23,7 @@ def test_default_PhxProject(reset_class_counters): '1', '40.6', '-73.8', - '3.0', + 'None', '-4', '-2', '0.2',