adding a flag to indicate whether group controls applied

for WellCollection.
This commit is contained in:
Kai Bao
2017-03-23 13:25:12 +01:00
parent dff247d975
commit 745a2a5561
2 changed files with 14 additions and 1 deletions

View File

@@ -194,6 +194,8 @@ namespace Opm
roots_[i]->applyProdGroupControls();
roots_[i]->applyInjGroupControls();
}
group_control_applied_ = true;
}
/// Applies explicit reinjection controls. This must be called at each timestep to be correct.
@@ -324,6 +326,13 @@ namespace Opm
}
bool WellCollection::groupControlApplied() const
{
return group_control_applied_;
}
bool WellCollection::groupTargetConverged(const std::vector<double>& well_rates) const
{
// TODO: eventually, there should be only one root node

View File

@@ -139,6 +139,9 @@ namespace Opm
/// Whether we have active group control
bool groupControlActive() const;
/// Whether we have applied the group control
bool groupControlApplied() const;
/// Whether the group target is converged
// It is considered converged if eitehr the group targets are matched or the group targets are not matched while the wells are
// running under their own limits so that they can not produce more
@@ -163,7 +166,8 @@ namespace Opm
bool group_control_active_ = false;
// This is used to mark whether apply or update the group control
bool group_control_applied_ = false;
};
} // namespace Opm