Additional changes to create restart group data in general and igrp data in particular
This commit is contained in:
@@ -63,7 +63,7 @@ inline std::ostream& operator<<( std::ostream& stream, const Well& well ) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
BOOST_CHECK_EQUAL( "WELL1" , well.name() );
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
|
||||
}
|
||||
@@ -71,10 +71,10 @@ BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) {
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_Equals) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
auto timeMap2 = createXDaysTimeMap(11);
|
||||
Opm::Well well1("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well2("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well3("WELL3" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well4("WELL3" , 0, 0, 0.0, Opm::Phase::OIL, timeMap2 , 0);
|
||||
Opm::Well well1("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well2("WELL1" , 2, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well3("WELL3" , 3, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well4("WELL3" , 4, 0, 0, 0.0, Opm::Phase::OIL, timeMap2 , 0);
|
||||
BOOST_CHECK_EQUAL( well1, well1 );
|
||||
BOOST_CHECK_EQUAL( well2, well1 );
|
||||
BOOST_CHECK( well1 == well2 );
|
||||
@@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_Equals) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(&(well.getProductionProperties(5)), &(well.getProductionProperties(5)));
|
||||
BOOST_CHECK_EQUAL(&(well.getProductionProperties(8)), &(well.getProductionProperties(8)));
|
||||
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(&(well.getInjectionProperties(5)), &(well.getInjectionProperties(5)));
|
||||
BOOST_CHECK_EQUAL(&(well.getInjectionProperties(8)), &(well.getInjectionProperties(8)));
|
||||
@@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 5);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 5);
|
||||
BOOST_CHECK_EQUAL( false , well.hasBeenDefined(0) );
|
||||
BOOST_CHECK_EQUAL( false , well.hasBeenDefined(4) );
|
||||
BOOST_CHECK_EQUAL( true , well.hasBeenDefined(5) );
|
||||
@@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy( 5 ).OilRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).LiquidRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL( true, well.getProductionPropertiesCopy(5).predictionMode);
|
||||
Opm::WellProductionProperties props;
|
||||
@@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL( true, well.getInjectionPropertiesCopy(5).predictionMode);
|
||||
Opm::WellInjectionProperties props;
|
||||
@@ -333,28 +333,13 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
BOOST_CHECK_EQUAL( 0U , well.getConnections( 0 ).size() );
|
||||
}
|
||||
|
||||
// Helper function for CompletionOrder test.
|
||||
inline Opm::Connection connection( int i, int j, int k, int complnum = 1 ) {
|
||||
return Opm::Connection { i, j, k,
|
||||
complnum,
|
||||
k*1.0,
|
||||
Opm::WellCompletion::AUTO,
|
||||
99.88,
|
||||
17.29,
|
||||
0.25,
|
||||
0,
|
||||
Opm::WellCompletion::DirectionEnum::Z };
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::GAS, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::GAS, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).GasRate);
|
||||
Opm::WellProductionProperties properties;
|
||||
@@ -368,7 +353,7 @@ BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).WaterRate);
|
||||
Opm::WellProductionProperties properties;
|
||||
@@ -381,7 +366,7 @@ BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate);
|
||||
Opm::WellInjectionProperties props(well.getInjectionPropertiesCopy(5));
|
||||
@@ -400,7 +385,7 @@ BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate);
|
||||
Opm::WellInjectionProperties properties(well.getInjectionPropertiesCopy(5));
|
||||
@@ -415,7 +400,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.
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap ,0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap ,0);
|
||||
|
||||
/* 1: Well is created as producer */
|
||||
BOOST_CHECK_EQUAL( false , well.isInjector(0));
|
||||
@@ -471,7 +456,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap ,0);
|
||||
Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap ,0);
|
||||
|
||||
BOOST_CHECK_EQUAL("" , well.getGroupName(2));
|
||||
|
||||
@@ -485,7 +470,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 23, 42, 2334.32, Opm::Phase::WATER, timeMap, 3);
|
||||
Opm::Well well("WELL1", 1, 23, 42, 2334.32, Opm::Phase::WATER, timeMap, 3);
|
||||
|
||||
BOOST_CHECK(!well.hasBeenDefined(2));
|
||||
BOOST_CHECK(well.hasBeenDefined(3));
|
||||
@@ -498,7 +483,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
|
||||
Opm::WellProductionProperties productionProps(well.getProductionPropertiesCopy(1));
|
||||
@@ -519,7 +504,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InjectorType) {
|
||||
auto timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
Opm::WellInjectionProperties injectionProps(well.getInjectionPropertiesCopy(1));
|
||||
injectionProps.injectorType = Opm::WellInjector::WATER;
|
||||
@@ -531,15 +516,13 @@ BOOST_AUTO_TEST_CASE(InjectorType) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
|
||||
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::OIL, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::OIL, timeMap, 0);
|
||||
|
||||
|
||||
BOOST_CHECK( !well.getProductionPropertiesCopy(1).hasProductionControl( Opm::WellProducer::ORAT ));
|
||||
@@ -589,7 +572,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
|
||||
BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
|
||||
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RATE ));
|
||||
BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RESV ));
|
||||
@@ -633,7 +616,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
BOOST_CHECK(well.isAvailableForGroupControl(10));
|
||||
well.setAvailableForGroupControl(12, false);
|
||||
@@ -644,7 +627,7 @@ BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
BOOST_CHECK_LT(well.getGuideRate(0), 0);
|
||||
well.setGuideRate(1, 32.2);
|
||||
@@ -654,7 +637,7 @@ BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(0));
|
||||
well.setGuideRatePhase(3, Opm::GuideRate::RAT);
|
||||
BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(2));
|
||||
@@ -663,7 +646,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) {
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor(0));
|
||||
well.setEfficiencyFactor(3, 0.9);
|
||||
BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor(0));
|
||||
@@ -672,7 +655,7 @@ BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetScalingFactor_ScalingFactorSetSet) {
|
||||
auto timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(0));
|
||||
well.setGuideRateScalingFactor(4, 0.6);
|
||||
BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(3));
|
||||
|
||||
Reference in New Issue
Block a user