diff --git a/opm/simulators/wells/StandardWellConnections.cpp b/opm/simulators/wells/StandardWellConnections.cpp index 6cd3360c3..adae2d548 100644 --- a/opm/simulators/wells/StandardWellConnections.cpp +++ b/opm/simulators/wells/StandardWellConnections.cpp @@ -479,9 +479,9 @@ computeProperties(const WellState& well_state, double total_mobility = 0.0; double total_invB = 0.; for (int p = 0; p < np; ++p) { - int ebosPhaseIdx = well_.flowPhaseToEbosPhaseIdx(p); - total_mobility += invB(cell_idx, ebosPhaseIdx) * mobility(cell_idx, ebosPhaseIdx); - total_invB += invB(cell_idx, ebosPhaseIdx); + int modelPhaseIdx = well_.flowPhaseToModelPhaseIdx(p); + total_mobility += invB(cell_idx, modelPhaseIdx) * mobility(cell_idx, modelPhaseIdx); + total_invB += invB(cell_idx, modelPhaseIdx); } if constexpr (Indices::enableSolvent) { total_mobility += solventInverseFormationVolumeFactor(cell_idx) * solventMobility(cell_idx); @@ -494,11 +494,11 @@ computeProperties(const WellState& well_state, // ratios for those perforations. constexpr double small_value = 1.e-10; for (int p = 0; p < np; ++p) { - const int ebosPhaseIdx = well_.flowPhaseToEbosPhaseIdx(p); + const int modelPhaseIdx = well_.flowPhaseToModelPhaseIdx(p); const auto mob_ratio = non_zero_total_mobility - ? mobility(cell_idx, ebosPhaseIdx) / total_mobility + ? mobility(cell_idx, modelPhaseIdx) / total_mobility : small_value / total_invB; - perfRates[perf * well_.numComponents() + p] = well_tw_fraction * invB(cell_idx, ebosPhaseIdx) * mob_ratio; + perfRates[perf * well_.numComponents() + p] = well_tw_fraction * invB(cell_idx, modelPhaseIdx) * mob_ratio; } if constexpr (Indices::enableSolvent) { const auto mob_ratio = non_zero_total_mobility diff --git a/opm/simulators/wells/WellInterfaceFluidSystem.cpp b/opm/simulators/wells/WellInterfaceFluidSystem.cpp index 30c22f16d..1db9b316f 100644 --- a/opm/simulators/wells/WellInterfaceFluidSystem.cpp +++ b/opm/simulators/wells/WellInterfaceFluidSystem.cpp @@ -224,7 +224,7 @@ checkConstraints(WellState& well_state, template int WellInterfaceFluidSystem:: -flowPhaseToEbosPhaseIdx(const int phaseIdx) const +flowPhaseToModelPhaseIdx(const int phaseIdx) const { const auto& pu = this->phaseUsage(); if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && pu.phase_pos[Water] == phaseIdx) diff --git a/opm/simulators/wells/WellInterfaceFluidSystem.hpp b/opm/simulators/wells/WellInterfaceFluidSystem.hpp index aa33fbd2e..f7c31e809 100644 --- a/opm/simulators/wells/WellInterfaceFluidSystem.hpp +++ b/opm/simulators/wells/WellInterfaceFluidSystem.hpp @@ -52,7 +52,7 @@ protected: static constexpr int INVALIDCOMPLETION = std::numeric_limits::max(); public: - int flowPhaseToEbosPhaseIdx(const int phaseIdx) const; + int flowPhaseToModelPhaseIdx(const int phaseIdx) const; static constexpr int Water = BlackoilPhases::Aqua; static constexpr int Oil = BlackoilPhases::Liquid; diff --git a/opm/simulators/wells/WellInterface_impl.hpp b/opm/simulators/wells/WellInterface_impl.hpp index d10121c07..0484ccc26 100644 --- a/opm/simulators/wells/WellInterface_impl.hpp +++ b/opm/simulators/wells/WellInterface_impl.hpp @@ -1429,12 +1429,12 @@ namespace Opm const double well_tw_fraction = this->well_index_[perf] / total_tw; double total_mobility = 0.0; for (int p = 0; p < np; ++p) { - int ebosPhaseIdx = this->flowPhaseToEbosPhaseIdx(p); - total_mobility += fs.invB(ebosPhaseIdx).value() * intQuants.mobility(ebosPhaseIdx).value(); + int modelPhaseIdx = this->flowPhaseToModelPhaseIdx(p); + total_mobility += fs.invB(modelPhaseIdx).value() * intQuants.mobility(modelPhaseIdx).value(); } for (int p = 0; p < np; ++p) { - int ebosPhaseIdx = this->flowPhaseToEbosPhaseIdx(p); - scaling_factor[p] += well_tw_fraction * fs.invB(ebosPhaseIdx).value() * intQuants.mobility(ebosPhaseIdx).value() / total_mobility; + int modelPhaseIdx = this->flowPhaseToModelPhaseIdx(p); + scaling_factor[p] += well_tw_fraction * fs.invB(modelPhaseIdx).value() * intQuants.mobility(modelPhaseIdx).value() / total_mobility; } } return scaling_factor; @@ -1793,7 +1793,7 @@ namespace Opm // the reciprocal FVF. const auto connMob = mobility[this->flowPhaseToModelCompIdx(p)] - * fs.invB(this->flowPhaseToEbosPhaseIdx(p)).value(); + * fs.invB(this->flowPhaseToModelPhaseIdx(p)).value(); connPI[p] = connPICalc(connMob); } @@ -1845,7 +1845,7 @@ namespace Opm } const auto mt = std::accumulate(mobility.begin(), mobility.end(), 0.0); - connII[phase_pos] = connIICalc(mt * fs.invB(this->flowPhaseToEbosPhaseIdx(phase_pos)).value()); + connII[phase_pos] = connIICalc(mt * fs.invB(this->flowPhaseToModelPhaseIdx(phase_pos)).value()); } } // namespace Opm