mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: regard wells which do not penetrate any active cells as shut
this happens for example in the Norne deck from opm-data.
This commit is contained in:
@@ -684,6 +684,13 @@ public:
|
||||
{
|
||||
const auto& comm = simulator_.gridView().comm();
|
||||
|
||||
if (dofVariables_.size() == 0) {
|
||||
std::cout << "Well " << name() << " does not penetrate any active cell."
|
||||
<< " Assuming it to be shut!\n";
|
||||
setWellStatus(WellStatus::Shut);
|
||||
return;
|
||||
}
|
||||
|
||||
// determine the maximum depth of the well over all processes
|
||||
refDepth_ = comm.min(refDepth_);
|
||||
|
||||
|
||||
@@ -107,10 +107,8 @@ public:
|
||||
// the well primarily serves as a placeholder.) The big rest of the well is
|
||||
// specified by the updateWellCompletions_() method
|
||||
auto well = std::make_shared<Well>(simulator_);
|
||||
well->beginSpec();
|
||||
well->setName(wellName);
|
||||
well->setWellStatus(Well::Shut);
|
||||
well->endSpec();
|
||||
|
||||
wells_.push_back(well);
|
||||
wellNameToIndex_[well->name()] = wells_.size() - 1;
|
||||
@@ -615,8 +613,10 @@ protected:
|
||||
model.clearAuxiliaryModules();
|
||||
auto wellIt = wells_.begin();
|
||||
const auto& wellEndIt = wells_.end();
|
||||
for (; wellIt != wellEndIt; ++wellIt)
|
||||
for (; wellIt != wellEndIt; ++wellIt) {
|
||||
(*wellIt)->clear();
|
||||
(*wellIt)->beginSpec();
|
||||
}
|
||||
|
||||
//////
|
||||
// tell the active wells which DOFs they contain
|
||||
@@ -655,10 +655,11 @@ protected:
|
||||
}
|
||||
|
||||
// register all wells at the model as auxiliary equations
|
||||
auto wellIt2 = wells.begin();
|
||||
const auto& wellEndIt2 = wells.end();
|
||||
for (; wellIt2 != wellEndIt2; ++wellIt2)
|
||||
model.addAuxiliaryModule(*wellIt2);
|
||||
wellIt = wells_.begin();
|
||||
for (; wellIt != wellEndIt; ++wellIt) {
|
||||
(*wellIt)->endSpec();
|
||||
model.addAuxiliaryModule(*wellIt);
|
||||
}
|
||||
}
|
||||
|
||||
void computeWellCompletionsMap_(unsigned reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap)
|
||||
|
||||
Reference in New Issue
Block a user