Change Well constructors to avoid explicit bool arg.
Suggested by Joakim Hove.
This commit is contained in:
parent
6dfeadc229
commit
15ee739326
@ -452,10 +452,14 @@ namespace Opm {
|
||||
// We change from eclipse's 1 - n, to a 0 - n-1 solution
|
||||
int headI = record->getItem("HEAD_I")->getInt(0) - 1;
|
||||
int headJ = record->getItem("HEAD_J")->getInt(0) - 1;
|
||||
bool refDepthDefaulted = record->getItem("REF_DEPTH")->defaultApplied();
|
||||
double refDepth = record->getItem("REF_DEPTH")->getSIDouble(0);
|
||||
Phase::PhaseEnum preferredPhase = Phase::PhaseEnumFromString(record->getItem("PHASE")->getTrimmedString(0));
|
||||
WellPtr well(new Well(wellName, headI, headJ, refDepthDefaulted, refDepth, preferredPhase, m_timeMap , timeStep));
|
||||
WellPtr well;
|
||||
if (record->getItem("REF_DEPTH")->defaultApplied()) {
|
||||
well = std::make_shared<Well>(wellName, headI, headJ, preferredPhase, m_timeMap , timeStep);
|
||||
} else {
|
||||
double refDepth = record->getItem("REF_DEPTH")->getSIDouble(0);
|
||||
well = std::make_shared<Well>(wellName, headI, headJ, refDepth, preferredPhase, m_timeMap , timeStep);
|
||||
}
|
||||
m_wells.insert( wellName , well);
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,7 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
Well::Well(const std::string& name_, int headI, int headJ,
|
||||
bool refDepthDefaulted, double refDepth, Phase::PhaseEnum preferredPhase,
|
||||
Well::Well(const std::string& name_, int headI, int headJ, double refDepth, Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep)
|
||||
: m_status(new DynamicState<WellCommon::StatusEnum>(timeMap, WellCommon::OPEN)),
|
||||
m_isAvailableForGroupControl(new DynamicState<bool>(timeMap, true)),
|
||||
@ -42,7 +41,7 @@ namespace Opm {
|
||||
m_groupName( new DynamicState<std::string>( timeMap , "" )),
|
||||
m_headI(headI),
|
||||
m_headJ(headJ),
|
||||
m_refDepthDefaulted(refDepthDefaulted),
|
||||
m_refDepthDefaulted(false),
|
||||
m_refDepth(refDepth),
|
||||
m_preferredPhase(preferredPhase)
|
||||
{
|
||||
@ -50,6 +49,28 @@ namespace Opm {
|
||||
m_creationTimeStep = creationTimeStep;
|
||||
}
|
||||
|
||||
Well::Well(const std::string& name_, int headI, int headJ, Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep)
|
||||
: m_status(new DynamicState<WellCommon::StatusEnum>(timeMap, WellCommon::OPEN)),
|
||||
m_isAvailableForGroupControl(new DynamicState<bool>(timeMap, true)),
|
||||
m_guideRate(new DynamicState<double>(timeMap, -1.0)),
|
||||
m_guideRatePhase(new DynamicState<GuideRate::GuideRatePhaseEnum>(timeMap, GuideRate::UNDEFINED)),
|
||||
m_guideRateScalingFactor(new DynamicState<double>(timeMap, 1.0)),
|
||||
m_isProducer(new DynamicState<bool>(timeMap, true)) ,
|
||||
m_completions( new DynamicState<CompletionSetConstPtr>( timeMap , CompletionSetConstPtr( new CompletionSet()) )),
|
||||
m_productionProperties( new DynamicState<WellProductionProperties>(timeMap, WellProductionProperties() )),
|
||||
m_injectionProperties( new DynamicState<WellInjectionProperties>(timeMap, WellInjectionProperties() )),
|
||||
m_groupName( new DynamicState<std::string>( timeMap , "" )),
|
||||
m_headI(headI),
|
||||
m_headJ(headJ),
|
||||
m_refDepthDefaulted(true),
|
||||
m_refDepth(-1e100),
|
||||
m_preferredPhase(preferredPhase)
|
||||
{
|
||||
m_name = name_;
|
||||
m_creationTimeStep = creationTimeStep;
|
||||
}
|
||||
|
||||
const std::string& Well::name() const {
|
||||
return m_name;
|
||||
}
|
||||
|
@ -79,9 +79,10 @@ namespace Opm {
|
||||
|
||||
class Well {
|
||||
public:
|
||||
Well(const std::string& name, int headI, int headJ,
|
||||
bool refDepthDefaulted, double refDepth,
|
||||
Phase::PhaseEnum preferredPhase,
|
||||
Well(const std::string& name, int headI, int headJ, double refDepth, Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep);
|
||||
/// Use this constructor when reference depth is defaulted.
|
||||
Well(const std::string& name, int headI, int headJ, Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep);
|
||||
const std::string& name() const;
|
||||
|
||||
|
@ -148,8 +148,8 @@ BOOST_AUTO_TEST_CASE(GroupAddWell) {
|
||||
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Group group("G1" , timeMap , 0);
|
||||
Opm::WellPtr well1(new Opm::Well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well1(new Opm::Well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
|
||||
BOOST_CHECK_EQUAL(0U , group.numWells(2));
|
||||
group.addWell( 3 , well1 );
|
||||
@ -185,8 +185,8 @@ BOOST_AUTO_TEST_CASE(GroupAddAndDelWell) {
|
||||
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Group group("G1" , timeMap , 0);
|
||||
Opm::WellPtr well1(new Opm::Well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well1(new Opm::Well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0));
|
||||
|
||||
BOOST_CHECK_EQUAL(0U , group.numWells(2));
|
||||
group.addWell( 3 , well1 );
|
||||
|
@ -53,8 +53,8 @@ BOOST_AUTO_TEST_CASE(AddAndDeleteWell) {
|
||||
Opm::WellSet wellSet;
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
|
||||
Opm::WellPtr well(new Opm::Well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well(new Opm::Well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL2" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
|
||||
wellSet.addWell( well );
|
||||
BOOST_CHECK_EQUAL(true , wellSet.hasWell("WELL1"));
|
||||
@ -78,8 +78,8 @@ BOOST_AUTO_TEST_CASE(AddWellSameName) {
|
||||
Opm::WellSet wellSet;
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
|
||||
Opm::WellPtr well1(new Opm::Well("WELL" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well1(new Opm::Well("WELL" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
Opm::WellPtr well2(new Opm::Well("WELL" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0));
|
||||
|
||||
wellSet.addWell( well1 );
|
||||
BOOST_CHECK_EQUAL(true , wellSet.hasWell("WELL"));
|
||||
|
@ -44,14 +44,14 @@ static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
BOOST_CHECK_EQUAL( "WELL1" , well.name() );
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 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)));
|
||||
@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 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)));
|
||||
@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 5);
|
||||
Opm::Well well("WELL1" , 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) );
|
||||
@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy( 5 ).OilRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).LiquidRate);
|
||||
Opm::WellProductionProperties props;
|
||||
@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL( true, well.getProductionPropertiesCopy(5).predictionMode);
|
||||
Opm::WellProductionProperties props;
|
||||
@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL( true, well.getInjectionPropertiesCopy(5).predictionMode);
|
||||
Opm::WellInjectionProperties props;
|
||||
@ -157,7 +157,7 @@ BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::CompletionSetConstPtr completions = well.getCompletions( 0 );
|
||||
BOOST_CHECK_EQUAL( 0U , completions->size());
|
||||
}
|
||||
@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UpdateCompletions) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0);
|
||||
Opm::CompletionSetConstPtr completions = well.getCompletions( 0 );
|
||||
BOOST_CHECK_EQUAL( 0U , completions->size());
|
||||
|
||||
@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(UpdateCompletions) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::GAS, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::GAS, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).GasRate);
|
||||
Opm::WellProductionProperties properties;
|
||||
@ -217,7 +217,7 @@ BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).WaterRate);
|
||||
Opm::WellProductionProperties properties;
|
||||
@ -230,7 +230,7 @@ BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate);
|
||||
Opm::WellInjectionProperties props(well.getInjectionPropertiesCopy(5));
|
||||
@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0);
|
||||
|
||||
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate);
|
||||
Opm::WellInjectionProperties properties(well.getInjectionPropertiesCopy(5));
|
||||
@ -258,7 +258,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::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::OIL, timeMap ,0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::OIL, timeMap ,0);
|
||||
|
||||
/* 1: Well is created as producer */
|
||||
BOOST_CHECK_EQUAL( false , well.isInjector(0));
|
||||
@ -314,7 +314,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1" , 0, 0, false, 0.0, Opm::Phase::WATER, timeMap ,0);
|
||||
Opm::Well well("WELL1" , 0, 0, 0.0, Opm::Phase::WATER, timeMap ,0);
|
||||
|
||||
BOOST_CHECK_EQUAL("" , well.getGroupName(2));
|
||||
|
||||
@ -328,7 +328,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 23, 42, false, 2334.32, Opm::Phase::WATER, timeMap, 3);
|
||||
Opm::Well well("WELL1", 23, 42, 2334.32, Opm::Phase::WATER, timeMap, 3);
|
||||
|
||||
BOOST_CHECK(!well.hasBeenDefined(2));
|
||||
BOOST_CHECK(well.hasBeenDefined(3));
|
||||
@ -341,7 +341,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
|
||||
Opm::WellProductionProperties productionProps(well.getProductionPropertiesCopy(1));
|
||||
@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InjectorType) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
Opm::WellInjectionProperties injectionProps(well.getInjectionPropertiesCopy(1));
|
||||
injectionProps.injectorType = Opm::WellInjector::WATER;
|
||||
@ -377,7 +377,7 @@ BOOST_AUTO_TEST_CASE(InjectorType) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellStatus) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
well.setStatus( 1 , Opm::WellCommon::OPEN );
|
||||
BOOST_CHECK_EQUAL( Opm::WellCommon::OPEN , well.getStatus( 5 ));
|
||||
@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE(WellStatus) {
|
||||
BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
|
||||
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::OIL, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::OIL, timeMap, 0);
|
||||
|
||||
|
||||
BOOST_CHECK( !well.getProductionPropertiesCopy(1).hasProductionControl( Opm::WellProducer::ORAT ));
|
||||
@ -441,7 +441,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
|
||||
BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
|
||||
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 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 ));
|
||||
@ -485,7 +485,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
BOOST_CHECK(well.isAvailableForGroupControl(10));
|
||||
well.setAvailableForGroupControl(12, false);
|
||||
@ -496,7 +496,7 @@ BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
|
||||
BOOST_CHECK_LT(well.getGuideRate(0), 0);
|
||||
well.setGuideRate(1, 32.2);
|
||||
@ -506,7 +506,7 @@ BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 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));
|
||||
@ -516,7 +516,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellSetScalingFactor_ScalingFactorSetSet) {
|
||||
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
|
||||
Opm::Well well("WELL1", 1, 2, false, 2334.32, Opm::Phase::WATER, timeMap, 0);
|
||||
Opm::Well well("WELL1", 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));
|
||||
|
Loading…
Reference in New Issue
Block a user