mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
Fix bug in access order for state.qs.
State.qs is called well_phase_flow_rate in this function. It is stored with wells running fastest, not phases.
This commit is contained in:
parent
cb50728ac2
commit
dcb59a2fab
@ -945,9 +945,12 @@ namespace {
|
||||
const int num_phases,
|
||||
const double* distr)
|
||||
{
|
||||
const int num_wells = well_phase_flow_rate.size() / num_phases;
|
||||
double rate = 0.0;
|
||||
for (int phase = 0; phase < num_phases; ++phase) {
|
||||
rate += well_phase_flow_rate.value()[well*num_phases + phase] * distr[phase];
|
||||
// Important: well_phase_flow_rate is ordered with all rates for first
|
||||
// phase coming first, then all for second phase etc.
|
||||
rate += well_phase_flow_rate.value()[well + phase*num_wells] * distr[phase];
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user