WellInterfaceFluidSystem: rename flowPhaseToEbosPhaseIdx to flowPhaseToModelPhaseIdx

This commit is contained in:
Arne Morten Kvarving 2024-02-06 12:36:45 +01:00
parent c4c7d2e4f5
commit 34e883c1de
4 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -224,7 +224,7 @@ checkConstraints(WellState& well_state,
template<typename FluidSystem>
int
WellInterfaceFluidSystem<FluidSystem>::
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)

View File

@ -52,7 +52,7 @@ protected:
static constexpr int INVALIDCOMPLETION = std::numeric_limits<int>::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;

View File

@ -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