Files
ResInsight/GrpcInterface/Python/rips/PythonExamples/set_grid_properties.py

17 lines
558 B
Python
Raw Normal View History

######################################################################
# This script sets values for SOIL for all grid cells in the first case in the project
######################################################################
import rips
2021-01-26 20:48:01 +01:00
resinsight = rips.Instance.find()
case = resinsight.project.case(case_id=0)
2019-09-19 15:14:01 +02:00
total_cell_count = case.cell_count().reservoir_cell_count
values = []
2019-09-19 15:14:01 +02:00
for i in range(0, total_cell_count):
2021-01-26 20:48:01 +01:00
values.append(i % 2 * 0.75)
print("Applying values to full grid")
2021-01-26 20:48:01 +01:00
case.set_grid_property(values, "DYNAMIC_NATIVE", "SOIL", 0)