mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Prepare to assemble RESV control target.
This commit is contained in:
parent
1d4d16feab
commit
f45f6ea62c
@ -745,22 +745,38 @@ assemble_well_contrib(struct cfs_tpfa_res_wells *W ,
|
|||||||
struct cfs_tpfa_res_data *h )
|
struct cfs_tpfa_res_data *h )
|
||||||
{
|
{
|
||||||
int w, i, c, np, np2, nc;
|
int w, i, c, np, np2, nc;
|
||||||
|
double pw, dp;
|
||||||
|
double *WI, *gpot, *pmobp;
|
||||||
const double *Ac, *dAc;
|
const double *Ac, *dAc;
|
||||||
|
|
||||||
nc = ((int) h->J->m) - W->conn->number_of_wells;
|
nc = ((int) h->J->m) - W->conn->number_of_wells;
|
||||||
np = cq->nphases;
|
np = cq->nphases;
|
||||||
np2 = np * np;
|
np2 = np * np;
|
||||||
|
|
||||||
|
WI = W->data->WI;
|
||||||
|
gpot = W->data->gpot;
|
||||||
|
pmobp = W->data->phasemob;
|
||||||
|
|
||||||
for (w = i = 0; w < W->conn->number_of_wells; w++) {
|
for (w = i = 0; w < W->conn->number_of_wells; w++) {
|
||||||
for (; i < W->conn->well_connpos[w + 1]; i++) {
|
pw = wpress[ w ];
|
||||||
|
|
||||||
|
for (; i < W->conn->well_connpos[w + 1];
|
||||||
|
i++, gpot += np, pmobp += np) {
|
||||||
|
|
||||||
c = W->conn->well_cells[ i ];
|
c = W->conn->well_cells[ i ];
|
||||||
Ac = cq->Ac + (c * np2);
|
Ac = cq->Ac + (c * np2);
|
||||||
dAc = cq->dAc + (c * np2);
|
dAc = cq->dAc + (c * np2);
|
||||||
|
|
||||||
|
dp = pw - cpress[ c ];
|
||||||
|
|
||||||
init_completion_contrib(i, np, Ac, dAc, h->pimpl);
|
init_completion_contrib(i, np, Ac, dAc, h->pimpl);
|
||||||
|
|
||||||
assemble_completion_to_cell(c, nc + w, np, dt, h);
|
assemble_completion_to_cell(c, nc + w, np, dt, h);
|
||||||
|
|
||||||
|
/* Prepare for RESV controls */
|
||||||
|
compute_darcyflux_and_deriv(np, WI[i], dp, pmobp, gpot,
|
||||||
|
h->pimpl->flux_work,
|
||||||
|
h->pimpl->flux_work + np);
|
||||||
#if 0
|
#if 0
|
||||||
assemble_completion_to_well();
|
assemble_completion_to_well();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user