diff --git a/ebos/eclalugridvanguard.hh b/ebos/eclalugridvanguard.hh index 8375cae6e..4c9ef97b8 100644 --- a/ebos/eclalugridvanguard.hh +++ b/ebos/eclalugridvanguard.hh @@ -202,7 +202,7 @@ protected: new CartesianIndexMapper(*grid_, cartesianDimension_, cartesianCellId_); } - void filterCompletions_() + void filterConnections_() { // not handling the removal of completions for this type of grid yet. } diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index 8c8f2b2bc..031b7c529 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -270,7 +270,7 @@ public: eclState_->getRestartConfig().overrideRestartWriteInterval(outputInterval); asImp_().createGrids_(); - asImp_().filterCompletions_(); + asImp_().filterConnections_(); asImp_().finalizeInit_(); } diff --git a/ebos/eclcpgridvanguard.hh b/ebos/eclcpgridvanguard.hh index 0249ce0f7..bde629860 100644 --- a/ebos/eclcpgridvanguard.hh +++ b/ebos/eclcpgridvanguard.hh @@ -264,8 +264,8 @@ protected: globalTrans_ = nullptr; } - // removing some completions located in inactive grid cells - void filterCompletions_() + // removing some connection located in inactive grid cells + void filterConnections_() { assert(grid_); Grid grid = *grid_; diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index b9ed15997..d09bca67e 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -195,15 +195,15 @@ public: || well->getPLTActive(reportStepNum))) continue; - for (const auto& completion: well->getConnections(reportStepNum)) { - const size_t i = size_t(completion.getI()); - const size_t j = size_t(completion.getJ()); - const size_t k = size_t(completion.getK()); + for (const auto& connection: well->getConnections(reportStepNum)) { + const size_t i = size_t(connection.getI()); + const size_t j = size_t(connection.getJ()); + const size_t k = size_t(connection.getK()); const size_t index = simulator_.vanguard().eclState().getInputGrid().getGlobalIndex(i, j, k); - oilCompletionPressures_.emplace(std::make_pair(index, 0.0)); - waterCompletionSaturations_.emplace(std::make_pair(index, 0.0)); - gasCompletionSaturations_.emplace(std::make_pair(index, 0.0)); + oilConnectionPressures_.emplace(std::make_pair(index, 0.0)); + waterConnectionSaturations_.emplace(std::make_pair(index, 0.0)); + gasConnectionSaturations_.emplace(std::make_pair(index, 0.0)); } } } @@ -557,14 +557,14 @@ public: } // Adding Well RFT data - if (oilCompletionPressures_.count(cartesianIdx) > 0) { - oilCompletionPressures_[cartesianIdx] = Opm::getValue(fs.pressure(oilPhaseIdx)); + if (oilConnectionPressures_.count(cartesianIdx) > 0) { + oilConnectionPressures_[cartesianIdx] = Opm::getValue(fs.pressure(oilPhaseIdx)); } - if (waterCompletionSaturations_.count(cartesianIdx) > 0) { - waterCompletionSaturations_[cartesianIdx] = Opm::getValue(fs.saturation(waterPhaseIdx)); + if (waterConnectionSaturations_.count(cartesianIdx) > 0) { + waterConnectionSaturations_[cartesianIdx] = Opm::getValue(fs.saturation(waterPhaseIdx)); } - if (gasCompletionSaturations_.count(cartesianIdx) > 0) { - gasCompletionSaturations_[cartesianIdx] = Opm::getValue(fs.saturation(gasPhaseIdx)); + if (gasConnectionSaturations_.count(cartesianIdx) > 0) { + gasConnectionSaturations_[cartesianIdx] = Opm::getValue(fs.saturation(gasPhaseIdx)); } } } @@ -654,33 +654,33 @@ public: continue; wellData.connections.resize(well->getConnections(reportStepNum).size()); size_t count = 0; - for (const auto& completion: well->getConnections(reportStepNum)) { - const size_t i = size_t(completion.getI()); - const size_t j = size_t(completion.getJ()); - const size_t k = size_t(completion.getK()); + for (const auto& connection: well->getConnections(reportStepNum)) { + const size_t i = size_t(connection.getI()); + const size_t j = size_t(connection.getJ()); + const size_t k = size_t(connection.getK()); const size_t index = simulator_.vanguard().eclState().getInputGrid().getGlobalIndex(i, j, k); - auto& completionData = wellData.connections[count]; - completionData.index = index; + auto& connectionData = wellData.connections[count]; + connectionData.index = index; count++; } wellDatas.emplace(std::make_pair(well->name(), wellData)); } Opm::data::Well& wellData = wellDatas.at(well->name()); - for (auto& completionData: wellData.connections) { - const auto index = completionData.index; - if (oilCompletionPressures_.count(index) > 0) - completionData.cell_pressure = oilCompletionPressures_.at(index); - if (waterCompletionSaturations_.count(index) > 0) - completionData.cell_saturation_water = waterCompletionSaturations_.at(index); - if (gasCompletionSaturations_.count(index) > 0) - completionData.cell_saturation_gas = gasCompletionSaturations_.at(index); + for (auto& connectionData: wellData.connections) { + const auto index = connectionData.index; + if (oilConnectionPressures_.count(index) > 0) + connectionData.cell_pressure = oilConnectionPressures_.at(index); + if (waterConnectionSaturations_.count(index) > 0) + connectionData.cell_saturation_water = waterConnectionSaturations_.at(index); + if (gasConnectionSaturations_.count(index) > 0) + connectionData.cell_saturation_gas = gasConnectionSaturations_.at(index); } } - oilCompletionPressures_.clear(); - waterCompletionSaturations_.clear(); - gasCompletionSaturations_.clear(); + oilConnectionPressures_.clear(); + waterConnectionSaturations_.clear(); + gasConnectionSaturations_.clear(); } /*! @@ -1317,9 +1317,9 @@ private: ScalarBuffer pressureTimesPoreVolume_; ScalarBuffer pressureTimesHydrocarbonVolume_; std::map, double> blockData_; - std::map oilCompletionPressures_; - std::map waterCompletionSaturations_; - std::map gasCompletionSaturations_; + std::map oilConnectionPressures_; + std::map waterConnectionSaturations_; + std::map gasConnectionSaturations_; }; } // namespace Ewoms diff --git a/ebos/eclpolyhedralgridvanguard.hh b/ebos/eclpolyhedralgridvanguard.hh index 3020879fb..de763155c 100644 --- a/ebos/eclpolyhedralgridvanguard.hh +++ b/ebos/eclpolyhedralgridvanguard.hh @@ -156,7 +156,7 @@ protected: cartesianIndexMapper_ = new CartesianIndexMapper(*grid_); } - void filterCompletions_() + void filterConnections_() { // not handling the removal of completions for this type of grid yet. } diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index 017f4d639..89c326f45 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -607,7 +607,7 @@ protected: } void updateWellTopology_(unsigned reportStepIdx OPM_UNUSED, - const WellConnectionsMap& wellCompletions, + const WellConnectionsMap& wellConnections, std::vector& gridDofIsPenetrated) const { auto& model = simulator_.model(); @@ -643,14 +643,14 @@ protected: unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0); unsigned cartesianDofIdx = vanguard.cartesianIndex(globalDofIdx); - if (wellCompletions.count(cartesianDofIdx) == 0) + if (wellConnections.count(cartesianDofIdx) == 0) // the current DOF is not contained in any well, so we must skip // it... continue; gridDofIsPenetrated[globalDofIdx] = true; - auto eclWell = wellCompletions.at(cartesianDofIdx).second; + auto eclWell = wellConnections.at(cartesianDofIdx).second; eclWell->addDof(elemCtx, dofIdx); wells.insert(eclWell); @@ -666,7 +666,7 @@ protected: } } - void computeWellConnectionsMap_(unsigned reportStepIdx OPM_UNUSED, WellConnectionsMap& cartesianIdxToCompletionMap) + void computeWellConnectionsMap_(unsigned reportStepIdx OPM_UNUSED, WellConnectionsMap& cartesianIdxToConnectionMap) { const auto& deckSchedule = simulator_.vanguard().schedule(); @@ -679,7 +679,7 @@ protected: #endif // compute the mapping from logically Cartesian indices to the well the - // respective completion. + // respective connection. const std::vector& deckWells = deckSchedule.getWells(reportStepIdx); for (size_t deckWellIdx = 0; deckWellIdx < deckWells.size(); ++deckWellIdx) { const Opm::Well* deckWell = deckWells[deckWellIdx]; @@ -690,7 +690,7 @@ protected: #ifndef NDEBUG if( simulator_.vanguard().grid().comm().size() == 1 ) { - std::cout << "Well '" << wellName << "' suddenly appears in the completions " + std::cout << "Well '" << wellName << "' suddenly appears in the connection " << "for the report step, but has not been previously specified. " << "Ignoring.\n"; } @@ -699,21 +699,21 @@ protected: } std::array cartesianCoordinate; - // set the well parameters defined by the current set of completions - const auto& completionSet = deckWell->getConnections(reportStepIdx); - for (size_t complIdx = 0; complIdx < completionSet.size(); complIdx ++) { - const auto& completion = completionSet.get(complIdx); - cartesianCoordinate[ 0 ] = completion.getI(); - cartesianCoordinate[ 1 ] = completion.getJ(); - cartesianCoordinate[ 2 ] = completion.getK(); + // set the well parameters defined by the current set of connections + const auto& connectionSet = deckWell->getConnections(reportStepIdx); + for (size_t connIdx = 0; connIdx < connectionSet.size(); connIdx ++) { + const auto& connection = connectionSet.get(connIdx); + cartesianCoordinate[ 0 ] = connection.getI(); + cartesianCoordinate[ 1 ] = connection.getJ(); + cartesianCoordinate[ 2 ] = connection.getK(); unsigned cartIdx = simulator_.vanguard().cartesianIndex( cartesianCoordinate ); // in this code we only support each cell to be part of at most a single // well. TODO (?) change this? - assert(cartesianIdxToCompletionMap.count(cartIdx) == 0); + assert(cartesianIdxToConnectionMap.count(cartIdx) == 0); auto eclWell = wells_[wellIndex(wellName)]; - cartesianIdxToCompletionMap[cartIdx] = std::make_pair(&completion, eclWell); + cartesianIdxToConnectionMap[cartIdx] = std::make_pair(&connection, eclWell); } } } @@ -735,7 +735,7 @@ protected: } } - // associate the well completions with grid cells and register them in the + // associate the well connections with grid cells and register them in the // Peaceman well object const auto& vanguard = simulator_.vanguard(); const GridView gridView = vanguard.gridView(); @@ -780,7 +780,7 @@ protected: // permeability by the one specified in the deck-> Note: this // is not implemented by opm-parser yet... /* - Scalar Kh = completion->getEffectivePermeability(); + Scalar Kh = connection->getEffectivePermeability(); if (std::isfinite(Kh) && Kh > 0.0) eclWell->setEffectivePermeability(elemCtx, dofIdx, Kh); */ diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index fcd53d558..990138314 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -208,7 +208,7 @@ void test_readWriteWells() { w1.control = 1; /* - * the completion keys (active indices) and well names correspond to the + * the connection keys (active indices) and well names correspond to the * input deck. All other entries in the well structures are arbitrary. */ w1.connections.push_back( { 88, rc1, 30.45, 123.45 } );