Default saturation table_id in completions with cell satnum value
Pass eclGridProperties from EclipseState to Completions in order to set default saturation table. Most changes are due to interface change in Schedule(...)
This commit is contained in:
@@ -56,8 +56,8 @@ namespace Opm {
|
||||
m_runspec( deck ),
|
||||
m_gridDims( deck ),
|
||||
m_inputGrid( deck, nullptr ),
|
||||
m_schedule( m_parseContext, m_inputGrid, deck, m_runspec.phases() ),
|
||||
m_eclipseProperties( deck, m_tables, m_inputGrid ),
|
||||
m_schedule( m_parseContext, m_inputGrid, m_eclipseProperties, deck, m_runspec.phases() ),
|
||||
m_eclipseConfig( deck, m_eclipseProperties, m_gridDims, m_schedule, parseContext ),
|
||||
m_transMult( m_inputGrid.getNX(), m_inputGrid.getNY(), m_inputGrid.getNZ(),
|
||||
m_eclipseProperties, deck.getKeywordList( "MULTREGT" ) ),
|
||||
|
||||
@@ -125,8 +125,8 @@ namespace Opm {
|
||||
Runspec m_runspec;
|
||||
const GridDims m_gridDims;
|
||||
EclipseGrid m_inputGrid;
|
||||
Schedule m_schedule;
|
||||
Eclipse3DProperties m_eclipseProperties;
|
||||
Schedule m_schedule;
|
||||
EclipseConfig m_eclipseConfig;
|
||||
TransMult m_transMult;
|
||||
NNC m_inputNnc;
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Completion.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
@@ -102,6 +104,7 @@ namespace Opm {
|
||||
|
||||
inline std::vector< Completion >
|
||||
fromCOMPDAT( const EclipseGrid& grid,
|
||||
const Eclipse3DProperties& eclipseProperties,
|
||||
const DeckRecord& compdatRecord,
|
||||
const Well& well,
|
||||
int prev_complnum ) {
|
||||
@@ -126,7 +129,8 @@ namespace Opm {
|
||||
Value<double> diameter("Diameter");
|
||||
Value<double> skinFactor("SkinFactor");
|
||||
Value<int> satTableId("SAT_TABLE");
|
||||
|
||||
const auto& satnum = eclipseProperties.getIntGridProperty("SATNUM");
|
||||
bool defaultSatTable = true;
|
||||
{
|
||||
const auto& connectionTransmissibilityFactorItem = compdatRecord.getItem("CONNECTION_TRANSMISSIBILITY_FACTOR");
|
||||
const auto& diameterItem = compdatRecord.getItem("DIAMETER");
|
||||
@@ -143,15 +147,18 @@ namespace Opm {
|
||||
skinFactor.setValue( skinFactorItem.get< double >(0));
|
||||
|
||||
if (satTableIdItem.hasValue(0) && satTableIdItem.get < int > (0) > 0)
|
||||
{
|
||||
satTableId.setValue( satTableIdItem.get< int >(0));
|
||||
else
|
||||
satTableId.setValue( -1);
|
||||
|
||||
defaultSatTable = false;
|
||||
}
|
||||
}
|
||||
|
||||
const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnumFromString(compdatRecord.getItem("DIR").getTrimmedString(0));
|
||||
|
||||
for (int k = K1; k <= K2; k++) {
|
||||
if (defaultSatTable)
|
||||
satTableId.setValue ( satnum.iget(grid.getGlobalIndex(I,J,k)) );
|
||||
|
||||
completions.emplace_back( I, J, k,
|
||||
int( completions.size() + prev_complnum ) + 1,
|
||||
grid.getCellDepth( I,J,k ),
|
||||
@@ -178,6 +185,7 @@ namespace Opm {
|
||||
|
||||
std::map< std::string, std::vector< Completion > >
|
||||
Completion::fromCOMPDAT( const EclipseGrid& grid ,
|
||||
const Eclipse3DProperties& eclipseProperties,
|
||||
const DeckKeyword& compdatKeyword,
|
||||
const std::vector< const Well* >& wells ) {
|
||||
|
||||
@@ -199,6 +207,7 @@ namespace Opm {
|
||||
if( prev_compls[ index ] == 0 ) (*well)->getCompletions().size();
|
||||
|
||||
auto completions = Opm::fromCOMPDAT( grid,
|
||||
eclipseProperties,
|
||||
record,
|
||||
**well,
|
||||
prev_compls[ index ] );
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace Opm {
|
||||
class DeckRecord;
|
||||
class Well;
|
||||
class EclipseGrid;
|
||||
class Eclipse3DProperties;
|
||||
|
||||
class Completion {
|
||||
public:
|
||||
@@ -78,6 +79,7 @@ namespace Opm {
|
||||
|
||||
static std::map< std::string, std::vector< Completion > >
|
||||
fromCOMPDAT( const EclipseGrid& grid,
|
||||
const Eclipse3DProperties& eclipseProperties,
|
||||
const DeckKeyword& compdatKeyword,
|
||||
const std::vector< const Well* >& );
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace Opm {
|
||||
|
||||
Schedule::Schedule( const ParseContext& parseContext,
|
||||
const EclipseGrid& grid,
|
||||
const Eclipse3DProperties& eclipseProperties,
|
||||
const Deck& deck,
|
||||
const Phases &phases ) :
|
||||
m_timeMap( deck ),
|
||||
@@ -96,7 +97,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
if (Section::hasSCHEDULE(deck)) {
|
||||
iterateScheduleSection( parseContext, SCHEDULESection( deck ), grid );
|
||||
iterateScheduleSection( parseContext, SCHEDULESection( deck ), grid, eclipseProperties );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +113,8 @@ namespace Opm {
|
||||
return posixTime( this->m_timeMap.getEndTime() );
|
||||
}
|
||||
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section , const EclipseGrid& grid) {
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section , const EclipseGrid& grid,
|
||||
const Eclipse3DProperties& eclipseProperties) {
|
||||
/*
|
||||
geoModifiers is a list of geo modifiers which can be found in the schedule
|
||||
section. This is only partly supported, support is indicated by the bool
|
||||
@@ -177,7 +179,7 @@ namespace Opm {
|
||||
handleWGRUPCON(keyword, currentStep);
|
||||
|
||||
else if (keyword.name() == "COMPDAT")
|
||||
handleCOMPDAT(keyword, currentStep, grid);
|
||||
handleCOMPDAT(keyword, currentStep, grid, eclipseProperties);
|
||||
|
||||
else if (keyword.name() == "WELSEGS")
|
||||
handleWELSEGS(keyword, currentStep);
|
||||
@@ -1221,9 +1223,9 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid) {
|
||||
void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid, const Eclipse3DProperties& eclipseProperties) {
|
||||
const auto wells = this->getWells( currentStep );
|
||||
auto completions = Completion::fromCOMPDAT( grid, keyword, wells );
|
||||
auto completions = Completion::fromCOMPDAT( grid, eclipseProperties, keyword, wells );
|
||||
|
||||
for( const auto pair : completions ) {
|
||||
auto& well = this->m_wells.get( pair.first );
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Opm
|
||||
class DeckRecord;
|
||||
class EclipseGrid;
|
||||
class ParseContext;
|
||||
class Eclipse3DProperties;
|
||||
class SCHEDULESection;
|
||||
class TimeMap;
|
||||
class UnitSystem;
|
||||
@@ -53,7 +54,7 @@ namespace Opm
|
||||
class Schedule {
|
||||
public:
|
||||
Schedule(const ParseContext& parseContext, const EclipseGrid& grid,
|
||||
const Deck& deck, const Phases &phases );
|
||||
const Eclipse3DProperties& eclipseProperties ,const Deck& deck, const Phases &phases );
|
||||
|
||||
/*
|
||||
* If the input deck does not specify a start time, Eclipse's 1. Jan
|
||||
@@ -110,7 +111,8 @@ namespace Opm
|
||||
std::vector< Well* > getWells(const std::string& wellNamePattern);
|
||||
void updateWellStatus( Well& well, size_t reportStep , WellCommon::StatusEnum status);
|
||||
void addWellToGroup( Group& newGroup , Well& well , size_t timeStep);
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& , const EclipseGrid& grid);
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& , const EclipseGrid& grid,
|
||||
const Eclipse3DProperties& eclipseProperties);
|
||||
bool handleGroupFromWELSPECS(const std::string& groupName, GroupTree& newTree) const;
|
||||
void addGroup(const std::string& groupName , size_t timeStep);
|
||||
void addWell(const std::string& wellName, const DeckRecord& record, size_t timeStep, WellCompletion::CompletionOrderEnum wellCompletionOrder);
|
||||
@@ -120,7 +122,7 @@ namespace Opm
|
||||
void handleWCONHIST( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWCONPROD( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWGRUPCON( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid);
|
||||
void handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid, const Eclipse3DProperties& eclipseProperties);
|
||||
void handleCOMPLUMP( const DeckKeyword& keyword, size_t currentStep );
|
||||
void handleWELSEGS( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleCOMPSEGS( const DeckKeyword& keyword, size_t currentStep);
|
||||
|
||||
@@ -74,10 +74,12 @@ BOOST_AUTO_TEST_CASE( CheckUnsoppertedInSCHEDULE ) {
|
||||
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
EclipseGrid grid( deck );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
{
|
||||
Schedule schedule( parseContext , grid , deck, Phases(true, true, true) );
|
||||
Schedule schedule( parseContext , grid , eclipseProperties, 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 ));
|
||||
|
||||
@@ -281,7 +281,9 @@ 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::Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Opm::Schedule schedule(parseContext , grid, eclipseProperties, deck, Opm::Phases(true, true, true) );
|
||||
|
||||
const auto& group1 = schedule.getGroup("PRODUC");
|
||||
BOOST_CHECK_EQUAL(group1.getGroupEfficiencyFactor(0), 0.85);
|
||||
@@ -328,7 +330,9 @@ 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::Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Opm::Schedule schedule(parseContext , grid, eclipseProperties, 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,9 @@ BOOST_AUTO_TEST_CASE(MESSAGES) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
const MessageLimits limits = schedule.getMessageLimits();
|
||||
|
||||
BOOST_CHECK_EQUAL( limits.getBugPrintLimit( 0 ) , 77 ); // The pre Schedule initialization
|
||||
|
||||
@@ -198,14 +198,18 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckMissingReturnsDefaults) {
|
||||
Deck deck;
|
||||
deck.addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto wells = schedule.getWells();
|
||||
|
||||
BOOST_CHECK_EQUAL( "CW_1" , wells[0]->name());
|
||||
@@ -216,22 +220,28 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithStart) {
|
||||
auto deck = createDeck();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8)));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithSCHEDULENoThrow) {
|
||||
Deck deck;
|
||||
EclipseGrid grid(10,10,10);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
deck.addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
|
||||
BOOST_CHECK_NO_THROW( Schedule schedule( ParseContext() , grid , deck, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule schedule( ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) ));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, 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 +250,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(schedule.getGroupTree(0).exists("FIELD"));
|
||||
}
|
||||
|
||||
@@ -265,7 +277,9 @@ static Deck deckWithGRUPTREE() {
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = deckWithGRUPTREE();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK( schedule.getGroupTree( 0 ).exists( "FIELD" ) );
|
||||
BOOST_CHECK( schedule.getGroupTree( 0 ).exists( "FAREN" ) );
|
||||
BOOST_CHECK_EQUAL( "FAREN", schedule.getGroupTree( 0 ).parent( "BARNET" ) );
|
||||
@@ -274,7 +288,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
auto groups = schedule.getGroups();
|
||||
|
||||
@@ -292,7 +308,9 @@ BOOST_AUTO_TEST_CASE(GetGroups) {
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, 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") );
|
||||
@@ -302,7 +320,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
size_t timeStep = 0;
|
||||
const auto wells_alltimesteps = schedule.getWells();
|
||||
BOOST_CHECK_EQUAL(0U, wells_alltimesteps.size());
|
||||
@@ -315,7 +335,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
size_t timeStep = 0;
|
||||
|
||||
const auto wells_alltimesteps = schedule.getWells();
|
||||
@@ -329,7 +351,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
std::string wellNamePattern;
|
||||
|
||||
wellNamePattern = "*";
|
||||
@@ -348,7 +372,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(0), 1);
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(1), 1);
|
||||
@@ -359,7 +385,9 @@ BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) {
|
||||
BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWellsAndCompletionData();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(1), 7);
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(3), 9);
|
||||
@@ -368,7 +396,9 @@ BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
BOOST_AUTO_TEST_CASE(TestCrossFlowHandling) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckForTestingCrossFlow();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
auto well_ban = schedule.getWell("BAN");
|
||||
BOOST_CHECK_EQUAL(well_ban->getAllowCrossFlow(), false);
|
||||
@@ -458,7 +488,9 @@ static Deck createDeckWithWellsAndCompletionDataWithWELOPEN() {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsAndCompletionDataWithWELOPEN) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = createDeckWithWellsAndCompletionDataWithWELOPEN();
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, 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 ));
|
||||
@@ -535,7 +567,9 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWELOPEN_TryToOpenWellWithShutCompleti
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 3;
|
||||
BOOST_CHECK_EQUAL(WellCommon::StatusEnum::SHUT, well->getStatus(currentStep));
|
||||
@@ -584,7 +618,9 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFT) {
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
{
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
@@ -646,7 +682,9 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFTPLT) {
|
||||
ParseContext parseContext;
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 3;
|
||||
@@ -693,7 +731,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArg) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 1;
|
||||
@@ -731,8 +771,10 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
@@ -747,8 +789,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, Phases(true, true, true) ), std::out_of_range);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ), std::out_of_range);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
@@ -803,7 +846,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
const auto& cs2 = well->getCompletions( 2 );
|
||||
@@ -838,7 +883,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const auto& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -870,7 +917,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDTthenDRVDT) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext, grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 2;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -895,7 +944,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithVAPPARS) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
const OilVaporizationProperties& ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@@ -922,7 +973,9 @@ BOOST_AUTO_TEST_CASE(createDeckWithOutOilVaporizationProperties) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), false);
|
||||
|
||||
@@ -981,7 +1034,9 @@ BOOST_AUTO_TEST_CASE(changeBhpLimitInHistoryModeWithWeltarg) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well_p = schedule.getWell("P");
|
||||
|
||||
BOOST_CHECK_EQUAL(well_p->getProductionProperties(0).BHPLimit, 0); //start
|
||||
@@ -1068,7 +1123,9 @@ BOOST_AUTO_TEST_CASE(changeModeWithWHISTCTL) {
|
||||
ParseContext parseContext;
|
||||
auto deck = parser.parseString(input, parseContext);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto* well_p1 = schedule.getWell("P1");
|
||||
auto* well_p2 = schedule.getWell("P2");
|
||||
|
||||
@@ -1132,7 +1189,9 @@ 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, Phases(true, true, true) ), std::invalid_argument);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_THROW(Schedule schedule(parseContext , grid, eclipseProperties, deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(move_HEAD_I_location) {
|
||||
@@ -1159,7 +1218,9 @@ BOOST_AUTO_TEST_CASE(move_HEAD_I_location) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString(input, ctx);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& well = *schedule.getWell( "W1" );
|
||||
BOOST_CHECK_EQUAL( 3, well.getHeadI() );
|
||||
@@ -1190,7 +1251,9 @@ BOOST_AUTO_TEST_CASE(change_ref_depth) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString(input, ctx);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& well = *schedule.getWell( "W1" );
|
||||
BOOST_CHECK_EQUAL( 12.0, well.getRefDepth() );
|
||||
@@ -1227,7 +1290,9 @@ BOOST_AUTO_TEST_CASE( COMPDAT_sets_automatic_complnum ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString(input, ctx);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& cs1 = schedule.getWell( "W1" )->getCompletions( 1 );
|
||||
BOOST_CHECK_EQUAL( 1, cs1.get( 0 ).complnum() );
|
||||
@@ -1268,7 +1333,9 @@ BOOST_AUTO_TEST_CASE( COMPDAT_multiple_wells ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString( input, ctx );
|
||||
EclipseGrid grid( 10, 10, 10 );
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& w1cs = schedule.getWell( "W1" )->getCompletions();
|
||||
BOOST_CHECK_EQUAL( 1, w1cs.get( 0 ).complnum() );
|
||||
@@ -1306,7 +1373,9 @@ BOOST_AUTO_TEST_CASE( COMPDAT_multiple_records_same_completion ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString(input, ctx);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& cs = schedule.getWell( "W1" )->getCompletions();
|
||||
BOOST_CHECK_EQUAL( 3U, cs.size() );
|
||||
@@ -1337,8 +1406,10 @@ BOOST_AUTO_TEST_CASE( complump_less_than_1 ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString( input, ctx );
|
||||
EclipseGrid grid( 10, 10, 10);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Phases p( true, true, true );
|
||||
BOOST_CHECK_THROW( Schedule( ctx, grid, deck, p ), std::invalid_argument );
|
||||
BOOST_CHECK_THROW( Schedule( ctx, grid, eclipseProperties, deck, p ), std::invalid_argument );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( complump ) {
|
||||
@@ -1381,7 +1452,9 @@ BOOST_AUTO_TEST_CASE( complump ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString(input, ctx);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& well = *schedule.getWell( "W1" );
|
||||
const auto& sc0 = well.getCompletions( 0 );
|
||||
@@ -1453,7 +1526,9 @@ BOOST_AUTO_TEST_CASE( COMPLUMP_specific_coordinates ) {
|
||||
ParseContext ctx;
|
||||
auto deck = Parser().parseString( input, ctx );
|
||||
EclipseGrid grid( 10, 10, 10 );
|
||||
Schedule schedule( ctx, grid, deck, Phases( true, true, true ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ctx, grid, eclipseProperties, deck, Phases( true, true, true ) );
|
||||
|
||||
const auto& well = *schedule.getWell( "W1" );
|
||||
const auto& cs1 = well.getCompletions( 1 );
|
||||
|
||||
@@ -71,7 +71,9 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule( ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@@ -322,7 +324,9 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@@ -350,7 +354,9 @@ BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
|
||||
auto deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
|
||||
@@ -140,14 +140,18 @@ static Deck createDeckWithWaterInjector() {
|
||||
BOOST_AUTO_TEST_CASE(TestNoSolvent) {
|
||||
auto deck = createDeckWithOutSolvent();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext(), grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(deck.hasKeyword("WSOLVENT"));
|
||||
|
||||
}
|
||||
@@ -155,7 +159,9 @@ BOOST_AUTO_TEST_CASE(TestGasInjector) {
|
||||
BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) {
|
||||
auto deck = createDeckWithDynamicWSOLVENT();
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(ParseContext() , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK(deck.hasKeyword("WSOLVENT"));
|
||||
const auto& keyword = deck.getKeyword("WSOLVENT");
|
||||
BOOST_CHECK_EQUAL(keyword.size(),1);
|
||||
@@ -172,11 +178,15 @@ 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, Phases(true, true, true) ), std::invalid_argument);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext() , grid , eclipseProperties, 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, Phases(true, true, true) ), std::invalid_argument);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , eclipseProperties, deck, Phases(true, true, true) ), std::invalid_argument);
|
||||
}
|
||||
|
||||
@@ -225,7 +225,9 @@ 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::Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , eclipseProperties, deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@@ -264,7 +266,9 @@ 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::Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , eclipseProperties, deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@@ -305,7 +309,9 @@ 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::Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , eclipseProperties, deck, Opm::Phases(true, true, true) );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
|
||||
@@ -38,11 +38,13 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
const Schedule schedule( ParseContext(), grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
const auto& COMPDAT1 = deck.getKeyword("COMPDAT" , 1);
|
||||
|
||||
const auto wells = schedule.getWells( 0 );
|
||||
auto completions = Completion::fromCOMPDAT( grid, COMPDAT1, wells );
|
||||
auto completions = Completion::fromCOMPDAT( grid, eclipseProperties, COMPDAT1, wells );
|
||||
BOOST_CHECK_EQUAL( 3U , completions.size() );
|
||||
|
||||
BOOST_CHECK( completions.find("W_1") != completions.end() );
|
||||
@@ -82,5 +84,12 @@ BOOST_AUTO_TEST_CASE( CreateCompletionsFromKeyword ) {
|
||||
BOOST_CHECK (well2->getCompletions(0).allCompletionsShut());
|
||||
BOOST_CHECK_EQUAL (well2->getStatus(0) , WellCommon::StatusEnum::SHUT);
|
||||
|
||||
// Check saturation table number for connection
|
||||
std::vector<Completion> W_1Completions = completions.find("W_1")->second;
|
||||
const auto& W1_completion0 = W_1Completions[0];
|
||||
const auto& W1_completion3 = W_1Completions[3];
|
||||
|
||||
BOOST_CHECK_EQUAL( 1 , W1_completion0.getSatTableId());
|
||||
BOOST_CHECK_EQUAL( 2 , W1_completion3.getSatTableId());
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(ParseContext(), grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("INJE1"));
|
||||
@@ -73,7 +75,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched( parseContext, grid, eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("PROD1"));
|
||||
|
||||
@@ -46,7 +46,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, 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());
|
||||
@@ -60,7 +62,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, 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());
|
||||
@@ -73,7 +77,9 @@ 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, Phases(true, true, true) ) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +89,9 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(10,10,3);
|
||||
|
||||
BOOST_CHECK_THROW( Schedule(parseContext , grid , deck, Phases(true, true, true) ) , std::invalid_argument );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_THROW( Schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
@@ -94,8 +101,10 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,60,30);
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_EQUAL(3, 3);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true) );
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
BOOST_CHECK_EQUAL(4, 4);
|
||||
|
||||
auto* well1 = sched.getWell("W_1");
|
||||
@@ -113,7 +122,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
auto well1 = sched.getWell( "W_1" );
|
||||
auto well2 = sched.getWell( "W_2" );
|
||||
@@ -153,7 +164,9 @@ 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, Phases(true, true, true) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true) );
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -269,7 +282,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid, eclipseProperties, deck, Phases(true, true, true));
|
||||
}
|
||||
|
||||
|
||||
@@ -279,7 +294,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -309,7 +326,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
const auto& grouptree = sched.getGroupTree( 0 );
|
||||
|
||||
@@ -333,7 +352,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK( schedule.hasGroup( "FIELD" ));
|
||||
BOOST_CHECK( schedule.hasGroup( "PROD" ));
|
||||
@@ -352,7 +373,9 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_size ) {
|
||||
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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
BOOST_CHECK_EQUAL( 2U, schedule.getGroupTree(0).children("FIELD").size() );
|
||||
@@ -367,7 +390,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
const auto& tree0 = schedule.getGroupTree( 0 );
|
||||
@@ -398,7 +423,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
|
||||
const auto& tree0 = schedule.getGroupTree( 0 );
|
||||
@@ -417,7 +444,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL( 3U , sched.numGroups() );
|
||||
BOOST_CHECK( sched.hasGroup( "INJ" ));
|
||||
@@ -459,7 +488,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
auto& group1 = sched.getGroup("GROUP1");
|
||||
auto& group2 = sched.getGroup("GROUP2");
|
||||
@@ -486,7 +517,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("W_1"));
|
||||
@@ -548,7 +581,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
const auto* well1 = sched.getWell("W_1");
|
||||
BOOST_CHECK(well1->isAvailableForGroupControl(0));
|
||||
@@ -587,7 +622,9 @@ COMPDAT \n\
|
||||
/\n";
|
||||
auto deck = parser.parseString(deckString, parseContext);
|
||||
EclipseGrid grid(30,30,10);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, 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() );
|
||||
@@ -605,7 +642,9 @@ 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, Phases(true, true, true)) );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
BOOST_CHECK_NO_THROW( Schedule(parseContext , grid , eclipseProperties, deck, Phases(true, true, true)) );
|
||||
}
|
||||
|
||||
|
||||
@@ -616,7 +655,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
|
||||
const auto* well1 = sched.getWell("W1");
|
||||
@@ -640,7 +681,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched.numWells());
|
||||
@@ -688,7 +731,9 @@ 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, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
|
||||
BOOST_CHECK_EQUAL(3U, sched.numWells());
|
||||
BOOST_CHECK(sched.hasWell("INJE01"));
|
||||
@@ -798,7 +843,9 @@ BOOST_AUTO_TEST_CASE(TestEvents) {
|
||||
|
||||
auto deck = parser.parseFile(scheduleFile, parseContext);
|
||||
EclipseGrid grid(40,40,30);
|
||||
Schedule sched(parseContext , grid , deck, Phases(true, true, true));
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
Schedule sched(parseContext , grid , eclipseProperties, deck, Phases(true, true, true));
|
||||
const Events& events = sched.getEvents();
|
||||
|
||||
BOOST_CHECK( events.hasEvent(ScheduleEvents::NEW_WELL , 0 ) );
|
||||
|
||||
@@ -189,14 +189,16 @@ BOOST_AUTO_TEST_CASE( CheckUnsupportedInSCHEDULE ) {
|
||||
auto deckSupported = parser.parseString( deckStringSupported , parseContext );
|
||||
auto deckUnSupported = parser.parseString( deckStringUnSupported , parseContext );
|
||||
EclipseGrid grid( deckSupported );
|
||||
TableManager table ( deckSupported );
|
||||
Eclipse3DProperties eclipseProperties ( deckSupported , table, grid);
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , eclipseProperties, deckSupported, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , eclipseProperties, deckUnSupported, Phases(true, true, true) ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::THROW_EXCEPTION );
|
||||
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) ));
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , eclipseProperties, deckUnSupported, Phases(true, true, true) ), std::invalid_argument );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , eclipseProperties, deckSupported, Phases(true, true, true) ));
|
||||
}
|
||||
|
||||
|
||||
@@ -263,12 +265,14 @@ BOOST_AUTO_TEST_CASE(TestCOMPORD) {
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
|
||||
EclipseGrid grid( deck );
|
||||
TableManager table ( deck );
|
||||
Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::IGNORE);
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck, Phases(true, true, true) ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::THROW_EXCEPTION);
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deck, Phases(true, true, true) ), std::invalid_argument );
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , eclipseProperties, deck, Phases(true, true, true) ), std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ COMPDAT
|
||||
COMPDAT
|
||||
-- WELL I J K1 K2 Sat. CF DIAM KH SKIN ND DIR Ro
|
||||
'W_1' 3 7 1 3 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 /
|
||||
'W_1' 3 7 2 2 'OPEN' 1* 23487.0 0.311 4332.346 2* 'X' 22.123 /
|
||||
'W_1' 3 7 2 2 'OPEN' 2 23487.0 0.311 4332.346 2* 'X' 22.123 /
|
||||
'W_1' 3 7 3 3 'OPEN' 1* 51.867 0.311 4799.764 2* 'X' 22.143 /
|
||||
'W_1' 3 7 4 4 'OPEN' 1* 34.243 0.311 3169.482 2* 'X' 22.166 /
|
||||
'W_1' 3 7 4 4 'OPEN' 1* 8.988 0.311 832.457 2* 'X' 22.236 /
|
||||
|
||||
Reference in New Issue
Block a user