Go to the source code of this file.
|
void | fsh_destroy (struct fsh_data *h) |
|
struct fsh_data * | cfsh_construct (struct UnstructuredGrid *G, well_t *W) |
|
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) |
|
struct fsh_data * | ifsh_construct (struct UnstructuredGrid *G, well_t *W) |
|
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) |
|
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) |
|
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
- Construct
FSH data object suitable for the particular problem using either of the functions cfsh_construct() or ifsh_construct() for compressible or incompressible flow, respectively
- Compute static discretisation quantities, for instance using functions mim_ip_simple_all() and mim_ip_compute_gpress()
- For each time step or non-linear iteration:
- Compute dynamic discretisation quantities incorporating effects of multiple phases and non-linear feedback.
- Assemble system of simultaneous linear equations using functions cfsh_assemble() or ifsh_assemble()
- Solve the resulting system of linear equations, available in the
A 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.
- Reconstruct derived quantities such as cell pressures and interface fluxes using function fsh_press_flux(). Function fsh_press_flux() relies on the solution to the linear system being stored in the
x object.
- Release resources using function fsh_destroy() at end of simulation.
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 .
- Parameters
-
[in] | bc | Boundary conditions. |
[in] | src | Explicit source terms. |
[in] | Binv | Inverse of block-diagonal matrix Typically computed using functions mim_ip_simple_all() and mim_ip_mobility_update(). |
[in] | Biv | . |
[in] | P | Compressible accumulation term. |
[in] | gpress | Gravity pressure. |
[in] | wctrl | Well controls. Ignored. |
[in] | WI | Well indices. Ignored. |
[in] | BivW | for wells. Ignored. |
[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.
- Parameters
-
[in] | G | Grid. |
[in] | W | Well topology. Ignored. |
- Returns
- Fully formed data object suitable for use in a compressible pressure solver.
NULL in case of construction failure.
Dispose of all memory associated to FSH object.
- Parameters
-
[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.
- Parameters
-
[in] | G | Grid. |
[in] | Binv | Inverse of block-diagonal matrix Must coincide with the matrix used to form the system of linear equations currently stored in the data object. |
[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. |
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 .
- Parameters
-
[in] | bc | Boundary conditions. |
[in] | src | Explicit source terms. |
[in] | Binv | Inverse of block-diagonal matrix Typically computed using functions mim_ip_simple_all() and mim_ip_mobility_update(). |
[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.
- Parameters
-
- Returns
- Fully formed data object suitable for use in an incompressible pressure solver.
NULL in case of construction failure.
|