mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1494 from joakim-hove/rename-completions
Rename Completion -> Connection
This commit is contained in:
commit
5034e25ab8
@ -253,26 +253,26 @@ void wellsToState( const data::Wells& wells,
|
||||
state.wellRates()[ wellrate_index + i ] = well.rates.get( phs[ i ] );
|
||||
}
|
||||
|
||||
const auto perforation_pressure = []( const data::Completion& comp ) {
|
||||
const auto perforation_pressure = []( const data::Connection& comp ) {
|
||||
return comp.pressure;
|
||||
};
|
||||
|
||||
const auto perforation_reservoir_rate = []( const data::Completion& comp ) {
|
||||
const auto perforation_reservoir_rate = []( const data::Connection& comp ) {
|
||||
return comp.reservoir_rate;
|
||||
};
|
||||
|
||||
std::transform( well.completions.begin(),
|
||||
well.completions.end(),
|
||||
std::transform( well.connections.begin(),
|
||||
well.connections.end(),
|
||||
state.perfPress().begin() + wm.second[ 1 ],
|
||||
perforation_pressure );
|
||||
|
||||
std::transform( well.completions.begin(),
|
||||
well.completions.end(),
|
||||
std::transform( well.connections.begin(),
|
||||
well.connections.end(),
|
||||
state.perfRates().begin() + wm.second[ 1 ],
|
||||
perforation_reservoir_rate );
|
||||
|
||||
int local_comp_index = 0;
|
||||
for (const data::Completion& comp : well.completions) {
|
||||
for (const data::Connection& comp : well.connections) {
|
||||
const int global_comp_index = wm.second[1] + local_comp_index;
|
||||
for (int phase_index = 0; phase_index < np; ++phase_index) {
|
||||
state.perfPhaseRates()[global_comp_index*np + phase_index] = comp.rates.get(phs[phase_index]);
|
||||
|
@ -56,9 +56,9 @@ namespace Opm
|
||||
// for other facilities needed but not available from parser, we need to process them here
|
||||
|
||||
// initialize the segment_perforations_
|
||||
const CompletionSet& completion_set = well_ecl_->getCompletions(current_step_);
|
||||
const ConnectionSet& completion_set = well_ecl_->getConnections(current_step_);
|
||||
for (int perf = 0; perf < number_of_perforations_; ++perf) {
|
||||
const Completion& completion = completion_set.get(perf);
|
||||
const Connection& completion = completion_set.get(perf);
|
||||
const int segment_number = completion.getSegmentNumber();
|
||||
const int segment_index = segmentNumberToIndex(segment_number);
|
||||
segment_perforations_[segment_index].push_back(perf);
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
{
|
||||
std::vector<int> compressed_well_perforations;
|
||||
// All possible completions of the well
|
||||
const auto& completionSet = well->getCompletions(last_time_step);
|
||||
const auto& completionSet = well->getConnections(last_time_step);
|
||||
compressed_well_perforations.reserve(completionSet.size());
|
||||
|
||||
for ( size_t c=0; c < completionSet.size(); c++ )
|
||||
|
@ -754,7 +754,7 @@ namespace Opm
|
||||
bore_diameters_.reserve(nperf);
|
||||
|
||||
// COMPDAT handling
|
||||
const auto& completionSet = well_ecl_->getCompletions(current_step_);
|
||||
const auto& completionSet = well_ecl_->getConnections(current_step_);
|
||||
for (size_t c=0; c<completionSet.size(); c++) {
|
||||
const auto& completion = completionSet.get(c);
|
||||
if (completion.getState() == WellCompletion::OPEN) {
|
||||
|
@ -484,7 +484,7 @@ namespace Opm
|
||||
well.rates.set( rt::vaporized_oil, this->well_vaporized_oil_rates_[w] );
|
||||
|
||||
int local_comp_index = 0;
|
||||
for( auto& comp : well.completions ) {
|
||||
for( auto& comp : well.connections) {
|
||||
const auto rates = this->perfPhaseRates().begin()
|
||||
+ (np * wt.second[ 1 ])
|
||||
+ (np * local_comp_index);
|
||||
@ -549,7 +549,7 @@ namespace Opm
|
||||
} else { // it is a multi-segment well
|
||||
const SegmentSet& segment_set = well_ecl->getSegmentSet(time_step);
|
||||
// assuming the order of the perforations in well_ecl is the same with Wells
|
||||
const CompletionSet& completion_set = well_ecl->getCompletions(time_step);
|
||||
const ConnectionSet& completion_set = well_ecl->getConnections(time_step);
|
||||
// number of segment for this single well
|
||||
const int well_nseg = segment_set.numberSegment();
|
||||
const int nperf = completion_set.size();
|
||||
@ -558,7 +558,7 @@ namespace Opm
|
||||
// that is why I think we should use a well model to initialize the WellState here
|
||||
std::vector<std::vector<int>> segment_perforations(well_nseg);
|
||||
for (int perf = 0; perf < nperf; ++perf) {
|
||||
const Completion& completion = completion_set.get(perf);
|
||||
const Connection& completion = completion_set.get(perf);
|
||||
const int segment_number = completion.getSegmentNumber();
|
||||
const int segment_index = segment_set.segmentNumberToIndex(segment_number);
|
||||
segment_perforations[segment_index].push_back(perf);
|
||||
|
@ -253,18 +253,18 @@ namespace Opm
|
||||
|
||||
const int num_perf_well = this->wells_->well_connpos[ well_index + 1 ]
|
||||
- this->wells_->well_connpos[ well_index ];
|
||||
well.completions.resize(num_perf_well);
|
||||
well.connections.resize(num_perf_well);
|
||||
|
||||
for( int i = 0; i < num_perf_well; ++i ) {
|
||||
const auto wi = this->wells_->well_connpos[ well_index ] + i;
|
||||
const auto active_index = this->wells_->well_cells[ wi ];
|
||||
|
||||
auto& completion = well.completions[ i ];
|
||||
completion.index = globalCellIdxMap[active_index];
|
||||
completion.pressure = this->perfPress()[ itr.second[1] + i ];
|
||||
completion.reservoir_rate = this->perfRates()[ itr.second[1] + i ];
|
||||
auto& connection = well.connections[ i ];
|
||||
connection.index = globalCellIdxMap[active_index];
|
||||
connection.pressure = this->perfPress()[ itr.second[1] + i ];
|
||||
connection.reservoir_rate = this->perfRates()[ itr.second[1] + i ];
|
||||
}
|
||||
assert(num_perf_well == int(well.completions.size()));
|
||||
assert(num_perf_well == int(well.connections.size()));
|
||||
}
|
||||
|
||||
return dw;
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <opm/grid/utility/compressedToCartesian.hpp>
|
||||
#include <opm/core/props/rock/RockFromDeck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ConnectionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
@ -164,7 +164,7 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
|
||||
{ // COMPDAT handling
|
||||
// shut completions and open ones stored in this process will have 1 others 0.
|
||||
|
||||
for(const auto& completion : well->getCompletions(timeStep)) {
|
||||
for(const auto& completion : well->getConnections(timeStep)) {
|
||||
if (completion.getState() == WellCompletion::OPEN) {
|
||||
int i = completion.getI();
|
||||
int j = completion.getJ();
|
||||
|
Loading…
Reference in New Issue
Block a user