From 68786651f5cd78b785e6fa28b46196f717337e5b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 6 Sep 2021 12:58:16 +0200 Subject: [PATCH] drop using statement for well_efficiency_factor_ rather qualify member variable with this-> --- opm/simulators/wells/StandardWell.hpp | 1 - opm/simulators/wells/StandardWell_impl.hpp | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/opm/simulators/wells/StandardWell.hpp b/opm/simulators/wells/StandardWell.hpp index 578c924fc..e1614733a 100644 --- a/opm/simulators/wells/StandardWell.hpp +++ b/opm/simulators/wells/StandardWell.hpp @@ -262,7 +262,6 @@ namespace Opm protected: // protected member variables from the Base class - using Base::well_efficiency_factor_; using Base::perf_depth_; using Base::well_cells_; using Base::number_of_perforations_; diff --git a/opm/simulators/wells/StandardWell_impl.hpp b/opm/simulators/wells/StandardWell_impl.hpp index 1ae160550..329d07838 100644 --- a/opm/simulators/wells/StandardWell_impl.hpp +++ b/opm/simulators/wells/StandardWell_impl.hpp @@ -449,7 +449,7 @@ namespace Opm const int cell_idx = well_cells_[perf]; for (int componentIdx = 0; componentIdx < num_components_; ++componentIdx) { // the cq_s entering mass balance equations need to consider the efficiency factors. - const EvalWell cq_s_effective = cq_s[componentIdx] * well_efficiency_factor_; + const EvalWell cq_s_effective = cq_s[componentIdx] * this->well_efficiency_factor_; connectionRates[perf][componentIdx] = Base::restrictEval(cq_s_effective); @@ -497,7 +497,7 @@ namespace Opm assert(dt > 0); resWell_loc += (this->wellSurfaceVolumeFraction(componentIdx) - this->F0_[componentIdx]) * volume / dt; } - resWell_loc -= this->getQs(componentIdx) * well_efficiency_factor_; + resWell_loc -= this->getQs(componentIdx) * this->well_efficiency_factor_; for (int pvIdx = 0; pvIdx < this->numWellEq_; ++pvIdx) { this->invDuneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+Indices::numEq); } @@ -640,7 +640,7 @@ namespace Opm auto& perf_rate_polymer = perf_data.polymer_rates; perf_rate_polymer[perf] = cq_s_poly.value(); - cq_s_poly *= well_efficiency_factor_; + cq_s_poly *= this->well_efficiency_factor_; connectionRates[perf][Indices::contiPolymerEqIdx] = Base::restrictEval(cq_s_poly); if constexpr (Base::has_polymermw) { @@ -651,7 +651,7 @@ namespace Opm if constexpr (has_foam) { // TODO: the application of well efficiency factor has not been tested with an example yet const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx); - EvalWell cq_s_foam = cq_s[gasCompIdx] * well_efficiency_factor_; + EvalWell cq_s_foam = cq_s[gasCompIdx] * this->well_efficiency_factor_; if (this->isInjector()) { cq_s_foam *= this->wfoam(); } else { @@ -673,7 +673,7 @@ namespace Opm auto& perf_rate_solvent = perf_data.solvent_rates; perf_rate_solvent[perf] = cq_s_zfrac_effective.value(); - cq_s_zfrac_effective *= well_efficiency_factor_; + cq_s_zfrac_effective *= this->well_efficiency_factor_; connectionRates[perf][Indices::contiZfracEqIdx] = Base::restrictEval(cq_s_zfrac_effective); } @@ -690,7 +690,7 @@ namespace Opm auto& perf_rate_brine = perf_data.brine_rates; perf_rate_brine[perf] = cq_s_sm.value(); - cq_s_sm *= well_efficiency_factor_; + cq_s_sm *= this->well_efficiency_factor_; connectionRates[perf][Indices::contiBrineEqIdx] = Base::restrictEval(cq_s_sm); }