mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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:
@@ -225,6 +225,9 @@ namespace Opm {
|
|||||||
|
|
||||||
void updateGroupControls(WellState& well_state) const;
|
void updateGroupControls(WellState& well_state) const;
|
||||||
|
|
||||||
|
/// setting the well_solutions_ based on well_state.
|
||||||
|
void setWellSolutions(const WellState& well_state) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool wells_active_;
|
bool wells_active_;
|
||||||
const Wells* wells_;
|
const Wells* wells_;
|
||||||
|
|||||||
@@ -505,6 +505,7 @@ namespace Opm {
|
|||||||
|
|
||||||
if (!converged) {
|
if (!converged) {
|
||||||
well_state = well_state0;
|
well_state = well_state0;
|
||||||
|
setWellSolutions(well_state);
|
||||||
// also recover the old well controls
|
// also recover the old well controls
|
||||||
// TODO: well_solutions_ for each well not recovered here.
|
// TODO: well_solutions_ for each well not recovered here.
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
@@ -759,9 +760,7 @@ namespace Opm {
|
|||||||
|
|
||||||
// calculate the well potentials
|
// calculate the well potentials
|
||||||
// TODO: for the purpose of group control, not tested yet
|
// TODO: for the purpose of group control, not tested yet
|
||||||
for (const auto& well : well_container_) {
|
setWellSolutions(well_state);
|
||||||
well->setWellSolutions(well_state);
|
|
||||||
}
|
|
||||||
setWellVariables();
|
setWellVariables();
|
||||||
computeWellConnectionPressures(ebos_simulator, well_state);
|
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
|
} // namespace Opm
|
||||||
|
|||||||
Reference in New Issue
Block a user