Merge pull request #5236 from hnil/no_early_exit_zero_flux

Avoid deleting derivative i.e. getting "wrong" matrix in case of zero…
This commit is contained in:
Kai Bao 2024-08-29 14:46:09 +02:00 committed by GitHub
commit f47d00c9d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 15 deletions

View File

@ -285,10 +285,6 @@ public:
distZ*g,
thpres,
problem.moduleParams());
if (pressureDifferences[phaseIdx] == 0) {
volumeFlux[phaseIdx] = 0.0;
continue;
}
const bool upwindIsInterior = (static_cast<unsigned>(upIdx[phaseIdx]) == interiorDofIdx);
const IntensiveQuantities& up = upwindIsInterior ? intQuantsIn : intQuantsEx;

View File

@ -137,7 +137,7 @@ add_test_compare_parallel_simulation(CASENAME aquflux_01
FILENAME AQUFLUX-01
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL 0.04
REL_TOL 0.06
DIR aquifers
TEST_ARGS --enable-tuning=true --enable-drift-compensation=false --relaxed-max-pv-fraction=0.0 --tolerance-cnv=1.0e-3)
@ -150,12 +150,12 @@ add_test_compare_parallel_simulation(CASENAME aquflux_02
TEST_ARGS --enable-tuning=true)
add_test_compare_parallel_simulation(CASENAME network_balance_01
FILENAME NETWORK-01
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${coarse_rel_tol_parallel}
DIR network
TEST_ARGS --enable-tuning=true --time-step-control=newtoniterationcount --time-step-control-growth-rate=3.0 --relaxed-max-pv-fraction=0.0 --tolerance-cnv=1e-3)
FILENAME NETWORK-01
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${coarse_rel_tol_parallel}
DIR network
TEST_ARGS --enable-tuning=true --time-step-control=newtoniterationcount --time-step-control-growth-rate=3.0 --relaxed-max-pv-fraction=0.0 --tolerance-cnv=1e-3)
add_test_compare_parallel_simulation(CASENAME numerical_aquifer_3d_1aqu
FILENAME 3D_1AQU_3CELLS
@ -202,7 +202,7 @@ add_test_compare_parallel_simulation(CASENAME 3_a_mpi_multflt_mod2
SIMULATOR flow
ABS_TOL ${abs_tol_parallel}
REL_TOL ${rel_tol_parallel}
DIR model2
DIR model2
TEST_ARGS --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --enable-drift-compensation=false)
add_test_compare_parallel_simulation(CASENAME rxft

View File

@ -30,7 +30,7 @@ class TestBasic(unittest.TestCase):
rho_g = sim.get_fluidstate_variable(name='rho_g')
self.assertAlmostEqual(rho_g[0], 241.36955087, places=2, msg='value of gas density')
rho_o = sim.get_fluidstate_variable(name='rho_o')
self.assertAlmostEqual(rho_o[0], 631.78611238, places=3, msg='value of oil density')
self.assertAlmostEqual(rho_o[0], 631.78674, places=2, msg='value of oil density')
Rs = sim.get_fluidstate_variable(name='Rs')
self.assertAlmostEqual(Rs[0], 226.19666048, places=5, msg='value of solution gas-oil ratio')
Rv = sim.get_fluidstate_variable(name='Rv')
@ -38,8 +38,8 @@ class TestBasic(unittest.TestCase):
Sw = sim.get_fluidstate_variable(name='Sw')
self.assertAlmostEqual(Sw[0], 0.11969486712, places=5, msg='value of water saturation')
So = sim.get_fluidstate_variable(name='So')
self.assertAlmostEqual(So[0], 0.825166164326, places=5, msg='value of oil saturation')
self.assertAlmostEqual(So[0], 0.825129, places=3, msg='value of oil saturation')
Sg = sim.get_fluidstate_variable(name='Sg')
self.assertAlmostEqual(Sg[0], 0.055138968544, places=5, msg='value of gas saturation')
self.assertAlmostEqual(Sg[0], 0.055138968544, places=3, msg='value of gas saturation')
T = sim.get_fluidstate_variable(name='T')
self.assertAlmostEqual(T[0], 288.705, places=3, msg='value of temperature')