Merge pull request #953 from ANerd/cond_prod_control
Only add present phases from WCONHIST
This commit is contained in:
@@ -53,12 +53,12 @@ namespace Opm {
|
||||
EclipseState::EclipseState(const Deck& deck, ParseContext parseContext) :
|
||||
m_parseContext( parseContext ),
|
||||
m_tables( deck ),
|
||||
m_runspec( deck ),
|
||||
m_gridDims( deck ),
|
||||
m_inputGrid( deck, nullptr ),
|
||||
m_schedule( std::make_shared<Schedule>( m_parseContext, m_inputGrid, deck ) ),
|
||||
m_schedule( std::make_shared<Schedule>( m_parseContext, m_inputGrid, deck, m_runspec.phases() ) ),
|
||||
m_eclipseProperties( deck, m_tables, m_inputGrid ),
|
||||
m_eclipseConfig( deck, m_eclipseProperties, m_gridDims, *m_schedule , parseContext),
|
||||
m_runspec( deck ),
|
||||
m_transMult( m_inputGrid.getNX(), m_inputGrid.getNY(), m_inputGrid.getNZ(),
|
||||
m_eclipseProperties, deck.getKeywordList( "MULTREGT" ) ),
|
||||
m_inputNnc( deck, m_gridDims ),
|
||||
|
||||
@@ -122,12 +122,12 @@ namespace Opm {
|
||||
|
||||
ParseContext m_parseContext;
|
||||
const TableManager m_tables;
|
||||
Runspec m_runspec;
|
||||
const GridDims m_gridDims;
|
||||
EclipseGrid m_inputGrid;
|
||||
std::shared_ptr< const Schedule > m_schedule;
|
||||
Eclipse3DProperties m_eclipseProperties;
|
||||
EclipseConfig m_eclipseConfig;
|
||||
Runspec m_runspec;
|
||||
TransMult m_transMult;
|
||||
NNC m_inputNnc;
|
||||
UnitSystem m_deckUnitSystem;
|
||||
|
||||
@@ -68,14 +68,16 @@ namespace Opm {
|
||||
|
||||
Schedule::Schedule( const ParseContext& parseContext,
|
||||
const EclipseGrid& grid,
|
||||
const Deck& deck ) :
|
||||
const Deck& deck,
|
||||
const Phases &phases ) :
|
||||
m_timeMap( std::make_shared< TimeMap>( deck )),
|
||||
m_rootGroupTree( *m_timeMap, GroupTree{} ),
|
||||
m_oilvaporizationproperties( *m_timeMap, OilVaporizationProperties{} ),
|
||||
m_events( *m_timeMap ),
|
||||
m_modifierDeck( *m_timeMap, nullptr ),
|
||||
m_tuning( *m_timeMap ),
|
||||
m_messageLimits( *m_timeMap )
|
||||
m_messageLimits( *m_timeMap ),
|
||||
m_phases(phases)
|
||||
{
|
||||
m_controlModeWHISTCTL = WellProducer::CMODE_UNDEFINED;
|
||||
addGroup( "FIELD", 0 );
|
||||
@@ -440,10 +442,10 @@ namespace Opm {
|
||||
if (isPredictionMode) {
|
||||
auto addGrupProductionControl = well->isAvailableForGroupControl(currentStep);
|
||||
properties = WellProductionProperties::prediction( record, addGrupProductionControl );
|
||||
} else {
|
||||
} else {
|
||||
const WellProductionProperties& prev_properties = well->getProductionProperties(currentStep);
|
||||
double BHPLimit = prev_properties.BHPLimit;
|
||||
properties = WellProductionProperties::history( BHPLimit , record);
|
||||
properties = WellProductionProperties::history( BHPLimit , record, m_phases);
|
||||
}
|
||||
|
||||
if (status != WellCommon::SHUT) {
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MessageLimits.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
|
||||
|
||||
namespace Opm
|
||||
@@ -52,7 +53,7 @@ namespace Opm
|
||||
class Schedule {
|
||||
public:
|
||||
Schedule(const ParseContext& parseContext, const EclipseGrid& grid,
|
||||
const Deck& deck );
|
||||
const Deck& deck, const Phases &phases );
|
||||
|
||||
/*
|
||||
* If the input deck does not specify a start time, Eclipse's 1. Jan
|
||||
@@ -101,6 +102,7 @@ namespace Opm
|
||||
DynamicVector<std::shared_ptr<Deck> > m_modifierDeck;
|
||||
Tuning m_tuning;
|
||||
MessageLimits m_messageLimits;
|
||||
Phases m_phases;
|
||||
|
||||
MessageContainer m_messages;
|
||||
WellProducer::ControlModeEnum m_controlModeWHISTCTL;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Opm {
|
||||
{}
|
||||
|
||||
|
||||
WellProductionProperties WellProductionProperties::history(double BHPLimit, const DeckRecord& record)
|
||||
WellProductionProperties WellProductionProperties::history(double BHPLimit, const DeckRecord& record, const Phases &phases)
|
||||
{
|
||||
// Modes supported in WCONHIST just from {O,W,G}RAT values
|
||||
//
|
||||
@@ -50,8 +50,16 @@ namespace Opm {
|
||||
p.predictionMode = false;
|
||||
|
||||
namespace wp = WellProducer;
|
||||
for( auto cmode : { wp::ORAT, wp::WRAT, wp::GRAT,
|
||||
wp::LRAT, wp::RESV, wp::GRUP } ) {
|
||||
if(phases.active(Phase::OIL))
|
||||
p.addProductionControl( wp::ORAT );
|
||||
|
||||
if(phases.active(Phase::WATER))
|
||||
p.addProductionControl( wp::WRAT );
|
||||
|
||||
if(phases.active(Phase::GAS))
|
||||
p.addProductionControl( wp::GRAT );
|
||||
|
||||
for( auto cmode : { wp::LRAT, wp::RESV, wp::GRUP } ) {
|
||||
p.addProductionControl( cmode );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
|
||||
namespace Opm {
|
||||
@@ -47,7 +48,7 @@ namespace Opm {
|
||||
bool operator!=(const WellProductionProperties& other) const;
|
||||
WellProductionProperties();
|
||||
|
||||
static WellProductionProperties history(double BHPLimit, const DeckRecord& record );
|
||||
static WellProductionProperties history(double BHPLimit, const DeckRecord& record, const Phases &phases = Phases(true, true, true) );
|
||||
static WellProductionProperties prediction( const DeckRecord& record, bool addGroupProductionControl );
|
||||
|
||||
bool hasProductionControl(WellProducer::ControlModeEnum controlModeArg) const {
|
||||
|
||||
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE( CheckUnsoppertedInSCHEDULE ) {
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
{
|
||||
Schedule schedule( parseContext , grid , deck );
|
||||
Schedule schedule( parseContext , grid , deck, Phases(true, true, true) );
|
||||
auto events = schedule.getEvents( );
|
||||
BOOST_CHECK_EQUAL( false , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 1 ));
|
||||
BOOST_CHECK_EQUAL( true , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 2 ));
|
||||
|
||||
@@ -287,7 +287,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithGEFAC) {
|
||||
Opm::ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
Opm::Schedule schedule(parseContext , grid, deck, Opm::Phases(true, true, true) );
|
||||
|
||||
const auto& group1 = schedule.getGroup("PRODUC");
|
||||
BOOST_CHECK_EQUAL(group1.getGroupEfficiencyFactor(0), 0.85);
|
||||
@@ -334,7 +334,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWGRUPCONandWCONPROD) {
|
||||
Opm::ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
Opm::Schedule schedule(parseContext , grid, deck, Opm::Phases(true, true, true) );
|
||||
const auto* currentWell = schedule.getWell("B-37T2");
|
||||
const Opm::WellProductionProperties& wellProductionProperties = currentWell->getProductionProperties(0);
|
||||
BOOST_CHECK_EQUAL(wellProductionProperties.controlMode, Opm::WellProducer::ControlModeEnum::GRUP);
|
||||
|
||||
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(MESSAGES) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
const MessageLimits limits = schedule.getMessageLimits();
|
||||
|
||||
BOOST_CHECK_EQUAL( limits.getBugPrintLimit( 0 ) , 77 ); // The pre Schedule initialization
|
||||
|
||||
@@ -198,14 +198,14 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckMissingReturnsDefaults) {
|
||||
Deck deck;
|
||||
deck.addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1983 , boost::gregorian::Jan , 1)));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) {
|
||||
auto deck = createDeckWithWellsOrdered();
|
||||
EclipseGrid grid(100,100,100);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
auto wells = schedule.getWells();
|
||||
|
||||
BOOST_CHECK_EQUAL( "CW_1" , wells[0]->name());
|
||||
@@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithStart) {
|
||||
auto deck = createDeck();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8)));
|
||||
}
|
||||
|
||||
@@ -225,13 +225,13 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithSCHEDULENoThrow) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
deck.addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
|
||||
BOOST_CHECK_NO_THROW( Schedule schedule( ParseContext() , grid , deck ));
|
||||
BOOST_CHECK_NO_THROW( Schedule schedule( ParseContext() , grid , deck, Phases(true, true, true) ));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL( 0U , schedule.numWells() );
|
||||
BOOST_CHECK_EQUAL( false , schedule.hasWell("WELL1") );
|
||||
BOOST_CHECK_THROW( schedule.getWell("WELL2") , std::invalid_argument );
|
||||
@@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) {
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithoutGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL("FIELD", schedule.getGroupTree(0).getNode("FIELD")->name());
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ static Deck deckWithGRUPTREE() {
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = deckWithGRUPTREE();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
const auto& fieldNode = schedule.getGroupTree(0).getNode("FIELD");
|
||||
BOOST_CHECK_EQUAL("FIELD", fieldNode->name());
|
||||
const auto& FAREN = fieldNode->getChildGroup("FAREN");
|
||||
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTime
|
||||
BOOST_AUTO_TEST_CASE(GetGroups) {
|
||||
auto deck = deckWithGRUPTREE();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
|
||||
auto groups = schedule.getGroups();
|
||||
|
||||
@@ -293,7 +293,7 @@ BOOST_AUTO_TEST_CASE(GetGroups) {
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL( 1U , schedule.numGroups() );
|
||||
BOOST_CHECK_EQUAL( true , schedule.hasGroup("FIELD") );
|
||||
BOOST_CHECK_EQUAL( false , schedule.hasGroup("GROUP") );
|
||||
@@ -303,7 +303,7 @@ BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) {
|
||||
BOOST_AUTO_TEST_CASE(WellsIterator_Empty_EmptyVectorReturned) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
size_t timeStep = 0;
|
||||
const auto wells_alltimesteps = schedule.getWells();
|
||||
BOOST_CHECK_EQUAL(0U, wells_alltimesteps.size());
|
||||
@@ -316,7 +316,7 @@ BOOST_AUTO_TEST_CASE(WellsIterator_Empty_EmptyVectorReturned) {
|
||||
BOOST_AUTO_TEST_CASE(WellsIterator_HasWells_WellsReturned) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
size_t timeStep = 0;
|
||||
|
||||
const auto wells_alltimesteps = schedule.getWells();
|
||||
@@ -330,7 +330,7 @@ BOOST_AUTO_TEST_CASE(WellsIterator_HasWells_WellsReturned) {
|
||||
BOOST_AUTO_TEST_CASE(WellsIteratorWithRegex_HasWells_WellsReturned) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
std::string wellNamePattern;
|
||||
|
||||
wellNamePattern = "*";
|
||||
@@ -349,7 +349,7 @@ BOOST_AUTO_TEST_CASE(WellsIteratorWithRegex_HasWells_WellsReturned) {
|
||||
BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(0), 1);
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(1), 1);
|
||||
@@ -360,7 +360,7 @@ BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) {
|
||||
BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWellsAndCompletionData();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(1), 7);
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(3), 9);
|
||||
@@ -369,7 +369,7 @@ BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
BOOST_AUTO_TEST_CASE(TestCrossFlowHandling) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckForTestingCrossFlow();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
|
||||
auto well_ban = schedule.getWell("BAN");
|
||||
BOOST_CHECK_EQUAL(well_ban->getAllowCrossFlow(), false);
|
||||
@@ -449,7 +449,7 @@ static Deck createDeckWithWellsAndCompletionDataWithWELOPEN() {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsAndCompletionDataWithWELOPEN) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWellsAndCompletionDataWithWELOPEN();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus( 0 ));
|
||||
BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus( 3 ));
|
||||
@@ -522,7 +522,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWELOPEN_TryToOpenWellWithShutCompleti
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 3;
|
||||
BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep));
|
||||
@@ -563,7 +563,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1_ThrowsExcpetion) {
|
||||
|
||||
auto deck = parser.parseString(input, ParseContext());
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1andC2_ThrowsExcpetion) {
|
||||
@@ -599,7 +599,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1andC2_ThrowsExcpetion)
|
||||
|
||||
auto deck = parser.parseString(input, ParseContext());
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC2_ThrowsExcpetion) {
|
||||
@@ -635,7 +635,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC2_ThrowsExcpetion) {
|
||||
|
||||
auto deck = parser.parseString(input, ParseContext());
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) {
|
||||
@@ -670,7 +670,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) {
|
||||
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = parser.parseString(input, ParseContext());
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 3;
|
||||
BOOST_CHECK_EQUAL(WellCommon::StatusEnum::OPEN, well->getStatus(currentStep));
|
||||
@@ -717,7 +717,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFT) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
|
||||
{
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
@@ -782,7 +782,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFTPLT) {
|
||||
ParseContext parseContext;
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 3;
|
||||
@@ -829,7 +829,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArg) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 1;
|
||||
@@ -868,7 +868,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException) {
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
@@ -884,7 +884,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::out_of_range);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, Phases(true, true, true) ), std::out_of_range);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
@@ -939,7 +939,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
const auto& cs2 = well->getCompletions( 2 );
|
||||
@@ -974,7 +974,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const auto& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -1006,7 +1006,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDTthenDRVDT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 2;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -1031,7 +1031,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithVAPPARS) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -1058,7 +1058,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithOutOilVaporizationProperties) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), false);
|
||||
|
||||
@@ -1117,7 +1117,7 @@ BOOST_AUTO_TEST_CASE(changeBhpLimitInHistoryModeWithWeltarg) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
auto* well_p = schedule.getWell("P");
|
||||
|
||||
BOOST_CHECK_EQUAL(well_p->getProductionProperties(0).BHPLimit, 0); //start
|
||||
@@ -1204,7 +1204,7 @@ BOOST_AUTO_TEST_CASE(changeModeWithWHISTCTL) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
auto* well_p1 = schedule.getWell("P1");
|
||||
auto* well_p2 = schedule.getWell("P2");
|
||||
|
||||
@@ -1268,6 +1268,6 @@ BOOST_AUTO_TEST_CASE(unsupportedOptionWHISTCTL) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(parseContext , grid, deck ), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(Schedule schedule(parseContext , grid, deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ParseContext() , grid , deck );
|
||||
Schedule schedule( ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true));
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true));
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
|
||||
@@ -140,14 +140,14 @@ static Deck createDeckWithWaterInjector() {
|
||||
BOOST_AUTO_TEST_CASE(TestNoSolvent) {
|
||||
auto deck = createDeckWithOutSolvent();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(!deck.hasKeyword("WSOLVENT"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestGasInjector) {
|
||||
auto deck = createDeckWithGasInjector();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext(), grid , deck );
|
||||
Schedule schedule(ParseContext(), grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(deck.hasKeyword("WSOLVENT"));
|
||||
|
||||
}
|
||||
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(TestGasInjector) {
|
||||
BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) {
|
||||
auto deck = createDeckWithDynamicWSOLVENT();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(deck.hasKeyword("WSOLVENT"));
|
||||
const auto& keyword = deck.getKeyword("WSOLVENT");
|
||||
BOOST_CHECK_EQUAL(keyword.size(),1);
|
||||
@@ -172,11 +172,11 @@ BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) {
|
||||
BOOST_AUTO_TEST_CASE(TestOilInjector) {
|
||||
auto deck = createDeckWithOilInjector();
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext() , grid , deck ), std::invalid_argument);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext() , grid , deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestWaterInjector) {
|
||||
auto deck = createDeckWithWaterInjector();
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck ), std::invalid_argument);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestTRACK) {
|
||||
Opm::ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@@ -234,7 +234,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestDefaultTRACK) {
|
||||
Opm::ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
|
||||
Opm::ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
|
||||
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE( CreateCompletionsFromKeyword ) {
|
||||
const auto scheduleFile = "testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1";
|
||||
auto deck = parser.parseFile(scheduleFile, ParseContext());
|
||||
EclipseGrid grid(10,10,10);
|
||||
const Schedule schedule( ParseContext(), grid, deck );
|
||||
const Schedule schedule( ParseContext(), grid, deck, Phases(true, true, true) );
|
||||
const auto& COMPDAT1 = deck.getKeyword("COMPDAT" , 1);
|
||||
|
||||
const auto wells = schedule.getWells( 0 );
|
||||
|
||||
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) {
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1");
|
||||
auto deck = parser.parseFile(wconprodFile, ParseContext());
|
||||
EclipseGrid grid(30,30,30);
|
||||
Schedule sched(ParseContext(), grid, deck );
|
||||
Schedule sched(ParseContext(), grid, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("INJE1"));
|
||||
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) {
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1");
|
||||
auto deck = parser.parseFile(wconprodFile, parseContext);
|
||||
EclipseGrid grid(30,30,30);
|
||||
Schedule sched( parseContext, grid, deck );
|
||||
Schedule sched( parseContext, grid, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("PROD1"));
|
||||
|
||||
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule sched(parseContext , grid , deck );
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
const auto& timeMap = sched.getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched.getStartTime());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap.size());
|
||||
@@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule sched(parseContext , grid , deck );
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
const auto& timeMap = sched.getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched.getStartTime());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap.size());
|
||||
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , deck ) );
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , deck, Phases(true, true, true) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
|
||||
BOOST_CHECK_THROW( Schedule(parseContext , grid , deck ) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( Schedule(parseContext , grid , deck, Phases(true, true, true) ) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
BOOST_CHECK_EQUAL(3, 3);
|
||||
Schedule sched(parseContext , grid , deck );
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL(4, 4);
|
||||
|
||||
auto* well1 = sched.getWell("W_1");
|
||||
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(WellTestOpen) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
Schedule sched(parseContext , grid , deck );
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
|
||||
auto well1 = sched.getWell( "W_1" );
|
||||
auto well2 = sched.getWell( "W_2" );
|
||||
@@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
Schedule sched(parseContext , grid , deck );
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -270,7 +270,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
Schedule sched(parseContext , grid, deck);
|
||||
Schedule sched(parseContext , grid, deck, Phases(true, true, true));
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -310,7 +310,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
const auto& rootNode = sched.getGroupTree(0).getNode("FIELD");
|
||||
|
||||
@@ -339,7 +339,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule schedule(parseContext , grid , deck);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK( schedule.hasGroup( "FIELD" ));
|
||||
BOOST_CHECK( schedule.hasGroup( "PROD" ));
|
||||
@@ -358,7 +358,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function)
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule schedule(parseContext , grid , deck);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
const auto& root0 = schedule.getGroupTree(0).getNode("FIELD");
|
||||
@@ -375,7 +375,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule schedule(parseContext , grid , deck);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
const auto& root0 = schedule.getGroupTree(0).getNode("FIELD");
|
||||
@@ -420,7 +420,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule schedule(parseContext , grid , deck);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
|
||||
// Time , from first GRUPTREE
|
||||
@@ -453,7 +453,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
const auto& rootNode = sched.getGroupTree(0);
|
||||
rootNode.printTree(std::cout);
|
||||
@@ -467,7 +467,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL( 3U , sched.numGroups() );
|
||||
BOOST_CHECK( sched.hasGroup( "INJ" ));
|
||||
@@ -509,7 +509,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
auto& group1 = sched.getGroup("GROUP1");
|
||||
auto& group2 = sched.getGroup("GROUP2");
|
||||
@@ -536,7 +536,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -569,7 +569,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_THROW(Schedule(parseContext , grid , deck), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(Schedule(parseContext , grid , deck, Phases(true, true, true)), std::invalid_argument);
|
||||
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
const auto* well1 = sched.getWell("W_1");
|
||||
BOOST_CHECK(well1->isAvailableForGroupControl(0));
|
||||
@@ -647,7 +647,7 @@ COMPDAT \n\
|
||||
/\n";
|
||||
auto deck = parser.parseString(deckString, parseContext);
|
||||
EclipseGrid grid(30,30,10);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
const auto* well = sched.getWell("W1");
|
||||
const auto& completions = well->getCompletions(0);
|
||||
BOOST_CHECK_EQUAL( 10 , completions.get(0).getI() );
|
||||
@@ -665,7 +665,7 @@ BOOST_AUTO_TEST_CASE(OpmCode) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , deck) );
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , deck, Phases(true, true, true)) );
|
||||
}
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(20,40,1);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
|
||||
const auto* well1 = sched.getWell("W1");
|
||||
@@ -700,7 +700,7 @@ BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(30,30,30);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
@@ -748,7 +748,7 @@ BOOST_AUTO_TEST_CASE(WellTestWECON) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WECON");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(30,30,30);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(3U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("INJE01"));
|
||||
@@ -858,7 +858,7 @@ BOOST_AUTO_TEST_CASE(TestEvents) {
|
||||
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,40,30);
|
||||
Schedule sched(parseContext , grid , deck);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
const Events& events = sched.getEvents();
|
||||
|
||||
BOOST_CHECK( events.hasEvent(ScheduleEvents::NEW_WELL , 0 ) );
|
||||
|
||||
@@ -191,12 +191,12 @@ BOOST_AUTO_TEST_CASE( CheckUnsupportedInSCHEDULE ) {
|
||||
EclipseGrid grid( deckSupported );
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported, Phases(true, true, true) ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::THROW_EXCEPTION );
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deckUnSupported ), std::invalid_argument );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported ));
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deckUnSupported, Phases(true, true, true) ), std::invalid_argument );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported, Phases(true, true, true) ));
|
||||
}
|
||||
|
||||
|
||||
@@ -265,10 +265,10 @@ BOOST_AUTO_TEST_CASE(TestCOMPORD) {
|
||||
EclipseGrid grid( deck );
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::IGNORE);
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck, Phases(true, true, true) ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::THROW_EXCEPTION);
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deck ), std::invalid_argument );
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deck, Phases(true, true, true) ), std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ extern "C" {
|
||||
|
||||
|
||||
Opm::Schedule * schedule_alloc(Opm::ParseContext * context, Opm::EclipseGrid * grid, Opm::Deck * deck) {
|
||||
return new Opm::Schedule( *context , *grid, *deck );
|
||||
return new Opm::Schedule( *context , *grid, *deck, Opm::Runspec(*deck).phases() );
|
||||
}
|
||||
|
||||
void schedule_free( Opm::Schedule * schedule ) {
|
||||
|
||||
Reference in New Issue
Block a user