mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-23 07:53:29 -06:00
Add test case with capillary transition region.
This commit is contained in:
parent
b2be489e6e
commit
7d63cb9204
@ -398,4 +398,42 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE (DeckWithCapillary)
|
||||
{
|
||||
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||
Opm::EclipseGridParser deck("capillary.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.5351621345e7 , reltol);
|
||||
|
||||
const auto& sats = comp.saturation();
|
||||
const std::vector<double> s[3]{
|
||||
{ 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.425893333333, 0.774026666666, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
|
||||
{ 0, 0, 0, 0.00736, 0.792746666666, 0.8, 0.8, 0.8, 0.8, 0.574106666666, 0.225973333333, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0.8, 0.8, 0.8, 0.79264, 0.007253333333, 0, 0, 0, 0, 0, 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) {
|
||||
BOOST_CHECK_CLOSE(sats[phase][i], s[phase][i], reltol);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user