From 2d5d0953eef28eb1bc61f4e1a6017888a505b1d9 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Fri, 2 Nov 2018 15:21:28 +0100 Subject: [PATCH] Add support for output of well productivity index --- opm/output/data/Wells.hpp | 16 ++++- .../EclipseState/Schedule/Connection.hpp | 6 ++ .../eclipse/EclipseState/Schedule/Well.hpp | 6 +- .../EclipseState/Schedule/WellConnections.hpp | 20 ++++--- opm/parser/eclipse/Units/UnitSystem.hpp | 2 + src/opm/output/eclipse/Summary.cpp | 24 ++++++++ .../EclipseState/Schedule/Connection.cpp | 14 +++++ .../EclipseState/Schedule/Schedule.cpp | 7 ++- .../eclipse/EclipseState/Schedule/Well.cpp | 10 +++- .../EclipseState/Schedule/WellConnections.cpp | 16 ++++- src/opm/parser/eclipse/Units/UnitSystem.cpp | 56 ++++++++++++++++- .../share/keywords/000_Eclipse100/C/COMPDAT | 2 +- .../keywords/000_Eclipse100/W/WELL_PROBE | 6 +- tests/parser/ConnectionTests.cpp | 20 +++---- tests/parser/GroupTests.cpp | 12 ++-- tests/parser/MultisegmentWellTests.cpp | 14 ++--- tests/parser/UnitTests.cpp | 16 +++++ tests/parser/WellTests.cpp | 60 +++++++++---------- 18 files changed, 236 insertions(+), 71 deletions(-) diff --git a/opm/output/data/Wells.hpp b/opm/output/data/Wells.hpp index d944cc6f4..177781cdd 100644 --- a/opm/output/data/Wells.hpp +++ b/opm/output/data/Wells.hpp @@ -58,6 +58,9 @@ namespace Opm { reservoir_water = (1 << 8), reservoir_oil = (1 << 9), reservoir_gas = (1 << 10), + productivity_index_water = (1 << 11), + productivity_index_oil = (1 << 12), + productivity_index_gas = (1 << 13), }; using enum_size = std::underlying_type< opt >::type; @@ -101,6 +104,9 @@ namespace Opm { double reservoir_water = 0.0; double reservoir_oil = 0.0; double reservoir_gas = 0.0; + double productivity_index_water = 0.0; + double productivity_index_oil = 0.0; + double productivity_index_gas = 0.0; }; struct Connection { @@ -142,7 +148,6 @@ namespace Opm { int control; std::vector< Connection > connections; std::unordered_map segments; - inline bool flowing() const noexcept; template void write(MessageBufferType& buffer) const; @@ -264,6 +269,9 @@ namespace Opm { case opt::reservoir_water: return this->reservoir_water; case opt::reservoir_oil: return this->reservoir_oil; case opt::reservoir_gas: return this->reservoir_gas; + case opt::productivity_index_water: return this->productivity_index_water; + case opt::productivity_index_oil: return this->productivity_index_oil; + case opt::productivity_index_gas: return this->productivity_index_gas; } throw std::invalid_argument( @@ -301,6 +309,9 @@ namespace Opm { buffer.write(this->reservoir_water); buffer.write(this->reservoir_oil); buffer.write(this->reservoir_gas); + buffer.write(this->productivity_index_water); + buffer.write(this->productivity_index_oil); + buffer.write(this->productivity_index_gas); } template @@ -359,6 +370,9 @@ namespace Opm { buffer.read(this->reservoir_water); buffer.read(this->reservoir_oil); buffer.read(this->reservoir_gas); + buffer.read(this->productivity_index_water); + buffer.read(this->productivity_index_oil); + buffer.read(this->productivity_index_gas); } template diff --git a/opm/parser/eclipse/EclipseState/Schedule/Connection.hpp b/opm/parser/eclipse/EclipseState/Schedule/Connection.hpp index e1482a220..a90df46a4 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Connection.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Connection.hpp @@ -46,6 +46,8 @@ namespace Opm { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction, const std::size_t seqIndex, @@ -69,6 +71,8 @@ namespace Opm { double CF() const; double Kh() const; double rw() const; + double r0() const; + double skinFactor() const; double wellPi() const; void setState(WellCompletion::StateEnum state); @@ -96,6 +100,8 @@ namespace Opm { double m_CF; double m_Kh; double m_rw; + double m_r0; + double m_skin_factor; std::array ijk; std::size_t m_seqIndex; diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp index 974d3b058..24fbae731 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp @@ -51,7 +51,7 @@ namespace Opm { class Well { public: Well(const std::string& name, const size_t& seqIndex, int headI, - int headJ, double refDepth, Phase preferredPhase, + int headJ, double refDepth, double drainageRadius, Phase preferredPhase, const TimeMap& timeMap, size_t creationTimeStep, WellCompletion::CompletionOrderEnum completionOrdering = WellCompletion::TRACK, bool allowCrossFlow = true, bool automaticShutIn = true); @@ -76,6 +76,9 @@ namespace Opm { double getRefDepth() const; double getRefDepth( size_t timestep ) const; void setRefDepth( size_t timestep, double ); + double getDrainageRadius( size_t timestep ) const; + void setDrainageRadius( size_t timestep, double ); + Phase getPreferredPhase() const; bool isAvailableForGroupControl(size_t timeStep) const; @@ -226,6 +229,7 @@ namespace Opm { DynamicState< int > m_headI; DynamicState< int > m_headJ; DynamicState< double > m_refDepth; + DynamicState< double > m_drainageRadius; Phase m_preferredPhase; WellCompletion::CompletionOrderEnum m_comporder; diff --git a/opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp b/opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp index f30356bf1..a9c5fe3ba 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/WellConnections.hpp @@ -38,12 +38,14 @@ namespace Opm { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnum::Z, - const std::size_t seqIndex = 0, - const double segDistStart= 0.0, - const double segDistEnd= 0.0, - const bool defaultSatTabId = true); + const std::size_t seqIndex = 0, + const double segDistStart= 0.0, + const double segDistEnd= 0.0, + const bool defaultSatTabId = true); void loadCOMPDAT(const DeckRecord& record, const EclipseGrid& grid, const Eclipse3DProperties& eclipseProperties, std::size_t& totNC); using const_iterator = std::vector< Connection >::const_iterator; @@ -87,12 +89,14 @@ namespace Opm { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnum::Z, - const std::size_t seqIndex = 0, - const double segDistStart= 0.0, - const double segDistEnd= 0.0, - const bool defaultSatTabId = true); + const std::size_t seqIndex = 0, + const double segDistStart= 0.0, + const double segDistEnd= 0.0, + const bool defaultSatTabId = true); size_t findClosestConnection(int oi, int oj, double oz, size_t start_pos); diff --git a/opm/parser/eclipse/Units/UnitSystem.hpp b/opm/parser/eclipse/Units/UnitSystem.hpp index 5b4f3724b..15dab237a 100644 --- a/opm/parser/eclipse/Units/UnitSystem.hpp +++ b/opm/parser/eclipse/Units/UnitSystem.hpp @@ -70,6 +70,8 @@ namespace Opm { gas_inverse_formation_volume_factor, oil_inverse_formation_volume_factor, water_inverse_formation_volume_factor, + liquid_productivity_index, + gas_productivity_index }; explicit UnitSystem(UnitType unit = UnitType::UNIT_TYPE_METRIC); diff --git a/src/opm/output/eclipse/Summary.cpp b/src/opm/output/eclipse/Summary.cpp index 65aea67ea..af5ee2f08 100644 --- a/src/opm/output/eclipse/Summary.cpp +++ b/src/opm/output/eclipse/Summary.cpp @@ -340,6 +340,15 @@ measure rate_unit< rt::reservoir_oil >() { return measure::rate; } template<> constexpr measure rate_unit< rt::reservoir_gas >() { return measure::rate; } +template<> constexpr +measure rate_unit < rt::productivity_index_water > () { return measure::liquid_productivity_index; } + +template<> constexpr +measure rate_unit < rt::productivity_index_oil > () { return measure::liquid_productivity_index; } + +template<> constexpr +measure rate_unit < rt::productivity_index_gas > () { return measure::gas_productivity_index; } + double efac( const std::vector>& eff_factors, const std::string& name ) { auto it = std::find_if( eff_factors.begin(), eff_factors.end(), [&] ( const std::pair< std::string, double > elem ) @@ -653,6 +662,16 @@ quantity region_rate( const fn_args& args ) { return { -sum, rate_unit< phase >() }; } +template < rt phase> +quantity pi (const fn_args& args ) { + const quantity zero = { 0, rate_unit< phase >() }; + if( args.schedule_wells.empty() ) return zero; + + const auto p = args.wells.find( args.schedule_wells.front()->name() ); + if( p == args.wells.end() ) return zero; + std::cout << p->second.rates.get(phase) << std::endl; + return { p->second.rates.get(phase), rate_unit< phase >() }; +} template< typename F, typename G > auto mul( F f, G g ) -> bin_op< F, G, std::multiplies< quantity > > { return { f, g }; } @@ -963,6 +982,11 @@ static const std::unordered_map< std::string, ofun > funs = { { "SWFR", srate< rt::wat > }, { "SGFR", srate< rt::gas > }, { "SPR", spr }, + // Well PI + { "WPIW", pi< rt::productivity_index_water >}, + { "WPIO", pi< rt::productivity_index_oil >}, + { "WPIG", pi< rt::productivity_index_gas >}, + { "WPIL", sum( pi< rt::productivity_index_water >, pi< rt::productivity_index_oil>)}, }; diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Connection.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Connection.cpp index aa53dbbd0..ebccd081e 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Connection.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Connection.cpp @@ -43,6 +43,8 @@ namespace Opm { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction, const std::size_t seqIndex, @@ -58,6 +60,8 @@ namespace Opm { m_CF(CF), m_Kh(Kh), m_rw(rw), + m_r0(r0), + m_skin_factor(skin_factor), ijk({i,j,k}), m_seqIndex(seqIndex), m_segDistStart(segDistStart), @@ -173,6 +177,14 @@ namespace Opm { return this->m_rw; } + double Connection::r0() const { + return this->m_r0; + } + + double Connection::skinFactor() const { + return this->m_skin_factor; + } + void Connection::setState(WellCompletion::StateEnum state) { this->open_state = state; } @@ -200,6 +212,8 @@ namespace Opm { && this->m_complnum == rhs.m_complnum && this->m_CF == rhs.m_CF && this->m_rw == rhs.m_rw + && this->m_r0 == rhs.m_r0 + && this->m_skin_factor == rhs.m_skin_factor && this->wPi == rhs.wPi && this->m_Kh == rhs.m_Kh && this->sat_tableId == rhs.sat_tableId diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 92f9fc3ed..c9846cb3f 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -485,6 +485,9 @@ namespace Opm { : -1.0; currentWell.setRefDepth( currentStep, refDepth ); + double drainageRadius = record.getItem( "D_RADIUS" ).getSIDouble(0); + currentWell.setDrainageRadius( currentStep, drainageRadius ); + addWellToGroup( this->m_groups.at( groupName ), this->m_wells.get( wellName ), currentStep); if (handleGroupFromWELSPECS(groupName, newTree)) needNewTree = true; @@ -1468,6 +1471,8 @@ namespace Opm { ? refDepthItem.getSIDouble( 0 ) : -1.0; + double drainageRadius = record.getItem( "D_RADIUS" ).getSIDouble(0); + bool allowCrossFlow = true; const std::string& allowCrossFlowStr = record.getItem().getTrimmedString(0); if (allowCrossFlowStr == "NO") @@ -1482,7 +1487,7 @@ namespace Opm { const size_t wseqIndex = m_wells.size(); Well well(wellName, wseqIndex, - headI, headJ, refDepth, + headI, headJ, refDepth, drainageRadius, preferredPhase, m_timeMap, timeStep, wellConnectionOrder, allowCrossFlow, automaticShutIn); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well.cpp index a252506e2..47e75d686 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well.cpp @@ -34,7 +34,7 @@ namespace Opm { Well::Well(const std::string& name_, const size_t& seqIndex_, int headI, - int headJ, double refDepth , Phase preferredPhase, + int headJ, double refDepth , double drainageRadius, Phase preferredPhase, const TimeMap& timeMap, size_t creationTimeStep, WellCompletion::CompletionOrderEnum completionOrdering, bool allowCrossFlow, bool automaticShutIn) @@ -60,6 +60,7 @@ namespace Opm { m_headI( timeMap, headI ), m_headJ( timeMap, headJ ), m_refDepth( timeMap, refDepth ), + m_drainageRadius (timeMap, drainageRadius), m_preferredPhase(preferredPhase), m_comporder(completionOrdering), m_allowCrossFlow(allowCrossFlow), @@ -347,6 +348,13 @@ namespace Opm { this->m_refDepth.update( timestep, depth ); } + void Well::setDrainageRadius( size_t timestep, double radius ) { + this->m_drainageRadius.update( timestep, radius ); + } + double Well::getDrainageRadius(size_t timestep) const { + return m_drainageRadius.get( timestep ); + } + Phase Well::getPreferredPhase() const { return m_preferredPhase; } diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/WellConnections.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/WellConnections.cpp index 0a307fd2d..595e01b28 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/WellConnections.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/WellConnections.cpp @@ -140,6 +140,8 @@ namespace { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction, const std::size_t seqIndex, @@ -149,7 +151,7 @@ namespace { { int conn_i = (i < 0) ? this->headI : i; int conn_j = (j < 0) ? this->headJ : j; - Connection conn(conn_i, conn_j, k, complnum, depth, state, CF, Kh, rw, satTableId, direction, seqIndex, segDistStart, segDistEnd, defaultSatTabId); + Connection conn(conn_i, conn_j, k, complnum, depth, state, CF, Kh, rw, r0, skin_factor, satTableId, direction, seqIndex, segDistStart, segDistEnd, defaultSatTabId); this->add(conn); } @@ -161,6 +163,8 @@ namespace { double CF, double Kh, double rw, + double r0, + double skin_factor, const int satTableId, const WellCompletion::DirectionEnum direction, const std::size_t seqIndex, @@ -178,6 +182,8 @@ namespace { CF, Kh, rw, + r0, + skin_factor, satTableId, direction, seqIndex, @@ -215,6 +221,8 @@ namespace { const WellCompletion::DirectionEnum direction = WellCompletion::DirectionEnumFromString(record.getItem("DIR").getTrimmedString(0)); double skin_factor = record.getItem("SKIN").getSIDouble(0); double rw; + double r0; + if (satTableIdItem.hasValue(0) && satTableIdItem.get < int > (0) > 0) { @@ -251,7 +259,6 @@ namespace { if (CF > 0 && Kh > 0) goto CF_done; - /* We must calculate CF and Kh from the items in the COMPDAT record and cell properties. */ { // Angle of completion exposed to flow. We assume centre @@ -260,7 +267,6 @@ namespace { size_t global_index = grid.getGlobalIndex(I,J,k); std::array cell_perm = {{ permx[global_index], permy[global_index], permz[global_index]}}; std::array cell_size = grid.getCellDims(global_index); - double r0; const auto& K = permComponents(direction, cell_perm); const auto& D = effectiveExtent(direction, ntg[global_index], cell_size); @@ -299,6 +305,8 @@ namespace { CF, Kh, rw, + r0, + skin_factor, satTableId, direction, noConn, 0., 0., defaultSatTable); @@ -321,6 +329,8 @@ namespace { CF, Kh, rw, + r0, + skin_factor, satTableId, direction, noConn, conSDStart, conSDEnd, defaultSatTable); diff --git a/src/opm/parser/eclipse/Units/UnitSystem.cpp b/src/opm/parser/eclipse/Units/UnitSystem.cpp index fc668089e..9f4d5c240 100644 --- a/src/opm/parser/eclipse/Units/UnitSystem.cpp +++ b/src/opm/parser/eclipse/Units/UnitSystem.cpp @@ -71,6 +71,8 @@ namespace { 0.0, 0.0, 0.0, + 0.0, + 0.0, 0.0 }; @@ -103,7 +105,11 @@ namespace { 1, /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + 1 / (Metric::LiquidSurfaceVolume / Metric::Time / Metric::Pressure), + 1 / (Metric::GasSurfaceVolume / Metric::Time / Metric::Pressure), 1 / Metric::Energy + + }; static const double from_metric[] = { @@ -135,7 +141,10 @@ namespace { 1, /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + Metric::LiquidSurfaceVolume / Metric::Time / Metric::Pressure, + Metric::GasSurfaceVolume / Metric::Time / Metric::Pressure, Metric::Energy + }; static constexpr const char* metric_names[] = { @@ -167,7 +176,10 @@ namespace { "SM3/RM3", /* gas inverse formation volume factor */ "SM3/RM3", /* oil inverse formation volume factor */ "SM3/RM3", /* water inverse formation volume factor */ + "SM3/DAY/BARS", + "SM3/DAY/BARS", "KJ", /* energy */ + }; // ================================================================= @@ -202,6 +214,8 @@ namespace { 0.0, 0.0, 0.0, + 0.0, + 0.0, 0.0 }; @@ -234,7 +248,10 @@ namespace { 1 / (Field::GasSurfaceVolume / Field::ReservoirVolume), /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + 1 / (Field::LiquidSurfaceVolume / Field::Time / Field::Pressure), + 1 / (Field::GasSurfaceVolume / Field::Time / Field::Pressure), 1 / Field::Energy + }; static const double from_field[] = { @@ -266,7 +283,10 @@ namespace { Field::GasSurfaceVolume / Field::ReservoirVolume, /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + Field::LiquidSurfaceVolume / Field::Time / Field::Pressure, + Field::GasSurfaceVolume / Field::Time / Field::Pressure, Field::Energy + }; static constexpr const char* field_names[] = { @@ -298,7 +318,10 @@ namespace { "MSCF/RB", /* gas inverse formation volume factor */ "STB/RB", /* oil inverse formation volume factor */ "STB/RB", /* water inverse formation volume factor */ + "STB/DAY/PSIA", + "MSCF/DAY/PSIA", "BTU", /* energy */ + }; // ================================================================= @@ -333,6 +356,8 @@ namespace { 0.0, 0.0, 0.0, + 0.0, + 0.0, 0.0 }; @@ -365,7 +390,10 @@ namespace { 1, /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + 1 / (Lab::LiquidSurfaceVolume / Lab::Time / Lab::Pressure), + 1 / (Lab::GasSurfaceVolume / Lab::Time / Lab::Pressure), 1 / Lab::Energy + }; static const double from_lab[] = { @@ -397,7 +425,10 @@ namespace { 1, /* gas inverse formation volume factor */ 1, /* oil inverse formation volume factor */ 1, /* water inverse formation volume factor */ + Lab::LiquidSurfaceVolume / Lab::Time / Lab::Pressure, + Lab::GasSurfaceVolume / Lab::Time / Lab::Pressure, Lab::Energy + }; static constexpr const char* lab_names[] = { @@ -429,7 +460,10 @@ namespace { "SCC/RCC", /* gas formation volume factor */ "SCC/RCC", /* oil inverse formation volume factor */ "SCC/RCC", /* water inverse formation volume factor */ + "SCC/HR/ATM", + "SCC/HR/ATM", "J", /* energy */ + }; // ================================================================= @@ -464,6 +498,8 @@ namespace { 0.0, 0.0, 0.0, + 0.0, + 0.0, 0.0 }; @@ -496,7 +532,10 @@ namespace { 1 / (PVT_M::GasSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bg */ 1 / (PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bo */ 1 / (PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume), /* 1/Bw */ + 1 / (PVT_M::LiquidSurfaceVolume / PVT_M::Time / PVT_M::Pressure), + 1 / (PVT_M::GasSurfaceVolume / PVT_M::Time / PVT_M::Pressure), 1 / PVT_M::Energy + }; static const double from_pvt_m[] = { @@ -528,7 +567,10 @@ namespace { PVT_M::GasSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bg */ PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bo */ PVT_M::LiquidSurfaceVolume / PVT_M::ReservoirVolume, /* 1/Bw */ + PVT_M::LiquidSurfaceVolume / PVT_M::Time / PVT_M::Pressure, + PVT_M::GasSurfaceVolume / PVT_M::Time / PVT_M::Pressure, PVT_M::Energy + }; static constexpr const char* pvt_m_names[] = { @@ -560,7 +602,10 @@ namespace { "SM3/RM3", /* gas inverse formation volume factor */ "SM3/RM3", /* oil inverse formation volume factor */ "SM3/RM3", /* water inverse formation volume factor */ - "KJ" /* energy */ + "SM3/DAY/ATM", + "SM3/DAY/ATM", + "KJ" /* energy */, + }; // ================================================================= @@ -595,6 +640,8 @@ namespace { 0.0, 0.0, 0.0, + 0.0, + 0.0, 0.0 }; @@ -627,6 +674,8 @@ namespace { 1, 1, 1, + 1, + 1, 1 }; @@ -659,6 +708,8 @@ namespace { 1, 1, 1, + 1, + 1, 1 }; @@ -691,7 +742,10 @@ namespace { "SM3/RM3", /* gas inverse formation volume factor */ "SM3/RM3", /* oil inverse formation volume factor */ "SM3/RM3", /* water inverse formation volume factor */ + "SM3/DAY/BARS", + "SM3/DAY/BARS", "KJ", /* energy */ + }; } // namespace Anonymous diff --git a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/C/COMPDAT b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/C/COMPDAT index 5117dcf07..010e5b967 100644 --- a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/C/COMPDAT +++ b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/C/COMPDAT @@ -12,4 +12,4 @@ {"name" : "SKIN" , "value_type" : "DOUBLE", "dimension" : "1" , "default" : 0}, {"name" : "D_FACTOR" , "value_type" : "DOUBLE", "dimension" : "1" }, {"name" : "DIR" , "value_type" : "STRING" , "default" : "Z"}, - {"name" : "PR" , "value_type" : "DOUBLE", "dimension" : "Pressure" }]} + {"name" : "PR" , "value_type" : "DOUBLE", "dimension" : "Length" }]} diff --git a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE index 80eb77c6f..8b7730a6d 100644 --- a/src/opm/parser/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE +++ b/src/opm/parser/eclipse/share/keywords/000_Eclipse100/W/WELL_PROBE @@ -241,7 +241,11 @@ "WTPRALK", "WTPTALK", "WTIRALK", - "WTITALK" + "WTITALK", + "WPIG", + "WPIW", + "WPIO", + "WPIL" ], "comment":"Some keywords need to be suffixed by a number, some with the tracer name...", "deck_name_regex":"WU.+|(WBHWC|WGFWC|WOFWC|WWFWC)[1-9][0-9]?|WTPR.+|WTPT.+|WTPC.+|WTIR.+|WTIT.+|WTIC.+", diff --git a/tests/parser/ConnectionTests.cpp b/tests/parser/ConnectionTests.cpp index 4eb352165..7be7499e8 100644 --- a/tests/parser/ConnectionTests.cpp +++ b/tests/parser/ConnectionTests.cpp @@ -69,8 +69,8 @@ BOOST_AUTO_TEST_CASE(CreateWellConnectionsOK) { BOOST_AUTO_TEST_CASE(AddCompletionSizeCorrect) { Opm::WellCompletion::DirectionEnum dir = Opm::WellCompletion::DirectionEnum::Z; Opm::WellConnections completionSet; - Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0, dir,0, 0., 0., true); - Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0, 0., 0., true); + Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0, 0., 0., true); + Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0, 0., 0., true); completionSet.add( completion1 ); BOOST_CHECK_EQUAL( 1U , completionSet.size() ); @@ -83,8 +83,8 @@ BOOST_AUTO_TEST_CASE(AddCompletionSizeCorrect) { BOOST_AUTO_TEST_CASE(WellConnectionsGetOutOfRangeThrows) { Opm::WellCompletion::DirectionEnum dir = Opm::WellCompletion::DirectionEnum::Z; - Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); - Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); + Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); + Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); Opm::WellConnections completionSet; completionSet.add( completion1 ); BOOST_CHECK_EQUAL( 1U , completionSet.size() ); @@ -103,9 +103,9 @@ BOOST_AUTO_TEST_CASE(AddCompletionCopy) { Opm::WellConnections completionSet; Opm::WellCompletion::DirectionEnum dir = Opm::WellCompletion::DirectionEnum::Z; - Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); - Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); - Opm::Connection completion3( 10,10,12, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); + Opm::Connection completion1( 10,10,10, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); + Opm::Connection completion2( 10,10,11, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); + Opm::Connection completion3( 10,10,12, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); completionSet.add( completion1 ); completionSet.add( completion2 ); @@ -125,9 +125,9 @@ BOOST_AUTO_TEST_CASE(ActiveCompletions) { Opm::EclipseGrid grid(10,20,20); Opm::WellCompletion::DirectionEnum dir = Opm::WellCompletion::DirectionEnum::Z; Opm::WellConnections completions; - Opm::Connection completion1( 0,0,0, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); - Opm::Connection completion2( 0,0,1, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); - Opm::Connection completion3( 0,0,2, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0, dir,0,0., 0., true); + Opm::Connection completion1( 0,0,0, 1, 0.0, Opm::WellCompletion::OPEN , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); + Opm::Connection completion2( 0,0,1, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); + Opm::Connection completion3( 0,0,2, 1, 0.0, Opm::WellCompletion::SHUT , 99.88, 355.113, 0.25, 0.0, 0.0, 0, dir,0,0., 0., true); completions.add( completion1 ); completions.add( completion2 ); diff --git a/tests/parser/GroupTests.cpp b/tests/parser/GroupTests.cpp index 680725e4c..46ecce5ad 100644 --- a/tests/parser/GroupTests.cpp +++ b/tests/parser/GroupTests.cpp @@ -156,8 +156,8 @@ BOOST_AUTO_TEST_CASE(GroupAddWell) { auto timeMap = createXDaysTimeMap( 10 ); Opm::Group group("G1" , 1, timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); BOOST_CHECK_EQUAL(0U , group.numWells(2)); group.addWell( 3 , well1.get() ); @@ -193,8 +193,8 @@ BOOST_AUTO_TEST_CASE(GroupAddAndDelWell) { auto timeMap = createXDaysTimeMap( 10 ); Opm::Group group("G1" , 1, timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); BOOST_CHECK_EQUAL(0U , group.numWells(2)); group.addWell( 3 , well1.get() ); @@ -226,8 +226,8 @@ BOOST_AUTO_TEST_CASE(GroupAddAndDelWell) { BOOST_AUTO_TEST_CASE(getWells) { auto timeMap = createXDaysTimeMap( 10 ); Opm::Group group("G1" , 1, timeMap , 0); - auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); - auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well1 = std::make_shared< Well >("WELL1", 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); + auto well2 = std::make_shared< Well >("WELL2", 2, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap, 0); group.addWell( 2 , well1.get() ); group.addWell( 3 , well1.get() ); diff --git a/tests/parser/MultisegmentWellTests.cpp b/tests/parser/MultisegmentWellTests.cpp index 6092c59f0..af7dce349 100644 --- a/tests/parser/MultisegmentWellTests.cpp +++ b/tests/parser/MultisegmentWellTests.cpp @@ -45,14 +45,14 @@ BOOST_AUTO_TEST_CASE(MultisegmentWellTest) { Opm::WellCompletion::DirectionEnum dir = Opm::WellCompletion::DirectionEnum::Z; Opm::WellConnections connection_set; Opm::EclipseGrid grid(20,20,20); - connection_set.add(Opm::Connection( 19, 0, 0, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, dir,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 19, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, dir,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 19, 0, 2, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, dir,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 19, 0, 0, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, dir,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 19, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, dir,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 19, 0, 2, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, dir,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 18, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 17, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 16, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); - connection_set.add(Opm::Connection( 15, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 18, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 17, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 16, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); + connection_set.add(Opm::Connection( 15, 0, 1, 1, 0.0, Opm::WellCompletion::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0, Opm::WellCompletion::DirectionEnum::X,0, 0., 0., true) ); BOOST_CHECK_EQUAL( 7U , connection_set.size() ); diff --git a/tests/parser/UnitTests.cpp b/tests/parser/UnitTests.cpp index d0e14346e..573409a87 100644 --- a/tests/parser/UnitTests.cpp +++ b/tests/parser/UnitTests.cpp @@ -338,6 +338,8 @@ BOOST_AUTO_TEST_CASE(METRIC_UNITS) BOOST_CHECK_CLOSE( metric.to_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( metric.to_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( metric.to_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( metric.to_si( Meas::liquid_productivity_index , 1.0 ) , 1.1574074074074073e-10 , 1.0e-10 ); + BOOST_CHECK_CLOSE( metric.to_si( Meas::gas_productivity_index , 1.0 ) , 1.1574074074074073e-10 , 1.0e-10 ); // ---------------------------------------------------------------- // SI -> METRIC @@ -368,6 +370,8 @@ BOOST_AUTO_TEST_CASE(METRIC_UNITS) BOOST_CHECK_CLOSE( metric.from_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( metric.from_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( metric.from_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( metric.from_si( Meas::liquid_productivity_index , 1.0 ) , 86.400e8 , 1.0e-10 ); + BOOST_CHECK_CLOSE( metric.from_si( Meas::gas_productivity_index , 1.0 ) , 86.400e8 , 1.0e-10 ); } BOOST_AUTO_TEST_CASE(FIELD_UNITS) @@ -408,6 +412,8 @@ BOOST_AUTO_TEST_CASE(FIELD_UNITS) BOOST_CHECK_CLOSE( field.to_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 178.1076066790352 , 1.0e-10 ); BOOST_CHECK_CLOSE( field.to_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( field.to_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( field.to_si( Meas::liquid_productivity_index , 1.0 ) , 1.840130728333334e-06 / 6.894757293168360e+03 , 1.0e-10 ); + BOOST_CHECK_CLOSE( field.to_si( Meas::gas_productivity_index , 1.0 ) , 3.277412800000001e-04 / 6.894757293168360e+03 , 1.0e-10 ); // ---------------------------------------------------------------- // SI -> FIELD @@ -438,6 +444,8 @@ BOOST_AUTO_TEST_CASE(FIELD_UNITS) BOOST_CHECK_CLOSE( field.from_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 5.614583333333335e-03 , 1.0e-10 ); BOOST_CHECK_CLOSE( field.from_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( field.from_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( field.from_si( Meas::liquid_productivity_index , 1.0 ) , 5.434396505653337e+05 * 6.894757293168360e+03 , 1.0e-10 ); + BOOST_CHECK_CLOSE( field.from_si( Meas::gas_productivity_index , 1.0 ) , 3.051187204736614e+03 * 6.894757293168360e+03, 1.0e-10 ); } BOOST_AUTO_TEST_CASE(LAB_UNITS) @@ -478,6 +486,8 @@ BOOST_AUTO_TEST_CASE(LAB_UNITS) BOOST_CHECK_CLOSE( lab.to_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( lab.to_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( lab.to_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( lab.to_si( Meas::liquid_productivity_index , 1.0 ) , 2.777777777777778e-10 / 101325.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( lab.to_si( Meas::gas_productivity_index , 1.0 ) , 2.777777777777778e-10 / 101325.0 , 1.0e-10 ); // ---------------------------------------------------------------- // SI -> LAB @@ -508,6 +518,8 @@ BOOST_AUTO_TEST_CASE(LAB_UNITS) BOOST_CHECK_CLOSE( lab.from_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( lab.from_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( lab.from_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( lab.from_si( Meas::liquid_productivity_index , 1.0 ) , 3.6e9 * 101325.0, 1.0e-10 ); + BOOST_CHECK_CLOSE( lab.from_si( Meas::gas_productivity_index , 1.0 ) , 3.6e9 * 101325.0 , 1.0e-10 ); } BOOST_AUTO_TEST_CASE(PVT_M_UNITS) @@ -548,6 +560,8 @@ BOOST_AUTO_TEST_CASE(PVT_M_UNITS) BOOST_CHECK_CLOSE( pvt_m.to_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( pvt_m.to_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( pvt_m.to_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( pvt_m.to_si( Meas::liquid_productivity_index , 1.0 ) , 1.1574074074074073e-05 /101325.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( pvt_m.to_si( Meas::gas_productivity_index , 1.0 ) , 1.1574074074074073e-05 /101325.0 , 1.0e-10 ); // ---------------------------------------------------------------- // SI -> PVT-M @@ -578,6 +592,8 @@ BOOST_AUTO_TEST_CASE(PVT_M_UNITS) BOOST_CHECK_CLOSE( pvt_m.from_si( Meas::gas_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( pvt_m.from_si( Meas::oil_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); BOOST_CHECK_CLOSE( pvt_m.from_si( Meas::water_inverse_formation_volume_factor , 1.0 ) , 1.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( pvt_m.from_si( Meas::liquid_productivity_index , 1.0 ) , 86.400e3 * 101325.0 , 1.0e-10 ); + BOOST_CHECK_CLOSE( pvt_m.from_si( Meas::gas_productivity_index , 1.0 ) , 86.400e3 * 101325.0, 1.0e-10 ); } BOOST_AUTO_TEST_CASE(TemperatureConversions) diff --git a/tests/parser/WellTests.cpp b/tests/parser/WellTests.cpp index 8ec1c05c7..773535038 100644 --- a/tests/parser/WellTests.cpp +++ b/tests/parser/WellTests.cpp @@ -63,7 +63,7 @@ inline std::ostream& operator<<( std::ostream& stream, const Well& well ) { BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL( "WELL1" , well.name() ); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate); } @@ -71,10 +71,10 @@ BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) { BOOST_AUTO_TEST_CASE(CreateWell_Equals) { auto timeMap = createXDaysTimeMap(10); auto timeMap2 = createXDaysTimeMap(11); - Opm::Well well1("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); - Opm::Well well2("WELL1" , 2, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); - Opm::Well well3("WELL3" , 3, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); - Opm::Well well4("WELL3" , 4, 0, 0, 0.0, Opm::Phase::OIL, timeMap2 , 0); + Opm::Well well1("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well2("WELL1" , 2, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well3("WELL3" , 3, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well4("WELL3" , 4, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap2 , 0); BOOST_CHECK_EQUAL( well1, well1 ); BOOST_CHECK_EQUAL( well2, well1 ); BOOST_CHECK( well1 == well2 ); @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_Equals) { BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL(&(well.getProductionProperties(5)), &(well.getProductionProperties(5))); BOOST_CHECK_EQUAL(&(well.getProductionProperties(8)), &(well.getProductionProperties(8))); @@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) { BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap , 0); BOOST_CHECK_EQUAL(&(well.getInjectionProperties(5)), &(well.getInjectionProperties(5))); BOOST_CHECK_EQUAL(&(well.getInjectionProperties(8)), &(well.getInjectionProperties(8))); @@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) { BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 5); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 5); BOOST_CHECK_EQUAL( false , well.hasBeenDefined(0) ); BOOST_CHECK_EQUAL( false , well.hasBeenDefined(4) ); BOOST_CHECK_EQUAL( true , well.hasBeenDefined(5) ); @@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) { BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy( 5 ).OilRate); Opm::WellProductionProperties props; @@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) { BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate); Opm::WellProductionProperties props; @@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) { BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).LiquidRate); Opm::WellProductionProperties props; @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) { BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL( true, well.getProductionPropertiesCopy(5).predictionMode); Opm::WellProductionProperties props; @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) { BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap , 0); BOOST_CHECK_EQUAL( true, well.getInjectionPropertiesCopy(5).predictionMode); Opm::WellInjectionProperties props; @@ -333,13 +333,13 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) { BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap , 0); BOOST_CHECK_EQUAL( 0U , well.getConnections( 0 ).size() ); } BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::GAS, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::GAS, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).GasRate); Opm::WellProductionProperties properties; @@ -353,7 +353,7 @@ BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) { BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).WaterRate); Opm::WellProductionProperties properties; @@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) { BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate); Opm::WellInjectionProperties props(well.getInjectionPropertiesCopy(5)); @@ -385,7 +385,7 @@ BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) { BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap , 0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap , 0); BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate); Opm::WellInjectionProperties properties(well.getInjectionPropertiesCopy(5)); @@ -400,7 +400,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) { // HACK: This test checks correctly setting of isProducer/isInjector. This property depends on which of // WellProductionProperties/WellInjectionProperties is set last, independent of actual values. auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::OIL, timeMap ,0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::OIL, timeMap ,0); /* 1: Well is created as producer */ BOOST_CHECK_EQUAL( false , well.isInjector(0)); @@ -456,7 +456,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) { BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1" , 1, 0, 0, 0.0, Opm::Phase::WATER, timeMap ,0); + Opm::Well well("WELL1" , 1, 0, 0, 0.0, 0.0, Opm::Phase::WATER, timeMap ,0); BOOST_CHECK_EQUAL("" , well.getGroupName(2)); @@ -470,7 +470,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) { BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 1, 23, 42, 2334.32, Opm::Phase::WATER, timeMap, 3); + Opm::Well well("WELL1", 1, 23, 42, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 3); BOOST_CHECK(!well.hasBeenDefined(2)); BOOST_CHECK(well.hasBeenDefined(3)); @@ -483,7 +483,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) { BOOST_AUTO_TEST_CASE(XHPLimitDefault) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); Opm::WellProductionProperties productionProps(well.getProductionPropertiesCopy(1)); @@ -504,7 +504,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) { BOOST_AUTO_TEST_CASE(InjectorType) { auto timeMap = createXDaysTimeMap(10); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); Opm::WellInjectionProperties injectionProps(well.getInjectionPropertiesCopy(1)); injectionProps.injectorType = Opm::WellInjector::WATER; @@ -522,7 +522,7 @@ BOOST_AUTO_TEST_CASE(InjectorType) { BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::OIL, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::OIL, timeMap, 0); BOOST_CHECK( !well.getProductionPropertiesCopy(1).hasProductionControl( Opm::WellProducer::ORAT )); @@ -572,7 +572,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) { BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RATE )); BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RESV )); @@ -616,7 +616,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) { BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK(well.isAvailableForGroupControl(10)); well.setAvailableForGroupControl(12, false); @@ -627,7 +627,7 @@ BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) { BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK_LT(well.getGuideRate(0), 0); well.setGuideRate(1, 32.2); @@ -637,7 +637,7 @@ BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) { BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(0)); well.setGuideRatePhase(3, Opm::GuideRate::RAT); BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(2)); @@ -646,7 +646,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) { BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor(0)); well.setEfficiencyFactor(3, 0.9); BOOST_CHECK_EQUAL(1.0, well.getEfficiencyFactor(0)); @@ -655,7 +655,7 @@ BOOST_AUTO_TEST_CASE(WellEfficiencyFactorSet) { BOOST_AUTO_TEST_CASE(WellSetScalingFactor_ScalingFactorSetSet) { auto timeMap = createXDaysTimeMap(20); - Opm::Well well("WELL1", 1, 1, 2, 2334.32, Opm::Phase::WATER, timeMap, 0); + Opm::Well well("WELL1", 1, 1, 2, 2334.32, 0.0, Opm::Phase::WATER, timeMap, 0); BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(0)); well.setGuideRateScalingFactor(4, 0.6); BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(3));