mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellInterfaceFluidSystem: rename flowPhaseToEbosPhaseIdx to flowPhaseToModelPhaseIdx
This commit is contained in:
parent
c4c7d2e4f5
commit
34e883c1de
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user