mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Consistently refer to "half-transmissibilities" as "one-sided".
While here, remove a comment that only describes the mechanics of the following loop and does not provide any more insight.
This commit is contained in:
@@ -578,7 +578,7 @@ compute_psys_contrib(grid_t *G,
|
|||||||
nc = G->number_of_cells;
|
nc = G->number_of_cells;
|
||||||
nconn = G->cell_facepos[nc];
|
nconn = G->cell_facepos[nc];
|
||||||
|
|
||||||
/* Compressible half-trans */
|
/* Compressible one-sided transmissibilities */
|
||||||
set_dynamic_trans(G, trans, cq, h->pimpl->ratio);
|
set_dynamic_trans(G, trans, cq, h->pimpl->ratio);
|
||||||
compute_densrat_update(G, cq, h->pimpl->ratio,
|
compute_densrat_update(G, cq, h->pimpl->ratio,
|
||||||
h->pimpl->masstrans_f);
|
h->pimpl->masstrans_f);
|
||||||
@@ -749,38 +749,39 @@ compute_fpress(grid_t *G,
|
|||||||
int c, i, f, c1, c2;
|
int c, i, f, c1, c2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Equation used for face pressure pf:
|
* Define face pressures as weighted average of connecting cell
|
||||||
* pf = (h1 p1 + h2 p2) / (h1 + h2)
|
* pressures. Specifically, we define
|
||||||
* where h{12} are half-transmissibilities
|
|
||||||
* and p{12} are cell pressures.
|
|
||||||
*
|
*
|
||||||
* NOTE: this should be modified to account for gravity and
|
* pf = (t1 p1 + t2 p2) / (t1 + t2)
|
||||||
* Neumann boundaries with nonzero flux!
|
*
|
||||||
|
* in which t1 and t2 are the one-sided transmissibilities and p1
|
||||||
|
* and p2 are the associated cell pressures.
|
||||||
|
*
|
||||||
|
* NOTE: The formula does not account for effects of gravity or
|
||||||
|
* flux boundary conditions.
|
||||||
*/
|
*/
|
||||||
for (f = 0; f < G->number_of_faces; f++) {
|
for (f = 0; f < G->number_of_faces; f++) {
|
||||||
scratch_f[f] = fpress[f] = 0.0;
|
scratch_f[f] = fpress[f] = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Temporarily storing (h1 + h2) in scratch[f]
|
|
||||||
* and (h1 p1 + h2 p2) in fpress[f].
|
|
||||||
*/
|
|
||||||
for (c = i = 0; c < G->number_of_cells; c++) {
|
for (c = i = 0; c < G->number_of_cells; c++) {
|
||||||
for (; i < G->cell_facepos[c + 1]; i++) {
|
for (; i < G->cell_facepos[c + 1]; i++) {
|
||||||
f = G->cell_faces[i];
|
f = G->cell_faces[i];
|
||||||
scratch_f[f] += htrans[i];
|
scratch_f[f] += htrans[i];
|
||||||
fpress[f] += htrans[i]*cpress[c];
|
fpress[f] += htrans[i] * cpress[c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (f = 0; f < G->number_of_faces; f++) {
|
for (f = 0; f < G->number_of_faces; f++) {
|
||||||
fpress[f] /= scratch_f[f];
|
fpress[f] /= scratch_f[f];
|
||||||
|
|
||||||
c1 = G->face_cells[2*f + 0];
|
c1 = G->face_cells[2*f + 0];
|
||||||
c2 = G->face_cells[2*f + 1];
|
c2 = G->face_cells[2*f + 1];
|
||||||
|
|
||||||
if (((c1 < 0) || (c2 < 0)) && (bc->type[f] == PRESSURE)) {
|
if (((c1 < 0) || (c2 < 0)) && (bc->type[f] == PRESSURE)) {
|
||||||
fpress[f] = bc->bcval[f];
|
fpress[f] = bc->bcval[f];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user