Skip to content

Commit

Permalink
fix(shw_create_branch_pipes): Refactor atttribute names
Browse files Browse the repository at this point in the history
- Refactor hot-water piping (recirc, branch) attributes names for clarity to support WUFI export
- update installer versions
  • Loading branch information
ed-p-may committed Mar 17, 2023
1 parent 108fde3 commit e551521
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
Binary file modified hbph_installer.gh
Binary file not shown.
2 changes: 1 addition & 1 deletion honeybee_ph_rhino/_component_info_.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
These are called when the component is instantiated within the Grasshopper canvas.
"""

RELEASE_VERSION = "Honeybee-PH v1.0.23"
RELEASE_VERSION = "Honeybee-PH v1.0.24"
CATEGORY = "HB-PH"
SUB_CATEGORIES = {
0: "00 | Utils",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _create_location(self):
longitude=self.monthly_data_collection.longitude,
site_elevation=self.monthly_data_collection.station_elevation,
climate_zone=1,
hours_from_UTC=-4,
hours_from_UTC=-5, # TODO: make automatic somehow?
)

def _create_monthly_temps(self):
Expand Down
18 changes: 13 additions & 5 deletions honeybee_ph_rhino/gh_compo_io/shw_create_branch_pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class _BranchPipeBuilder(object):
"""Interface for collect and clean DHW Branch Piping user-inputs"""

diameter = ghio_validators.UnitM("diameter", default=0.0127)
diameter_m = ghio_validators.UnitM("diameter_m", default=0.0127)
display_name = ghio_validators.HBName(
"display_name", default="_unnamed_branch_pipe_")

Expand All @@ -29,7 +29,7 @@ def __init__(self, IGH, _geometry, _name, _diameter):
self.IGH = IGH
self.geometry = _geometry
self.display_name = _name
self.diameter = _diameter
self.diameter_m = _diameter

def _convert_to_polyline(self, _input):
"""Try to convert input geometry to a Rhino Polyline object."""
Expand Down Expand Up @@ -69,7 +69,15 @@ def create_hbph_dhw_branch_pipe(self):

for segment in segments:
hbph_obj.add_segment(
hot_water.PhPipeSegment(segment, self.diameter)
hot_water.PhPipeSegment(
_geom=segment,
_diameter_m=self.diameter_m,
_insul_thickness_m=0.0,
_insul_conductivity= 0.04,
_insul_refl = False,
_insul_quality=None,
_daily_period=24
)
)

return hbph_obj
Expand All @@ -82,7 +90,7 @@ def __init__(self, _IGH, _geometry, _name, _diameter):
self.IGH = _IGH
self.geometry = _geometry
self.name = _name
self.diameter = _diameter
self.diameter_m = _diameter

def run(self):
# type: () -> List[hot_water.PhPipeElement]
Expand All @@ -93,7 +101,7 @@ def run(self):
self.IGH,
input_tools.clean_get(self.geometry, i),
input_tools.clean_get(self.name, i, "_unnamed_"),
input_tools.clean_get(self.diameter, i),
input_tools.clean_get(self.diameter_m, i),
)
dhw_branch_piping_.append(branch_pipe_builder.create_hbph_dhw_branch_pipe())

Expand Down
26 changes: 13 additions & 13 deletions honeybee_ph_rhino/gh_compo_io/shw_create_recirc_pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
class _RecircPipeBuilder(object):
"""Interface for collect and clean DHW Recirculation Piping user-inputs"""

diameter = ghio_validators.UnitM("diameter", default=0.0254)
diameter_m = ghio_validators.UnitM("diameter_m", default=0.0254)
display_name = ghio_validators.HBName(
"display_name", default="_unnamed_recirc_pipe_")
insul_thickness = ghio_validators.UnitM("insul_thickness", default=0.0254)
insul_thickness_m = ghio_validators.UnitM("insul_thickness_m", default=0.0254)
insul_conductivity = ghio_validators.UnitW_MK("insul_conductivity", default=0.04)
daily_period = ghio_validators.FloatMax24("daily_period", default=24)

def __init__(self, IGH, _geometry,
_name="_unnamed_", _diameter=0.0254,
_insul_thickness=0.0254, _insul_conductivity=0.04,
_name="_unnamed_", _diameter_m=0.0254,
_insul_thickness_m=0.0254, _insul_conductivity=0.04,
_insul_reflective=True, _insul_quality=None,
_daily_period=24.0):
# type: (gh_io.IGH, Union[Polyline3D, LineSegment3D], str, float, float, float, bool, None, float) -> None
self.IGH = IGH
self.geometry = _geometry
self.display_name = _name
self.diameter = _diameter
self.insul_thickness = _insul_thickness
self.diameter_m = _diameter_m
self.insul_thickness_m = _insul_thickness_m
self.insul_conductivity = _insul_conductivity
self.insul_reflective = _insul_reflective
self.insul_quality = _insul_quality
Expand Down Expand Up @@ -82,8 +82,8 @@ def create_hbph_dhw_recirc_pipe(self):
hbph_obj.add_segment(
hot_water.PhPipeSegment(
segment,
self.diameter,
self.insul_thickness,
self.diameter_m,
self.insul_thickness_m,
self.insul_conductivity,
self.insul_reflective,
self.insul_quality,
Expand All @@ -96,13 +96,13 @@ def create_hbph_dhw_recirc_pipe(self):
class GHCompo_CreateSHWRecircPipes(object):
"""Component Interface"""

def __init__(self, _IGH, _geometry, _name, _diameter, _insul_thickness, _insul_conductivity,
def __init__(self, _IGH, _geometry, _name, _diameter_m, _insul_thickness_m, _insul_conductivity,
_insul_reflective, _insul_quality, _daily_period):
self.IGH = _IGH
self.geometry = _geometry
self.name = _name
self.diameter = _diameter
self.insul_thickness = _insul_thickness
self.diameter_m = _diameter_m
self.insul_thickness_m = _insul_thickness_m
self.insul_conductivity = _insul_conductivity
self.insul_reflective = _insul_reflective
self.insul_quality = _insul_quality
Expand All @@ -116,8 +116,8 @@ def run(self):
self.IGH,
input_tools.clean_get(self.geometry, i),
input_tools.clean_get(self.name, i, "_unnamed_"),
input_tools.clean_get(self.diameter, i, 0.0254),
input_tools.clean_get(self.insul_thickness, i, 0.0254),
input_tools.clean_get(self.diameter_m, i, 0.0254),
input_tools.clean_get(self.insul_thickness_m, i, 0.0254),
input_tools.clean_get(self.insul_conductivity, i, 0.04),
input_tools.clean_get(self.insul_reflective, i, True),
input_tools.clean_get(self.insul_quality, i, None),
Expand Down

0 comments on commit e551521

Please sign in to comment.