2020-02-11 14:20:53 -06:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
|
2021-01-26 13:48:01 -06:00
|
|
|
sys.path.insert(1, os.path.join(sys.path[0], "../../"))
|
2020-02-11 14:20:53 -06:00
|
|
|
import rips
|
|
|
|
|
|
|
|
import dataroot
|
|
|
|
|
2020-04-16 09:06:18 -05:00
|
|
|
|
2020-02-11 14:20:53 -06:00
|
|
|
def test_10k(rips_instance, initialize_test):
|
|
|
|
case_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
|
|
|
case = rips_instance.project.load_case(path=case_path)
|
2021-09-01 01:25:22 -05:00
|
|
|
case.create_view()
|
2021-01-26 13:48:01 -06:00
|
|
|
assert len(case.grids()) == 2
|
2020-02-11 14:20:53 -06:00
|
|
|
cell_count_info = case.cell_count()
|
|
|
|
|
|
|
|
sim_wells = case.simulation_wells()
|
2021-01-26 13:48:01 -06:00
|
|
|
assert len(sim_wells) == 3
|
2020-02-11 14:20:53 -06:00
|
|
|
|
2021-01-26 13:48:01 -06:00
|
|
|
assert sim_wells[0].name == "GI1"
|
|
|
|
assert sim_wells[1].name == "GP1"
|
|
|
|
assert sim_wells[2].name == "GP2"
|
2020-02-11 14:20:53 -06:00
|
|
|
|
|
|
|
timesteps = case.time_steps()
|
|
|
|
|
|
|
|
# On time step 0 all simulation wells are undefined
|
|
|
|
for sim_well in sim_wells:
|
|
|
|
status = sim_well.status(0)
|
2021-01-26 13:48:01 -06:00
|
|
|
assert status.well_type == "NotDefined"
|
2020-02-11 14:20:53 -06:00
|
|
|
|
|
|
|
# On time step 3 all wells are producing
|
|
|
|
for sim_well in sim_wells:
|
2020-04-16 09:06:18 -05:00
|
|
|
status = sim_well.status(3)
|
2021-01-26 13:48:01 -06:00
|
|
|
assert status.well_type == "Producer"
|
2020-02-11 14:20:53 -06:00
|
|
|
|
|
|
|
# On time step 0 all simulation wells have no cells
|
|
|
|
for sim_well in sim_wells:
|
|
|
|
cells = sim_well.cells(0)
|
2021-01-26 13:48:01 -06:00
|
|
|
assert len(cells) == 0
|
2020-02-11 14:20:53 -06:00
|
|
|
|
|
|
|
# On the other time steps there should be cells
|
|
|
|
expected_cell_count = {}
|
|
|
|
expected_cell_count["GP1"] = 105
|
|
|
|
expected_cell_count["GI1"] = 38
|
|
|
|
expected_cell_count["GP2"] = 18
|
|
|
|
for sim_well in sim_wells:
|
2023-02-01 01:46:46 -06:00
|
|
|
for tidx, timestep in enumerate(timesteps):
|
2021-01-26 13:48:01 -06:00
|
|
|
if tidx > 0:
|
2020-02-11 14:20:53 -06:00
|
|
|
cells = sim_well.cells(tidx)
|
2021-01-26 13:48:01 -06:00
|
|
|
print(
|
|
|
|
"well: "
|
|
|
|
+ sim_well.name
|
|
|
|
+ " timestep: "
|
|
|
|
+ str(tidx)
|
|
|
|
+ " cells:"
|
|
|
|
+ str(len(cells))
|
|
|
|
)
|
|
|
|
assert len(cells) == expected_cell_count[sim_well.name]
|