From fa03db07f8fe50b072e3879f75ede5a72ffa7b56 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Mon, 11 Sep 2017 12:55:12 +0200 Subject: [PATCH] correcting the way to use efficiency factor in assembleWelEq --- opm/autodiff/StandardWell_impl.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opm/autodiff/StandardWell_impl.hpp b/opm/autodiff/StandardWell_impl.hpp index 53c7e24cc..f67a39c81 100644 --- a/opm/autodiff/StandardWell_impl.hpp +++ b/opm/autodiff/StandardWell_impl.hpp @@ -571,7 +571,7 @@ namespace Opm } // subtract sum of phase fluxes in the well equations. - resWell_[0][componentIdx] -= cq_s[componentIdx].value(); + resWell_[0][componentIdx] -= cq_s_effective.value(); // assemble the jacobians for (int pvIdx = 0; pvIdx < numWellEq; ++pvIdx) { @@ -579,7 +579,7 @@ namespace Opm // also need to consider the efficiency factor when manipulating the jacobians. duneC_[0][cell_idx][pvIdx][flowPhaseToEbosCompIdx(componentIdx)] -= cq_s_effective.derivative(pvIdx+numEq); // intput in transformed matrix } - invDuneD_[0][0][componentIdx][pvIdx] -= cq_s[componentIdx].derivative(pvIdx+numEq); + invDuneD_[0][0][componentIdx][pvIdx] -= cq_s_effective.derivative(pvIdx+numEq); } for (int pvIdx = 0; pvIdx < numEq; ++pvIdx) { @@ -612,6 +612,7 @@ namespace Opm cq_s_poly *= extendEval(intQuants.polymerConcentration() * intQuants.polymerViscosityCorrection()); } if (!only_wells) { + // TODO: we need to consider the efficiency here. for (int pvIdx = 0; pvIdx < numEq; ++pvIdx) { ebosJac[cell_idx][cell_idx][contiPolymerEqIdx][flowToEbosPvIdx(pvIdx)] -= cq_s_poly.derivative(pvIdx); } @@ -626,7 +627,7 @@ namespace Opm // add vol * dF/dt + Q to the well equations; for (int componentIdx = 0; componentIdx < numComp; ++componentIdx) { EvalWell resWell_loc = (wellSurfaceVolumeFraction(componentIdx) - F0_[componentIdx]) * volume / dt; - resWell_loc += getQs(componentIdx); + resWell_loc += getQs(componentIdx) * well_efficiency_factor_; for (int pvIdx = 0; pvIdx < numWellEq; ++pvIdx) { invDuneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+numEq); }