diff --git a/ebos/eclcpgridvanguard.hh b/ebos/eclcpgridvanguard.hh index f8e3bb9f6..019b64d11 100644 --- a/ebos/eclcpgridvanguard.hh +++ b/ebos/eclcpgridvanguard.hh @@ -266,7 +266,7 @@ protected: Grid grid = *grid_; grid.switchToGlobalView(); const auto eclipseGrid = Opm::UgGridHelpers::createEclipseGrid(grid, this->eclState().getInputGrid()); - this->schedule().filterCompletions(eclipseGrid); + this->schedule().filterConnections(eclipseGrid); } Grid* grid_; diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index d6c534541..7699250f4 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -192,7 +192,7 @@ public: || well->getPLTActive(reportStepNum))) continue; - for (const auto& completion: well->getCompletions(reportStepNum)) { + 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()); @@ -649,15 +649,15 @@ public: if (!(well->getRFTActive(reportStepNum) || well->getPLTActive(reportStepNum))) continue; - wellData.completions.resize(well->getCompletions(reportStepNum).size()); + wellData.connections.resize(well->getConnections(reportStepNum).size()); size_t count = 0; - for (const auto& completion: well->getCompletions(reportStepNum)) { + 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()); const size_t index = simulator_.vanguard().eclState().getInputGrid().getGlobalIndex(i, j, k); - auto& completionData = wellData.completions[count]; + auto& completionData = wellData.connections[count]; completionData.index = index; count++; } @@ -665,7 +665,7 @@ public: } Opm::data::Well& wellData = wellDatas.at(well->name()); - for (auto& completionData: wellData.completions) { + for (auto& completionData: wellData.connections) { const auto index = completionData.index; if (oilCompletionPressures_.count(index) > 0) completionData.cell_pressure = oilCompletionPressures_.at(index); diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index ec3a502cb..5807fcfaf 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -80,7 +80,7 @@ class EclWellManager typedef Ewoms::EclPeacemanWell Well; - typedef std::map > > WellCompletionsMap; + typedef std::map > > WellConnectionsMap; typedef Dune::FieldVector EvalEqVector; @@ -128,8 +128,8 @@ public: { unsigned episodeIdx = simulator_.episodeIndex(); - WellCompletionsMap wellCompMap; - computeWellCompletionsMap_(episodeIdx, wellCompMap); + WellConnectionsMap wellCompMap; + computeWellConnectionsMap_(episodeIdx, wellCompMap); if (wasRestarted || wellTopologyChanged_(eclState, deckSchedule, episodeIdx)) updateWellTopology_(episodeIdx, wellCompMap, gridDofIsPenetrated_); @@ -604,7 +604,7 @@ protected: } void updateWellTopology_(unsigned reportStepIdx OPM_UNUSED, - const WellCompletionsMap& wellCompletions, + const WellConnectionsMap& wellCompletions, std::vector& gridDofIsPenetrated) const { auto& model = simulator_.model(); @@ -663,7 +663,7 @@ protected: } } - void computeWellCompletionsMap_(unsigned reportStepIdx OPM_UNUSED, WellCompletionsMap& cartesianIdxToCompletionMap) + void computeWellConnectionsMap_(unsigned reportStepIdx OPM_UNUSED, WellConnectionsMap& cartesianIdxToCompletionMap) { const auto& deckSchedule = simulator_.vanguard().schedule(); @@ -697,7 +697,7 @@ protected: std::array cartesianCoordinate; // set the well parameters defined by the current set of completions - const auto& completionSet = deckWell->getCompletions(reportStepIdx); + 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(); @@ -715,7 +715,7 @@ protected: } } - void updateWellParameters_(unsigned reportStepIdx, const WellCompletionsMap& wellCompletions) + void updateWellParameters_(unsigned reportStepIdx, const WellConnectionsMap& wellConnections) { const auto& deckSchedule = simulator_.vanguard().schedule(); const std::vector& deckWells = deckSchedule.getWells(reportStepIdx); @@ -753,14 +753,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; - const auto& compInfo = wellCompletions.at(cartesianDofIdx); - const Opm::Completion* completion = compInfo.first; - std::shared_ptr eclWell = compInfo.second; + const auto& connInfo = wellConnections.at(cartesianDofIdx); + const Opm::Connection* connection = connInfo.first; + std::shared_ptr eclWell = connInfo.second; eclWell->addDof(elemCtx, dofIdx); // the catch is a hack for a ideosyncrasy of opm-parser with regard to @@ -768,7 +768,7 @@ protected: // completion, there seems to be no other way to detect this except for // catching the exception try { - eclWell->setRadius(elemCtx, dofIdx, 0.5*completion->getDiameter()); + eclWell->setRadius(elemCtx, dofIdx, 0.5*connection->getDiameter()); } catch (const std::logic_error&) {} @@ -784,7 +784,7 @@ protected: // overwrite the automatically computed connection // transmissibilty factor by the one specified in the deck-> - const auto& ctf = completion->getConnectionTransmissibilityFactorAsValueObject(); + const auto& ctf = connection->getConnectionTransmissibilityFactorAsValueObject(); if (ctf.hasValue() && ctf.getValue() > 0.0) eclWell->setConnectionTransmissibilityFactor(elemCtx, dofIdx, ctf.getValue()); } diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index 699adbc20..b259b9673 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -210,14 +210,14 @@ void test_readWriteWells() { * the completion keys (active indices) and well names correspond to the * input deck. All other entries in the well structures are arbitrary. */ - w1.completions.push_back( { 88, rc1, 30.45, 123.45 } ); - w1.completions.push_back( { 288, rc2, 33.19, 67.89 } ); + w1.connections.push_back( { 88, rc1, 30.45, 123.45 } ); + w1.connections.push_back( { 288, rc2, 33.19, 67.89 } ); w2.rates = r2; w2.bhp = 2.34; w2.temperature = 4.56; w2.control = 2; - w2.completions.push_back( { 188, rc3, 36.22, 19.28 } ); + w2.connections.push_back( { 188, rc3, 36.22, 19.28 } ); Opm::data::Wells wellRates;