mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding function initCompletions() to WellInterface
This commit is contained in:
parent
c0b48e28c3
commit
8be28e8448
@ -320,6 +320,21 @@ namespace Opm
|
||||
// well bore diameter
|
||||
std::vector<double> bore_diameters_;
|
||||
|
||||
/*
|
||||
* completions_ contains the mapping from completion id to connection indices
|
||||
* {
|
||||
* 2 : [ConnectionIndex, ConnectioniIndex],
|
||||
* 1 : [ConnectionIndex, ConnectionIndex, ConnectoniIndex],
|
||||
* 5 : [ConnectionIndex],
|
||||
* 7 : [ConnectionIndex]
|
||||
* ...
|
||||
* }
|
||||
* The integer ID's correspond to the COMPLETION id given by the COMPLUMP keyword.
|
||||
* When there is no COMPLUMP keyword used, a default completion number will be assigned
|
||||
* based on the order of the declaration of the connections
|
||||
*/
|
||||
std::map<int, std::vector<int>> completions_;
|
||||
|
||||
const PhaseUsage* phase_usage_;
|
||||
|
||||
bool getAllowCrossFlow() const;
|
||||
@ -417,6 +432,8 @@ namespace Opm
|
||||
|
||||
void scaleProductivityIndex(const int perfIdx, double& productivity_index, const bool new_well, Opm::DeferredLogger& deferred_logger);
|
||||
|
||||
void initCompletions();
|
||||
|
||||
// count the number of times an output log message is created in the productivity
|
||||
// index calculations
|
||||
int well_productivity_index_logger_counter_;
|
||||
|
@ -100,6 +100,9 @@ namespace Opm
|
||||
saturation_table_number_.begin() );
|
||||
}
|
||||
|
||||
// initialization of the completions mapping
|
||||
initCompletions();
|
||||
|
||||
well_efficiency_factor_ = 1.0;
|
||||
|
||||
connectionRates_.resize(number_of_perforations_);
|
||||
@ -137,6 +140,28 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
initCompletions()
|
||||
{
|
||||
assert(completions_.empty() );
|
||||
|
||||
const WellConnections& connections = well_ecl_.getConnections();
|
||||
const int num_conns = connections.size();
|
||||
|
||||
assert(num_conns == number_of_perforations_);
|
||||
|
||||
for (int c = 0; c < num_conns; c++) {
|
||||
completions_[connections[c].complnum()].push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
|
Loading…
Reference in New Issue
Block a user