ResInsight/ApplicationCode/GrpcInterface/Python/rips/examples/SoilPorvSync.py

16 lines
551 B
Python
Raw Normal View History

import rips
resInsight = rips.Instance.find()
case = resInsight.project.case(id=0)
porvResults = case.properties.activeCellProperty('STATIC_NATIVE', 'PORV', 0)
timeStepInfo = case.timeSteps()
for i in range (0, len(timeStepInfo)):
soilResults = case.properties.activeCellProperty('DYNAMIC_NATIVE', 'SOIL', i)
results = []
for (soil, porv) in zip(soilResults, porvResults):
results.append(soil * porv)
case.properties.setActiveCellProperty(results, 'GENERATED', 'SOILPORVSync', i)
print("Transferred all results back")