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