python connection: exposed directly via pybind11.
python connection. added property pos. removed shedule.py. test_connection.py passed. test_wells.py: test_completion passes. removed opm.io.config. renamed test_state2.py -> test_state.py.
This commit is contained in:
@@ -12,6 +12,10 @@ std::string direction( const Connection& c ) {
|
||||
return Connection::Direction2String( c.dir() );
|
||||
}
|
||||
|
||||
std::tuple<int, int, int> get_pos( const Connection& conn ) {
|
||||
return std::make_tuple(conn.getI(), conn.getJ(), conn.getK());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +24,10 @@ void python::common::export_Connection(py::module& module) {
|
||||
py::class_< Connection >( module, "Connection")
|
||||
.def_property_readonly("direction", &direction )
|
||||
.def_property_readonly("state", &state )
|
||||
.def_property_readonly( "I", &Connection::getI )
|
||||
.def_property_readonly( "J", &Connection::getJ )
|
||||
.def_property_readonly( "K", &Connection::getK )
|
||||
.def_property_readonly( "i", &Connection::getI )
|
||||
.def_property_readonly( "j", &Connection::getJ )
|
||||
.def_property_readonly( "j", &Connection::getK )
|
||||
.def_property_readonly( "pos", &get_pos )
|
||||
.def_property_readonly( "attached_to_segment", &Connection::attachedToSegment )
|
||||
.def_property_readonly( "center_depth", &Connection::depth)
|
||||
.def_property_readonly( "rw", &Connection::rw)
|
||||
@@ -30,7 +35,7 @@ void python::common::export_Connection(py::module& module) {
|
||||
.def_property_readonly( "number", &Connection::complnum) // This is deprecated; complnum is the "correct" proeprty name
|
||||
.def_property_readonly( "sat_table_id", &Connection::satTableId)
|
||||
.def_property_readonly( "segment_number", &Connection::segment)
|
||||
.def_property_readonly( "CF", &Connection::CF)
|
||||
.def_property_readonly( "Kh", &Connection::Kh)
|
||||
.def_property_readonly( "cf", &Connection::CF)
|
||||
.def_property_readonly( "kh", &Connection::Kh)
|
||||
.def_property_readonly( "well_pi", &Connection::wellPi );
|
||||
}
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
|
||||
#include "export.hpp"
|
||||
|
||||
@@ -15,6 +19,10 @@ void python::common::export_EclipseConfig(py::module& module)
|
||||
.def( "restart", &EclipseConfig::restart, ref_internal);
|
||||
|
||||
py::class_< SummaryConfig >( module, "SummaryConfig")
|
||||
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
||||
return SummaryConfig( deck, schedule, state.getTableManager() );
|
||||
} ) )
|
||||
|
||||
.def( "__contains__", &SummaryConfig::hasKeyword );
|
||||
|
||||
py::class_< InitConfig >( module, "InitConfig")
|
||||
|
||||
@@ -17,6 +17,7 @@ from .libopmcommon_python import DeckKeyword
|
||||
from .libopmcommon_python import EclipseState
|
||||
from .libopmcommon_python import Schedule
|
||||
from .libopmcommon_python import OpmLog
|
||||
from .libopmcommon_python import SummaryConfig
|
||||
|
||||
|
||||
#from .schedule import Well, Connection, Schedule
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from .config import *
|
||||
@@ -1,11 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from opm import libopmcommon_python as lib
|
||||
from ..parser.sunbeam import delegate
|
||||
|
||||
|
||||
@delegate(lib.SummaryConfig)
|
||||
class SummaryConfig(object):
|
||||
def __repr__(self):
|
||||
return 'SummaryConfig()'
|
||||
|
||||
@@ -12,7 +12,3 @@ class SunbeamState(object):
|
||||
def deck(self):
|
||||
return self._deck()
|
||||
|
||||
@property
|
||||
def summary_config(self):
|
||||
return self._summary_config()
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from opm._common import Schedule
|
||||
|
||||
from .schedule import *
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from opm import libopmcommon_python as lib
|
||||
from ..parser.sunbeam import delegate
|
||||
|
||||
|
||||
|
||||
@delegate(lib.Connection)
|
||||
class Connection(object):
|
||||
|
||||
@property
|
||||
def pos(self):
|
||||
return self.I, self.J, self.K
|
||||
|
||||
def __repr__(self):
|
||||
return 'Connection(number = {})'.format(self.number)
|
||||
|
||||
# using the names flowing and closed for functions that test if a well is
|
||||
# opened or closed at some point, because we might want to use the more
|
||||
# imperative words 'open' and 'close' (or 'shut') for *changing* the status
|
||||
# later
|
||||
@staticmethod
|
||||
def flowing():
|
||||
def fn(connection): return connection.state == 'OPEN'
|
||||
return fn
|
||||
|
||||
@staticmethod
|
||||
def closed():
|
||||
def fn(connection): return connection.state == 'SHUT'
|
||||
return fn
|
||||
|
||||
@staticmethod
|
||||
def auto():
|
||||
def fn(connection): return connection.state == 'AUTO'
|
||||
return fn
|
||||
|
||||
1
python/python/opm/io/summary/__init__.py
Normal file
1
python/python/opm/io/summary/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from opm._common import SummaryConfig
|
||||
@@ -81,7 +81,6 @@ setup(
|
||||
packages=[
|
||||
'opm',
|
||||
'opm.io',
|
||||
'opm.io.config',
|
||||
'opm.io.deck',
|
||||
'opm.io.ecl_state',
|
||||
'opm.io.parser',
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
import unittest
|
||||
import opm.io
|
||||
|
||||
from opm.io.parser import Parser
|
||||
from opm.io.ecl_state import EclipseState
|
||||
from opm.io.schedule import Schedule
|
||||
|
||||
|
||||
def flowing(connection):
|
||||
return connection.state == 'OPEN'
|
||||
|
||||
def closed(connection):
|
||||
return connection.state == 'SHUT'
|
||||
|
||||
|
||||
class TestWells(unittest.TestCase):
|
||||
|
||||
"""
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.sch = opm.io.parse('tests/spe3/SPE3CASE1.DATA').schedule
|
||||
deck = Parser().parse('tests/spe3/SPE3CASE1.DATA')
|
||||
cls.state = EclipseState(deck)
|
||||
cls.sch = Schedule(deck, cls.state)
|
||||
cls.timesteps = cls.sch.timesteps
|
||||
|
||||
def test_connection_pos(self):
|
||||
@@ -19,7 +31,7 @@ class TestWells(unittest.TestCase):
|
||||
self.assertEqual(p01, (6,6,3))
|
||||
self.assertEqual(p10, (0,0,0))
|
||||
self.assertEqual(p11, (0,0,1))
|
||||
|
||||
|
||||
def test_connection_state(self):
|
||||
for timestep,_ in enumerate(self.timesteps):
|
||||
for well in self.sch.get_wells(timestep):
|
||||
@@ -27,8 +39,6 @@ class TestWells(unittest.TestCase):
|
||||
self.assertEqual("OPEN", connection.state)
|
||||
|
||||
def test_filters(self):
|
||||
flowing = opm.io.schedule.Connection.flowing()
|
||||
closed = opm.io.schedule.Connection.closed()
|
||||
connections = self.sch.get_wells(0)[0].connections()
|
||||
self.assertEqual(len(list(filter(flowing, connections))), 2)
|
||||
self.assertEqual(len(list(filter(closed, connections))), 0)
|
||||
@@ -44,7 +54,7 @@ class TestWells(unittest.TestCase):
|
||||
for well in self.sch.get_wells(timestep):
|
||||
for connection in well.connections():
|
||||
self.assertFalse(connection.attached_to_segment)
|
||||
"""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -1,23 +1,186 @@
|
||||
import unittest
|
||||
import opm.io
|
||||
|
||||
class TestState(unittest.TestCase):
|
||||
from opm.io.parser import Parser
|
||||
|
||||
from opm.io.ecl_state import EclipseState
|
||||
from opm.io.schedule import Schedule
|
||||
from opm.io.summary import SummaryConfig
|
||||
|
||||
|
||||
class TestState2(unittest.TestCase):
|
||||
FAULTS_DECK = """
|
||||
RUNSPEC
|
||||
|
||||
DIMENS
|
||||
10 10 10 /
|
||||
GRID
|
||||
DX
|
||||
1000*0.25 /
|
||||
DY
|
||||
1000*0.25 /
|
||||
DZ
|
||||
1000*0.25 /
|
||||
TOPS
|
||||
100*0.25 /
|
||||
FAULTS
|
||||
'F1' 1 1 1 4 1 4 'X' /
|
||||
'F2' 5 5 1 4 1 4 'X-' /
|
||||
/
|
||||
MULTFLT
|
||||
'F1' 0.50 /
|
||||
'F2' 0.50 /
|
||||
/
|
||||
EDIT
|
||||
MULTFLT /
|
||||
'F2' 0.25 /
|
||||
/
|
||||
OIL
|
||||
|
||||
GAS
|
||||
|
||||
TITLE
|
||||
The title
|
||||
|
||||
START
|
||||
8 MAR 1998 /
|
||||
|
||||
PROPS
|
||||
REGIONS
|
||||
SWAT
|
||||
1000*1 /
|
||||
SATNUM
|
||||
1000*2 /
|
||||
\
|
||||
"""
|
||||
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.spe3 = opm.io.parse('tests/spe3/SPE3CASE1.DATA')
|
||||
cpa = opm.io.parse('tests/data/CORNERPOINT_ACTNUM.DATA')
|
||||
|
||||
def setUpClass(cls):
|
||||
parser = Parser()
|
||||
cls.deck_cpa = parser.parse('tests/data/CORNERPOINT_ACTNUM.DATA')
|
||||
cls.cp_state = EclipseState(cls.deck_cpa)
|
||||
|
||||
cls.deck_spe3 = parser.parse('tests/spe3/SPE3CASE1.DATA')
|
||||
cls.state = EclipseState(cls.deck_spe3)
|
||||
cls.schedule = Schedule(cls.deck_spe3, cls.state)
|
||||
cls.summary_config = SummaryConfig(cls.deck_spe3, cls.state, cls.schedule)
|
||||
|
||||
def test_config(self):
|
||||
cfg = self.state.config()
|
||||
|
||||
init = cfg.init()
|
||||
self.assertTrue(init.hasEquil())
|
||||
self.assertFalse(init.restartRequested())
|
||||
self.assertEqual(0, init.getRestartStep())
|
||||
|
||||
rst = cfg.restart()
|
||||
self.assertFalse(rst.getWriteRestartFile(0))
|
||||
self.assertEqual(7, rst.getFirstRestartStep())
|
||||
|
||||
def test_repr_title(self):
|
||||
self.assertEqual('SPE 3 - CASE 1', self.state.title)
|
||||
|
||||
def test_state_nnc(self):
|
||||
self.assertFalse(self.state.has_input_nnc())
|
||||
|
||||
def test_grid(self):
|
||||
grid = self.state.grid()
|
||||
self.assertEqual(9, grid.nx)
|
||||
self.assertEqual(9, grid.ny)
|
||||
self.assertEqual(4, grid.nz)
|
||||
self.assertEqual(9*9*4, grid.nactive)
|
||||
self.assertEqual(9*9*4, grid.cartesianSize)
|
||||
g,i,j,k = 295,7,5,3
|
||||
self.assertEqual(g, grid.globalIndex(i,j,k))
|
||||
self.assertEqual((i,j,k), grid.getIJK(g))
|
||||
|
||||
def test_simulation(self):
|
||||
sim = self.state.simulation()
|
||||
self.assertFalse(sim.hasThresholdPressure())
|
||||
self.assertFalse(sim.useCPR())
|
||||
self.assertTrue(sim.hasDISGAS())
|
||||
self.assertTrue(sim.hasVAPOIL())
|
||||
|
||||
def test_tables(self):
|
||||
tables = self.state.tables()
|
||||
self.assertTrue('SGOF' in tables)
|
||||
self.assertTrue('SWOF' in tables)
|
||||
self.assertFalse('SOF' in tables)
|
||||
|
||||
ct = self.cp_state.tables()
|
||||
self.assertFalse('SGOF' in ct)
|
||||
self.assertTrue('SWOF' in ct)
|
||||
|
||||
tab = 'SWOF'
|
||||
col = 'KRW'
|
||||
self.assertAlmostEqual(0.1345, self.state.tables().evaluate(tab, 0, col, 0.5))
|
||||
self.assertAlmostEqual(0.39, self.state.tables().evaluate(tab, 0, col, 0.72))
|
||||
|
||||
with self.assertRaises(KeyError):
|
||||
self.state.tables().evaluate(tab, 0, 'NO', 1)
|
||||
|
||||
def test_faults(self):
|
||||
self.assertEquals([], self.state.faultNames())
|
||||
parser = Parser()
|
||||
faultdeck = parser.parse_string(self.FAULTS_DECK)
|
||||
faultstate = EclipseState(faultdeck)
|
||||
self.assertEqual(['F1', 'F2'], faultstate.faultNames())
|
||||
# 'F2' 5 5 1 4 1 4 'X-' / \n"
|
||||
f2 = faultstate.faultFaces('F2')
|
||||
self.assertTrue((4,0,0,'X-') in f2)
|
||||
self.assertFalse((3,0,0,'X-') in f2)
|
||||
|
||||
def test_jfunc(self):
|
||||
# jf["FLAG"] = WATER; # set in deck
|
||||
# jf["DIRECTION"] = XY; # default
|
||||
# jf["ALPHA_FACTOR"] = 0.5 # default
|
||||
# jf["BETA_FACTOR"] = 0.5 # default
|
||||
# jf["OIL_WATER"] = 21.0 # set in deck
|
||||
# jf["GAS_OIL"] = -1.0 # N/A
|
||||
|
||||
parser = Parser()
|
||||
deck = parser.parse('tests/data/JFUNC.DATA')
|
||||
js = EclipseState(deck)
|
||||
self.assertEqual('JFUNC TEST', js.title)
|
||||
jf = js.jfunc()
|
||||
print(jf)
|
||||
self.assertEqual(jf['FLAG'], 'WATER')
|
||||
self.assertEqual(jf['DIRECTION'], 'XY')
|
||||
self.assertFalse('GAS_OIL' in jf)
|
||||
self.assertTrue('OIL_WATER' in jf)
|
||||
self.assertEqual(jf['OIL_WATER'], 21.0)
|
||||
self.assertEqual(jf["ALPHA_FACTOR"], 0.5) # default
|
||||
self.assertEqual(jf["BETA_FACTOR"], 0.5) # default
|
||||
|
||||
jfunc_gas = """
|
||||
DIMENS
|
||||
10 10 10 /
|
||||
GRID
|
||||
DX
|
||||
1000*0.25 /
|
||||
DY
|
||||
1000*0.25 /
|
||||
DZ
|
||||
1000*0.25 /
|
||||
TOPS
|
||||
100*0.25 /
|
||||
JFUNC
|
||||
GAS * 13.0 0.6 0.7 Z /
|
||||
PROPS\nREGIONS
|
||||
"""
|
||||
deck2 = parser.parse_string(jfunc_gas)
|
||||
js_gas = EclipseState(deck2)
|
||||
jf = js_gas.jfunc()
|
||||
self.assertEqual(jf['FLAG'], 'GAS')
|
||||
self.assertEqual(jf['DIRECTION'], 'Z')
|
||||
self.assertTrue('GAS_OIL' in jf)
|
||||
self.assertFalse('OIL_WATER' in jf)
|
||||
self.assertEqual(jf['GAS_OIL'], 13.0)
|
||||
self.assertEqual(jf["ALPHA_FACTOR"], 0.6) # default
|
||||
self.assertEqual(jf["BETA_FACTOR"], 0.7) # default
|
||||
|
||||
def test_summary(self):
|
||||
smry = self.spe3.summary_config
|
||||
smry = self.summary_config
|
||||
self.assertTrue('SummaryConfig' in repr(smry))
|
||||
self.assertTrue('WOPR' in smry) # hasKeyword
|
||||
self.assertFalse('NONO' in smry) # hasKeyword
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
import unittest
|
||||
|
||||
from opm.io.parser import Parser
|
||||
|
||||
from opm.io.ecl_state import EclipseState
|
||||
|
||||
|
||||
class TestState2(unittest.TestCase):
|
||||
FAULTS_DECK = """
|
||||
RUNSPEC
|
||||
|
||||
DIMENS
|
||||
10 10 10 /
|
||||
GRID
|
||||
DX
|
||||
1000*0.25 /
|
||||
DY
|
||||
1000*0.25 /
|
||||
DZ
|
||||
1000*0.25 /
|
||||
TOPS
|
||||
100*0.25 /
|
||||
FAULTS
|
||||
'F1' 1 1 1 4 1 4 'X' /
|
||||
'F2' 5 5 1 4 1 4 'X-' /
|
||||
/
|
||||
MULTFLT
|
||||
'F1' 0.50 /
|
||||
'F2' 0.50 /
|
||||
/
|
||||
EDIT
|
||||
MULTFLT /
|
||||
'F2' 0.25 /
|
||||
/
|
||||
OIL
|
||||
|
||||
GAS
|
||||
|
||||
TITLE
|
||||
The title
|
||||
|
||||
START
|
||||
8 MAR 1998 /
|
||||
|
||||
PROPS
|
||||
REGIONS
|
||||
SWAT
|
||||
1000*1 /
|
||||
SATNUM
|
||||
1000*2 /
|
||||
\
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
parser = Parser()
|
||||
cls.deck_spe3 = parser.parse('tests/spe3/SPE3CASE1.DATA')
|
||||
cls.deck_cpa = parser.parse('tests/data/CORNERPOINT_ACTNUM.DATA')
|
||||
cls.state = EclipseState(cls.deck_spe3)
|
||||
cls.cp_state = EclipseState(cls.deck_cpa)
|
||||
|
||||
def test_config(self):
|
||||
cfg = self.state.config()
|
||||
|
||||
init = cfg.init()
|
||||
self.assertTrue(init.hasEquil())
|
||||
self.assertFalse(init.restartRequested())
|
||||
self.assertEqual(0, init.getRestartStep())
|
||||
|
||||
rst = cfg.restart()
|
||||
self.assertFalse(rst.getWriteRestartFile(0))
|
||||
self.assertEqual(7, rst.getFirstRestartStep())
|
||||
|
||||
def test_repr_title(self):
|
||||
self.assertEqual('SPE 3 - CASE 1', self.state.title)
|
||||
|
||||
def test_state_nnc(self):
|
||||
self.assertFalse(self.state.has_input_nnc())
|
||||
|
||||
def test_grid(self):
|
||||
grid = self.state.grid()
|
||||
self.assertEqual(9, grid.nx)
|
||||
self.assertEqual(9, grid.ny)
|
||||
self.assertEqual(4, grid.nz)
|
||||
self.assertEqual(9*9*4, grid.nactive)
|
||||
self.assertEqual(9*9*4, grid.cartesianSize)
|
||||
g,i,j,k = 295,7,5,3
|
||||
self.assertEqual(g, grid.globalIndex(i,j,k))
|
||||
self.assertEqual((i,j,k), grid.getIJK(g))
|
||||
|
||||
def test_simulation(self):
|
||||
sim = self.state.simulation()
|
||||
self.assertFalse(sim.hasThresholdPressure())
|
||||
self.assertFalse(sim.useCPR())
|
||||
self.assertTrue(sim.hasDISGAS())
|
||||
self.assertTrue(sim.hasVAPOIL())
|
||||
|
||||
def test_tables(self):
|
||||
tables = self.state.tables()
|
||||
self.assertTrue('SGOF' in tables)
|
||||
self.assertTrue('SWOF' in tables)
|
||||
self.assertFalse('SOF' in tables)
|
||||
|
||||
ct = self.cp_state.tables()
|
||||
self.assertFalse('SGOF' in ct)
|
||||
self.assertTrue('SWOF' in ct)
|
||||
|
||||
tab = 'SWOF'
|
||||
col = 'KRW'
|
||||
self.assertAlmostEqual(0.1345, self.state.tables().evaluate(tab, 0, col, 0.5))
|
||||
self.assertAlmostEqual(0.39, self.state.tables().evaluate(tab, 0, col, 0.72))
|
||||
|
||||
with self.assertRaises(KeyError):
|
||||
self.state.tables().evaluate(tab, 0, 'NO', 1)
|
||||
|
||||
def test_faults(self):
|
||||
self.assertEquals([], self.state.faultNames())
|
||||
parser = Parser()
|
||||
faultdeck = parser.parse_string(self.FAULTS_DECK)
|
||||
faultstate = EclipseState(faultdeck)
|
||||
self.assertEqual(['F1', 'F2'], faultstate.faultNames())
|
||||
# 'F2' 5 5 1 4 1 4 'X-' / \n"
|
||||
f2 = faultstate.faultFaces('F2')
|
||||
self.assertTrue((4,0,0,'X-') in f2)
|
||||
self.assertFalse((3,0,0,'X-') in f2)
|
||||
|
||||
def test_jfunc(self):
|
||||
# jf["FLAG"] = WATER; # set in deck
|
||||
# jf["DIRECTION"] = XY; # default
|
||||
# jf["ALPHA_FACTOR"] = 0.5 # default
|
||||
# jf["BETA_FACTOR"] = 0.5 # default
|
||||
# jf["OIL_WATER"] = 21.0 # set in deck
|
||||
# jf["GAS_OIL"] = -1.0 # N/A
|
||||
|
||||
parser = Parser()
|
||||
deck = parser.parse('tests/data/JFUNC.DATA')
|
||||
js = EclipseState(deck)
|
||||
self.assertEqual('JFUNC TEST', js.title)
|
||||
jf = js.jfunc()
|
||||
print(jf)
|
||||
self.assertEqual(jf['FLAG'], 'WATER')
|
||||
self.assertEqual(jf['DIRECTION'], 'XY')
|
||||
self.assertFalse('GAS_OIL' in jf)
|
||||
self.assertTrue('OIL_WATER' in jf)
|
||||
self.assertEqual(jf['OIL_WATER'], 21.0)
|
||||
self.assertEqual(jf["ALPHA_FACTOR"], 0.5) # default
|
||||
self.assertEqual(jf["BETA_FACTOR"], 0.5) # default
|
||||
|
||||
jfunc_gas = """
|
||||
DIMENS
|
||||
10 10 10 /
|
||||
GRID
|
||||
DX
|
||||
1000*0.25 /
|
||||
DY
|
||||
1000*0.25 /
|
||||
DZ
|
||||
1000*0.25 /
|
||||
TOPS
|
||||
100*0.25 /
|
||||
JFUNC
|
||||
GAS * 13.0 0.6 0.7 Z /
|
||||
PROPS\nREGIONS
|
||||
"""
|
||||
deck2 = parser.parse_string(jfunc_gas)
|
||||
js_gas = EclipseState(deck2)
|
||||
jf = js_gas.jfunc()
|
||||
self.assertEqual(jf['FLAG'], 'GAS')
|
||||
self.assertEqual(jf['DIRECTION'], 'Z')
|
||||
self.assertTrue('GAS_OIL' in jf)
|
||||
self.assertFalse('OIL_WATER' in jf)
|
||||
self.assertEqual(jf['GAS_OIL'], 13.0)
|
||||
self.assertEqual(jf["ALPHA_FACTOR"], 0.6) # default
|
||||
self.assertEqual(jf["BETA_FACTOR"], 0.7) # default
|
||||
|
||||
@@ -120,10 +120,9 @@ class TestWells(unittest.TestCase):
|
||||
num_steps = len( self.sch.timesteps )
|
||||
w0 = self.sch.get_wells(num_steps - 1)[0]
|
||||
c0,c1 = w0.connections()
|
||||
"""
|
||||
|
||||
self.assertEqual((6,6,2), c0.pos)
|
||||
self.assertEqual((6,6,3), c1.pos)
|
||||
"""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user