mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-10 15:05:35 -06:00
Merge pull request #4961 from vkip/network_restart_use_node_pressures
Use network pressures from restart
This commit is contained in:
commit
0b2c396a01
@ -154,6 +154,11 @@ namespace {
|
||||
std::move(python), outputInterval, init_state);
|
||||
}
|
||||
|
||||
// Read network pressures from restart
|
||||
if (rst_state.network.isActive()) {
|
||||
eclipseState.loadRestartNetworkPressures(rst_state.network);
|
||||
}
|
||||
|
||||
udqState = std::make_unique<Opm::UDQState>
|
||||
((*schedule)[0].udq().params().undefinedValue());
|
||||
udqState->load_rst(rst_state);
|
||||
|
@ -94,20 +94,25 @@ BlackoilWellModelGeneric(Schedule& schedule,
|
||||
, nupcol_wgstate_(phase_usage)
|
||||
{
|
||||
|
||||
const auto numProcs = comm_.size();
|
||||
this->not_on_process_ = [this, numProcs](const Well& well) {
|
||||
if (numProcs == decltype(numProcs){1})
|
||||
return false;
|
||||
const auto numProcs = comm_.size();
|
||||
this->not_on_process_ = [this, numProcs](const Well& well) {
|
||||
if (numProcs == decltype(numProcs){1})
|
||||
return false;
|
||||
|
||||
// Recall: false indicates NOT active!
|
||||
const auto value = std::make_pair(well.name(), true);
|
||||
auto candidate = std::lower_bound(this->parallel_well_info_.begin(),
|
||||
this->parallel_well_info_.end(),
|
||||
value);
|
||||
// Recall: false indicates NOT active!
|
||||
const auto value = std::make_pair(well.name(), true);
|
||||
auto candidate = std::lower_bound(this->parallel_well_info_.begin(),
|
||||
this->parallel_well_info_.end(),
|
||||
value);
|
||||
|
||||
return (candidate == this->parallel_well_info_.end())
|
||||
|| (*candidate != value);
|
||||
};
|
||||
return (candidate == this->parallel_well_info_.end())
|
||||
|| (*candidate != value);
|
||||
};
|
||||
|
||||
const auto& node_pressures = eclState.getRestartNetworkPressures();
|
||||
if (node_pressures.has_value()) {
|
||||
this->node_pressures_ = node_pressures.value();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -74,6 +74,24 @@ add_test_compare_restarted_simulation(CASENAME aquflux_02
|
||||
DIR aquifers
|
||||
TEST_ARGS --enable-tuning=true)
|
||||
|
||||
add_test_compare_restarted_simulation(CASENAME network_01_restart
|
||||
FILENAME NETWORK-01-RESTART
|
||||
SIMULATOR flow
|
||||
ABS_TOL ${abs_tol_restart}
|
||||
REL_TOL ${rel_tol_restart}
|
||||
RESTART_STEP 5
|
||||
DIR network
|
||||
TEST_ARGS --enable-tuning=true --local-well-solve-control-switching=true)
|
||||
|
||||
add_test_compare_restarted_simulation(CASENAME network_01_reroute_restart
|
||||
FILENAME NETWORK-01-REROUTE-RESTART
|
||||
SIMULATOR flow
|
||||
ABS_TOL ${abs_tol_restart}
|
||||
REL_TOL ${rel_tol_restart}
|
||||
RESTART_STEP 5
|
||||
DIR network
|
||||
TEST_ARGS --enable-tuning=true --local-well-solve-control-switching=true)
|
||||
|
||||
# The dynamic MSW data is not written to /read from the restart file
|
||||
# We therefore accept significant deviation in the results.
|
||||
# Note also that we use --sched-restart=true since some necessary
|
||||
|
Loading…
Reference in New Issue
Block a user