Merge pull request #1281 from totto82/fixRESV

Use pore volume weighted averaged hydrocarbon state in rateConverted.
This commit is contained in:
Atgeirr Flø Rasmussen
2017-10-09 13:42:43 +02:00
committed by GitHub
8 changed files with 160 additions and 236 deletions

View File

@@ -90,8 +90,7 @@ BOOST_FIXTURE_TEST_CASE(Construction, TestFixture<SetupSimple>)
SurfaceToReservoirVoidage<Props::FluidSystem, Region> RCvrt;
Region reg{ 0 };
int numCells = Opm::UgGridHelpers::numCells(*grid.c_grid());
RCvrt cvrt(ad_props.phaseUsage(), ad_props.cellPvtRegionIndex(), numCells, reg);
RCvrt cvrt(ad_props.phaseUsage(), reg);
}
@@ -105,18 +104,17 @@ BOOST_FIXTURE_TEST_CASE(ThreePhase, TestFixture<SetupSimple>)
Region reg{ 0 };
int numCells = Opm::UgGridHelpers::numCells(*grid.c_grid());
RCvrt cvrt(ad_props.phaseUsage(), ad_props.cellPvtRegionIndex(), numCells, reg);
RCvrt cvrt(ad_props.phaseUsage(), reg);
Opm::BlackoilState x(numCells, Opm::UgGridHelpers::numFaces( *grid.c_grid()) , 3);
cvrt.defineState(x);
std::vector<double> qs{1.0e3, 1.0e1, 1.0e-1};
std::vector<double> coeff(qs.size(), 0.0);
std::vector<double> coeff(3, 0.0);
// Immiscible and incompressible: All coefficients are one (1),
// irrespective of actual surface rates.
cvrt.calcCoeff(qs, 0, coeff);
cvrt.calcCoeff(0, 0, coeff);
BOOST_CHECK_CLOSE(coeff[0], 1.0, 1.0e-6);
BOOST_CHECK_CLOSE(coeff[1], 1.0, 1.0e-6);
BOOST_CHECK_CLOSE(coeff[2], 1.0, 1.0e-6);