Verify that RESERVOIR_RATE controlled wells have specified total rate.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-26 15:03:55 +02:00
parent 6d4f0fe293
commit 88a24ef839

View File

@ -286,11 +286,13 @@ assemble_well_contrib(int nc ,
int *ok)
/* ---------------------------------------------------------------------- */
{
int w;
int w, p, np;
int are_rate;
struct WellControls *ctrls;
np = W->number_of_phases;
*all_rate = 1;
*ok = 1;
@ -307,7 +309,15 @@ assemble_well_contrib(int nc ,
break;
case RESERVOIR_RATE:
assemble_rate_well(nc, w, W, mt, wdp, h);
for (p = 0; p < np; ++p) {
if (ctrls->distr[np * ctrls->current + p] != 1.0) {
*ok = 0;
break;
}
}
if (*ok) {
assemble_rate_well(nc, w, W, mt, wdp, h);
}
break;
case SURFACE_RATE: