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();
|
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
|
// determine the maximum depth of the well over all processes
|
||||||
refDepth_ = comm.min(refDepth_);
|
refDepth_ = comm.min(refDepth_);
|
||||||
|
|
||||||
|
|||||||
@@ -107,10 +107,8 @@ public:
|
|||||||
// the well primarily serves as a placeholder.) The big rest of the well is
|
// the well primarily serves as a placeholder.) The big rest of the well is
|
||||||
// specified by the updateWellCompletions_() method
|
// specified by the updateWellCompletions_() method
|
||||||
auto well = std::make_shared<Well>(simulator_);
|
auto well = std::make_shared<Well>(simulator_);
|
||||||
well->beginSpec();
|
|
||||||
well->setName(wellName);
|
well->setName(wellName);
|
||||||
well->setWellStatus(Well::Shut);
|
well->setWellStatus(Well::Shut);
|
||||||
well->endSpec();
|
|
||||||
|
|
||||||
wells_.push_back(well);
|
wells_.push_back(well);
|
||||||
wellNameToIndex_[well->name()] = wells_.size() - 1;
|
wellNameToIndex_[well->name()] = wells_.size() - 1;
|
||||||
@@ -615,8 +613,10 @@ protected:
|
|||||||
model.clearAuxiliaryModules();
|
model.clearAuxiliaryModules();
|
||||||
auto wellIt = wells_.begin();
|
auto wellIt = wells_.begin();
|
||||||
const auto& wellEndIt = wells_.end();
|
const auto& wellEndIt = wells_.end();
|
||||||
for (; wellIt != wellEndIt; ++wellIt)
|
for (; wellIt != wellEndIt; ++wellIt) {
|
||||||
(*wellIt)->clear();
|
(*wellIt)->clear();
|
||||||
|
(*wellIt)->beginSpec();
|
||||||
|
}
|
||||||
|
|
||||||
//////
|
//////
|
||||||
// tell the active wells which DOFs they contain
|
// tell the active wells which DOFs they contain
|
||||||
@@ -655,10 +655,11 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// register all wells at the model as auxiliary equations
|
// register all wells at the model as auxiliary equations
|
||||||
auto wellIt2 = wells.begin();
|
wellIt = wells_.begin();
|
||||||
const auto& wellEndIt2 = wells.end();
|
for (; wellIt != wellEndIt; ++wellIt) {
|
||||||
for (; wellIt2 != wellEndIt2; ++wellIt2)
|
(*wellIt)->endSpec();
|
||||||
model.addAuxiliaryModule(*wellIt2);
|
model.addAuxiliaryModule(*wellIt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void computeWellCompletionsMap_(unsigned reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap)
|
void computeWellCompletionsMap_(unsigned reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap)
|
||||||
|
|||||||
Reference in New Issue
Block a user