diff --git a/opm/autodiff/StandardWellsDense.hpp b/opm/autodiff/StandardWellsDense.hpp index 453b2ac41..ee04e1c16 100644 --- a/opm/autodiff/StandardWellsDense.hpp +++ b/opm/autodiff/StandardWellsDense.hpp @@ -1197,7 +1197,6 @@ enum WellVariablePositions { well_controls_set_current( wc, current); - // Updating well state and primary variables if constraint is broken // Target values are used as initial conditions for BHP, THP, and SURFACE_RATE @@ -1294,13 +1293,10 @@ enum WellVariablePositions { OPM_THROW(std::logic_error, "Expected PRODUCER or INJECTOR type of well"); } - break; } - - std::vector g = {1,1,0.01}; if (well_controls_iget_type(wc, current) == RESERVOIR_RATE) { for (int phase = 0; phase < np; ++phase) { @@ -1598,6 +1594,8 @@ enum WellVariablePositions { } } + assert(bhp != 0.0); + // Should we consider crossflow when calculating well potentionals? const bool allow_cf = allow_cross_flow(w, ebosSimulator); for (int perf = wells().well_connpos[w]; perf < wells().well_connpos[w+1]; ++perf) {