using one day time step for SPE1CASE1a/SPE1CASE1.DATA

to avoid time stepping change causes test failures for the python tests
This commit is contained in:
Kai Bao 2024-06-19 00:33:53 +02:00
parent c262a58ebb
commit 027c3ba0fc
4 changed files with 21 additions and 15 deletions

View File

@ -54,9 +54,11 @@ class TestBasic(unittest.TestCase):
sim.step_init()
sim.step()
dt = sim.get_dt()
# NOTE: The timestep should be 1 month = 31 days
# = 31 * 24 * 60 * 60 seconds = 2678400 seconds
self.assertAlmostEqual(dt, 2678400.0, places=7, msg='value of timestep')
# NOTE: the timestep size is reduced to 1 day to avoid regression failures
# due to changes in time stepping.
# NOTE: The timestep should be 1 day
# = 24 * 60 * 60 seconds = 86400 seconds
self.assertAlmostEqual(dt, 86400., places=7, msg='value of timestep')
vol = sim.get_cell_volumes()
self.assertEqual(len(vol), 300, 'length of volume vector')
# NOTE: The volume should be 1000 ft x 1000 ft x 20 ft * 0.3 (porosity)

View File

@ -20,26 +20,26 @@ class TestBasic(unittest.TestCase):
sim.step_init()
sim.step()
oil_pressure = sim.get_fluidstate_variable(name='po')
self.assertAlmostEqual(oil_pressure[0], 41729978.837, places=2, msg='value of oil pressure')
self.assertAlmostEqual(oil_pressure[0], 35795160.67, places=2, msg='value of oil pressure')
gas_pressure = sim.get_fluidstate_variable(name='pg')
self.assertAlmostEqual(gas_pressure[0], 41729978.837, places=2, msg='value of gas pressure')
self.assertAlmostEqual(gas_pressure[0], 35795160.67, places=2, msg='value of gas pressure')
water_pressure = sim.get_fluidstate_variable(name='pw')
self.assertAlmostEqual(water_pressure[0], 41729978.837, places=2, msg='value of water pressure')
self.assertAlmostEqual(water_pressure[0], 35795160.67, places=2, msg='value of water pressure')
rho_w = sim.get_fluidstate_variable(name='rho_w')
self.assertAlmostEqual(rho_w[0], 1001.7549054, places=6, msg='value of water density')
self.assertAlmostEqual(rho_w[0], 998.9822355, places=6, msg='value of water density')
rho_g = sim.get_fluidstate_variable(name='rho_g')
self.assertAlmostEqual(rho_g[0], 275.72397867, places=7, msg='value of gas density')
self.assertAlmostEqual(rho_g[0], 241.36955087, places=7, msg='value of gas density')
rho_o = sim.get_fluidstate_variable(name='rho_o')
self.assertAlmostEqual(rho_o[0], 639.64061021, places=7, msg='value of oil density')
self.assertAlmostEqual(rho_o[0], 631.78611238, places=7, msg='value of oil density')
Rs = sim.get_fluidstate_variable(name='Rs')
self.assertAlmostEqual(Rs[0], 226.196660482, places=7, msg='value of solution gas-oil ratio')
self.assertAlmostEqual(Rs[0], 226.19666048, places=7, msg='value of solution gas-oil ratio')
Rv = sim.get_fluidstate_variable(name='Rv')
self.assertAlmostEqual(Rv[0], 0.0, places=7, msg='value of volatile gas-oil ratio')
Sw = sim.get_fluidstate_variable(name='Sw')
self.assertAlmostEqual(Sw[0], 0.11905577997, places=10, msg='value of water saturation')
self.assertAlmostEqual(Sw[0], 0.11969486712, places=10, msg='value of water saturation')
So = sim.get_fluidstate_variable(name='So')
self.assertAlmostEqual(So[0], 0.56951652831, places=10, msg='value of oil saturation')
self.assertAlmostEqual(So[0], 0.825166164326, places=10, msg='value of oil saturation')
Sg = sim.get_fluidstate_variable(name='Sg')
self.assertAlmostEqual(Sg[0], 0.31142769170, places=10, msg='value of gas saturation')
self.assertAlmostEqual(Sg[0], 0.055138968544, places=10, msg='value of gas saturation')
T = sim.get_fluidstate_variable(name='T')
self.assertAlmostEqual(T[0], 288.705, places=3, msg='value of temperature')

View File

@ -20,7 +20,7 @@ class TestBasic(unittest.TestCase):
sim.step_init()
sim.step()
pressure = sim.get_primary_variable(variable='pressure')
self.assertAlmostEqual(pressure[0], 41729978.837, places=2, msg='value of pressure')
self.assertAlmostEqual(pressure[0], 35795160.67, places=2, msg='value of pressure')
pressure_meaning = sim.get_primary_variable_meaning(
variable='pressure')
pressure_meaning_map = sim.get_primary_variable_meaning_map(

View File

@ -421,8 +421,12 @@ WCONINJE
-- pressure in the PVT table=9014.7psia (default is 100 000psia)
TSTEP
--Advance the simulater once a day for TEN days:
--Relatively small time steps are used to avoid regression failures
--due to time stepping change
10*1 /
--Advance the simulater once a month for TEN years:
31 28 31 30 31 30 31 31 30 31 30 31 /
--31 28 31 30 31 30 31 31 30 31 30 31 /
--31 28 31 30 31 30 31 31 30 31 30 31
--31 28 31 30 31 30 31 31 30 31 30 31
--31 28 31 30 31 30 31 31 30 31 30 31