2019-07-18 03:53:59 -05:00
|
|
|
import os
|
|
|
|
import rips
|
|
|
|
|
2021-01-26 13:48:01 -06:00
|
|
|
resinsight = rips.Instance.find()
|
2019-07-18 03:53:59 -05:00
|
|
|
|
2019-09-19 07:10:52 -05:00
|
|
|
case_paths = []
|
2021-01-26 13:48:01 -06:00
|
|
|
case_paths.append(
|
|
|
|
"C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID"
|
|
|
|
)
|
|
|
|
case_paths.append(
|
|
|
|
"C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID"
|
|
|
|
)
|
2019-09-23 04:50:33 -05:00
|
|
|
for case_path in case_paths:
|
2021-01-26 13:48:01 -06:00
|
|
|
assert os.path.exists(
|
|
|
|
case_path
|
|
|
|
), "You need to set valid case paths for this script to work"
|
2019-07-29 05:55:02 -05:00
|
|
|
|
2019-09-19 07:10:52 -05:00
|
|
|
case_group = resinsight.project.create_grid_case_group(case_paths=case_paths)
|
2019-07-29 05:55:02 -05:00
|
|
|
|
2019-09-19 07:10:52 -05:00
|
|
|
case_group.print_object_info()
|
2021-01-26 13:48:01 -06:00
|
|
|
|
|
|
|
# stat_cases = caseGroup.statistics_cases()
|
|
|
|
# case_ids = []
|
|
|
|
# for stat_case in stat_cases:
|
2020-02-21 05:10:02 -06:00
|
|
|
# stat_case.set_dynamic_properties_to_calculate(["SWAT"])
|
|
|
|
# case_ids.append(stat_case.id)
|
2019-07-29 05:55:02 -05:00
|
|
|
|
2019-09-23 04:50:33 -05:00
|
|
|
case_group.compute_statistics()
|
2019-07-29 05:55:02 -05:00
|
|
|
|
2019-09-19 07:10:52 -05:00
|
|
|
view = case_group.views()[0]
|
2020-02-21 05:10:02 -06:00
|
|
|
cell_result = view.cell_result()
|
|
|
|
cell_result.set_result_variable("PRESSURE_DEV")
|