unifying interface of a few functions of Wells classes

updateWellControls()
updateWellState()
addWellControlEq()

The change of function computeWellConnectionPressures() is not done
completely. Should find a solution later.
This commit is contained in:
Kai Bao
2016-05-09 15:27:09 +02:00
parent be165a26e0
commit 4254b48b57
10 changed files with 65 additions and 109 deletions

View File

@@ -498,10 +498,8 @@ namespace Opm {
// Possibly switch well controls and updating well state to
// get reasonable initial conditions for the wells
const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_));
const V depth = cellCentroidsZToEigen(grid_);
// updateWellControls(well_state);
stdWells().updateWellControls(gravity, vfp_properties_, terminal_output_, well_state);
stdWells().updateWellControls(terminal_output_, well_state);
// Create the primary variables.
SolutionState state = variableState(reservoir_state, well_state);
@@ -514,7 +512,7 @@ namespace Opm {
// and well connection pressures.
computeAccum(state0, 0);
// computeWellConnectionPressures(state0, well_state);
stdWells().computeWellConnectionPressures(state0, well_state, depth, gravity);
stdWells().computeWellConnectionPressures(state0, well_state);
}
// OPM_AD_DISKVAL(state.pressure);
@@ -577,7 +575,7 @@ namespace Opm {
stdWells().updatePerfPhaseRatesAndPressures(cq_s, state, well_state);
stdWells().addWellFluxEq(cq_s, state, residual_);
addWellContributionToMassBalanceEq(cq_s, state, well_state);
stdWells().addWellControlEq(state, well_state, aliveWells, vfp_properties_, gravity, residual_);
stdWells().addWellControlEq(state, well_state, aliveWells, residual_);
}