mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-12 02:55:38 -06:00
Assemble flux boundary conditions into system of linear equations.
A few restrictions apply: * The bc->value is interpreted as an inflow *into* the connecting cell. Outflow conditions must be specified using a negative sign. * We do not currently support general total flux conditions (necessitates the introduction of additional degrees of freedom), so bc->cond_pos[i+1]-bc->cond_pos[i] must be one (1) for all BC_FLUX_TOTVOL conditions.
This commit is contained in:
parent
47a3af5cfd
commit
11671f0cad
@ -190,6 +190,24 @@ assemble_bc_contrib(struct UnstructuredGrid *G ,
|
||||
}
|
||||
}
|
||||
|
||||
else if (bc->type[ i ] == BC_FLUX_TOTVOL) {
|
||||
/* We currently support individual flux faces only. */
|
||||
assert (bc->cond_pos[i + 1] - bc->cond_pos[i] == 1);
|
||||
|
||||
for (j = bc->cond_pos[ i ]; j < bc->cond_pos[i + 1]; j++) {
|
||||
f = bc->face[ j ];
|
||||
c1 = G->face_cells[2*f + 0];
|
||||
c2 = G->face_cells[2*f + 1];
|
||||
|
||||
assert ((c1 < 0) ^ (c2 < 0)); /* BCs on ext. faces only */
|
||||
|
||||
c1 = (c1 >= 0) ? c1 : c2;
|
||||
|
||||
/* Interpret BC as flow *INTO* cell */
|
||||
h->b[ c1 ] += bc->value[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
/* Other types currently not handled */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user