2019-05-22 15:30:09 +02:00
|
|
|
import sys
|
|
|
|
|
import os
|
|
|
|
|
sys.path.insert(1, os.path.join(sys.path[0], '../api'))
|
|
|
|
|
import ResInsight
|
|
|
|
|
|
|
|
|
|
resInsight = ResInsight.Instance.find()
|
2019-05-22 16:03:03 +02:00
|
|
|
|
|
|
|
|
activeCellCount = resInsight.gridInfo.cellCount(caseId=0).active_cell_count
|
2019-05-22 15:30:09 +02:00
|
|
|
|
|
|
|
|
values = []
|
2019-05-22 16:03:03 +02:00
|
|
|
for i in range(0, activeCellCount):
|
2019-05-22 15:30:09 +02:00
|
|
|
values.append(i % 2 * 0.5);
|
|
|
|
|
|
2019-05-22 16:03:03 +02:00
|
|
|
|
|
|
|
|
timeSteps = resInsight.gridInfo.timeSteps(caseId=0)
|
|
|
|
|
for i in range(0, len(timeSteps)):
|
|
|
|
|
print("Applying values to all time step " + str(i))
|
|
|
|
|
resInsight.properties.setActiveCellResults(values, 0, 'DYNAMIC_NATIVE', 'SOIL', i)
|
2019-05-22 15:30:09 +02:00
|
|
|
|