mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
Verify that RESERVOIR_RATE controlled wells have specified total rate.
This commit is contained in:
parent
6d4f0fe293
commit
88a24ef839
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user