mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-29 10:40:59 -06:00
Rename Completions -> Connections
This commit is contained in:
parent
3b5e746702
commit
2bd9c0ea78
@ -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_;
|
||||
|
@ -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);
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ConnectionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/material/common/Exceptions.hpp>
|
||||
@ -80,7 +80,7 @@ class EclWellManager
|
||||
|
||||
typedef Ewoms::EclPeacemanWell<TypeTag> Well;
|
||||
|
||||
typedef std::map<int, std::pair<const Opm::Completion*, std::shared_ptr<Well> > > WellCompletionsMap;
|
||||
typedef std::map<int, std::pair<const Opm::Connection*, std::shared_ptr<Well> > > WellConnectionsMap;
|
||||
|
||||
typedef Dune::FieldVector<Evaluation, numEq> 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<bool>& 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<int, 3> 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<const Opm::Well*>& 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<Well> eclWell = compInfo.second;
|
||||
const auto& connInfo = wellConnections.at(cartesianDofIdx);
|
||||
const Opm::Connection* connection = connInfo.first;
|
||||
std::shared_ptr<Well> 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());
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user