Add test for live oil initialisation.

The test is not finished or verified yet.
This commit is contained in:
Atgeirr Flø Rasmussen 2014-02-27 08:31:51 +01:00
parent 5a00d85467
commit 7cc0802f3e
3 changed files with 94 additions and 0 deletions

View File

@ -186,6 +186,7 @@ list (APPEND TEST_DATA_FILES
tests/capillary.DATA
tests/capillary_overlap.DATA
tests/deadfluids.DATA
tests/equil_liveoil.DATA
)
# originally generated with the command:

46
tests/equil_liveoil.DATA Normal file
View File

@ -0,0 +1,46 @@
WATER
OIL
GAS
DISGAS
PVTO
-- Rs Pbub Bo Vo
0 1. 1.0000 1.20 /
100 40. 1.0120 1.17 /
200 80. 1.0255 1.14 /
300 120. 1.0380 1.11 /
400 160. 1.0510 1.08 /
500 200. 1.0630 1.06 /
600 240. 1.0750 1.03 /
700 280. 1.0870 1.00 /
800 320. 1.0985 .98 /
900 360. 1.1100 .95 /
1000 400. 1.1200 .94
500. 1.1189 .94 /
/
PVDG
100 0.010 0.1
200 0.005 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
/
DENSITY
700 1000 1
/
EQUIL
50 150 50 0.25 45 0.35
/

View File

@ -480,4 +480,51 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
}
BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
{
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::EclipseGridParser deck("equil_liveoil.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::Equil::DeckDependent::PhasePressureSaturationComputer<Opm::EclipseGridParser> comp(props, deck, grid, 10.0);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
const int first = 0, last = grid.number_of_cells - 1;
// The relative tolerance is too loose to be very useful,
// but the answer we are checking is the result of an ODE
// solver, and it is unclear if we should check it against
// the true answer or something else.
const double reltol = 1.0e-6;
BOOST_CHECK_CLOSE(pressures[0][first] , 1.45e7 , reltol);
BOOST_CHECK_CLOSE(pressures[0][last ] , 1.545e7 , reltol);
BOOST_CHECK_CLOSE(pressures[1][last] , 1.5489764605846416e7 , reltol);
const auto& sats = comp.saturation();
// std::cout << "Saturations:\n";
// for (const auto& sat : sats) {
// for (const double s : sat) {
// std::cout << s << ' ';
// }
// std::cout << std::endl;
// }
const std::vector<double> s[3]{
{ 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.223141818182, 0.532269090909, 0.78471, 0.91526, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.207743333333, 0.08474, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.776858181818, 0.467730909091, 0.0075466666666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
for (int phase = 0; phase < 3; ++phase) {
BOOST_REQUIRE(sats[phase].size() == s[phase].size());
for (size_t i = 0; i < s[phase].size(); ++i) {
std::cout << sats[phase][i] << '\n';
//BOOST_CHECK_CLOSE(sats[phase][i], s[phase][i], reltol);
}
std::cout << std::endl;
}
}
BOOST_AUTO_TEST_SUITE_END()