Merge pull request #547 from totto82/productivity_index
Add support for output of well productivity index
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user