mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
cleanup
This commit is contained in:
parent
43fd50e355
commit
50ab26c330
@ -2378,15 +2378,14 @@ runWellPIScaling(const int timeStepIdx,
|
||||
bool
|
||||
BlackoilWellModelGeneric::
|
||||
guideRateUpdateIsNeeded() const {
|
||||
int update = 0;
|
||||
for (const auto& well : well_container_generic_) {
|
||||
if (well->changedToOpenThisStep()) {
|
||||
update = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
update = comm_.max(update);
|
||||
return update;
|
||||
const auto need_update =
|
||||
std::any_of(this->well_container_generic_.begin(),
|
||||
this->well_container_generic_.end(),
|
||||
[](const WellInterfaceGeneric* well)
|
||||
{
|
||||
return well->changedToOpenThisStep();
|
||||
});
|
||||
return this->comm_.max(static_cast<int>(need_update));
|
||||
}
|
||||
|
||||
|
||||
|
@ -113,9 +113,8 @@ computeWellRates_(
|
||||
displayDebugMessage_(msg);
|
||||
}
|
||||
|
||||
for (size_t phase = 0; phase < potentials.size(); ++phase){
|
||||
// make sure the potentials are negative
|
||||
potentials[phase] = std::min(0.0, potentials[phase]);
|
||||
for (auto& potential : potentials) {
|
||||
potential = std::min(0.0, potential);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1901,7 +1901,6 @@ namespace Opm
|
||||
// if the rates are trivial we are most probably looking at the newly
|
||||
// opened well and we therefore make the affort of computing the potentials anyway.
|
||||
if (total_rate > 0) {
|
||||
const double sign = this->isInjector() ? 1.0:-1.0;
|
||||
for (int phase = 0; phase < np; ++phase){
|
||||
well_potentials[phase] = sign * ws.surface_rates[phase];
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ namespace Opm
|
||||
try {
|
||||
computeWellPotentials(ebosSimulator, well_state_copy, potentials, deferred_logger);
|
||||
} catch (const std::exception& e) {
|
||||
const std::string msg = std::string("well ") + this->name() + std::string(": computeWellPotentials() failed during for re-computing: ") + e.what();
|
||||
const std::string msg = std::string("well ") + this->name() + std::string(": computeWellPotentials() failed during attempt to recompute potentials for well : ") + e.what();
|
||||
deferred_logger.info(msg);
|
||||
this->operability_status_.has_negative_potentials = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user