#4736 Case.py renames

This commit is contained in:
Gaute Lindkvist
2019-09-19 11:14:40 +02:00
parent c6dbc34183
commit e5987c26d7
13 changed files with 56 additions and 56 deletions

View File

@@ -15,9 +15,9 @@ if resInsight is not None:
print ("Got " + str(len(cases)) + " cases: ")
for case in cases:
print("Case name: " + case.name)
print("Case grid path: " + case.gridPath())
print("Case grid path: " + case.grid_path())
timesteps = case.timeSteps()
timesteps = case.time_steps()
for t in timesteps:
print("Year: " + str(t.year))
print("Month: " + str(t.month))

View File

@@ -12,12 +12,12 @@ resInsight = rips.Instance.find()
case = resInsight.project.case(id = 0)
# Get the cell count object
cellCounts = case.cellCount()
cellCounts = case.cell_count()
print("Number of active cells: " + str(cellCounts.active_cell_count))
print("Total number of reservoir cells: " + str(cellCounts.reservoir_cell_count))
# Get information for all active cells
activeCellInfos = case.cellInfoForActiveCells()
activeCellInfos = case.cell_info_for_active_cells()
# A simple check on the size of the cell info
assert(cellCounts.active_cell_count == len(activeCellInfos))

View File

@@ -18,7 +18,7 @@ property_list = ['SOIL', 'PRESSURE'] # list of parameter for snapshot
print ("Looping through cases")
for case in cases:
# Get grid path and its folder name
casepath = case.gridPath()
casepath = case.grid_path()
foldername = os.path.dirname(casepath)
# create a folder to hold the snapshots
@@ -30,7 +30,7 @@ for case in cases:
print ("Exporting to folder: " + dirname)
resInsight.commands.setExportFolder(type='SNAPSHOTS', path=dirname)
timeSteps = case.timeSteps()
timeSteps = case.time_steps()
tss_snapshot = range(0, len(timeSteps), n)
print(case.name, case.id, 'Number of timesteps: ' + str(len(timeSteps)))
print('Number of timesteps for snapshoting: ' + str(len(tss_snapshot)))

View File

@@ -8,4 +8,4 @@ cases = resInsight.project.cases()
print ("Got " + str(len(cases)) + " cases: ")
for case in cases:
print("Case name: " + case.name)
print("Case grid path: " + case.gridPath())
print("Case grid path: " + case.grid_path())

View File

@@ -6,7 +6,7 @@ import rips
resInsight = rips.Instance.find()
case = resInsight.project.case(id=0)
totalCellCount = case.cellCount().reservoir_cell_count
totalCellCount = case.cell_count().reservoir_cell_count
values = []
for i in range(0, totalCellCount):

View File

@@ -14,7 +14,7 @@ start = time.time()
case = resInsight.project.case(id=0)
# Get a list of all time steps
timeSteps = case.timeSteps()
timeSteps = case.time_steps()
averages = []
for i in range(0, len(timeSteps)):

View File

@@ -14,7 +14,7 @@ case = resInsight.project.case(id=0)
case = resInsight.project.case(id=0)
# Get a list of all time steps
timeSteps = case.timeSteps()
timeSteps = case.time_steps()
averages = []
for i in range(0, len(timeSteps)):

View File

@@ -19,7 +19,7 @@ def createResult(soilChunks, porvChunks):
resInsight = rips.Instance.find()
start = time.time()
case = resInsight.project.case(id=0)
timeStepInfo = case.timeSteps()
timeStepInfo = case.time_steps()
# Get a generator for the porv results. The generator will provide a chunk each time it is iterated
porvChunks = case.properties.activeCellPropertyAsync('STATIC_NATIVE', 'PORV', 0)

View File

@@ -11,7 +11,7 @@ case = resInsight.project.case(id=0)
# Read the full porv result
porvResults = case.properties.activeCellProperty('STATIC_NATIVE', 'PORV', 0)
timeStepInfo = case.timeSteps()
timeStepInfo = case.time_steps()
for i in range (0, len(timeStepInfo)):
# Read the full SOIl result for time step i