Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ETS heat pump COP from GMT sys-params #32

Merged
merged 16 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@
},
"central_pump_parameters": {
"pump_design_head": 60000
},
"wahp": {
"cop_c": 3.0,
"cop_h": 3.0
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@
},
"central_pump_parameters": {
"pump_design_head": 60000
},
"wahp": {
"cop_c": 3.0,
"cop_h": 3.0
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
}
}
]
},
"wahp": {
"cop_c": 3.0,
"cop_h": 3.0
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@
}
}
]
},
"wahp": {
"cop_c": 3.0,
"cop_h": 3.0
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@
}
}
]
},
"wahp": {
"cop_c": 3.0,
"cop_h": 3.0
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_network_ghe_upstream(self):
assert sim_summary["ghe_system"]["active_borehole_length"]["value"] == pytest.approx(133, 2)
# FIXME: 135 is the max borehole length for a GHE (as set in the sys-params file).
# This implies the borefield size is too small.
# Borefield dimensions are set in the geojson file and transfered to the sys-params file by the GMT.
# Borefield dimensions are set in the geojson file and transferred to the sys-params file by the GMT.

# -- Clean up
# Restore the original borehole length and number of boreholes.
Expand Down Expand Up @@ -131,7 +131,7 @@ def test_network_ghe_proportional(self):
assert sim_summary["ghe_system"]["active_borehole_length"]["value"] == pytest.approx(133, 2)
# FIXME: 135 is the max borehole length for a GHE (as set in the sys-params file).
# This implies the borefield size is too small.
# Borefield dimensions are set in the geojson file and transfered to the sys-params file by the GMT.
# Borefield dimensions are set in the geojson file and transferred to the sys-params file by the GMT.

# -- Clean up
# Restore the original borehole length and number of boreholes.
Expand Down
18 changes: 15 additions & 3 deletions thermalnetwork/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ def check_for_existing_component(self, name: str, comp_type_str: str, throw: boo
return 1
return 0

def set_components(self, comp_data_list: list[dict], throw: bool = True):
def set_components(self, comp_data_list: list[dict], sys_param_district_data: dict = {}, throw: bool = True):
# TODO: determine what level of sys-param data to use
# TODO: replace all hard-coded values with sys-param data
# Add ets pump
obj = {
"id": "",
Expand All @@ -270,7 +272,15 @@ def set_components(self, comp_data_list: list[dict], throw: bool = True):
self.components_data.append(obj)

# Add WAHP
vtnate marked this conversation as resolved.
Show resolved Hide resolved
obj = {"id": "", "name": "small wahp", "type": "HEATPUMP", "properties": {"cop_c": 3.0, "cop_h": 3.0}}
obj = {
"id": "",
"name": "small wahp",
"type": "HEATPUMP",
"properties": {
"cop_c": sys_param_district_data["wahp"]["cop_c"],
"cop_h": sys_param_district_data["wahp"]["cop_h"],
},
}
obj["name"] = str(obj["name"]).strip().upper()
self.components_data.append(obj)

Expand Down Expand Up @@ -600,7 +610,9 @@ def run_sizer_from_cli_worker(
# begin populating structures in preparation for sizing
errors = 0
errors += network.set_design(des_method_str=ghe_design_data["method"], throw=True)
errors += network.set_components(network_data, throw=True)
errors += network.set_components(
network_data, system_parameters_data["district_system"]["fifth_generation"], throw=True
)
# print(f"components_data: {network.components_data}\n")
# pprint(network.components_data)

Expand Down
Loading