mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user