EclPeacmanWell: only calculate the well residual after shut wells have been dealt with

that's because the right hand side of shut wells is supposed to be
zero.
This commit is contained in:
Andreas Lauser
2016-03-07 17:08:37 +01:00
parent d7b5075420
commit a94d22c69e

View File

@@ -331,9 +331,6 @@ public:
unsigned wellGlobalDofIdx = AuxModule::localToGlobalDof(/*localDofIdx=*/0);
residual[wellGlobalDofIdx] = 0.0;
Scalar wellResid = wellResidual_(actualBottomHolePressure_);
residual[wellGlobalDofIdx][0] = wellResid;
auto &diagBlock = matrix[wellGlobalDofIdx][wellGlobalDofIdx];
diagBlock = 0.0;
for (unsigned i = 0; i < numModelEq; ++ i)
@@ -353,6 +350,9 @@ public:
return;
}
Scalar wellResid = wellResidual_(actualBottomHolePressure_);
residual[wellGlobalDofIdx][0] = wellResid;
// account for the effect of the grid DOFs which are influenced by the well on
// the well equation and the effect of the well on the grid DOFs
auto wellDofIt = dofVariables_.begin();