2019-05-30 18:52:38 +02:00
|
|
|
import sys
|
|
|
|
|
import os
|
2019-06-03 21:11:27 +02:00
|
|
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
|
|
|
|
import rips
|
2019-06-04 10:34:31 +02:00
|
|
|
import time
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-03 21:11:27 +02:00
|
|
|
resInsight = rips.Instance.find()
|
2019-06-04 10:34:31 +02:00
|
|
|
start = time.time()
|
2019-06-03 14:33:16 +02:00
|
|
|
case = resInsight.project.case(id=0)
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
poroChunks = case.properties.activeCellProperty('STATIC_NATIVE', 'PORO', 0)
|
|
|
|
|
poroResults = []
|
|
|
|
|
for poroChunk in poroChunks:
|
|
|
|
|
for poro in poroChunk.values:
|
|
|
|
|
poroResults.append(poro)
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
permxChunks = case.properties.activeCellProperty('STATIC_NATIVE', 'PERMX', 0)
|
|
|
|
|
permxResults = []
|
|
|
|
|
for permxChunk in permxChunks:
|
|
|
|
|
for permx in permxChunk.values:
|
|
|
|
|
permxResults.append(permx)
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
results = []
|
|
|
|
|
for (poro, permx) in zip(poroResults, permxResults):
|
|
|
|
|
results.append(poro * permx)
|
|
|
|
|
|
|
|
|
|
case.properties.setActiveCellProperty(results, 'GENERATED', 'POROPERMXSY', 0)
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-04 10:34:31 +02:00
|
|
|
end = time.time()
|
|
|
|
|
print("Time elapsed: ", end - start)
|
|
|
|
|
|
2019-05-30 18:52:38 +02:00
|
|
|
print("Transferred all results back")
|