mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 16:21:55 -06:00
adding setWellSolutions to StandardWellsDense.
the function will calculate the well_solutions_ based on well_state. It will be used when we recover the well_state from a failed iteration, then we should also update well_solutions_ for consistence.
This commit is contained in:
parent
5af15fa63f
commit
5cb0a5109e
@ -225,6 +225,9 @@ namespace Opm {
|
||||
|
||||
void updateGroupControls(WellState& well_state) const;
|
||||
|
||||
/// setting the well_solutions_ based on well_state.
|
||||
void setWellSolutions(const WellState& well_state) const;
|
||||
|
||||
protected:
|
||||
bool wells_active_;
|
||||
const Wells* wells_;
|
||||
|
@ -505,6 +505,7 @@ namespace Opm {
|
||||
|
||||
if (!converged) {
|
||||
well_state = well_state0;
|
||||
setWellSolutions(well_state);
|
||||
// also recover the old well controls
|
||||
// TODO: well_solutions_ for each well not recovered here.
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
@ -759,9 +760,7 @@ namespace Opm {
|
||||
|
||||
// calculate the well potentials
|
||||
// TODO: for the purpose of group control, not tested yet
|
||||
for (const auto& well : well_container_) {
|
||||
well->setWellSolutions(well_state);
|
||||
}
|
||||
setWellSolutions(well_state);
|
||||
setWellVariables();
|
||||
computeWellConnectionPressures(ebos_simulator, well_state);
|
||||
|
||||
@ -1042,4 +1041,17 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
setWellSolutions(const WellState& well_state) const
|
||||
{
|
||||
for (const auto& well : well_container_) {
|
||||
well->setWellSolutions(well_state);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user