Add well potentials to SingleWellState

This commit is contained in:
Joakim Hove
2021-08-05 10:57:15 +02:00
parent e84eaa3179
commit 2f504536f4
10 changed files with 32 additions and 42 deletions

View File

@@ -367,8 +367,7 @@ namespace Opm
const int np = number_of_phases_;
const double sign = well_copy.well_ecl_.isInjector() ? 1.0 : -1.0;
for (int phase = 0; phase < np; ++phase){
well_state_copy.wellRates(well_copy.index_of_well_)[phase]
= sign * well_state_copy.wellPotentials(well_copy.index_of_well_)[phase];
well_state_copy.wellRates(well_copy.index_of_well_)[phase] = sign * ws.well_potentials[phase];
}
well_copy.scaleSegmentRatesWithWellRates(well_state_copy);