ICFERST
22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
|
This module contain all the necessary subroutines to deal with FE-wise equations and fields. Assembling and solving of the momentum equation and associated fields such as capillary pressure, hydrostatic pressure solver, and stabilisation techniques. Also includes the assembly and solving of a Laplacian system (for zeta potential mainly) More...
Functions/Subroutines | |
subroutine, public | intenerge_assem_solve (state, packed_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, VOLFRA_PORE, IGOT_T2, igot_theta_flux, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, option_path, mass_ele_transp, thermal, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, icomp, saturation, Permeability_tensor_field, nonlinear_iteration) |
Calls to generate the transport equation for the transport of energy/temperature and to solve the transport of components. More... | |
subroutine | force_min_max_principle (Mdims, entrance, tracer, nonlinear_iteration, totally_min_max) |
: To help the stability of the system,if there are no sources/sinks it is known that the temperature must fulfill the min max principle, therefore here values outside this rank are capped. More... | |
subroutine, public | tracer_assemble_solve (Tracer_name, state, packed_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, tracer, velocity, density, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, VOLFRA_PORE, IGOT_T2, igot_theta_flux, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, mass_ele_transp, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, icomp, saturation, Permeability_tensor_field, nonlinear_iteration) |
Calls to generate and solve the transport equation for n passive tracers defined in diamond as Passive_Tracer_N Where N is an integer which is continuous starting from 1. More... | |
subroutine, public | volumefraction_assemble_solve (state, packed_state, multicomponent_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, multi_absorp, upwnd, eles_with_pipe, pipes_aux, DT, SUF_SIG_DIAGTEN_BC, V_SOURCE, VOLFRA_PORE, igot_theta_flux, mass_ele_transp, nonlinear_iteration, time_step, SFPI_taken, SFPI_its, Courant_number, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J) |
Calls to generate the transport equation for the saturation. Embeded an FPI with backtracking method is uncluded. More... | |
subroutine | compositional_assemble_solve (state, packed_state, multicomponent_state, Mdims, CV_GIdims, CV_funs, Mspars, ndgln, Mdisopt, Mmat, upwnd, multi_absorp, DT, SUF_SIG_DIAGTEN_BC, GET_THETA_FLUX, USE_THETA_FLUX, THETA_GDIFF, eles_with_pipe, pipes_aux, mass_ele, sum_theta_flux, sum_one_m_theta_flux, sum_theta_flux_j, sum_one_m_theta_flux_j) |
:In this subroutine the components are solved for all the phases. Systems for each component are assembled and solved by calling INTENERGE_ASSEM_SOLVE More... | |
subroutine, public | force_bal_cty_assem_solve (state, packed_state, Mdims, CV_GIdims, FE_GIdims, CV_funs, FE_funs, Mspars, ndgln, Mdisopt, Mmat, multi_absorp, upwnd, eles_with_pipe, pipes_aux, velocity, pressure, DT, SUF_SIG_DIAGTEN_BC, V_SOURCE, VOLFRA_PORE, IGOT_THETA_FLUX, THETA_FLUX, ONE_M_THETA_FLUX, THETA_FLUX_J, ONE_M_THETA_FLUX_J, calculate_mass_delta, outfluxes, pres_its_taken, nonlinear_its, Courant_number) |
Calls to generate the Gradient Matrix, the divergence matrix, the momentum matrix and the mass matrix Once these matrices (and corresponding RHSs) are generated the system of equations is solved using the projection method. More... | |
subroutine | dg_visc_lin (S_INV_NNX_MAT12, NNX_MAT, NNX_MAT2, NN_MAT, NN_MAT2, U_SNLOC, U_NLOC, SBUFEN_REVERSED, SDETWE, SBCVNGI, SNORMXN_ALL, NDIM, U_SLOC2LOC, U_OTHER_LOC, U_NLOC_EXT, ON_BOUNDARY) |
:<FOR INERTIA ONLY> This sub calculates S_INV_NNX_MAT12 which contains NDIM matricies that are used to form the inter element coupling for the viscocity discretization. NNX_MAT, NNX_MAT2 contain matricies of first derivative times basis function for current element and neightbouring element. Similarly NN_MAT, NN_MAT2, contain the element-wise mass matrices. Only call this sub if element not next to the boundary... More... | |
subroutine | viscocity_tensor_les_calc (LES_UDIFFUSION, LES_UDIFFUSION_VOL, DUX_ELE_ALL, NDIM, NPHASE, U_NLOC, X_NLOC, TOTELE, X_NONODS, X_ALL, X_NDGLN, MAT_NONODS, MAT_NLOC, MAT_NDGLN, LES_DISOPT, LES_CS, UDEN, CV_NONODS, CV_NDGLN, U_NDGLN, U_NONODS, U_ALL, DERIV) |
: <FOR INERTIA ONLY> This subroutine calculates a tensor of viscocity LES_UDIFFUSION, LES_UDIFFUSION_VOL More... | |
subroutine | comb_vel_matrix_diag_dist (DIAG_BIGM_CON, BIGM_CON, DGM_PETSC, FINELE, COLELE, NDIM, NPHASE, U_NLOC, TOTELE, velocity, pressure, Mmat) |
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into the matrix DGM_PHA. For stokes also the diagonal of the matrix is introduced in the mass matrix More... | |
subroutine | comb_vel_matrix_diag_dist_lump (DIAG_BIGM_CON, BIGM_CON, DGM_PETSC, FINELE, COLELE, NDIM, NPHASE, U_NLOC, TOTELE, velocity, pressure) |
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into the matrix DGM_PHA. More... | |
subroutine | use_posinmat_c_store (COUNT, U_INOD, P_JNOD, U_NONODS, FINDC, COLC, NCOLC, IDO_STORE_AC_SPAR_PT, STORED_AC_SPAR_PT, POSINMAT_C_STORE, ELE, U_ILOC, P_JLOC, TOTELE, U_NLOC, P_NLOC) |
Used to assemble the C matrix in the ICFERST format. More... | |
subroutine | use_posinmat_c_store_suf_dg (COUNT, U_INOD, P_JNOD, U_NONODS, FINDC, COLC, NCOLC, IDO_STORE_AC_SPAR_PT, STORED_AC_SPAR_PT, POSINMAT_C_STORE_SUF_DG, ELE, IFACE, U_SILOC, P_SJLOC, TOTELE, NFACE, U_SNLOC, P_SNLOC) |
Used to assemble the C matrix in the ICFERST format (for DG?) More... | |
subroutine | linearise_field (field_in, field_out) |
: <FOR INERTIA ONLY> This sub will linearise a p2 field More... | |
subroutine | introduce_grad_rhs_field_term (packed_state, Mdims, Mmat, RHS_field, FE_funs, Devfuns, X_ALL, LOC_U_RHS, ele, cv_ndgln, x_ndgln, ele2, iface, sdetwe, SNORMXN_ALL, U_SLOC2LOC, CV_SLOC2LOC, MAT_OTHER_LOC) |
: This subroutine performs and introduces the gradient of a RHS field (Capillary pressure for example) for the momentum equation. It has two options (hard-coded) integrations by parts (activated) or voluemtric integration, For capillary pressure: The capillary pressure is a term introduced as a RHS which affects the effective velocity More... | |
subroutine | getoverrelaxation_parameter (state, packed_state, Mdims, ndgln, Overrelaxation, Phase_with_Pc, totally_min_max, for_transport) |
Overrelaxation has to be alocate before calling this subroutine its size is cv_nonods For more information read: doi.org/10.1016/j.cma.2019.07.004. More... | |
subroutine | high_order_pressure_solve (Mdims, ndgln, u_rhs, state, packed_state, nphase, u_absorbin) |
: Instead of including the gravity in the RHS normally, here a system based on a Laplacian is created and solved that accounts for the gravity effect in the system. Next, this is introduced as a RHS in the momemtum equation This allows for higher precision for the gravity effect. > More... | |
real function | dg_oscilat_detect (SNDOTQ_KEEP, SNDOTQ2_KEEP, N_DOT_DU, N_DOT_DU2, SINCOME, MASS_ELE, MASS_ELE2) |
: <INERTIA ONLY>Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1.0- CENTRAL SCHEME. dg_oscilat_detect=0.0- UPWIND SCHEME. More... | |
real function | p0_dg_oscilat_detect (SNDOTQ_KEEP, SNDOTQ2_KEEP, N_DOT_DU, N_DOT_DU2, SINCOME, MASS_ELE, MASS_ELE2) |
: <INERTIA ONLY> Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1.0- CENTRAL SCHEME. dg_oscilat_detect=0.0- UPWIND SCHEME. More... | |
subroutine | diffus_cal_coeff_stress_or_tensor (Mdims, DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX, STRESS_FORM, STRESS_FORM_STAB, ZERO_OR_TWO_THIRDS, SBUFEN_REVERSED, SBCVFEN_REVERSED, SBCVNGI, SLOC_UDIFFUSION, SLOC_UDIFFUSION_VOL, SLOC2_UDIFFUSION, SLOC2_UDIFFUSION_VOL, DIFF_GI_ADDED, HDC, U_CV_NODJ_IPHA_ALL, U_CV_NODI_IPHA_ALL, UOLD_CV_NODJ_IPHA_ALL, UOLD_CV_NODI_IPHA_ALL, ELE, ELE2, SNORMXN_ALL, SLOC_DUX_ELE_ALL, SLOC2_DUX_ELE_ALL, SLOC_DUOLDX_ELE_ALL, SLOC2_DUOLDX_ELE_ALL, SELE, WIC_U_BC, WIC_U_BC_DIRICHLET, SIMPLE_DIFF_CALC, DIFF_MIN_FRAC, DIFF_MAX_FRAC) |
: <INERTIA ONLY> This sub calculates the effective diffusion coefficientd DIFF_COEF_DIVDX,DIFF_COEFOLD_DIVDX based on a non-linear method and a non-oscillating scheme. This implements the stress and tensor form of diffusion and calculates a jump conidition. which is in DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX The coefficient are in N_DOT_DKDU, N_DOT_DKDUOLD. look at the manual DG treatment of viscocity. More... | |
subroutine, public | generate_and_solve_laplacian_system (Mdims, state, packed_state, ndgln, Mmat, Mspars, CV_funs, CV_GIdims, Sigma_field, field_name, K_fields, F_fields, intface_val_type, solver_path) |
: In this method we assemble and solve the Laplacian system using at least P1 elements The equation solved is the following: Div sigma Grad X = - SUM (Div K Grad F) with Neuman BCs = 0 where K and F are passed down as a vector. Therefore for n entries the SUM will be performed over n fields Example: F = (3, nphase, cv_nonods) would include three terms in the RHS and the same for K If harmonic average then we perform the harmonic average of sigma and K IMPORTANT: This subroutine requires the PHsparsity to be generated Note that this method solves considering FE fields. If using CV you may incur in an small error. > More... | |
subroutine | impose_strong_bcs_wells (state, pipes_aux, Mdims, Mmat, ndgln, CMC_petsc, pressure, rhs_p) |
: In this subroutine, we modify the CMC matrix and the RHS for the pressure to strongly impose the pressure boundary conditions for wells ONLY. This is required only when using P0DG-P1 If not imposing strong pressure BCs and using P0DG-P1, the formulation for weak pressure BCs leads to a 0 in the diagonal of the CMC matrix, therefore strong BCs are required. More... | |
subroutine | ai_backtracking_parameters (Mdims, ndgln, packed_state, state, courant_number_in, backtrack_par_factor, overrelaxation, res, resold, outer_nonlinear_iteration, for_transport) |
Subroutine that calculates the backtrack_par_factor based on Machine Learning. The inputs of the Machine learning model are dimensionless numbers and configurations of the system. This subroutine also generates several dimensionless numbers cv-wise. More... | |
This module contain all the necessary subroutines to deal with FE-wise equations and fields. Assembling and solving of the momentum equation and associated fields such as capillary pressure, hydrostatic pressure solver, and stabilisation techniques. Also includes the assembly and solving of a Laplacian system (for zeta potential mainly)
subroutine multiphase_1d_engine::ai_backtracking_parameters | ( | type(multi_dimensions), intent(in) | Mdims, |
type(multi_ndgln), intent(in) | ndgln, | ||
type( state_type ), intent(inout) | packed_state, | ||
type( state_type ), dimension( : ), intent(inout) | state, | ||
real, dimension(:), intent(inout) | courant_number_in, | ||
real, intent(inout) | backtrack_par_factor, | ||
real, dimension(:), intent(in) | overrelaxation, | ||
real, intent(in) | res, | ||
real, intent(in) | resold, | ||
integer, intent(in) | outer_nonlinear_iteration, | ||
logical, intent(in), optional | for_transport | ||
) |
Subroutine that calculates the backtrack_par_factor based on Machine Learning. The inputs of the Machine learning model are dimensionless numbers and configurations of the system. This subroutine also generates several dimensionless numbers cv-wise.
subroutine multiphase_1d_engine::comb_vel_matrix_diag_dist | ( | real, dimension( :,:,:, :,:,:, : ), intent(in) | DIAG_BIGM_CON, |
real, dimension( :,:,:, :,:,:, : ), intent(in) | BIGM_CON, | ||
type( petsc_csr_matrix ), intent(inout) | DGM_PETSC, | ||
integer, dimension(: ), intent(in) | FINELE, | ||
integer, dimension( : ), intent(in) | COLELE, | ||
integer, intent(in) | NDIM, | ||
integer, intent(in) | NPHASE, | ||
integer, intent(in) | U_NLOC, | ||
integer, intent(in) | TOTELE, | ||
type( tensor_field ) | velocity, | ||
type( tensor_field ) | pressure, | ||
type(multi_matrices), intent(inout) | Mmat | ||
) |
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into the matrix DGM_PHA. For stokes also the diagonal of the matrix is introduced in the mass matrix
subroutine multiphase_1d_engine::comb_vel_matrix_diag_dist_lump | ( | real, dimension( :,:,:, :,:,:, : ), intent(in) | DIAG_BIGM_CON, |
real, dimension( :,:,:, :,:,:, : ), intent(in) | BIGM_CON, | ||
type( petsc_csr_matrix ), intent(inout) | DGM_PETSC, | ||
integer, dimension(: ), intent(in) | FINELE, | ||
integer, dimension( : ), intent(in) | COLELE, | ||
integer, intent(in) | NDIM, | ||
integer, intent(in) | NPHASE, | ||
integer, intent(in) | U_NLOC, | ||
integer, intent(in) | TOTELE, | ||
type( tensor_field ) | velocity, | ||
type( tensor_field ) | pressure | ||
) |
: <FOR INERTIA ONLY>This subroutine combines the distributed and block diagonal for an element into the matrix DGM_PHA.
subroutine multiphase_1d_engine::compositional_assemble_solve | ( | type( state_type ), dimension( : ), intent(inout) | state, |
type( state_type ), intent(inout) | packed_state, | ||
type( state_type ), dimension( : ), intent(inout) | multicomponent_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_discretization_opts) | Mdisopt, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
type(multi_absorption), intent(inout) | multi_absorp, | ||
real, intent(in) | DT, | ||
real, dimension( :, : ), intent(in) | SUF_SIG_DIAGTEN_BC, | ||
logical, intent(in) | GET_THETA_FLUX, | ||
logical, intent(in) | USE_THETA_FLUX, | ||
real, dimension( :, : ), intent(inout) | THETA_GDIFF, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
real, dimension(:), intent(in) | mass_ele, | ||
real, dimension( :,: ), intent(inout) | sum_theta_flux, | ||
real, dimension( :,: ), intent(inout) | sum_one_m_theta_flux, | ||
real, dimension( :,: ), intent(inout) | sum_theta_flux_j, | ||
real, dimension( :,: ), intent(inout) | sum_one_m_theta_flux_j | ||
) |
:In this subroutine the components are solved for all the phases. Systems for each component are assembled and solved by calling INTENERGE_ASSEM_SOLVE
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 |
multicomponent_state | Linked list containing all the fields used by compositional, just in case we are solving for components > |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
CV_GIdims | Gauss integration numbers for CV fields |
CV_funs | Shape functions for the CV mesh |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
Mdisopt | Discretisation options |
Mmat | Matrices for ICFERST |
upwnd | Sigmas to compute the fluxes at the interphase for porous media |
multi_absorp | Absoprtion of associated with the transport field |
DT | Time step size |
SUF_SIG_DIAGTEN_BC | Like upwnd but for the boundary |
GET_THETA_FLUX,USE_THETA_FLUX | ????? |
THETA_GDIFF | ???? |
eles_with_pipe | Elements that have a pipe |
pipes_aux | Information required to define wells |
mass_ele | Mass of the elements |
sum_theta_flux,sum_one_m_theta_flux,sum_theta_flux_j,sum_one_m_theta_flux_j | ???? |
real function multiphase_1d_engine::dg_oscilat_detect | ( | real | SNDOTQ_KEEP, |
real | SNDOTQ2_KEEP, | ||
real | N_DOT_DU, | ||
real | N_DOT_DU2, | ||
real | SINCOME, | ||
real | MASS_ELE, | ||
real | MASS_ELE2 | ||
) |
: <INERTIA ONLY>Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1.0- CENTRAL SCHEME. dg_oscilat_detect=0.0- UPWIND SCHEME.
subroutine multiphase_1d_engine::dg_visc_lin | ( | real, dimension( ndim, u_snloc, 2*u_nloc ), intent(inout) | S_INV_NNX_MAT12, |
real, dimension( ndim, u_nloc, u_nloc ), intent(in) | NNX_MAT, | ||
real, dimension( ndim, u_nloc, u_nloc ), intent(in) | NNX_MAT2, | ||
real, dimension( u_nloc, u_nloc ), intent(in) | NN_MAT, | ||
real, dimension( u_nloc, u_nloc ), intent(in) | NN_MAT2, | ||
integer, intent(in) | U_SNLOC, | ||
integer, intent(in) | U_NLOC, | ||
real, dimension( sbcvngi, u_snloc ), intent(in) | SBUFEN_REVERSED, | ||
real, dimension( sbcvngi ), intent(in) | SDETWE, | ||
integer, intent(in) | SBCVNGI, | ||
real, dimension( ndim, sbcvngi ), intent(in) | SNORMXN_ALL, | ||
integer, intent(in) | NDIM, | ||
integer, dimension( u_snloc ), intent(in) | U_SLOC2LOC, | ||
integer, dimension( u_nloc ), intent(in) | U_OTHER_LOC, | ||
integer, intent(in) | U_NLOC_EXT, | ||
logical, intent(in) | ON_BOUNDARY | ||
) |
:<FOR INERTIA ONLY> This sub calculates S_INV_NNX_MAT12 which contains NDIM matricies that are used to form the inter element coupling for the viscocity discretization. NNX_MAT, NNX_MAT2 contain matricies of first derivative times basis function for current element and neightbouring element. Similarly NN_MAT, NN_MAT2, contain the element-wise mass matrices. Only call this sub if element not next to the boundary...
subroutine multiphase_1d_engine::diffus_cal_coeff_stress_or_tensor | ( | type(multi_dimensions), intent(in) | Mdims, |
real, dimension( mdims%ndim,mdims%nphase,sbcvngi ), intent(inout) | DIFF_COEF_DIVDX, | ||
real, dimension( mdims%ndim,mdims%nphase,sbcvngi ), intent(inout) | DIFF_COEFOLD_DIVDX, | ||
logical, intent(in) | STRESS_FORM, | ||
logical, intent(in) | STRESS_FORM_STAB, | ||
real, intent(in) | ZERO_OR_TWO_THIRDS, | ||
real, dimension( sbcvngi, mdims%u_snloc ), intent(in) | SBUFEN_REVERSED, | ||
real, dimension( sbcvngi, mdims%cv_snloc ), intent(in) | SBCVFEN_REVERSED, | ||
integer, intent(in) | SBCVNGI, | ||
real, dimension( mdims%ndim,mdims%ndim,mdims%nphase,mdims%cv_snloc ), intent(in) | SLOC_UDIFFUSION, | ||
real, dimension( mdims%nphase,mdims%cv_snloc ), intent(in) | SLOC_UDIFFUSION_VOL, | ||
real, dimension( mdims%ndim,mdims%ndim,mdims%nphase,mdims%cv_snloc ), intent(in) | SLOC2_UDIFFUSION, | ||
real, dimension( mdims%nphase,mdims%cv_snloc ), intent(in) | SLOC2_UDIFFUSION_VOL, | ||
real, dimension( mdims%ndim, mdims%ndim,mdims%ndim, mdims%nphase, sbcvngi), intent(in) | DIFF_GI_ADDED, | ||
real, intent(in) | HDC, | ||
real, dimension(mdims%ndim,mdims%nphase,sbcvngi), intent(in) | U_CV_NODJ_IPHA_ALL, | ||
real, dimension(mdims%ndim,mdims%nphase,sbcvngi), intent(in) | U_CV_NODI_IPHA_ALL, | ||
real, dimension(mdims%ndim,mdims%nphase,sbcvngi), intent(in) | UOLD_CV_NODJ_IPHA_ALL, | ||
real, dimension(mdims%ndim,mdims%nphase,sbcvngi), intent(in) | UOLD_CV_NODI_IPHA_ALL, | ||
integer, intent(in) | ELE, | ||
integer, intent(in) | ELE2, | ||
real, dimension( mdims%ndim, sbcvngi ), intent(in) | SNORMXN_ALL, | ||
real, dimension( mdims%ndim, mdims%ndim , mdims%nphase, mdims%u_snloc ), intent(in) | SLOC_DUX_ELE_ALL, | ||
real, dimension( mdims%ndim, mdims%ndim , mdims%nphase, mdims%u_snloc ), intent(in) | SLOC2_DUX_ELE_ALL, | ||
real, dimension( mdims%ndim, mdims%ndim , mdims%nphase, mdims%u_snloc ), intent(in) | SLOC_DUOLDX_ELE_ALL, | ||
real, dimension( mdims%ndim, mdims%ndim , mdims%nphase, mdims%u_snloc ), intent(in) | SLOC2_DUOLDX_ELE_ALL, | ||
integer, intent(in) | SELE, | ||
integer, dimension( mdims%ndim,mdims%nphase,mdims%stotel ), intent(in) | WIC_U_BC, | ||
integer, intent(in) | WIC_U_BC_DIRICHLET, | ||
logical, intent(in) | SIMPLE_DIFF_CALC, | ||
real, intent(in) | DIFF_MIN_FRAC, | ||
real, intent(in) | DIFF_MAX_FRAC | ||
) |
: <INERTIA ONLY> This sub calculates the effective diffusion coefficientd DIFF_COEF_DIVDX,DIFF_COEFOLD_DIVDX based on a non-linear method and a non-oscillating scheme. This implements the stress and tensor form of diffusion and calculates a jump conidition. which is in DIFF_COEF_DIVDX, DIFF_COEFOLD_DIVDX The coefficient are in N_DOT_DKDU, N_DOT_DKDUOLD. look at the manual DG treatment of viscocity.
subroutine, public multiphase_1d_engine::force_bal_cty_assem_solve | ( | type( state_type ), dimension( : ), intent(inout) | state, |
type( state_type ), intent(inout) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
type(multi_gi_dimensions), intent(in) | FE_GIdims, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type(multi_shape_funs), intent(in) | FE_funs, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_discretization_opts) | Mdisopt, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type(multi_absorption), intent(inout) | multi_absorp, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
type( tensor_field ), intent(inout) | velocity, | ||
type( tensor_field ), intent(inout) | pressure, | ||
real, intent(in) | DT, | ||
real, dimension( : , : ), intent(in) | SUF_SIG_DIAGTEN_BC, | ||
real, dimension( :, : ), intent(in) | V_SOURCE, | ||
real, dimension( :, : ), intent(in) | VOLFRA_PORE, | ||
integer, intent(in) | IGOT_THETA_FLUX, | ||
real, dimension( : , : ), intent(inout) | THETA_FLUX, | ||
real, dimension( : , : ), intent(inout) | ONE_M_THETA_FLUX, | ||
real, dimension( : , : ), intent(inout) | THETA_FLUX_J, | ||
real, dimension( : , : ), intent(inout) | ONE_M_THETA_FLUX_J, | ||
real, dimension(:,:), intent(inout) | calculate_mass_delta, | ||
type (multi_outfluxes), intent(inout) | outfluxes, | ||
integer, intent(inout) | pres_its_taken, | ||
integer, intent(in) | nonlinear_its, | ||
real, dimension(:), intent(inout) | Courant_number | ||
) |
Calls to generate the Gradient Matrix, the divergence matrix, the momentum matrix and the mass matrix Once these matrices (and corresponding RHSs) are generated the system of equations is solved using the projection method.
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 |
CV_GIdims | Gauss integration numbers for CV fields |
FE_GIdims | Gauss integration numbers for FE fields |
CV_funs | Shape functions for the CV mesh |
FE_funs | Shape functions for the FE mesh |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
Mdisopt | Discretisation options |
Mmat | Matrices for ICFERST |
multi_absorp | Absoprtion of associated with the transport field |
upwnd | Sigmas to compute the fluxes at the interphase for porous media |
eles_with_pipe | Elements that have a pipe |
pipes_aux | Information required to define wells |
velocity | tensor field. Why do we pass it down instead of retrieving it from packed_state... |
pressure | tensor fieldWhy do we pass it down instead of retrieving it from packed_state... |
DT | Time step size |
SUF_SIG_DIAGTEN_BC | Like upwnd but for the boundary |
V_SOURCE | Source term |
VOLFRA_PORE | Porosity field (Mdimsnpres,Mdimstotele) |
IGOT_THETA_FLUX,THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J | ???? |
calculate_mass_delta | This is to compute mass conservation |
outfluxes | variable containing the outfluxes information |
pres_its_taken | Integer containing the number of iterations performed by the solver to solve for pressure |
nonlinear_its | current non-linear iteration |
Courant_number | Global courant number and shock front courant number |
subroutine multiphase_1d_engine::force_min_max_principle | ( | type(multi_dimensions), intent(in) | Mdims, |
integer, intent(in) | entrance, | ||
type(tensor_field), intent(inout) | tracer, | ||
integer, intent(in) | nonlinear_iteration, | ||
real, dimension(2), intent(inout) | totally_min_max | ||
) |
: To help the stability of the system,if there are no sources/sinks it is known that the temperature must fulfill the min max principle, therefore here values outside this rank are capped.
subroutine, public multiphase_1d_engine::generate_and_solve_laplacian_system | ( | type(multi_dimensions), intent(in) | Mdims, |
type( state_type ), dimension(:), intent(inout) | state, | ||
type( state_type ), intent(inout) | packed_state, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type(multi_sparsities), intent(in) | Mspars, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
real, dimension(:,:), intent(in) | Sigma_field, | ||
character( len = * ), intent(in), optional | field_name, | ||
real, dimension(:,:,:), intent(in) | K_fields, | ||
real, dimension(:,:,:), intent(in) | F_fields, | ||
integer, intent(in) | intface_val_type, | ||
character(len=option_path_len), intent(in), optional | solver_path | ||
) |
: In this method we assemble and solve the Laplacian system using at least P1 elements The equation solved is the following: Div sigma Grad X = - SUM (Div K Grad F) with Neuman BCs = 0 where K and F are passed down as a vector. Therefore for n entries the SUM will be performed over n fields Example: F = (3, nphase, cv_nonods) would include three terms in the RHS and the same for K If harmonic average then we perform the harmonic average of sigma and K IMPORTANT: This subroutine requires the PHsparsity to be generated Note that this method solves considering FE fields. If using CV you may incur in an small error. >
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
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 |
ndgln | Global to local variables |
Mmat | Matrices for ICFERST |
Mspars | Sparsity of the matrices |
CV_funs | Shape functions for the CV mesh |
CV_GIdims | Gauss integration numbers for CV fields |
Sigma_field | Coefficient multipliying the left-hand side term |
field_name | name of the field to be solved for |
K_fields | Coefficients multipliying the RHS terms |
F_fields | RHS fierlds |
intface_val_type | 0 = no interpolation; 1 Harmonic mean; !20 for SP solver, harmonic mean considering charge; negative normal mean |
solver_path | Path to select the type of solver |
subroutine multiphase_1d_engine::getoverrelaxation_parameter | ( | type( state_type ), dimension( : ), intent(inout) | state, |
type( state_type ), intent(inout) | packed_state, | ||
type (multi_dimensions), intent(in) | Mdims, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
real, dimension(:), intent(inout) | Overrelaxation, | ||
integer, intent(inout) | Phase_with_Pc, | ||
real, dimension(:), optional | totally_min_max, | ||
logical, intent(in), optional | for_transport | ||
) |
Overrelaxation has to be alocate before calling this subroutine its size is cv_nonods For more information read: doi.org/10.1016/j.cma.2019.07.004.
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 |
Overrelaxation | INOUT Field containing the outcome of this subroutine |
Phase_with_Pc | Phase that will contain the Overrelaxation field |
totally_min_max | Min max of the field (to normalise for transport) |
for_transport | True if the field is not saturation |
subroutine multiphase_1d_engine::high_order_pressure_solve | ( | type(multi_dimensions), intent(in) | Mdims, |
type(multi_ndgln), intent(in) | ndgln, | ||
real, dimension( :, :, : ), intent(inout) | u_rhs, | ||
type( state_type ), dimension( : ), intent(inout) | state, | ||
type( state_type ), intent(inout) | packed_state, | ||
integer, intent(in) | nphase, | ||
real, dimension( :, :, : ), intent(in) | u_absorbin | ||
) |
: Instead of including the gravity in the RHS normally, here a system based on a Laplacian is created and solved that accounts for the gravity effect in the system. Next, this is introduced as a RHS in the momemtum equation This allows for higher precision for the gravity effect. >
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
ndgln | Global to local variables |
u_rhs | INOUT Field to contain the outcome of this subroutine |
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 |
Number | of phases |
u_absorbin | Absorption associated to the momentum equation/velocity |
subroutine multiphase_1d_engine::impose_strong_bcs_wells | ( | type( state_type ), dimension(:), intent(in) | state, |
type (multi_pipe_package), intent(in) | pipes_aux, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type (multi_matrices), intent(in) | Mmat, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type(petsc_csr_matrix), intent(inout) | CMC_petsc, | ||
type( tensor_field ), intent(in) | pressure, | ||
real, dimension (:,:), intent(inout) | rhs_p | ||
) |
: In this subroutine, we modify the CMC matrix and the RHS for the pressure to strongly impose the pressure boundary conditions for wells ONLY. This is required only when using P0DG-P1 If not imposing strong pressure BCs and using P0DG-P1, the formulation for weak pressure BCs leads to a 0 in the diagonal of the CMC matrix, therefore strong BCs are required.
state | Linked list containing all the fields defined in diamond and considered by Fluidity |
pipes_aux | Information required to define wells > |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
Mmat | Matrices for ICFERST |
ndgln | Global to local variables |
CMC_petsc | petsc_csr_matrix field containing the pressure matrix. Matrix to be modified here |
rhs_p | RHS associated to the pressure matrix. |
subroutine, public multiphase_1d_engine::intenerge_assem_solve | ( | type( state_type ), dimension( : ), intent(inout) | state, |
type( state_type ), intent(inout) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_discretization_opts) | Mdisopt, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
type(tensor_field), intent(inout) | tracer, | ||
type(tensor_field), intent(in) | velocity, | ||
type(tensor_field), intent(in) | density, | ||
type(multi_absorption), intent(inout) | multi_absorp, | ||
real, intent(in) | DT, | ||
real, dimension( :, : ), intent(in) | SUF_SIG_DIAGTEN_BC, | ||
real, dimension( :, : ), intent(in) | VOLFRA_PORE, | ||
integer, intent(in) | IGOT_T2, | ||
integer, intent(in) | igot_theta_flux, | ||
logical, intent(in) | GET_THETA_FLUX, | ||
logical, intent(in) | USE_THETA_FLUX, | ||
real, dimension( :, : ), intent(inout) | THETA_GDIFF, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
character( len = * ), intent(in), optional | option_path, | ||
real, dimension( : ), intent(inout), optional | mass_ele_transp, | ||
logical, intent(in), optional | thermal, | ||
real, dimension( :,: ), intent(inout), optional | THETA_FLUX, | ||
real, dimension( :,: ), intent(inout), optional | ONE_M_THETA_FLUX, | ||
real, dimension( :,: ), intent(inout), optional | THETA_FLUX_J, | ||
real, dimension( :,: ), intent(inout), optional | ONE_M_THETA_FLUX_J, | ||
integer, optional | icomp, | ||
type(tensor_field), intent(in), optional | saturation, | ||
type( tensor_field ), intent(in), optional, pointer | Permeability_tensor_field, | ||
integer, optional | nonlinear_iteration | ||
) |
Calls to generate the transport equation for the transport of energy/temperature and to solve the transport of components.
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 |
CV_GIdims | Gauss integration numbers for CV fields |
CV_funs | Shape functions for the CV mesh |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
Mdisopt | Discretisation options |
Mmat | Matrices for ICFERST |
upwnd | Sigmas to compute the fluxes at the interphase for porous media |
tracer | Tracer considered for the transport equation |
density | Density of the field |
velocity | Velocity of the field |
multi_absorp | Absoprtion of associated with the transport field |
IGOT_T2 | !> |
IGOT_T2. | True (1) if solving for a tracer, false otherwise |
igot_theta_flux | ???? |
GET_THETA_FLUX,USE_THETA_FLUX | ????? |
THERMAL | If true then we are solving for temperature |
THETA_GDIFF | ???? |
eles_with_pipe | Elements that have a pipe |
pipes_aux | Information required to define wells |
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J | ???? |
DT | Time step size |
SUF_SIG_DIAGTEN_BC | Like upwnd but for the boundary |
VOLFRA_PORE | Porosity field (Mdimsnpres,Mdimstotele) |
option_path | Option path of the tracer to be solved for |
mass_ele_transp | Mass of the elements |
saturation | PhaseVolumeFraction field |
Permeability_tensor_field | Permeability field |
icomp | Number of components, if > 0 then compositional is solved param nonlinear_iteration Current non-linear iteration |
subroutine multiphase_1d_engine::introduce_grad_rhs_field_term | ( | type( state_type ), intent(inout) | packed_state, |
type(multi_dimensions), intent(in) | Mdims, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
real, dimension(:,:,:), intent(in) | RHS_field, | ||
type(multi_shape_funs), intent(in) | FE_funs, | ||
type(multi_dev_shape_funs), intent(inout) | Devfuns, | ||
real, dimension(:,:) | X_ALL, | ||
real, dimension ( :, :, : ), intent(inout) | LOC_U_RHS, | ||
integer, intent(in) | ele, | ||
integer, dimension(:), intent(in) | cv_ndgln, | ||
integer, dimension(:), intent(in) | x_ndgln, | ||
integer, intent(in) | ele2, | ||
integer, intent(in) | iface, | ||
real, dimension(:), intent(in) | sdetwe, | ||
real, dimension(:,:), intent(in) | SNORMXN_ALL, | ||
integer, dimension(:), intent(in) | U_SLOC2LOC, | ||
integer, dimension(:), intent(in) | CV_SLOC2LOC, | ||
integer, dimension(:), intent(in) | MAT_OTHER_LOC | ||
) |
: This subroutine performs and introduces the gradient of a RHS field (Capillary pressure for example) for the momentum equation. It has two options (hard-coded) integrations by parts (activated) or voluemtric integration, For capillary pressure: The capillary pressure is a term introduced as a RHS which affects the effective velocity
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 |
Mmat | Matrices for ICFERST |
RHS_field | The values to introduce, for capilalry pressure these are the evaluted values of CapPressureval |
FE_funs | Shape functions for the FE mesh |
Devfuns | Derivatives of the FE_funs |
X_ALL | Coordinates of the nodes |
LOC_U_RHS | RHS INOUT field with the updated field |
ele | Current element |
cv_ndgln | Global to local variables of the CV mesh |
x_ndgln | Global to local variables of the nodes |
ele2 | neighbouring element |
iface | current face being integrated |
sdetwe | edge lenght associated to the current gauss integration point, i.e. edge lenght |
SNORMXN_ALL | normal to the current surface |
U_SLOC2LOC | Surface local to local for velocity nodes |
CV_SLOC2LOC | Surface local to local for cv nodes |
MAT_OTHER_LOC | for sub-CV the neighbouring one |
subroutine multiphase_1d_engine::linearise_field | ( | type( tensor_field ), intent(in) | field_in, |
real, dimension( :, : ), intent(inout) | field_out | ||
) |
: <FOR INERTIA ONLY> This sub will linearise a p2 field
real function multiphase_1d_engine::p0_dg_oscilat_detect | ( | real, intent(in) | SNDOTQ_KEEP, |
real, intent(in) | SNDOTQ2_KEEP, | ||
real, intent(in) | N_DOT_DU, | ||
real, intent(in) | N_DOT_DU2, | ||
real, intent(in) | SINCOME, | ||
real, intent(in) | MASS_ELE, | ||
real, intent(in) | MASS_ELE2 | ||
) |
: <INERTIA ONLY> Determine if we have an oscillation in the normal direction... dg_oscilat_detect=1.0- CENTRAL SCHEME. dg_oscilat_detect=0.0- UPWIND SCHEME.
subroutine, public multiphase_1d_engine::tracer_assemble_solve | ( | character(len=*), intent(in) | Tracer_name, |
type( state_type ), dimension( : ), intent(inout) | state, | ||
type( state_type ), intent(inout) | packed_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type (multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_discretization_opts) | Mdisopt, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
integer, intent(inout) | tracer, | ||
type(tensor_field), intent(in) | velocity, | ||
type(tensor_field), intent(in) | density, | ||
type(multi_absorption), intent(inout) | multi_absorp, | ||
real, intent(in) | DT, | ||
real, dimension( :, : ), intent(in) | SUF_SIG_DIAGTEN_BC, | ||
real, dimension( :, : ), intent(in) | VOLFRA_PORE, | ||
integer, intent(in) | IGOT_T2, | ||
integer, intent(in) | igot_theta_flux, | ||
logical, intent(in) | GET_THETA_FLUX, | ||
logical, intent(in) | USE_THETA_FLUX, | ||
real, dimension( :, : ), intent(inout) | THETA_GDIFF, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
real, dimension( : ), intent(inout), optional | mass_ele_transp, | ||
real, dimension( :,: ), intent(inout), optional | THETA_FLUX, | ||
real, dimension( :,: ), intent(inout), optional | ONE_M_THETA_FLUX, | ||
real, dimension( :,: ), intent(inout), optional | THETA_FLUX_J, | ||
real, dimension( :,: ), intent(inout), optional | ONE_M_THETA_FLUX_J, | ||
integer, optional | icomp, | ||
type(tensor_field), intent(in), optional | saturation, | ||
type( tensor_field ), intent(in), optional, pointer | Permeability_tensor_field, | ||
integer, optional | nonlinear_iteration | ||
) |
Calls to generate and solve the transport equation for n passive tracers defined in diamond as Passive_Tracer_N Where N is an integer which is continuous starting from 1.
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 |
CV_GIdims | Gauss integration numbers for CV fields |
CV_funs | Shape functions for the CV mesh |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
Mdisopt | Discretisation options |
Mmat | Matrices for ICFERST |
upwnd | Sigmas to compute the fluxes at the interphase for porous media |
tracer | Tracer considered for the transport equation |
velocity | Velocity of the field |
density | Density of the field |
multi_absorp | Absoprtion of associated with the transport field |
DT | Time step size |
SUF_SIG_DIAGTEN_BC | Like upwnd but for the boundary |
VOLFRA_PORE | Porosity field (Mdimsnpres,Mdimstotele) |
IGOT_T2 | !> |
IGOT_T2. | True (1) if solving for a tracer, false otherwise |
igot_theta_flux | ???? |
GET_THETA_FLUX,USE_THETA_FLUX | ????? |
THETA_GDIFF | ???? |
eles_with_pipe | Elements that have a pipe |
pipes_aux | Information required to define wells |
mass_ele_transp | Mass of the elements |
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J | ???? |
icomp | Number of components, if > 0 then compositional is solved |
saturation | PhaseVolumeFraction field |
Permeability_tensor_field | Permeability field param nonlinear_iteration Current non-linear iteration |
subroutine multiphase_1d_engine::use_posinmat_c_store | ( | integer, intent(inout) | COUNT, |
integer, intent(in) | U_INOD, | ||
integer, intent(in) | P_JNOD, | ||
integer, intent(in) | U_NONODS, | ||
integer, dimension( u_nonods + 1), intent(in) | FINDC, | ||
integer, dimension( ncolc), intent(in) | COLC, | ||
integer, intent(in) | NCOLC, | ||
integer, intent(in) | IDO_STORE_AC_SPAR_PT, | ||
logical, intent(in) | STORED_AC_SPAR_PT, | ||
integer, dimension( u_nloc,p_nloc, totele*ido_store_ac_spar_pt), intent(inout) | POSINMAT_C_STORE, | ||
integer, intent(in) | ELE, | ||
integer, intent(in) | U_ILOC, | ||
integer, intent(in) | P_JLOC, | ||
integer, intent(in) | TOTELE, | ||
integer, intent(in) | U_NLOC, | ||
integer, intent(in) | P_NLOC | ||
) |
Used to assemble the C matrix in the ICFERST format.
subroutine multiphase_1d_engine::use_posinmat_c_store_suf_dg | ( | integer, intent(inout) | COUNT, |
integer, intent(in) | U_INOD, | ||
integer, intent(in) | P_JNOD, | ||
integer, intent(in) | U_NONODS, | ||
integer, dimension( u_nonods + 1), intent(in) | FINDC, | ||
integer, dimension( ncolc), intent(in) | COLC, | ||
integer, intent(in) | NCOLC, | ||
integer, intent(in) | IDO_STORE_AC_SPAR_PT, | ||
logical, intent(in) | STORED_AC_SPAR_PT, | ||
integer, dimension( u_snloc,p_snloc,nface,totele*ido_store_ac_spar_pt ), intent(inout) | POSINMAT_C_STORE_SUF_DG, | ||
integer, intent(in) | ELE, | ||
integer, intent(in) | IFACE, | ||
integer, intent(in) | U_SILOC, | ||
integer, intent(in) | P_SJLOC, | ||
integer, intent(in) | TOTELE, | ||
integer, intent(in) | NFACE, | ||
integer, intent(in) | U_SNLOC, | ||
integer, intent(in) | P_SNLOC | ||
) |
Used to assemble the C matrix in the ICFERST format (for DG?)
subroutine multiphase_1d_engine::viscocity_tensor_les_calc | ( | real, dimension( ndim, ndim, nphase, mat_nonods ), intent(inout) | LES_UDIFFUSION, |
real, dimension( nphase, mat_nonods ), intent(inout) | LES_UDIFFUSION_VOL, | ||
real, dimension( ndim, ndim, nphase, u_nloc, totele ), intent(in) | DUX_ELE_ALL, | ||
integer, intent(in) | NDIM, | ||
integer, intent(in) | NPHASE, | ||
integer, intent(in) | U_NLOC, | ||
integer, intent(in) | X_NLOC, | ||
integer, intent(in) | TOTELE, | ||
integer, intent(in) | X_NONODS, | ||
real, dimension( ndim, x_nonods ), intent(in) | X_ALL, | ||
integer, dimension( x_nloc * totele ), intent(in) | X_NDGLN, | ||
integer, intent(in) | MAT_NONODS, | ||
integer, intent(in) | MAT_NLOC, | ||
integer, dimension( mat_nloc * totele ), intent(in) | MAT_NDGLN, | ||
integer, intent(in) | LES_DISOPT, | ||
real, intent(in) | LES_CS, | ||
real, dimension( nphase, cv_nonods ), intent(in) | UDEN, | ||
integer, intent(in) | CV_NONODS, | ||
integer, dimension( mat_nloc * totele ), intent(in) | CV_NDGLN, | ||
integer, dimension( u_nloc * totele ), intent(in) | U_NDGLN, | ||
integer, intent(in) | U_NONODS, | ||
real, dimension( ndim, nphase, u_nonods ), intent(in) | U_ALL, | ||
real, dimension( nphase, cv_nonods ), intent(in) | DERIV | ||
) |
: <FOR INERTIA ONLY> This subroutine calculates a tensor of viscocity LES_UDIFFUSION, LES_UDIFFUSION_VOL
subroutine, public multiphase_1d_engine::volumefraction_assemble_solve | ( | type( state_type ), dimension( : ), intent(inout) | state, |
type( state_type ) | packed_state, | ||
type( state_type ), dimension( : ), intent(inout) | multicomponent_state, | ||
type(multi_dimensions), intent(in) | Mdims, | ||
type(multi_gi_dimensions), intent(in) | CV_GIdims, | ||
type(multi_shape_funs), intent(inout) | CV_funs, | ||
type(multi_sparsities), intent(in) | Mspars, | ||
type(multi_ndgln), intent(in) | ndgln, | ||
type (multi_discretization_opts) | Mdisopt, | ||
type (multi_matrices), intent(inout) | Mmat, | ||
type(multi_absorption), intent(inout) | multi_absorp, | ||
type (porous_adv_coefs), intent(inout) | upwnd, | ||
type(pipe_coords), dimension(:), intent(in) | eles_with_pipe, | ||
type (multi_pipe_package), intent(in) | pipes_aux, | ||
real, intent(in) | DT, | ||
real, dimension( :, : ), intent(inout) | SUF_SIG_DIAGTEN_BC, | ||
real, dimension( :, : ), intent(in) | V_SOURCE, | ||
real, dimension( :, : ), intent(in) | VOLFRA_PORE, | ||
integer, intent(in) | igot_theta_flux, | ||
real, dimension( : ), intent(inout) | mass_ele_transp, | ||
integer, intent(in) | nonlinear_iteration, | ||
integer, intent(in) | time_step, | ||
integer, intent(inout) | SFPI_taken, | ||
integer, intent(inout) | SFPI_its, | ||
real, dimension(:), intent(inout) | Courant_number, | ||
real, dimension( :, :), intent(inout) | THETA_FLUX, | ||
real, dimension( :, :), intent(inout) | ONE_M_THETA_FLUX, | ||
real, dimension( :, :), intent(inout) | THETA_FLUX_J, | ||
real, dimension( :, :), intent(inout) | ONE_M_THETA_FLUX_J | ||
) |
Calls to generate the transport equation for the saturation. Embeded an FPI with backtracking method is uncluded.
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 |
multicomponent_state | Linked list containing all the fields used by compositional, just in case we are solving for components > |
Mdims | Data type storing all the dimensions describing the mesh, fields, nodes, etc |
CV_GIdims | Gauss integration numbers for CV fields |
CV_funs | Shape functions for the CV mesh |
Mspars | Sparsity of the matrices |
ndgln | Global to local variables |
Mdisopt | Discretisation options |
Mmat | Matrices for ICFERST |
multi_absorp | Absoprtion of associated with the transport field |
upwnd | Sigmas to compute the fluxes at the interphase for porous media |
eles_with_pipe | Elements that have a pipe |
pipes_aux | Information required to define wells |
DT | Time step size |
SUF_SIG_DIAGTEN_BC | Like upwnd but for the boundary |
V_SOURCE | Source term |
VOLFRA_PORE | Porosity field (Mdimsnpres,Mdimstotele) |
igot_theta_flux | ???? |
mass_ele_transp | Mass of the elements |
nonlinear_iteration | Current non-linear iteration |
time_step | current time-step |
SFPI_its | Number of saturation fixed point iterations taken |
Courant_number | Global courant number and shock front courant number |
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J | ???? |