mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Reset wellcontrols from well_state
This commit is contained in:
parent
cd76816ea5
commit
b023cb15a5
@ -283,8 +283,10 @@ namespace Opm {
|
|||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
|
|
||||||
|
//wellModel().assembleAndUpdate<FluidSystem>(well_state);
|
||||||
// Possibly switch well controls and updating well state to
|
// Possibly switch well controls and updating well state to
|
||||||
// get reasonable initial conditions for the wells
|
// get reasonable initial conditions for the wells
|
||||||
|
wellModel().resetWellControlFromState(well_state);
|
||||||
wellModel().updateWellControls(well_state);
|
wellModel().updateWellControls(well_state);
|
||||||
|
|
||||||
// Set the primary variables for the wells
|
// Set the primary variables for the wells
|
||||||
|
@ -86,6 +86,15 @@ namespace Opm {
|
|||||||
|
|
||||||
int numPhases() const { return wells().number_of_phases; };
|
int numPhases() const { return wells().number_of_phases; };
|
||||||
|
|
||||||
|
template<class WellState>
|
||||||
|
void resetWellControlFromState(WellState xw) {
|
||||||
|
const int nw = wells_->number_of_wells;
|
||||||
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
WellControls* wc = wells_->ctrls[w];
|
||||||
|
well_controls_set_current( wc, xw.currentControls()[w]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Wells& wells() const;
|
const Wells& wells() const;
|
||||||
|
|
||||||
const Wells* wellsPointer() const;
|
const Wells* wellsPointer() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user