Merge pull request #1179 from GitPaean/fixing_history_matching_well_1
Fixing history matching wells part 1
This commit is contained in:
@@ -808,10 +808,10 @@ BOOST_AUTO_TEST_CASE(testWellNameInWellNamePattern) {
|
||||
|
||||
namespace {
|
||||
namespace WCONHIST {
|
||||
std::string all_specified_CMODE_BHP() {
|
||||
std::string all_specified_CMODE_THP() {
|
||||
const std::string input =
|
||||
"WCONHIST\n"
|
||||
"'P' 'OPEN' 'BHP' 1 2 3/\n/\n";
|
||||
"'P' 'OPEN' 'THP' 1 2 3/\n/\n";
|
||||
|
||||
return input;
|
||||
}
|
||||
@@ -903,18 +903,15 @@ BOOST_AUTO_TEST_CASE(WCH_All_Specified_BHP_Defaulted)
|
||||
const Opm::WellProductionProperties& p =
|
||||
WCONHIST::properties(WCONHIST::all_specified());
|
||||
|
||||
// WCONHIST always supports {O,W,G}RAT, LRAT, and
|
||||
// RESV--irrespective of actual specification.
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
|
||||
BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::ORAT);
|
||||
|
||||
// BHP must be explicitly provided/specified
|
||||
BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_ORAT_Defaulted_BHP_Defaulted)
|
||||
@@ -922,17 +919,14 @@ BOOST_AUTO_TEST_CASE(WCH_ORAT_Defaulted_BHP_Defaulted)
|
||||
const Opm::WellProductionProperties& p =
|
||||
WCONHIST::properties(WCONHIST::orat_defaulted());
|
||||
|
||||
// WCONHIST always supports {O,W,G}RAT, LRAT, and
|
||||
// RESV--irrespective of actual specification.
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::WRAT);
|
||||
|
||||
// BHP must be explicitly provided/specified
|
||||
BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_OWRAT_Defaulted_BHP_Defaulted)
|
||||
@@ -940,17 +934,14 @@ BOOST_AUTO_TEST_CASE(WCH_OWRAT_Defaulted_BHP_Defaulted)
|
||||
const Opm::WellProductionProperties& p =
|
||||
WCONHIST::properties(WCONHIST::owrat_defaulted());
|
||||
|
||||
// WCONHIST always supports {O,W,G}RAT, LRAT, and
|
||||
// RESV--irrespective of actual specification.
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::GRAT);
|
||||
|
||||
// BHP must be explicitly provided/specified
|
||||
BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Defaulted)
|
||||
@@ -958,17 +949,14 @@ BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Defaulted)
|
||||
const Opm::WellProductionProperties& p =
|
||||
WCONHIST::properties(WCONHIST::all_defaulted());
|
||||
|
||||
// WCONHIST always supports {O,W,G}RAT, LRAT, and
|
||||
// RESV--irrespective of actual specification.
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::LRAT);
|
||||
|
||||
// BHP must be explicitly provided/specified
|
||||
BOOST_CHECK(! p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Specified)
|
||||
@@ -976,27 +964,21 @@ BOOST_AUTO_TEST_CASE(WCH_Rates_Defaulted_BHP_Specified)
|
||||
const Opm::WellProductionProperties& p =
|
||||
WCONHIST::properties(WCONHIST::all_defaulted_with_bhp());
|
||||
|
||||
// WCONHIST always supports {O,W,G}RAT, LRAT, and
|
||||
// RESV--irrespective of actual specification.
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::ORAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::WRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::GRAT));
|
||||
BOOST_CHECK( !p.hasProductionControl(Opm::WellProducer::LRAT));
|
||||
BOOST_CHECK(p.hasProductionControl(Opm::WellProducer::RESV));
|
||||
|
||||
BOOST_CHECK_EQUAL(p.controlMode , Opm::WellProducer::RESV);
|
||||
|
||||
/*
|
||||
BHP in WCONHIST is not an available control; just information
|
||||
about the historical BHP.
|
||||
*/
|
||||
BOOST_CHECK_EQUAL(false , p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
BOOST_CHECK_EQUAL(true, p.hasProductionControl(Opm::WellProducer::BHP));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(BHP_CMODE)
|
||||
{
|
||||
BOOST_CHECK_THROW( WCONHIST::properties(WCONHIST::all_specified_CMODE_BHP()) , std::invalid_argument);
|
||||
BOOST_CHECK_THROW( WCONHIST::properties(WCONHIST::all_specified_CMODE_THP()) , std::invalid_argument);
|
||||
BOOST_CHECK_THROW( WCONPROD::properties(WCONPROD::all_specified_CMODE_BHP()) , std::invalid_argument);
|
||||
}
|
||||
|
||||
|
||||
@@ -199,8 +199,8 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
const WellProductionProperties& prop3 = well2->getProductionProperties(3);
|
||||
BOOST_CHECK_EQUAL( WellProducer::ORAT , prop3.controlMode);
|
||||
BOOST_CHECK( prop3.hasProductionControl(WellProducer::ORAT));
|
||||
BOOST_CHECK( prop3.hasProductionControl(WellProducer::GRAT));
|
||||
BOOST_CHECK( prop3.hasProductionControl(WellProducer::WRAT));
|
||||
BOOST_CHECK( !prop3.hasProductionControl(WellProducer::GRAT));
|
||||
BOOST_CHECK( !prop3.hasProductionControl(WellProducer::WRAT));
|
||||
}
|
||||
|
||||
// BOOST_CHECK( !well2->getProductionProperties(8).hasProductionControl(WellProducer::GRAT));
|
||||
|
||||
Reference in New Issue
Block a user