This commit is contained in:
Gaute Lindkvist 2019-09-19 14:10:52 +02:00
parent 505660f9d6
commit ca919402e9
2 changed files with 17 additions and 17 deletions

View File

@ -3,26 +3,26 @@ import rips
resinsight = rips.Instance.find()
casePaths = []
casePaths.append("C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID")
casePaths.append("C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID")
for casePath in casePaths:
case_paths = []
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")
for casePath in case_paths:
assert os.path.exists(casePath), "You need to set valid case paths for this script to work"
caseGroup = resinsight.project.create_grid_case_group(casePaths=casePaths)
case_group = resinsight.project.create_grid_case_group(case_paths=case_paths)
caseGroup.print_object_info()
case_group.print_object_info()
#statCases = caseGroup.statistics_cases()
#caseIds = []
#for statCase in statCases:
# statCase.set_value("DynamicPropertiesToCalculate", ["SWAT"])
# statCase.update()
# caseIds.append(statCase.get_value("CaseId"))
#stat_cases = caseGroup.statistics_cases()
#case_ids = []
#for stat_case in stat_cases:
# stat_case.set_value("DynamicPropertiesToCalculate", ["SWAT"])
# stat_case.update()
# case_ids.append(stat_case.get_value("CaseId"))
resinsight.commands.compute_case_group_statistics(caseGroupId=caseGroup.groupId)
resinsight.commands.compute_case_group_statistics(case_group_id=case_group.group_id)
view = caseGroup.views()[0]
view = case_group.views()[0]
cellResult = view.cellResult()
cellResult.set_value("ResultVariable", "PRESSURE_DEV")
cellResult.update()

View File

@ -9,10 +9,10 @@ class View (PdmObject):
id(int): View Id corresponding to the View Id in ResInsight project.
"""
def __init__(self, pbmObject):
self.id = pbmObject.get_value("ViewId")
def __init__(self, pdm_object):
self.id = pdm_object.get_value("ViewId")
PdmObject.__init__(self, pbmObject.pb2Object, pbmObject.channel)
PdmObject.__init__(self, pdm_object.pb2_object, pdm_object.channel)
def showGridBox(self):
"""Check if the grid box is meant to be shown in the view"""