mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Account for gravity in well connection flux calculation
We previously ignored effects of gravity in the calculation of the well connection fluxes (i.e., perforation fluxes). This commit includes those effects where appropriate.
This commit is contained in:
parent
7406847201
commit
a0c8028ea8
@ -1090,7 +1090,7 @@ compute_wflux(int np ,
|
||||
{
|
||||
int w, c, i, p;
|
||||
double pw, dp, t;
|
||||
const double *pmob;
|
||||
const double *pmob, *wdp;
|
||||
|
||||
struct Wells *W;
|
||||
struct CompletionData *cdata;
|
||||
@ -1101,13 +1101,14 @@ compute_wflux(int np ,
|
||||
|
||||
W = wells->W;
|
||||
cdata = wells->data;
|
||||
wdp = cdata->wdp;
|
||||
|
||||
for (w = i = 0; w < W->number_of_wells; w++) {
|
||||
pw = wpress[w];
|
||||
|
||||
for (; i < W->well_connpos[w + 1]; i++) {
|
||||
c = W->well_cells[ i ];
|
||||
dp = pw - cpress[c];
|
||||
dp = pw + wdp[ i ] - cpress[c];
|
||||
|
||||
if (dp > 0) { pmob = cdata->phasemob + (i * np); } /* w->c */
|
||||
else { pmob = pmobc + (c * np); } /* c->w */
|
||||
|
Loading…
Reference in New Issue
Block a user