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
|
|
|
|
|
|
|
|
def createResult(poroChunks, permxChunks):
|
|
|
|
|
for (poroChunk, permxChunk) in zip(poroChunks, permxChunks):
|
|
|
|
|
resultChunk = []
|
|
|
|
|
for (poro, permx) in zip(poroChunk.values, permxChunk.values):
|
|
|
|
|
resultChunk.append(poro * permx)
|
|
|
|
|
yield resultChunk
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
permxChunks = case.properties.activeCellProperty('STATIC_NATIVE', 'PERMX', 0)
|
2019-05-30 18:52:38 +02:00
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
case.properties.setActiveCellPropertyAsync(createResult(poroChunks, permxChunks), 'GENERATED', 'POROPERMXAS', 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")
|