Use network pressures from restart

This commit is contained in:
Vegard Kippe
2023-10-30 23:26:35 +01:00
parent 8aa035f174
commit c9cc261891
2 changed files with 24 additions and 12 deletions

View File

@@ -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);

View File

@@ -91,20 +91,27 @@ 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()) {
for (const auto& it: node_pressures.value()) {
this->node_pressures_[it.first] = it.second;
}
}
}
int