Change UDQ restart data for injection groups

The code changes required to support multiple phases in a UDQ controlled
injection group is an educated guess.
This commit is contained in:
Joakim Hove
2020-01-29 07:44:53 +01:00
parent 0b2dbf7fc2
commit 45dfd4ffe0

View File

@@ -409,10 +409,19 @@ const std::vector<int> Opm::RestartIO::Helpers::igphData::ig_phase(const Opm::Sc
if (curGroups[ind] != nullptr) {
const auto& group = *curGroups[ind];
if (group.isInjectionGroup()) {
const auto& phase = group.injection_phase();
if ( phase == Opm::Phase::OIL ) inj_phase[group.insert_index()] = 1;
if ( phase == Opm::Phase::WATER ) inj_phase[group.insert_index()] = 2;
if ( phase == Opm::Phase::GAS ) inj_phase[group.insert_index()] = 3;
/*
Initial code could only inject one phase for each group, then
numerical value '3' was used for the gas phase, that can not
be right?
*/
int phase_sum = 0;
if (group.hasInjectionControl(Opm::Phase::OIL))
phase_sum += 1;
if (group.hasInjectionControl(Opm::Phase::WATER))
phase_sum += 2;
if (group.hasInjectionControl(Opm::Phase::GAS))
phase_sum += 4;
inj_phase[group.insert_index()] = phase_sum;
}
}
}