mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
Merge pull request #1958 from joakim-hove/well-potential-output
Calculate well potentials: check if restart file output is requestd
This commit is contained in:
commit
047a271cb5
@ -1084,6 +1084,7 @@ namespace Opm {
|
||||
|
||||
const Opm::SummaryConfig& summaryConfig = ebosSimulator_.vanguard().summaryConfig();
|
||||
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
||||
const bool write_restart_file = ebosSimulator_.vanguard().eclState().getRestartConfig().getWriteRestartFile(reportStepIdx);
|
||||
int exception_thrown = 0;
|
||||
try {
|
||||
for (const auto& well : well_container_copy) {
|
||||
@ -1132,13 +1133,14 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
const bool needed_for_output = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WOPI:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WGPI:" + well->name())) && well->wellType() == INJECTOR) ||
|
||||
((summaryConfig.hasSummaryKey( "WWPP:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WOPP:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WGPP:" + well->name())) && well->wellType() == PRODUCER);
|
||||
if (needed_for_output || wellCollection().requireWellPotentials())
|
||||
const bool needed_for_summary = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WOPI:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WGPI:" + well->name())) && well->wellType() == INJECTOR) ||
|
||||
((summaryConfig.hasSummaryKey( "WWPP:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WOPP:" + well->name()) ||
|
||||
summaryConfig.hasSummaryKey( "WGPP:" + well->name())) && well->wellType() == PRODUCER);
|
||||
|
||||
if (write_restart_file || needed_for_summary || wellCollection().requireWellPotentials())
|
||||
{
|
||||
std::vector<double> potentials;
|
||||
well->computeWellPotentials(ebosSimulator_, B_avg, well_state_copy, potentials, deferred_logger);
|
||||
|
Loading…
Reference in New Issue
Block a user