mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove unused classes.
After this, the two affected tests fail due to bugs in PVT region support in BlackoilPropsAdFromDeck.
This commit is contained in:
@@ -3,6 +3,7 @@ RUNSPEC
|
||||
|
||||
OIL
|
||||
WATER
|
||||
GAS
|
||||
|
||||
METRIC
|
||||
|
||||
@@ -47,11 +48,21 @@ PVCDO
|
||||
1 1 0 1000 0
|
||||
/
|
||||
|
||||
PVDG
|
||||
-- Pg Bg(Pg) mug
|
||||
1 1 1
|
||||
/
|
||||
|
||||
SWOF
|
||||
0 0 1 0
|
||||
1 1 0 0
|
||||
/
|
||||
|
||||
SGOF
|
||||
0 0 1 0
|
||||
1 1 0 0
|
||||
/
|
||||
|
||||
DENSITY
|
||||
800 1000 1
|
||||
/
|
||||
|
||||
@@ -26,13 +26,11 @@
|
||||
|
||||
#define BOOST_TEST_MODULE FluidPropertiesTest
|
||||
|
||||
#include <opm/autodiff/BlackoilPropsAd.hpp>
|
||||
#include <opm/autodiff/BlackoilPropsAdFromDeck.hpp>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/core/grid/GridManager.hpp>
|
||||
#include <opm/core/props/BlackoilPropertiesFromDeck.hpp>
|
||||
#include <opm/core/utility/Units.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
|
||||
@@ -70,8 +68,7 @@ struct TestFixture : public Setup
|
||||
TestFixture()
|
||||
: Setup()
|
||||
, grid (deck)
|
||||
, props(deck, eclState, *grid.c_grid(), param,
|
||||
param.getDefault("init_rock", false))
|
||||
, boprops_ad(deck, eclState, *grid.c_grid(), param.getDefault("init_rock", false))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -79,8 +76,8 @@ struct TestFixture : public Setup
|
||||
using Setup::deck;
|
||||
using Setup::eclState;
|
||||
|
||||
Opm::GridManager grid;
|
||||
Opm::BlackoilPropertiesFromDeck props;
|
||||
Opm::GridManager grid;
|
||||
Opm::BlackoilPropsAdFromDeck boprops_ad;
|
||||
};
|
||||
|
||||
template <class Setup>
|
||||
@@ -105,7 +102,6 @@ struct TestFixtureAd : public Setup
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(Construction, TestFixture<SetupSimple>)
|
||||
{
|
||||
Opm::BlackoilPropsAd boprops_ad(props);
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(SubgridConstruction, TestFixtureAd<SetupSimple>)
|
||||
@@ -115,29 +111,24 @@ BOOST_FIXTURE_TEST_CASE(SubgridConstruction, TestFixtureAd<SetupSimple>)
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(SurfaceDensity, TestFixture<SetupSimple>)
|
||||
{
|
||||
Opm::BlackoilPropsAd boprops_ad(props);
|
||||
|
||||
const double* rho0 = props .surfaceDensity();
|
||||
const double* rho0AD = boprops_ad.surfaceDensity();
|
||||
|
||||
enum { Water = Opm::BlackoilPropsAd::Water };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Water ], rho0[ Water ]);
|
||||
enum { Water = Opm::BlackoilPropsAdFromDeck::Water };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Water ], 1000.0);
|
||||
|
||||
enum { Oil = Opm::BlackoilPropsAd::Oil };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Oil ], rho0[ Oil ]);
|
||||
enum { Oil = Opm::BlackoilPropsAdFromDeck::Oil };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Oil ], 800.0);
|
||||
|
||||
enum { Gas = Opm::BlackoilPropsAd::Gas };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Gas ], rho0[ Gas ]);
|
||||
enum { Gas = Opm::BlackoilPropsAdFromDeck::Gas };
|
||||
BOOST_CHECK_EQUAL(rho0AD[ Gas ], 1.0);
|
||||
}
|
||||
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(ViscosityValue, TestFixture<SetupSimple>)
|
||||
{
|
||||
Opm::BlackoilPropsAd boprops_ad(props);
|
||||
const Opm::BlackoilPropsAdFromDeck::Cells cells(5, 0);
|
||||
|
||||
const Opm::BlackoilPropsAd::Cells cells(5, 0);
|
||||
|
||||
typedef Opm::BlackoilPropsAd::V V;
|
||||
typedef Opm::BlackoilPropsAdFromDeck::V V;
|
||||
|
||||
V Vpw;
|
||||
Vpw.resize(cells.size());
|
||||
@@ -150,7 +141,11 @@ BOOST_FIXTURE_TEST_CASE(ViscosityValue, TestFixture<SetupSimple>)
|
||||
// standard temperature
|
||||
V T = V::Constant(cells.size(), 273.15+20);
|
||||
|
||||
const Opm::BlackoilPropsAd::V VmuWat = boprops_ad.muWat(Vpw, T, cells);
|
||||
BOOST_REQUIRE_EQUAL(Vpw.size(), cells.size());
|
||||
|
||||
const Opm::BlackoilPropsAdFromDeck::V VmuWat = boprops_ad.muWat(Vpw, T, cells);
|
||||
|
||||
BOOST_REQUIRE_EQUAL(Vpw.size(), cells.size());
|
||||
|
||||
// Zero pressure dependence in water viscosity
|
||||
for (V::Index i = 0, n = VmuWat.size(); i < n; ++i) {
|
||||
@@ -161,11 +156,9 @@ BOOST_FIXTURE_TEST_CASE(ViscosityValue, TestFixture<SetupSimple>)
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(ViscosityAD, TestFixture<SetupSimple>)
|
||||
{
|
||||
Opm::BlackoilPropsAd boprops_ad(props);
|
||||
const Opm::BlackoilPropsAdFromDeck::Cells cells(5, 0);
|
||||
|
||||
const Opm::BlackoilPropsAd::Cells cells(5, 0);
|
||||
|
||||
typedef Opm::BlackoilPropsAd::V V;
|
||||
typedef Opm::BlackoilPropsAdFromDeck::V V;
|
||||
|
||||
V Vpw;
|
||||
Vpw.resize(cells.size());
|
||||
@@ -178,13 +171,13 @@ BOOST_FIXTURE_TEST_CASE(ViscosityAD, TestFixture<SetupSimple>)
|
||||
// standard temperature
|
||||
V T = V::Constant(cells.size(), 273.15+20);
|
||||
|
||||
typedef Opm::BlackoilPropsAd::ADB ADB;
|
||||
typedef Opm::BlackoilPropsAdFromDeck::ADB ADB;
|
||||
|
||||
const V VmuWat = boprops_ad.muWat(Vpw, T, cells);
|
||||
for (V::Index i = 0, n = Vpw.size(); i < n; ++i) {
|
||||
const std::vector<int> bp(1, grid.c_grid()->number_of_cells);
|
||||
|
||||
const Opm::BlackoilPropsAd::Cells c(1, 0);
|
||||
const Opm::BlackoilPropsAdFromDeck::Cells c(1, 0);
|
||||
const V pw = V(1, 1) * Vpw[i];
|
||||
const ADB Apw = ADB::variable(0, pw, bp);
|
||||
const ADB AT = ADB::constant(T);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <opm/autodiff/RateConverter.hpp>
|
||||
|
||||
#include <opm/autodiff/BlackoilPropsAd.hpp>
|
||||
#include <opm/autodiff/BlackoilPropsAdFromDeck.hpp>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
@@ -69,8 +69,7 @@ struct TestFixture : public Setup
|
||||
TestFixture()
|
||||
: Setup()
|
||||
, grid (deck)
|
||||
, props(deck, eclState, *grid.c_grid(), param,
|
||||
param.getDefault("init_rock", false))
|
||||
, ad_props(deck, eclState, *grid.c_grid(), param.getDefault("init_rock", false))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -78,20 +77,19 @@ struct TestFixture : public Setup
|
||||
using Setup::deck;
|
||||
using Setup::eclState;
|
||||
|
||||
Opm::GridManager grid;
|
||||
Opm::BlackoilPropertiesFromDeck props;
|
||||
Opm::GridManager grid;
|
||||
Opm::BlackoilPropsAdFromDeck ad_props;
|
||||
};
|
||||
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(Construction, TestFixture<SetupSimple>)
|
||||
{
|
||||
typedef std::vector<int> Region;
|
||||
typedef Opm::BlackoilPropsAd Props;
|
||||
typedef Opm::BlackoilPropsAdFromDeck Props;
|
||||
typedef Opm::RateConverter::
|
||||
SurfaceToReservoirVoidage<Props, Region> RCvrt;
|
||||
|
||||
Region reg{ 0 };
|
||||
Props ad_props(props);
|
||||
RCvrt cvrt(ad_props, reg);
|
||||
}
|
||||
|
||||
@@ -100,12 +98,11 @@ BOOST_FIXTURE_TEST_CASE(TwoPhaseII, TestFixture<SetupSimple>)
|
||||
{
|
||||
// Immiscible and incompressible two-phase fluid
|
||||
typedef std::vector<int> Region;
|
||||
typedef Opm::BlackoilPropsAd Props;
|
||||
typedef Opm::BlackoilPropsAdFromDeck Props;
|
||||
typedef Opm::RateConverter::
|
||||
SurfaceToReservoirVoidage<Props, Region> RCvrt;
|
||||
|
||||
Region reg{ 0 };
|
||||
Props ad_props(props);
|
||||
RCvrt cvrt(ad_props, reg);
|
||||
|
||||
Opm::BlackoilState x;
|
||||
|
||||
Reference in New Issue
Block a user