Merge pull request #547 from totto82/productivity_index
Add support for output of well productivity index
This commit is contained in:
commit
089b58f101
@ -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<std::size_t, Segment> segments;
|
||||
|
||||
inline bool flowing() const noexcept;
|
||||
template <class MessageBufferType>
|
||||
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 <class MessageBufferType>
|
||||
@ -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 <class MessageBufferType>
|
||||
|
@ -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<int,3> ijk;
|
||||
std::size_t m_seqIndex;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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<std::pair<std::string,double>>& 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>)},
|
||||
};
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -500,6 +500,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;
|
||||
@ -1519,6 +1522,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<ParserKeywords::WELSPECS::CROSSFLOW>().getTrimmedString(0);
|
||||
if (allowCrossFlowStr == "NO")
|
||||
@ -1533,7 +1538,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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<double,3> cell_perm = {{ permx[global_index], permy[global_index], permz[global_index]}};
|
||||
std::array<double,3> 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);
|
||||
|
@ -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
|
||||
|
@ -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" }]}
|
||||
|
@ -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.+",
|
||||
|
@ -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 );
|
||||
|
@ -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() );
|
||||
|
@ -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() );
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
@ -336,13 +336,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;
|
||||
@ -356,7 +356,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;
|
||||
@ -369,7 +369,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));
|
||||
@ -388,7 +388,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));
|
||||
@ -403,7 +403,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));
|
||||
@ -459,7 +459,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));
|
||||
|
||||
@ -473,7 +473,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));
|
||||
@ -486,7 +486,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));
|
||||
@ -507,7 +507,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;
|
||||
@ -525,7 +525,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 ));
|
||||
@ -575,7 +575,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 ));
|
||||
@ -619,7 +619,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);
|
||||
@ -630,7 +630,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);
|
||||
@ -640,7 +640,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));
|
||||
@ -649,7 +649,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));
|
||||
@ -658,7 +658,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));
|
||||
|
Loading…
Reference in New Issue
Block a user