mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move fluidsystem-only dependent method to WellInterfaceFluidSystem
This commit is contained in:
@@ -899,6 +899,23 @@ checkMaxRatioLimitWell(const WellState& well_state,
|
||||
return (well_ratio > max_ratio_limit);
|
||||
}
|
||||
|
||||
template<typename FluidSystem>
|
||||
int
|
||||
WellInterfaceFluidSystem<FluidSystem>::
|
||||
flowPhaseToEbosPhaseIdx(const int phaseIdx) const
|
||||
{
|
||||
const auto& pu = this->phaseUsage();
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && pu.phase_pos[Water] == phaseIdx)
|
||||
return FluidSystem::waterPhaseIdx;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && pu.phase_pos[Oil] == phaseIdx)
|
||||
return FluidSystem::oilPhaseIdx;
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) && pu.phase_pos[Gas] == phaseIdx)
|
||||
return FluidSystem::gasPhaseIdx;
|
||||
|
||||
// for other phases return the index
|
||||
return phaseIdx;
|
||||
}
|
||||
|
||||
template class WellInterfaceFluidSystem<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
||||
template class WellInterfaceFluidSystem<BlackOilFluidSystem<double,EclAlternativeBlackOilIndexTraits>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user