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

Add a quick fix for reading gfunction.csv from ghe_id subfolder #589

Merged
merged 36 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5c528d4
add ghe to create system parameter function
tanushree04 Jul 6, 2023
051822f
Add design method for borehole
tanushree04 Jul 12, 2023
8e1abca
update create sys param and system_parameter.py
tanushree04 Jul 14, 2023
e3daa50
update tests
tanushree04 Jul 17, 2023
3332b83
update district system type property
tanushree04 Jul 19, 2023
8b3a564
reduce unnecessary indenting
vtnate Jul 19, 2023
82025ab
add negative sign to heat_flow to designate as cooling
vtnate Jul 19, 2023
53119ad
clean up test setup now that we have at least python 3.8
vtnate Jul 19, 2023
66b8a74
update district_system_type property in system_parameters.py
tanushree04 Jul 19, 2023
df37a30
Merge branch 'ghe_modify' of github.com:urbanopt/geojson-modelica-tra…
vtnate Jul 19, 2023
4ac499c
redo the un-indenting I accidentally committed
vtnate Jul 19, 2023
7c5fd69
update dependencies with poetry
vtnate Jul 20, 2023
1d61309
remove generated test sys-param file
vtnate Jul 20, 2023
836cca8
gitignore generated test sys-param file
vtnate Jul 20, 2023
3ca86b6
add sys param argument
tanushree04 Jul 26, 2023
d0d58e2
fix typo that prevented sys-param creation via cli
vtnate Jul 26, 2023
1662b82
remove nonsensical 5G district parameters
vtnate Jul 27, 2023
1616023
clean up uo_des test comments a bit, and add intermediate assertions
vtnate Jul 27, 2023
bf3f983
remove outdated spawn compilation instructions
vtnate Jul 27, 2023
f600deb
enable 5G models with the CLI
vtnate Jul 27, 2023
60a43ca
Merge branch 'gmt-with-5g' into ghe_modify
vtnate Jul 27, 2023
b743d6e
add borehole length to template
tanushree04 Jul 27, 2023
377241c
Merge branch 'ghe_modify' of github.com:urbanopt/geojson-modelica-tra…
vtnate Jul 27, 2023
5a3da8c
add gfunction csv file to cli test for ghe district tests
vtnate Jul 27, 2023
1b66d1b
more updates to gmt class to handle 5g districts from cli
vtnate Jul 27, 2023
ac85feb
choose generations more explicitly in district.py
vtnate Jul 27, 2023
1f6adbc
use correct sys-param parameter name in borefield.py
vtnate Jul 27, 2023
56fa91d
add start/stop/step times for model simulation to cli options
vtnate Jul 27, 2023
98701bd
add 5g cli integration test, update calls to simulate during the summer
vtnate Jul 27, 2023
2963d54
Quick fix to enlarge loop flow rate
JingWang-CUB Jul 27, 2023
7d2a3d2
Fix for reading gfunction from ghe_id folder
JingWang-CUB Sep 27, 2023
967e8ae
Resolve conflicts with develop
JingWang-CUB Sep 27, 2023
2d3b57e
Resolve conflict
JingWang-CUB Sep 27, 2023
95284ed
Discard unwanted changes
JingWang-CUB Sep 27, 2023
0c582b3
Fix broken test_uo_des.py
JingWang-CUB Sep 27, 2023
d3b395f
Point to a different ghe_dir
JingWang-CUB Sep 28, 2023
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 @@ -44,6 +44,9 @@ def to_modelica(self, scaffold):
"gfunction": {
"input_path": self.system_parameters.get_param(
"$.district_system.fifth_generation.ghe_parameters.ghe_dir"
),
"ghe_id": self.system_parameters.get_param(
"$.district_system.fifth_generation.ghe_parameters.ghe_specific_params[0].ghe_id"
)
},
"soil": {
Expand Down Expand Up @@ -106,11 +109,11 @@ def to_modelica(self, scaffold):

# process g-function file
if Path(template_data["gfunction"]["input_path"]).expanduser().is_absolute():
gfunction = pd.read_csv(Path(template_data["gfunction"]["input_path"]) / "Gfunction.csv", header=0, usecols=[0, 2])
gfunction = pd.read_csv(Path(template_data["gfunction"]["input_path"]) / template_data["gfunction"]["ghe_id"] / "Gfunction.csv", header=0, usecols=[0, 2])
else:
sys_param_dir = Path(self.system_parameters.filename).parent.resolve()
try:
gfunction = pd.read_csv(sys_param_dir / template_data["gfunction"]["input_path"] / "Gfunction.csv", header=0, usecols=[0, 2])
gfunction = pd.read_csv(sys_param_dir / template_data["gfunction"]["input_path"] / template_data["gfunction"]["ghe_id"] / "Gfunction.csv", header=0, usecols=[0, 2])
except FileNotFoundError:
raise SystemExit(f'When using a relative path to your ghe_dir, your path \'{template_data["gfunction"]["input_path"]}\' must be relative to the dir your sys-param file is in.')
template_data["gfunction"]["gfunction_file_rows"] = gfunction.shape[0] + 1
Expand Down
58 changes: 0 additions & 58 deletions tests/model_connectors/data/Gfunction.csv

This file was deleted.

6 changes: 3 additions & 3 deletions tests/model_connectors/data/system_params_ghe.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"fifth_generation": {
"ghe_parameters": {
"version": "1.0",
"ghe_dir": "./",
"ghe_dir": "../../management/data/sdk_project_scraps/run/baseline_scenario/ghe_dir",
"fluid": {
"fluid_name": "Water",
"concentration_percent": 0.0,
Expand Down Expand Up @@ -85,7 +85,7 @@
},
"ghe_specific_params": [
{
"ghe_id": "c432cb11-4813-40df-8dd4-e88f5de40033",
"ghe_id": "0b575a8f-97d1-47e6-b329-7ef7566d26f2",
"ghe_geometric_params": {
"length_of_ghe": 100,
"width_of_ghe": 100
Expand All @@ -98,7 +98,7 @@
}
},
{
"ghe_id": "c432cb11-4813-40df-8dd4-e88f5de40033",
"ghe_id": "0b575a8f-97d1-47e6-b329-7ef7566d26f2",
"ghe_geometric_params": {
"length_of_ghe": 100,
"width_of_ghe": 100
Expand Down
6 changes: 3 additions & 3 deletions tests/model_connectors/data/system_params_ghe_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"ghe_parameters": {
"version": "1.0",
"ghe_dir": "./",
"ghe_dir": "../../management/data/sdk_project_scraps/run/baseline_scenario/ghe_dir",
"fluid": {
"fluid_name": "Water",
"concentration_percent": 0.0,
Expand Down Expand Up @@ -114,7 +114,7 @@
"geometric_constraints": {
"ghe_geometric_params": [
{
"ghe_id": "c432cb11-4813-40df-8dd4-e88f5de40033",
"ghe_id": "0b575a8f-97d1-47e6-b329-7ef7566d26f2",
"length": 100,
"width": 100
},
Expand All @@ -139,7 +139,7 @@
},
"ghe_specific_params": [
{
"ghe_id": "c432cb11-4813-40df-8dd4-e88f5de40033",
"ghe_id": "0b575a8f-97d1-47e6-b329-7ef7566d26f2",
"ghe_geometric_params": {
"length_of_ghe": 100,
"width_of_ghe": 100
Expand Down