mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-03 20:56:43 -06:00
removing the function flowPhaseToModelPhaseIdx
This commit is contained in:
1 parent
a69b1f031c
commit
20716c65ca
4 files changed
+9
-29
No files matched your search
@@ -430,7 +430,7 @@ computeDensitiesForStoppedProducer(const DensityPropertyFunctions& prop_func)
|
||||
auto phIx = std::vector<int>(np);
|
||||
|
||||
for (auto p = 0*np; p < np; ++p) {
|
||||
phIx[p] = this->well_.flowPhaseToModelPhaseIdx(p);
|
||||
phIx[p] = FluidSystem::activeToCanonicalPhaseIdx(p);
|
||||
}
|
||||
|
||||
return phIx;
|
||||
|
||||
@@ -99,26 +99,6 @@ modelCompIdxToFlowPhaseIdx(const int compIdx) const
|
||||
}
|
||||
|
||||
|
||||
template<typename FluidSystem, class Indices>
|
||||
int
|
||||
WellInterfaceIndices<FluidSystem, Indices>::
|
||||
flowPhaseToModelPhaseIdx(const int phaseIdx) const
|
||||
{
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) &&
|
||||
FluidSystem::canonicalToActivePhaseIdx(FluidSystem::waterPhaseIdx) == phaseIdx)
|
||||
return FluidSystem::waterPhaseIdx;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) &&
|
||||
FluidSystem::canonicalToActivePhaseIdx(FluidSystem::oilPhaseIdx) == phaseIdx)
|
||||
return FluidSystem::oilPhaseIdx;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) &&
|
||||
FluidSystem::canonicalToActivePhaseIdx(FluidSystem::gasPhaseIdx) == phaseIdx)
|
||||
return FluidSystem::gasPhaseIdx;
|
||||
|
||||
// for other phases return the index
|
||||
return phaseIdx;
|
||||
}
|
||||
|
||||
|
||||
template<class FluidSystem, class Indices>
|
||||
typename WellInterfaceIndices<FluidSystem,Indices>::Scalar
|
||||
WellInterfaceIndices<FluidSystem,Indices>::
|
||||
|
||||
@@ -42,7 +42,6 @@ public:
|
||||
|
||||
int flowPhaseToModelCompIdx(const int phaseIdx) const;
|
||||
int modelCompIdxToFlowPhaseIdx(const int compIdx) const;
|
||||
int flowPhaseToModelPhaseIdx(const int phaseIdx) const;
|
||||
Scalar scalingFactor(const int phaseIdx) const;
|
||||
|
||||
template <class EvalWell>
|
||||
|
||||
@@ -1606,12 +1606,12 @@ namespace Opm
|
||||
const Scalar well_tw_fraction = this->well_index_[perf] / total_tw;
|
||||
Scalar total_mobility = 0.0;
|
||||
for (int p = 0; p < np; ++p) {
|
||||
int modelPhaseIdx = this->flowPhaseToModelPhaseIdx(p);
|
||||
total_mobility += fs.invB(modelPhaseIdx).value() * intQuants.mobility(modelPhaseIdx).value();
|
||||
const int canonical_phase_idx = FluidSystem::activeToCanonicalPhaseIdx(p);
|
||||
total_mobility += fs.invB(canonical_phase_idx).value() * intQuants.mobility(canonical_phase_idx).value();
|
||||
}
|
||||
for (int p = 0; p < np; ++p) {
|
||||
int modelPhaseIdx = this->flowPhaseToModelPhaseIdx(p);
|
||||
scaling_factor[p] += well_tw_fraction * fs.invB(modelPhaseIdx).value() * intQuants.mobility(modelPhaseIdx).value() / total_mobility;
|
||||
const int canonical_phase_idx = FluidSystem::activeToCanonicalPhaseIdx(p);
|
||||
scaling_factor[p] += well_tw_fraction * fs.invB(canonical_phase_idx).value() * intQuants.mobility(canonical_phase_idx).value() / total_mobility;
|
||||
}
|
||||
}
|
||||
return scaling_factor;
|
||||
@@ -2014,9 +2014,9 @@ namespace Opm
|
||||
for (int p = 0; p < np; ++p) {
|
||||
// Note: E100's notion of PI value phase mobility includes
|
||||
// the reciprocal FVF.
|
||||
const int canonical_phase_idx = FluidSystem::activeToCanonicalPhaseIdx(p);
|
||||
const auto connMob =
|
||||
mobility[this->flowPhaseToModelCompIdx(p)]
|
||||
* fs.invB(this->flowPhaseToModelPhaseIdx(p)).value();
|
||||
mobility[this->flowPhaseToModelCompIdx(p)] * fs.invB(canonical_phase_idx).value();
|
||||
|
||||
connPI[p] = connPICalc(connMob);
|
||||
}
|
||||
@@ -2065,7 +2065,8 @@ namespace Opm
|
||||
}
|
||||
|
||||
const auto mt = std::accumulate(mobility.begin(), mobility.end(), 0.0);
|
||||
connII[phase_pos] = connIICalc(mt * fs.invB(this->flowPhaseToModelPhaseIdx(phase_pos)).value());
|
||||
const int canonicalPhseIdx = FluidSystem::activeToCanonicalPhaseIdx(phase_pos);
|
||||
connII[phase_pos] = connIICalc(mt * fs.invB(canonicalPhseIdx).value());
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
|
||||
Reference in new issue
Block a user