#7200 Add important Python examples

This commit is contained in:
Gaute Lindkvist 2021-01-12 15:27:56 +01:00 committed by Magne Sjaastad
parent 78c4a1568e
commit e1a6c4ef65
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Load ResInsight Processing Server Client Library
import rips
# Connect to ResInsight instance
resinsight = rips.Instance.find()
# Load an example case. Needs to be replaced with a valid path!
case = resinsight.project.load_case(
"C:/Users/lindk/Projects/ResInsight/TestModels/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
# Print out lots of information from the case object
print("Case id: " + str(case.id))
print("Case name: " + case.name)
print("Case type: " + case.__class__.__name__)
print("Case file name: " + case.file_path)
print("Case reservoir bounding box:", case.reservoir_boundingbox())
timesteps = case.time_steps()
for t in timesteps:
print("Year: " + str(t.year))
print("Month: " + str(t.month))

View File

@ -0,0 +1,8 @@
# Load ResInsight Processing Server Client Library
import rips
# Connect to ResInsight instance
resinsight = rips.Instance.find()
# Open a project
resinsight.project.open(
"C:/Users/lindk/Projects/ResInsight/TestModels/TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")