2020-02-11 14:20:53 -06:00
|
|
|
###################################################################################
|
|
|
|
# This example will connect to ResInsight, retrieve a list of
|
|
|
|
# simulation wells and print info
|
|
|
|
###################################################################################
|
|
|
|
|
|
|
|
# Import the ResInsight Processing Server Module
|
|
|
|
import rips
|
|
|
|
|
|
|
|
# Connect to ResInsight
|
2021-01-26 13:48:01 -06:00
|
|
|
resinsight = rips.Instance.find()
|
2020-02-11 14:20:53 -06:00
|
|
|
if resinsight is not None:
|
|
|
|
# Get a list of all wells
|
|
|
|
cases = resinsight.project.cases()
|
|
|
|
|
|
|
|
for case in cases:
|
2020-02-21 05:10:02 -06:00
|
|
|
print("Case id: " + str(case.id))
|
2020-02-11 14:20:53 -06:00
|
|
|
print("Case name: " + case.name)
|
|
|
|
|
|
|
|
timesteps = case.time_steps()
|
|
|
|
sim_wells = case.simulation_wells()
|
|
|
|
for sim_well in sim_wells:
|
|
|
|
print("Simulation well: " + sim_well.name)
|
|
|
|
|
|
|
|
for (tidx, timestep) in enumerate(timesteps):
|
|
|
|
status = sim_well.status(tidx)
|
|
|
|
cells = sim_well.cells(tidx)
|
2021-01-26 13:48:01 -06:00
|
|
|
print(
|
|
|
|
"timestep: "
|
|
|
|
+ str(tidx)
|
|
|
|
+ " type: "
|
|
|
|
+ status.well_type
|
|
|
|
+ " open: "
|
|
|
|
+ str(status.is_open)
|
|
|
|
+ " cells:"
|
|
|
|
+ str(len(cells))
|
|
|
|
)
|