the pressure fluctuation only apply for non-segmented well.

to recover previous residual history when running with only
non-segmented wells.
This commit is contained in:
Kai Bao 2015-10-09 15:42:03 +02:00
parent be293962b6
commit cb3f54b618

View File

@ -208,8 +208,12 @@ namespace Opm
for (int p = 0; p < np; ++p) {
perfPhaseRates()[np * (i + start_perforation) + p] = wellRates()[np * w + p] / double(number_of_perforations);
}
const double safety_factor = (wells[w]->wellType() == INJECTOR) ? 1.01 : 0.99;
perfPress()[i + start_perforation] = safety_factor * state.pressure()[wells[w]->wellCells()[i]];
if (wells[w]->isMultiSegmented()) {
const double safety_factor = (wells[w]->wellType() == INJECTOR) ? 1.01 : 0.99;
perfPress()[i + start_perforation] = safety_factor * state.pressure()[wells[w]->wellCells()[i]];
} else {
perfPress()[i + start_perforation] = state.pressure()[wells[w]->wellCells()[i]];
}
}
// 5. Segment rates and pressures