ICFERST
22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
|
This module contains all the subroutines to assemble and solve for pipes. More...
Functions/Subroutines | |
subroutine, public | assemble_pipe_transport_and_cty (state, packed_state, tracer, den_all, denold_all, final_phase, Mdims, ndgln, DERIV, CV_P, SOURCT_ALL, ABSORBT_ALL, WIC_T_BC_ALL, WIC_D_BC_ALL, WIC_U_BC_ALL, SUF_T_BC_ALL, SUF_D_BC_ALL, SUF_U_BC_ALL, getcv_disc, getct, Mmat, Mspars, upwnd, GOT_T2, DT, pipes_aux, DIAG_SCALE_PRES_COUP, DIAG_SCALE_PRES, mean_pore_cv, eles_with_pipe, thermal, CV_BETA, MASS_CV, INV_B, MASS_ELE, bcs_outfluxes, outfluxes, porous_heat_coef, assemble_collapsed_to_one_phase) |
: This sub modifies either MmatCT or the Advection-diffusion equation for 1D pipe modelling NOTE final_phase has to be define for the reservoir domain, i.e. for two phase flow it can be either 1 or 2, not 3 or 4. We define wells_first_phase as the first phase of the well domain More... | |
subroutine, public | mod_1d_force_bal_c (STATE, packed_state, Mdims, Mspars, Mmat, ndgln, eles_with_pipe, GET_PIVIT_MAT, WIC_P_BC_ALL, SUF_P_BC_ALL, SIGMA, NU_ALL, U_SOURCE, U_SOURCE_CV, pipes_aux) |
: This sub modifies MmatC for 1D pipe modelling. Works on the momentum equation More... | |
subroutine, public | retrieve_pipes_coords (state, packed_state, Mdims, ndgln, eles_with_pipe) |
: In this subroutine the elements that contain pipes are identified The pipes can either be defined using python (DEPRECATED) or a nastran file defining the trajectory of each well by points More... | |
subroutine, public | initialize_pipes_package_and_gamma (state, packed_state, pipes_aux, Mdims, Mspars, ndgln) |
This subroutine reads information from diamond and populates the necessary fields For P0DGP1 gamma is imposed to be zero at the boundary so the strong BCs work fine. More... | |
This module contains all the subroutines to assemble and solve for pipes.
subroutine, public multi_pipes::assemble_pipe_transport_and_cty | ( | type(state_type), dimension(:), intent(in) | state, |
type(state_type), intent(inout) | packed_state, | ||
type(tensor_field), intent(inout) | tracer, | ||
real, dimension(:,:), intent(inout) | den_all, | ||
real, dimension(:,:), intent(inout) | denold_all, | ||
integer, intent(in) | final_phase, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
real, dimension( :, : ), intent(in) | DERIV, | ||
real, dimension( :, :, : ), intent(in) | CV_P, | ||
real, dimension( :, : ), intent(in) | SOURCT_ALL, | ||
real, dimension( :, :, : ), intent(in), pointer | ABSORBT_ALL, | ||
integer, dimension(:,:,:), intent(in) | WIC_T_BC_ALL, | ||
integer, dimension(:,:,:), intent(in) | WIC_D_BC_ALL, | ||
integer, dimension(:,:,:), intent(in) | WIC_U_BC_ALL, | ||
real, dimension(:,:,:), intent(inout) | SUF_T_BC_ALL, | ||
real, dimension(:,:,:), intent(inout) | SUF_D_BC_ALL, | ||
real, dimension(:,:,:), intent(inout) | SUF_U_BC_ALL, | ||
logical, intent(in) | getcv_disc, | ||
logical, intent(in) | getct, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
logical, intent(in) | GOT_T2, | ||
real, intent(in) | DT, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
real, dimension(:,:,:), intent(inout) | DIAG_SCALE_PRES_COUP, | ||
real, dimension(:,:), intent(inout) | DIAG_SCALE_PRES, | ||
real, dimension( :, : ), intent(inout) | mean_pore_cv, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
logical, intent(in) | thermal, | ||
real, intent(in) | CV_BETA, | ||
real, dimension(:), intent(inout) | MASS_CV, | ||
real, dimension(:,:,:), intent(inout) | INV_B, | ||
real, dimension(:), intent(inout) | MASS_ELE, | ||
real, dimension(:,:, :), intent(inout), allocatable | bcs_outfluxes, | ||
type (multi_outfluxes), intent(inout) | outfluxes, | ||
real, dimension( : ), intent(in), optional | porous_heat_coef, | ||
logical, intent(in) | assemble_collapsed_to_one_phase | ||
) |
: This sub modifies either MmatCT or the Advection-diffusion equation for 1D pipe modelling NOTE final_phase has to be define for the reservoir domain, i.e. for two phase flow it can be either 1 or 2, not 3 or 4. We define wells_first_phase as the first phase of the well domain
state | Linked list containing all the fields defined in diamond and considered by Fluidity | |
packed_state | Linked list containing all the fields used by IC-FERST, memory partially shared with state | |
tracer | tracer to be assembled | |
den_all,denold_all | density and old density. Required like this to apply Boussinesq if required | |
final_phase | This is the final phase to be assembled, in this way we can assemble from phase 1 to final_phase not necessarily being for all the phases | |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc | |
ndgln | Global to local variables | |
DERIV | Derivative of the density against the pressure (nphase,Mdimscv_nonods) | |
CV_P | ! Control volume pressure, useless for the DCVFEM (1,Mdimsnpres,Mdimscv_nonods) | |
SOURCT_ALL | Source term of the tracer equation | |
ABSORBT_ALL | Absorption to be used here | |
WIC_T_BC_ALL | Boundary conditions for the tracer | |
WIC_D_BC_ALL | Boundary conditions for the density | |
WIC_U_BC_ALL | Boundary conditions for the velocity | |
SUF_T_BC_ALL | Values of the tracer at the surface of the elements? | |
SUF_D_BC_ALL | Values of the density at the surface of the elements? | |
SUF_U_BC_ALL | Values of the velocity at the surface of the elements? | |
GETCV_DISC | obtain the transport equation | |
GETCT | obtain the continuity equation | |
Mmat | Matrices for ICFERST | |
Mspars | Sparsity of the matrices | |
upwnd | Sigmas to compute the fluxes at the interphase for porous media | |
GOT_T2. | True if solving for a tracer, false otherwise | |
DT | time-step size | |
pipes_aux | Information required to define wells | |
DIAG_SCALE_PRES_COUP | Diagonal scaling of (distributed) pressure matrix (for wells) | |
DIAG_SCALE_PRES | Diagonal scaling of (distributed) pressure matrix (used to treat pressure implicitly) | |
MEAN_PORE_CV | Porosity defined control volume wise | |
eles_with_pipe | Elements that have a pipe | |
thermal | If true we are solving for temperature | |
CV_BETA | ??? | |
MASS_CV | mass of the CVs, the volume | |
INV_B | Coupling term of the wells | |
MASS_ELE | MAss of the elements, volume of elements | |
bcs_outfluxes | Outfluxes that pass boundary conditions, for mass conservation check | |
outfluxes | Contains all the fields required to compute the outfluxes of the model and create the outfluxes.csv file. Computed when assembling the continuity equation | |
porous_heat_coef | includes an average of porous and fluid heat coefficients | |
assemble_collapsed_to_one_phase | Collapses phases and solves for one single temperature. When there is thermal equilibrium | |
[in,out] | bcs_outfluxes | = if allocated then calculate outfluxes |
subroutine, public multi_pipes::initialize_pipes_package_and_gamma | ( | type(state_type), dimension(:), intent(in) | state, |
type(state_type), intent(in) | packed_state, | ||
type (multi_pipe_package), intent(inout) | pipes_aux, | ||
type (multi_dimensions), intent(in) | Mdims, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln | ||
) |
This subroutine reads information from diamond and populates the necessary fields For P0DGP1 gamma is imposed to be zero at the boundary so the strong BCs work fine.
state | Linked list containing all the fields defined in diamond and considered by Fluidity |
packed_state | Linked list containing all the fields used by IC-FERST, memory partially shared with state |
pipes_aux | INOUT Information required to define wells |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
subroutine, public multi_pipes::mod_1d_force_bal_c | ( | type(state_type), dimension( : ), intent(in) | STATE, |
type(state_type), intent(in) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
logical, intent(in) | GET_PIVIT_MAT, | ||
integer, dimension( :,:,: ), intent(in) | WIC_P_BC_ALL, | ||
real, dimension( :, :, : ), intent(in) | SUF_P_BC_ALL, | ||
real, dimension( :, : ), intent(in) | SIGMA, | ||
real, dimension( :, :, : ), intent(in) | NU_ALL, | ||
type( multi_field ), intent(in) | U_SOURCE, | ||
real, dimension( :, :, : ), intent(in) | U_SOURCE_CV, | ||
type (multi_pipe_package), intent(in) | pipes_aux | ||
) |
: This sub modifies MmatC for 1D pipe modelling. Works on the momentum equation
state | Linked list containing all the fields defined in diamond and considered by Fluidity |
packed_state | Linked list containing all the fields used by IC-FERST, memory partially shared with state |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
Mspars | Sparsity of the matrices |
Mmat | Matrices for ICFERST |
ndgln | Global to local variables |
eles_with_pipe | Elements that have a pipe |
GET_PIVIT_MAT | If true compute here the Mass matrix for the pipes part, default true. |
WIC_P_BC_ALL | Boundary conditions for the pressure |
SUF_P_BC_ALL | Values of the pressure at the surface of the elements? |
SIGMA | Absorption term coupling reservoir and wells |
NU_ALL | non-linear velocity |
U_SOURCE | Source term of the momentum equation defined on the element mesh |
U_SOURCE_CV | Source term of the momentum equation defined on the CV mesh |
pipes_aux | Information required to define wells |
subroutine, public multi_pipes::retrieve_pipes_coords | ( | type(state_type), dimension(:), intent(inout) | state, |
type(state_type), intent(in) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type(pipe_coords), dimension(:), intent(inout), allocatable | eles_with_pipe | ||
) |
: In this subroutine the elements that contain pipes are identified The pipes can either be defined using python (DEPRECATED) or a nastran file defining the trajectory of each well by points
state | Linked list containing all the fields defined in diamond and considered by Fluidity |
packed_state | Linked list containing all the fields used by IC-FERST, memory partially shared with state |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
ndgln | Global to local variables |
eles_with_pipe | INOUT (allocated inside) Elements that have a pipe |