improve initialization msw new wells

This commit is contained in:
Tor Harald Sandve
2022-03-23 12:29:40 +01:00
parent 519b5dd8cc
commit 32dfdc6198
3 changed files with 28 additions and 17 deletions

View File

@@ -297,17 +297,6 @@ namespace Opm {
well->closeCompletions(wellTestState());
}
// calculate the well potentials
try {
updateWellPotentials(reportStepIdx,
/*onlyAfterEvent*/true,
ebosSimulator_.vanguard().summaryConfig(),
local_deferredLogger);
} catch ( std::runtime_error& e ) {
const std::string msg = "A zero well potential is returned for output purposes. ";
local_deferredLogger.warning("WELL_POTENTIAL_CALCULATION_FAILED", msg);
}
if (alternative_well_rate_init_) {
// Update the well rates of well_state_, if only single-phase rates, to
// have proper multi-phase rates proportional to rates at bhp zero.
@@ -320,6 +309,17 @@ namespace Opm {
}
}
// calculate the well potentials
try {
updateWellPotentials(reportStepIdx,
/*onlyAfterEvent*/true,
ebosSimulator_.vanguard().summaryConfig(),
local_deferredLogger);
} catch ( std::runtime_error& e ) {
const std::string msg = "A zero well potential is returned for output purposes. ";
local_deferredLogger.warning("WELL_POTENTIAL_CALCULATION_FAILED", msg);
}
//update guide rates
const auto& comm = ebosSimulator_.vanguard().grid().comm();
const auto& summaryState = ebosSimulator_.vanguard().summaryState();