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:
Bård Skaflestad 2012-11-01 13:34:27 +01:00
parent 7406847201
commit a0c8028ea8

View File

@ -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 */