port the RateConverter to use the FluidSystem instead of the old fluid property API

this makes the RateConverter stuff independent of Eigen and it
simplifies some things because the the old PVT API is designed as a
"bulk-with-derivatives" API while the rate converter code used it in
"single shot" mode without derivatives.
This commit is contained in:
Andreas Lauser
2016-12-29 16:56:31 +01:00
parent 66decb4bda
commit 5fd83985a9
7 changed files with 83 additions and 113 deletions

View File

@@ -87,10 +87,11 @@ BOOST_FIXTURE_TEST_CASE(Construction, TestFixture<SetupSimple>)
typedef std::vector<int> Region;
typedef Opm::BlackoilPropsAdFromDeck Props;
typedef Opm::RateConverter::
SurfaceToReservoirVoidage<Props, Region> RCvrt;
SurfaceToReservoirVoidage<Props::FluidSystem, Region> RCvrt;
Region reg{ 0 };
RCvrt cvrt(ad_props, reg);
int numCells = Opm::UgGridHelpers::numCells(*grid.c_grid());
RCvrt cvrt(ad_props.phaseUsage(), ad_props.cellPvtRegionIndex(), numCells, reg);
}
@@ -100,12 +101,13 @@ BOOST_FIXTURE_TEST_CASE(ThreePhase, TestFixture<SetupSimple>)
typedef std::vector<int> Region;
typedef Opm::BlackoilPropsAdFromDeck Props;
typedef Opm::RateConverter::
SurfaceToReservoirVoidage<Props, Region> RCvrt;
SurfaceToReservoirVoidage<Props::FluidSystem, Region> RCvrt;
Region reg{ 0 };
RCvrt cvrt(ad_props, reg);
int numCells = Opm::UgGridHelpers::numCells(*grid.c_grid());
RCvrt cvrt(ad_props.phaseUsage(), ad_props.cellPvtRegionIndex(), numCells, reg);
Opm::BlackoilState x( Opm::UgGridHelpers::numCells( *grid.c_grid()) , Opm::UgGridHelpers::numFaces( *grid.c_grid()) , 3);
Opm::BlackoilState x(numCells, Opm::UgGridHelpers::numFaces( *grid.c_grid()) , 3);
cvrt.defineState(x);