Skip to content

Commit

Permalink
feat: output pump head to json-file (#49)
Browse files Browse the repository at this point in the history
* feat: output pump head value, inlet rate, inlet pressure and outlet pressure to json-file

---------

Co-authored-by: Thomas Falch Johansen <[email protected]>
  • Loading branch information
frodehk and TeeeJay authored Jun 8, 2023
1 parent 39c5c36 commit 60720f4
Show file tree
Hide file tree
Showing 20 changed files with 942 additions and 80 deletions.
26 changes: 13 additions & 13 deletions src/ecalc/cli/tests/snapshots/test_app/test_csv_default/test.csv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/ecalc/cli/tests/snapshots/test_app/test_full_csv/results.csv

Large diffs are not rendered by default.

155 changes: 154 additions & 1 deletion src/ecalc/cli/tests/snapshots/test_app/test_json_true/test_v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@
13510.67
]
},
"inlet_liquid_rate_m3_per_d": [
"inlet_liquid_rate_m3_per_day": [
18000.0,
19000.0,
15000.0,
Expand Down Expand Up @@ -1463,6 +1463,20 @@
]
},
"name": "Produced water reinjection pump",
"operational_head": [
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88
],
"outlet_pressure_bar": [
200.0,
200.0,
Expand Down Expand Up @@ -4141,6 +4155,83 @@
]
},
"id": "e1c82c648513148fb53d7b9dcff878ca",
"inlet_liquid_rate_m3_per_day": {
"regularity": [
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"typ": "STREAM_DAY",
"unit": "Sm3/d",
"values": [
18000.0,
19000.0,
15000.0,
16000.0,
14000.0,
15000.0,
18000.0,
15000.0,
12000.0,
14000.0,
16000.0,
14000.0
]
},
"inlet_pressure_bar": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "bara",
"values": [
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0
]
},
"is_valid": {
"timesteps": [
"2020-01-01 00:00:00",
Expand Down Expand Up @@ -4173,6 +4264,68 @@
]
},
"name": "Produced water reinjection pump",
"operational_head": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "J/kg",
"values": [
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88
]
},
"outlet_pressure_bar": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "bara",
"values": [
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0
]
},
"parent": "df82601448d0dfff409ca827eb200bf7",
"power": {
"regularity": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@
13510.67
]
},
"inlet_liquid_rate_m3_per_d": [
"inlet_liquid_rate_m3_per_day": [
18000.0,
19000.0,
15000.0,
Expand Down Expand Up @@ -1463,6 +1463,20 @@
]
},
"name": "Produced water reinjection pump",
"operational_head": [
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88
],
"outlet_pressure_bar": [
200.0,
200.0,
Expand Down Expand Up @@ -4141,6 +4155,83 @@
]
},
"id": "e1c82c648513148fb53d7b9dcff878ca",
"inlet_liquid_rate_m3_per_day": {
"regularity": [
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"typ": "STREAM_DAY",
"unit": "Sm3/d",
"values": [
18000.0,
19000.0,
15000.0,
16000.0,
14000.0,
15000.0,
18000.0,
15000.0,
12000.0,
14000.0,
16000.0,
14000.0
]
},
"inlet_pressure_bar": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "bara",
"values": [
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0,
10.0
]
},
"is_valid": {
"timesteps": [
"2020-01-01 00:00:00",
Expand Down Expand Up @@ -4173,6 +4264,68 @@
]
},
"name": "Produced water reinjection pump",
"operational_head": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "J/kg",
"values": [
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88,
18811.88
]
},
"outlet_pressure_bar": {
"timesteps": [
"2020-01-01 00:00:00",
"2021-01-01 00:00:00",
"2022-01-01 00:00:00",
"2023-01-01 00:00:00",
"2024-01-01 00:00:00",
"2024-12-01 00:00:00",
"2026-01-01 00:00:00",
"2027-01-01 00:00:00",
"2028-01-01 00:00:00",
"2029-01-01 00:00:00",
"2030-01-01 00:00:00",
"2031-01-01 00:00:00"
],
"unit": "bara",
"values": [
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0,
200.0
]
},
"parent": "df82601448d0dfff409ca827eb200bf7",
"power": {
"regularity": [
Expand Down
Loading

0 comments on commit 60720f4

Please sign in to comment.