putting the VREP control update after updateWellControls

which makes it almost should be put inside updateWellControls function.

it does not change the result.
This commit is contained in:
Kai Bao
2016-11-04 14:46:39 +01:00
parent a5aaf9b802
commit 753da2dd36

View File

@@ -790,6 +790,9 @@ namespace detail {
// get reasonable initial conditions for the wells
asImpl().wellModel().updateWellControls(well_state);
// enforce VREP control when necessary.
applyVREPGroupControl(reservoir_state, well_state);
// Create the primary variables.
SolutionState state = asImpl().variableState(reservoir_state, well_state);
@@ -1102,14 +1105,13 @@ namespace detail {
const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix());
assert(dx.size() == total_residual_v.size());
asImpl().wellModel().updateWellState(dx.array(), dpMaxRel(), well_state);
// Enforce the VREP control
applyVREPGroupControl(reservoir_state, well_state);
}
// We have to update the well controls regardless whether there are local
// wells active or not as parallel logging will take place that needs to
// communicate with all processes.
asImpl().wellModel().updateWellControls(well_state);
// Enforce the VREP control
applyVREPGroupControl(reservoir_state, well_state);
} while (it < 15);
if (converged) {
@@ -1525,9 +1527,6 @@ namespace detail {
asImpl().wellModel().updateWellState(dwells, dpMaxRel(), well_state);
// enforce VREP control when necessary.
applyVREPGroupControl(reservoir_state, well_state);
// Update phase conditions used for property calculations.
updatePhaseCondFromPrimalVariable(reservoir_state);
}