From 1981a3bf4ded8b8a1c9e13988e6ad41b8b4f366d Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Thu, 6 Jul 2023 15:56:16 +0200 Subject: [PATCH] switching to scale the mobility instead of the well index mostly to make the calculation of productivity easier. --- opm/simulators/wells/MultisegmentWell_impl.hpp | 6 ++---- opm/simulators/wells/StandardWell_impl.hpp | 5 ++--- opm/simulators/wells/WellInterface_impl.hpp | 11 +++++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index f93bcbf22..73af55623 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -768,8 +768,6 @@ namespace Opm // Pressure drawdown (also used to determine direction of flow) const Value drawdown = cell_press_at_perf - perf_press; - const double effectiveTw = this->isInjector() ? this->inj_fc_multiplier_[perf] * Tw : Tw; - // producing perforations if (drawdown > 0.0) { // Do nothing if crossflow is not allowed @@ -779,7 +777,7 @@ namespace Opm // compute component volumetric rates at standard conditions for (int comp_idx = 0; comp_idx < this->numComponents(); ++comp_idx) { - const Value cq_p = - effectiveTw * (mob_perfcells[comp_idx] * drawdown); + const Value cq_p = - Tw * (mob_perfcells[comp_idx] * drawdown); cq_s[comp_idx] = b_perfcells[comp_idx] * cq_p; } @@ -804,7 +802,7 @@ namespace Opm } // injection perforations total volume rates - const Value cqt_i = - effectiveTw * (total_mob * drawdown); + const Value cqt_i = - Tw * (total_mob * drawdown); // compute volume ratio between connection and at standard conditions Value volume_ratio = 0.0; diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 1116f83f0..07ed13a4c 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -239,7 +239,6 @@ namespace Opm if (this->isInjector()) { drawdown += skin_pressure; } - const double effectiveTw = this->isInjector() ? this->inj_fc_multiplier_[perf] * Tw : Tw; // producing perforations if (drawdown > 0) { @@ -250,7 +249,7 @@ namespace Opm // compute component volumetric rates at standard conditions for (int componentIdx = 0; componentIdx < this->numComponents(); ++componentIdx) { - const Value cq_p = - effectiveTw * (mob[componentIdx] * drawdown); + const Value cq_p = - Tw * (mob[componentIdx] * drawdown); cq_s[componentIdx] = b_perfcells_dense[componentIdx] * cq_p; } @@ -272,7 +271,7 @@ namespace Opm } // injection perforations total volume rates - const Value cqt_i = - effectiveTw * (total_mob_dense * drawdown); + const Value cqt_i = - Tw * (total_mob_dense * drawdown); // compute volume ratio between connection at standard conditions Value volumeRatio = bhp * 0.0; // initialize it with the correct type diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index c9696f9ce..0aeab1e5c 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -1267,6 +1267,17 @@ namespace Opm OPM_DEFLOG_THROW(std::runtime_error, "individual mobility for wells does not work in combination with solvent", deferred_logger); } } + + if (this->isInjector()) { + const auto perf_ecl_index = this->perforationData()[perf].ecl_index; + const auto& connections = this->well_ecl_.getConnections(); + const auto& connection = connections[perf_ecl_index]; + if (connection.filterCakeActive()) { + for (auto& val : mob) { + val *= this->inj_fc_multiplier_[perf]; + } + } + } }