Routines and data structures to support the construction and formation of hybridized pressure solvers based on Schur complement reductions. More...
#include <opm/core/grid.h>
#include <opm/core/pressure/legacy_well.h>
#include <opm/core/pressure/flow_bc.h>
Go to the source code of this file.
Classes | |
struct | fsh_data |
Main data structure of hybridized pressure solvers based on Schur complement reductions. More... | |
Functions | |
void | fsh_destroy (struct fsh_data *h) |
Dispose of all memory associated to FSH object. More... | |
struct fsh_data * | cfsh_construct (struct UnstructuredGrid *G, well_t *W) |
Construct compressible hybrid flow-solver data object for a given grid and well pattern. More... | |
void | cfsh_assemble (struct FlowBoundaryConditions *bc, const double *src, const double *Binv, const double *Biv, const double *P, const double *gpress, well_control_t *wctrl, const double *WI, const double *BivW, const double *wdp, struct fsh_data *h) |
Form Schur-complement system of simultaneous linear equations arising in compressible flow using a hybridized formulation. More... | |
struct fsh_data * | ifsh_construct (struct UnstructuredGrid *G, well_t *W) |
Construct incompressible hybrid flow-solver data object for a given grid and well pattern. More... | |
void | ifsh_assemble (struct FlowBoundaryConditions *bc, const double *src, const double *Binv, const double *gpress, well_control_t *wctrl, const double *WI, const double *wdp, struct fsh_data *h) |
Form Schur-complement system of simultaneous linear equations arising in compressible flow using a hybridized formulation. More... | |
void | fsh_press_flux (struct UnstructuredGrid *G, const double *Binv, const double *gpress, struct fsh_data *h, double *cpress, double *fflux, double *wpress, double *wflux) |
Compute cell pressures (cpress) and interface fluxes (fflux) from current solution of system of linear equations, h->x . More... | |
Routines and data structures to support the construction and formation of hybridized pressure solvers based on Schur complement reductions.
Pressure solvers based on this strategy will be structured according to the following scheme
FSH
data object suitable for the particular problem using either of the functions cfsh_construct() or ifsh_construct() for compressible or incompressible flow, respectivelyA
and b
objects of the FSH
data object, using some linear solver software. The solution should be placed in the x
object of the FSH
object.x
object.void cfsh_assemble | ( | struct FlowBoundaryConditions * | bc, |
const double * | src, | ||
const double * | Binv, | ||
const double * | Biv, | ||
const double * | P, | ||
const double * | gpress, | ||
well_control_t * | wctrl, | ||
const double * | WI, | ||
const double * | BivW, | ||
const double * | wdp, | ||
struct fsh_data * | h | ||
) |
Form Schur-complement system of simultaneous linear equations arising in compressible flow using a hybridized formulation.
Upon returning from function cfsh_assemble(), the resulting system of simultaneous linear equations is stored in h->A
and h->b
.
[in] | bc | Boundary conditions. |
[in] | src | Explicit source terms. |
[in] | Binv | Inverse of block-diagonal matrix ![]() |
[in] | Biv | ![]() |
[in] | P | Compressible accumulation term. |
[in] | gpress | Gravity pressure. |
[in] | wctrl | Well controls. Ignored. |
[in] | WI | Well indices. Ignored. |
[in] | BivW | ![]() |
[in] | wdp | Gravity pressure along well track. Ignored. |
[in,out] | h | Data object. |
Construct compressible hybrid flow-solver data object for a given grid and well pattern.
[in] | G | Grid. |
[in] | W | Well topology. Ignored. |
NULL
in case of construction failure. void fsh_destroy | ( | struct fsh_data * | h | ) |
Dispose of all memory associated to FSH
object.
[in,out] | h | FSH object. Following a call to function fsh_destroy(), the pointer is invalid. |
void fsh_press_flux | ( | struct UnstructuredGrid * | G, |
const double * | Binv, | ||
const double * | gpress, | ||
struct fsh_data * | h, | ||
double * | cpress, | ||
double * | fflux, | ||
double * | wpress, | ||
double * | wflux | ||
) |
Compute cell pressures (cpress) and interface fluxes (fflux) from current solution of system of linear equations, h->x
.
Back substitution process, projected half-contact fluxes.
[in] | G | Grid. |
[in] | Binv | Inverse of block-diagonal matrix ![]() |
[in] | gpress | Gravity pressure. Must coincide with the array used to form the system of linear equations. |
[in] | h | Data object. |
[out] | cpress | Cell pressure. |
[out] | fflux | Interface fluxes. |
[out] | wpress | Well pressure. |
[out] | wflux | Well perforation fluxes. |
void ifsh_assemble | ( | struct FlowBoundaryConditions * | bc, |
const double * | src, | ||
const double * | Binv, | ||
const double * | gpress, | ||
well_control_t * | wctrl, | ||
const double * | WI, | ||
const double * | wdp, | ||
struct fsh_data * | h | ||
) |
Form Schur-complement system of simultaneous linear equations arising in compressible flow using a hybridized formulation.
Upon returning from function cfsh_assemble(), the resulting system of simultaneous linear equations is stored in h->A
and h->b
.
[in] | bc | Boundary conditions. |
[in] | src | Explicit source terms. |
[in] | Binv | Inverse of block-diagonal matrix ![]() |
[in] | gpress | Gravity pressure. |
[in] | wctrl | Well controls. |
[in] | WI | Well indices. |
[in] | wdp | Gravity pressure along well track. |
[in,out] | h | Data object. |
Construct incompressible hybrid flow-solver data object for a given grid and well pattern.
G | Grid. |
W | Well topology. |
NULL
in case of construction failure.