Move enum CompletionOrder to Connection class

This commit is contained in:
Joakim Hove
2019-08-28 07:06:58 +02:00
parent 15e192876e
commit a2fc480e16
14 changed files with 68 additions and 83 deletions

View File

@@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
}
BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL( 0U , well.getConnections( ).size() );
}
@@ -200,7 +200,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
// HACK: This test checks correctly setting of isProducer/isInjector. This property depends on which of
// WellProductionProperties/WellInjectionProperties is set last, independent of actual values.
{
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
/* 1: Well is created as producer */
@@ -218,7 +218,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
{
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
/* Set a reservoir injection rate => Well becomes an Injector */
auto injectionProps2 = std::make_shared<Opm::Well2::WellInjectionProperties>(well.getInjectionProperties());
@@ -229,7 +229,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
}
{
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
/* Set rates => Well becomes a producer; injection rate should be set to 0. */
auto injectionProps3 = std::make_shared<Opm::Well2::WellInjectionProperties>(well.getInjectionProperties());
@@ -252,7 +252,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
}
BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
Opm::Well2 well("WELL1" , "G1", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "G1", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL("G1" , well.groupName());
well.updateGroup( "GROUP2");
@@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL(23, well.getHeadI());
BOOST_CHECK_EQUAL(42, well.getHeadJ());
@@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
auto productionProps = std::make_shared<Opm::WellProductionProperties>(well.getProductionProperties());
@@ -291,7 +291,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
BOOST_AUTO_TEST_CASE(InjectorType) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
auto injectionProps = std::make_shared<Opm::Well2::WellInjectionProperties>(well.getInjectionProperties());
injectionProps->injectorType = Opm::Well2::InjectorType::WATER;
@@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE(InjectorType) {
BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK( !well.getProductionProperties().hasProductionControl( Opm::WellProducer::ORAT ));
@@ -354,7 +354,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1", "GROUP", 0, 1, 23, 42, 2334.32, Opm::Phase::WATER, WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK( !well.getInjectionProperties().hasInjectionControl( Opm::Well2::InjectorCMode::RATE ));
BOOST_CHECK( !well.getInjectionProperties().hasInjectionControl( Opm::Well2::InjectorCMode::RESV ));
@@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
/*********************************************************************/
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase());
@@ -407,7 +407,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
}
BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) {
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor());
BOOST_CHECK( well.updateEfficiencyFactor(0.9));
@@ -758,7 +758,7 @@ BOOST_AUTO_TEST_CASE(CMODE_DEFAULT) {
BOOST_AUTO_TEST_CASE(WELL_CONTROLS) {
Opm::Well2 well("WELL", "GROUP", 0, 0, 0, 0, 1000, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Opm::WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 well("WELL", "GROUP", 0, 0, 0, 0, 1000, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Opm::Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::WellProductionProperties prod("OP1");
Opm::SummaryState st;
well.productionControls(st);
@@ -779,8 +779,8 @@ BOOST_AUTO_TEST_CASE(WELL_CONTROLS) {
BOOST_AUTO_TEST_CASE(ExtraAccessors) {
Opm::Well2 inj("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 prod("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, WellCompletion::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 inj("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
Opm::Well2 prod("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::WellProducer::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
auto inj_props= std::make_shared<Opm::Well2::WellInjectionProperties>(inj.getInjectionProperties());
inj_props->VFPTableNumber = 100;