mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove all sys.path.inserts from Python examples.
This commit is contained in:
parent
08e966e4d7
commit
02107a7a93
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -1,14 +1,11 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
||||
casePaths = []
|
||||
casePaths.append("C:/Users/lindkvis/Projects/ResInsight/TestModels/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID")
|
||||
casePaths.append("C:/Users/lindkvis/Projects/ResInsight/TestModels/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID")
|
||||
casePaths.append("C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID")
|
||||
casePaths.append("C:/Users/lindk/source/repos/ResInsight/TestModels/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID")
|
||||
for casePath in casePaths:
|
||||
assert os.path.exists(casePath), "You need to set valid case paths for this script to work"
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -1,7 +1,5 @@
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
# Load instance
|
||||
|
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
|
||||
import rips
|
||||
import time
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
|
||||
import rips
|
||||
import time
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
||||
if resInsight is None:
|
||||
print('ERROR: could not find ResInsight')
|
||||
print('ERROR: could not find ResInsight')
|
||||
else:
|
||||
print('Successfully connected to ResInsight')
|
@ -1,7 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -4,11 +4,11 @@ import rips
|
||||
resInsight = rips.Instance.find()
|
||||
|
||||
view = resInsight.project.view(0)
|
||||
view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
|
||||
selectionMode='FLOW_TR_INJ_AND_PROD')
|
||||
#view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
|
||||
# selectionMode='FLOW_TR_INJ_AND_PROD')
|
||||
|
||||
# Example of setting individual wells. Commented out because well names are case specific.
|
||||
#view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
|
||||
# selectionMode='FLOW_TR_BY_SELECTION',
|
||||
# injectors = ['C-1H', 'C-2H', 'F-2H'],
|
||||
# producers = ['B-1AH', 'B-3H', 'D-1H'])
|
||||
view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
|
||||
selectionMode='FLOW_TR_BY_SELECTION',
|
||||
injectors = ['C-1H', 'C-2H', 'F-2H'],
|
||||
producers = ['B-1AH', 'B-3H', 'D-1H'])
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
import itertools
|
||||
import time
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
import itertools
|
||||
import time
|
||||
@ -14,8 +11,10 @@ grid = case.grid(index = 0)
|
||||
timeSteps = case.timeSteps()
|
||||
|
||||
averages = []
|
||||
allResults = []
|
||||
for i in range(0, len(timeSteps)):
|
||||
results = case.properties.activeCellProperty('DYNAMIC_NATIVE', 'SOIL', i)
|
||||
allResults.append(results)
|
||||
mysum = sum(results)
|
||||
averages.append(mysum/len(results))
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
def createResult(soilChunks, porvChunks):
|
||||
|
@ -1,6 +1,3 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
resInsight = rips.Instance.find()
|
||||
|
Loading…
Reference in New Issue
Block a user