mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 02:13:27 -06:00
addressing the reviewing comments for PR #4596
This commit is contained in:
parent
1542f2c087
commit
79eeeae16e
@ -386,8 +386,9 @@ namespace Opm {
|
||||
void assemble(const int iterationIdx,
|
||||
const double dt);
|
||||
|
||||
// the function handles one itearation of updating well controls and also network related.
|
||||
// it is possible to decouple the update of well controls and network related further
|
||||
// well controls and network pressures affect each other and are solved in an iterative manner.
|
||||
// the function handles one iteration of updating well controls and network pressures.
|
||||
// it is possible to decouple the update of well controls and network pressures further.
|
||||
// the returned two booleans are {continue_due_to_network, well_group_control_changed}, respectively
|
||||
std::pair<bool, bool> updateWellControlsAndNetworkIteration(const double dt,
|
||||
const std::size_t network_update_iteration,
|
||||
|
@ -1255,13 +1255,13 @@ shouldBalanceNetwork(const int reportStepIdx, const int iterationIdx) const
|
||||
|
||||
bool
|
||||
BlackoilWellModelGeneric::
|
||||
shouldIterateNetwork(const int reportStepIdx,
|
||||
const std::size_t recursion_level,
|
||||
moreNetworkIteration(const int reportStepIdx,
|
||||
const std::size_t iteration,
|
||||
const double network_imbalance) const
|
||||
{
|
||||
const auto& balance = schedule()[reportStepIdx].network_balance();
|
||||
// Iterate if not converged, and number of iterations is not yet max (NETBALAN item 3).
|
||||
return recursion_level < balance.pressure_max_iter() &&
|
||||
return iteration < balance.pressure_max_iter() &&
|
||||
network_imbalance > balance.pressure_tolerance();
|
||||
}
|
||||
|
||||
|
@ -177,8 +177,8 @@ public:
|
||||
bool shouldBalanceNetwork(const int reportStepIndex,
|
||||
const int iterationIdx) const;
|
||||
|
||||
bool shouldIterateNetwork(const int reportStepIndex,
|
||||
const std::size_t recursion_level,
|
||||
bool moreNetworkIteration(const int reportStepIdx,
|
||||
const std::size_t iteration,
|
||||
const double network_imbalance) const;
|
||||
|
||||
template<class Serializer>
|
||||
|
@ -1510,11 +1510,7 @@ namespace Opm {
|
||||
const bool network_changed = comm.sum(local_network_changed);
|
||||
const double network_imbalance = comm.max(local_network_imbalance);
|
||||
if (network_changed) {
|
||||
const auto& balance = schedule()[episodeIdx].network_balance();
|
||||
// Iterate if not converged, and number of iterations is not yet max (NETBALAN item 3).
|
||||
if (network_update_it < balance.pressure_max_iter() && network_imbalance > balance.pressure_tolerance()) {
|
||||
more_network_update = true;
|
||||
}
|
||||
more_network_update = moreNetworkIteration(episodeIdx, network_update_it, network_imbalance);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user