Simplify Preferred Phase Extraction
Well::getPreferredPhase() now knows that the preferred phase for injectors is the injected phase. There is no need to special-case injectors here.
This commit is contained in:
parent
c76878520a
commit
2fb768e727
@ -234,7 +234,6 @@ namespace {
|
||||
{
|
||||
using PhaseVal = VI::IWell::Value::Preferred_Phase;
|
||||
|
||||
if (well.isProducer()) { // Preferred phase from WELSPECS
|
||||
switch (well.getPreferredPhase()) {
|
||||
case Opm::Phase::OIL: return PhaseVal::Oil;
|
||||
case Opm::Phase::GAS: return PhaseVal::Gas;
|
||||
@ -250,24 +249,6 @@ namespace {
|
||||
};
|
||||
}
|
||||
}
|
||||
else { // Injector. Preferred phase reset to injected phase.
|
||||
using IType = Opm::InjectorType;
|
||||
const auto& iprop = well.getInjectionProperties();
|
||||
|
||||
switch (iprop.injectorType) {
|
||||
case IType::OIL: return PhaseVal::Oil;
|
||||
case IType::GAS: return PhaseVal::Gas;
|
||||
case IType::WATER: return PhaseVal::Water;
|
||||
|
||||
default:
|
||||
throw std::invalid_argument {
|
||||
"Unsupported Injector Type '" +
|
||||
std::to_string(static_cast<int>(iprop.injectorType))
|
||||
+ '\''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename IWellArray>
|
||||
void setHistoryControlMode(const Opm::Well& well,
|
||||
|
Loading…
Reference in New Issue
Block a user