mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Merge pull request #4111 from goncalvesmachadoc/test-rvw
Add unit tests for EQUIL with rvw
This commit is contained in:
@@ -211,9 +211,11 @@ list (APPEND TEST_DATA_FILES
|
|||||||
tests/capillary_overlap.DATA
|
tests/capillary_overlap.DATA
|
||||||
tests/capillarySwatinit.DATA
|
tests/capillarySwatinit.DATA
|
||||||
tests/deadfluids.DATA
|
tests/deadfluids.DATA
|
||||||
tests/equil_livegas.DATA
|
tests/equil_wetgas.DATA
|
||||||
tests/equil_liveoil.DATA
|
tests/equil_liveoil.DATA
|
||||||
|
tests/equil_humidwetgas.DATA
|
||||||
tests/equil_rsvd_and_rvvd.DATA
|
tests/equil_rsvd_and_rvvd.DATA
|
||||||
|
tests/equil_rsvd_and_rvvd_and_rvwvd.DATA
|
||||||
tests/wetgas.DATA
|
tests/wetgas.DATA
|
||||||
tests/satfuncEPS_B.DATA
|
tests/satfuncEPS_B.DATA
|
||||||
tests/wells_manager_data.data
|
tests/wells_manager_data.data
|
||||||
|
|||||||
@@ -0,0 +1,143 @@
|
|||||||
|
NOECHO
|
||||||
|
|
||||||
|
RUNSPEC ======
|
||||||
|
|
||||||
|
WATER
|
||||||
|
OIL
|
||||||
|
GAS
|
||||||
|
VAPOIL
|
||||||
|
VAPWAT
|
||||||
|
|
||||||
|
TABDIMS
|
||||||
|
1 1 40 20 1 20 /
|
||||||
|
|
||||||
|
DIMENS
|
||||||
|
1 1 20
|
||||||
|
/
|
||||||
|
|
||||||
|
WELLDIMS
|
||||||
|
30 10 2 30 /
|
||||||
|
|
||||||
|
START
|
||||||
|
1 'JAN' 1990 /
|
||||||
|
|
||||||
|
NSTACK
|
||||||
|
25 /
|
||||||
|
|
||||||
|
EQLDIMS
|
||||||
|
-- NTEQUL
|
||||||
|
1 /
|
||||||
|
|
||||||
|
|
||||||
|
FMTOUT
|
||||||
|
FMTIN
|
||||||
|
|
||||||
|
GRID ======
|
||||||
|
|
||||||
|
DXV
|
||||||
|
1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
DYV
|
||||||
|
1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
DZV
|
||||||
|
20*5.0
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
PORO
|
||||||
|
20*0.2
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
PERMZ
|
||||||
|
20*1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PERMY
|
||||||
|
20*100.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PERMX
|
||||||
|
20*100.0
|
||||||
|
/
|
||||||
|
|
||||||
|
BOX
|
||||||
|
1 1 1 1 1 1 /
|
||||||
|
|
||||||
|
TOPS
|
||||||
|
0.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PROPS ======
|
||||||
|
|
||||||
|
PVDO
|
||||||
|
100 1.0 1.0
|
||||||
|
200 0.9 1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTG
|
||||||
|
-- Pg Rv Bg Vg
|
||||||
|
100 0.0001 0.010 0.1
|
||||||
|
0.0 0.0104 0.1 /
|
||||||
|
200 0.0004 0.005 0.2
|
||||||
|
0.0 0.0054 0.2 /
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTGW
|
||||||
|
-- Pg Rvw Bg Vg
|
||||||
|
100 0.0001 0.010 0.1
|
||||||
|
0.0 0.0104 0.1 /
|
||||||
|
200 0.0004 0.005 0.2
|
||||||
|
0.0 0.0054 0.2 /
|
||||||
|
/
|
||||||
|
|
||||||
|
SWOF
|
||||||
|
0.2 0 1 0.9
|
||||||
|
1 1 0 0.1
|
||||||
|
/
|
||||||
|
|
||||||
|
SGOF
|
||||||
|
0 0 1 0.2
|
||||||
|
0.8 1 0 0.5
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTW
|
||||||
|
--RefPres Bw Comp Vw Cv
|
||||||
|
1. 1.0 4.0E-5 0.96 0.0 /
|
||||||
|
|
||||||
|
|
||||||
|
ROCK
|
||||||
|
--RefPres Comp
|
||||||
|
1. 5.0E-5 /
|
||||||
|
|
||||||
|
DENSITY
|
||||||
|
700 1000 1
|
||||||
|
/
|
||||||
|
|
||||||
|
SOLUTION ======
|
||||||
|
|
||||||
|
EQUIL
|
||||||
|
45 150 45 0.25 45 0.35 1* 1* 0 1* 1* 1*
|
||||||
|
/
|
||||||
|
|
||||||
|
RPTSOL
|
||||||
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RV' 'RVW' 'RESTART=2' /
|
||||||
|
|
||||||
|
SUMMARY ======
|
||||||
|
RUNSUM
|
||||||
|
|
||||||
|
SEPARATE
|
||||||
|
|
||||||
|
SCHEDULE ======
|
||||||
|
|
||||||
|
TSTEP
|
||||||
|
1 /
|
||||||
|
|
||||||
|
RPTSCHED
|
||||||
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RV' 'RVW' 'RESTART=3' 'NEWTON=2' /
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
@@ -135,7 +135,7 @@ RVVD
|
|||||||
100. 0.0001 /
|
100. 0.0001 /
|
||||||
|
|
||||||
RPTSOL
|
RPTSOL
|
||||||
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RESTART=2' /
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RV' 'RESTART=2' /
|
||||||
|
|
||||||
SUMMARY ======
|
SUMMARY ======
|
||||||
RUNSUM
|
RUNSUM
|
||||||
@@ -148,7 +148,7 @@ TSTEP
|
|||||||
1 /
|
1 /
|
||||||
|
|
||||||
RPTSCHED
|
RPTSCHED
|
||||||
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RESTART=3' 'NEWTON=2' /
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RV' 'RESTART=3' 'NEWTON=2' /
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
NOECHO
|
||||||
|
|
||||||
|
RUNSPEC ======
|
||||||
|
|
||||||
|
WATER
|
||||||
|
OIL
|
||||||
|
GAS
|
||||||
|
DISGAS
|
||||||
|
VAPOIL
|
||||||
|
VAPWAT
|
||||||
|
|
||||||
|
TABDIMS
|
||||||
|
1 1 40 20 1 20 /
|
||||||
|
|
||||||
|
DIMENS
|
||||||
|
1 1 20
|
||||||
|
/
|
||||||
|
|
||||||
|
WELLDIMS
|
||||||
|
30 10 2 30 /
|
||||||
|
|
||||||
|
START
|
||||||
|
1 'JAN' 1990 /
|
||||||
|
|
||||||
|
NSTACK
|
||||||
|
25 /
|
||||||
|
|
||||||
|
EQLDIMS
|
||||||
|
-- NTEQUL
|
||||||
|
1 /
|
||||||
|
|
||||||
|
|
||||||
|
FMTOUT
|
||||||
|
FMTIN
|
||||||
|
|
||||||
|
GRID ======
|
||||||
|
|
||||||
|
DXV
|
||||||
|
1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
DYV
|
||||||
|
1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
DZV
|
||||||
|
20*5.0
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
PORO
|
||||||
|
20*0.2
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
PERMZ
|
||||||
|
20*1.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PERMY
|
||||||
|
20*100.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PERMX
|
||||||
|
20*100.0
|
||||||
|
/
|
||||||
|
|
||||||
|
BOX
|
||||||
|
1 1 1 1 1 1 /
|
||||||
|
|
||||||
|
TOPS
|
||||||
|
0.0
|
||||||
|
/
|
||||||
|
|
||||||
|
PROPS ======
|
||||||
|
|
||||||
|
PVTO
|
||||||
|
-- Rs Pbub Bo Vo
|
||||||
|
0 1. 1.0000 1.20 /
|
||||||
|
20 40. 1.0120 1.17 /
|
||||||
|
40 80. 1.0255 1.14 /
|
||||||
|
60 120. 1.0380 1.11 /
|
||||||
|
80 160. 1.0510 1.08 /
|
||||||
|
100 200. 1.0630 1.06 /
|
||||||
|
120 240. 1.0750 1.03 /
|
||||||
|
140 280. 1.0870 1.00 /
|
||||||
|
160 320. 1.0985 .98 /
|
||||||
|
180 360. 1.1100 .95 /
|
||||||
|
200 400. 1.1200 .94
|
||||||
|
500. 1.1189 .94 /
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTG
|
||||||
|
-- Pg Rv Bg Vg
|
||||||
|
100 0.0001 0.010 0.1
|
||||||
|
0.0 0.0104 0.1 /
|
||||||
|
200 0.0004 0.005 0.2
|
||||||
|
0.0 0.0054 0.2 /
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTGW
|
||||||
|
-- Pg Rvw Bg Vg
|
||||||
|
100 0.0001 0.010 0.1
|
||||||
|
0.0 0.0104 0.1 /
|
||||||
|
200 0.0004 0.005 0.2
|
||||||
|
0.0 0.0054 0.2 /
|
||||||
|
/
|
||||||
|
|
||||||
|
SWOF
|
||||||
|
0.2 0 1 0.9
|
||||||
|
1 1 0 0.1
|
||||||
|
/
|
||||||
|
|
||||||
|
SGOF
|
||||||
|
0 0 1 0.2
|
||||||
|
0.8 1 0 0.5
|
||||||
|
/
|
||||||
|
|
||||||
|
PVTW
|
||||||
|
--RefPres Bw Comp Vw Cv
|
||||||
|
1. 1.0 4.0E-5 0.96 0.0 /
|
||||||
|
|
||||||
|
|
||||||
|
ROCK
|
||||||
|
--RefPres Comp
|
||||||
|
1. 5.0E-5 /
|
||||||
|
|
||||||
|
DENSITY
|
||||||
|
700 1000 1
|
||||||
|
/
|
||||||
|
|
||||||
|
SOLUTION ======
|
||||||
|
|
||||||
|
EQUIL
|
||||||
|
45 150 45 0.25 45 0.35 1 1 0 1* 1* 1
|
||||||
|
/
|
||||||
|
|
||||||
|
RSVD
|
||||||
|
0 0.0
|
||||||
|
100 100. /
|
||||||
|
|
||||||
|
RVVD
|
||||||
|
0. 0.
|
||||||
|
100. 0.0001 /
|
||||||
|
|
||||||
|
RVWVD
|
||||||
|
0. 0.
|
||||||
|
100. 0.0001 /
|
||||||
|
|
||||||
|
RPTSOL
|
||||||
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RV' 'RVW' 'RESTART=2' /
|
||||||
|
|
||||||
|
SUMMARY ======
|
||||||
|
RUNSUM
|
||||||
|
|
||||||
|
SEPARATE
|
||||||
|
|
||||||
|
SCHEDULE ======
|
||||||
|
|
||||||
|
TSTEP
|
||||||
|
1 /
|
||||||
|
|
||||||
|
RPTSCHED
|
||||||
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RV' 'RVW' 'RESTART=3' 'NEWTON=2' /
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
@@ -115,7 +115,7 @@ EQUIL
|
|||||||
/
|
/
|
||||||
|
|
||||||
RPTSOL
|
RPTSOL
|
||||||
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RESTART=2' /
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RV' 'RESTART=2' /
|
||||||
|
|
||||||
SUMMARY ======
|
SUMMARY ======
|
||||||
RUNSUM
|
RUNSUM
|
||||||
@@ -128,7 +128,7 @@ TSTEP
|
|||||||
1 /
|
1 /
|
||||||
|
|
||||||
RPTSCHED
|
RPTSCHED
|
||||||
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RS' 'RESTART=3' 'NEWTON=2' /
|
'PRES' 'PGAS' 'PWAT' 'SOIL' 'SWAT' 'SGAS' 'RV' 'RESTART=3' 'NEWTON=2' /
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
||||||
+149
-3
@@ -81,13 +81,27 @@ namespace TTag {
|
|||||||
struct TestEquilTypeTag {
|
struct TestEquilTypeTag {
|
||||||
using InheritsFrom = std::tuple<FlowModelParameters, EclBaseProblem, BlackOilModel>;
|
using InheritsFrom = std::tuple<FlowModelParameters, EclBaseProblem, BlackOilModel>;
|
||||||
};
|
};
|
||||||
|
struct TestEquilVapwatTypeTag {
|
||||||
|
using InheritsFrom = std::tuple<FlowModelParameters, EclBaseProblem, BlackOilModel>;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EclWellModel<TypeTag, TTag::TestEquilTypeTag> {
|
struct EclWellModel<TypeTag, TTag::TestEquilTypeTag> {
|
||||||
using type = BlackoilWellModel<TypeTag>;
|
using type = BlackoilWellModel<TypeTag>;
|
||||||
};
|
};
|
||||||
|
template<class TypeTag>
|
||||||
|
struct EnableEvaporation<TypeTag, TTag::TestEquilTypeTag> {
|
||||||
|
static constexpr bool value = true;
|
||||||
|
};
|
||||||
|
template<class TypeTag>
|
||||||
|
struct EclWellModel<TypeTag, TTag::TestEquilVapwatTypeTag> {
|
||||||
|
using type = BlackoilWellModel<TypeTag>;
|
||||||
|
};
|
||||||
|
template<class TypeTag>
|
||||||
|
struct EnableEvaporation<TypeTag, TTag::TestEquilVapwatTypeTag> {
|
||||||
|
static constexpr bool value = true;
|
||||||
|
};
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
@@ -776,11 +790,11 @@ BOOST_AUTO_TEST_CASE(DeckWithLiveOil)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(DeckWithLiveGas)
|
BOOST_AUTO_TEST_CASE(DeckWithWetGas)
|
||||||
{
|
{
|
||||||
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
||||||
using FluidSystem = Opm::GetPropType<TypeTag, Opm::Properties::FluidSystem>;
|
using FluidSystem = Opm::GetPropType<TypeTag, Opm::Properties::FluidSystem>;
|
||||||
auto simulator = initSimulator<TypeTag>("equil_livegas.DATA");
|
auto simulator = initSimulator<TypeTag>("equil_wetgas.DATA");
|
||||||
const auto& eclipseState = simulator->vanguard().eclState();
|
const auto& eclipseState = simulator->vanguard().eclState();
|
||||||
Opm::GridManager gm(eclipseState.getInputGrid());
|
Opm::GridManager gm(eclipseState.getInputGrid());
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
@@ -858,6 +872,67 @@ BOOST_AUTO_TEST_CASE(DeckWithLiveGas)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(DeckWithHumidWetGas)
|
||||||
|
{
|
||||||
|
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
||||||
|
using FluidSystem = Opm::GetPropType<TypeTag, Opm::Properties::FluidSystem>;
|
||||||
|
FluidSystem::setEnableVaporizedWater(true);
|
||||||
|
auto simulator = initSimulator<TypeTag>("equil_humidwetgas.DATA");
|
||||||
|
const auto& eclipseState = simulator->vanguard().eclState();
|
||||||
|
Opm::GridManager gm(eclipseState.getInputGrid());
|
||||||
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
|
|
||||||
|
EquilFixture::Initializer comp(*simulator->problem().materialLawManager(),
|
||||||
|
eclipseState,
|
||||||
|
simulator->vanguard().grid(),
|
||||||
|
simulator->vanguard().gridView(),
|
||||||
|
simulator->vanguard().cartesianMapper(), 9.80665);
|
||||||
|
const auto& pressures = comp.press();
|
||||||
|
BOOST_REQUIRE_EQUAL(pressures.size(), 3U);
|
||||||
|
BOOST_REQUIRE_EQUAL(int(pressures[0].size()), grid.number_of_cells);
|
||||||
|
|
||||||
|
const int first = 0, last = grid.number_of_cells - 1;
|
||||||
|
const double reltol = 1.0e-1;
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::waterPhaseIdx][first], 1.480599988e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::waterPhaseIdx][last], 1.549297524e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::oilPhaseIdx][first], 1.489599988e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::oilPhaseIdx][last], 1.550297524e7, reltol);
|
||||||
|
|
||||||
|
const auto& sats = comp.saturation();
|
||||||
|
std::vector<double> s_opm[3];
|
||||||
|
s_opm[FluidSystem::waterPhaseIdx] = { 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.35838026, 0.64069098, 0.9154626, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||||
|
s_opm[FluidSystem::oilPhaseIdx] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02738364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
s_opm[FluidSystem::gasPhaseIdx] = { 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.64161973, 0.359309012, 0.057153701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
for (int phase = 0; phase < 3; ++phase) {
|
||||||
|
BOOST_REQUIRE_EQUAL(sats[phase].size(), s_opm[phase].size());
|
||||||
|
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
|
||||||
|
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], 100.*reltol);
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto& rv = comp.rv();
|
||||||
|
const std::vector<double> rv_opm {
|
||||||
|
0.00024837999651755729, 0.00024869285236692635, 0.00024900604366769004, 0.00024931957094322978,
|
||||||
|
0.00024963343471801471, 0.00024994763551760586, 0.00025026217386865733, 0.00025057705029892072,
|
||||||
|
0.00025089226533724643, 0.00025120780158539152, 0.00025105, 0.00025105,
|
||||||
|
0.00025105, 0.00025105, 0.00025105, 0.00025105,
|
||||||
|
0.00025105, 0.00025105, 0.00025105, 0.00025105};
|
||||||
|
|
||||||
|
const auto& rvw = comp.rvw();
|
||||||
|
const std::vector<double> rvw_opm {
|
||||||
|
0.00024837999651755729, 0.00024869285236692635, 0.00024900604366769004, 0.00024931957094322978,
|
||||||
|
0.00024963343471801471, 0.00024994763551760586, 0.00025026217386865733, 0.00025057705029892072,
|
||||||
|
0.00025089226533724643, 0.00025120780158539152, 0.00025236969680655122, 0.00025384953117447344,
|
||||||
|
0.00025532939474124625, 0.00025680928750801825, 0.00025828920947593858, 0.00025976916064615645,
|
||||||
|
0.00026124914101982041, 0.00026272915059807997, 0.0002642091893820838, 0.00026568925737298143};
|
||||||
|
|
||||||
|
for (size_t i = 0; i < rv_opm.size(); ++i) {
|
||||||
|
BOOST_CHECK_CLOSE(rv[i], rv_opm[i], reltol);
|
||||||
|
BOOST_CHECK_CLOSE(rvw[i], rvw_opm[i], reltol);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(DeckWithRSVDAndRVVD)
|
BOOST_AUTO_TEST_CASE(DeckWithRSVDAndRVVD)
|
||||||
{
|
{
|
||||||
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
||||||
@@ -1054,6 +1129,77 @@ BOOST_AUTO_TEST_CASE(DeckWithPBVDAndPDVD)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(DeckWithRSVDAndRVVDAndRVWVD)
|
||||||
|
{
|
||||||
|
using TypeTag = Opm::Properties::TTag::TestEquilTypeTag;
|
||||||
|
using FluidSystem = Opm::GetPropType<TypeTag, Opm::Properties::FluidSystem>;
|
||||||
|
FluidSystem::setEnableVaporizedWater(true);
|
||||||
|
auto simulator = initSimulator<TypeTag>("equil_rsvd_and_rvvd_and_rvwvd.DATA");
|
||||||
|
const auto& eclipseState = simulator->vanguard().eclState();
|
||||||
|
Opm::GridManager gm(eclipseState.getInputGrid());
|
||||||
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
|
|
||||||
|
EquilFixture::Initializer comp(*simulator->problem().materialLawManager(),
|
||||||
|
eclipseState,
|
||||||
|
simulator->vanguard().grid(),
|
||||||
|
simulator->vanguard().gridView(),
|
||||||
|
simulator->vanguard().cartesianMapper(), 9.80665);
|
||||||
|
const auto& pressures = comp.press();
|
||||||
|
BOOST_REQUIRE_EQUAL(pressures.size(), 3U);
|
||||||
|
BOOST_REQUIRE_EQUAL(int(pressures[0].size()), grid.number_of_cells);
|
||||||
|
|
||||||
|
const int first = 0, last = grid.number_of_cells - 1;
|
||||||
|
const double reltol = 1.0e-4;
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::waterPhaseIdx][first], 1.483359963e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::waterPhaseIdx][last], 1.549297524e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::oilPhaseIdx][first], 1.492359963e7, reltol);
|
||||||
|
BOOST_CHECK_CLOSE(pressures[FluidSystem::oilPhaseIdx][last], 1.550297524e7, reltol);
|
||||||
|
|
||||||
|
const auto& sats = comp.saturation();
|
||||||
|
std::vector<double> s_opm[3];
|
||||||
|
s_opm[FluidSystem::waterPhaseIdx] = { 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.32527877578987319, 0.62976875867666171, 0.918795223850500588, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||||
|
s_opm[FluidSystem::oilPhaseIdx] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.054786199472198836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
s_opm[FluidSystem::gasPhaseIdx] = { 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.674721224210102681, 0.37023124132333829, 0.026418562022795279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
for (int phase = 0; phase < 3; ++phase) {
|
||||||
|
BOOST_REQUIRE_EQUAL(sats[phase].size(), s_opm[phase].size());
|
||||||
|
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
|
||||||
|
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], reltol);
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto& rs = comp.rs();
|
||||||
|
const std::vector<double> rs_opm { // opm
|
||||||
|
74.617998198796087,74.652774471604374, 74.687905898686935, 74.723393674854691,
|
||||||
|
74.759238999357947, 74.795443075905553, 74.832007112684167, 74.892422092838459,
|
||||||
|
74.986801564438935, 75.088917653469338, 52.5, 57.5,
|
||||||
|
62.5, 67.5, 72.5, 76.528193441026076,
|
||||||
|
76.774856836636729, 77.021525099679991, 77.268198230347295, 77.514876228830232};
|
||||||
|
|
||||||
|
const auto& rv = comp.rv();
|
||||||
|
const std::vector<double> rv_opm {
|
||||||
|
2.5000000000000002e-06, 7.5000000000000002e-06, 1.2500000000000001e-05, 1.7500000000000002e-05,
|
||||||
|
2.2500000000000001e-05, 2.7500000000000004e-05, 3.2500000000000004e-05, 3.7500000000000003e-05,
|
||||||
|
4.2500000000000003e-05, 0.00025116322680309166, 5.2500000000000002e-05, 5.7500000000000002e-05,
|
||||||
|
6.2500000000000001e-05, 6.7500000000000001e-05, 7.25e-05, 7.75e-05,
|
||||||
|
8.25e-05, 8.7500000000000013e-05, 9.2500000000000012e-05, 9.7499999999999998e-05};
|
||||||
|
|
||||||
|
const auto& rvw = comp.rvw();
|
||||||
|
const std::vector<double> rvw_opm {
|
||||||
|
0.00024920798919277656, 0.00024941664682962629, 0.00024962743539212165, 0.00024984036204912818,
|
||||||
|
0.00025005543399614773, 0.00025027265845543336, 0.000250492042676105, 0.00025071359393426718,
|
||||||
|
0.00025093731953312241, 0.00025116322680309166, 0.00025236969680655122, 0.00025384953117447344,
|
||||||
|
0.00025532939474124625, 0.00025680928750801825, 0.00025828920947593858, 0.00025976916064615645,
|
||||||
|
0.00026124914101982041, 0.00026272915059807997, 0.0002642091893820838, 0.00026568925737298143};
|
||||||
|
|
||||||
|
for (size_t i = 0; i < rv_opm.size(); ++i) {
|
||||||
|
BOOST_CHECK_CLOSE(rs[i], rs_opm[i], reltol);
|
||||||
|
BOOST_CHECK_CLOSE(rv[i], rv_opm[i], reltol);
|
||||||
|
BOOST_CHECK_CLOSE(rvw[i], rvw_opm[i], reltol);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(DeckWithSwatinit)
|
BOOST_AUTO_TEST_CASE(DeckWithSwatinit)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user