ICFERST  22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
multiphase_1d_engine Module Reference

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...
 

Detailed Description

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)

Function/Subroutine Documentation

◆ ai_backtracking_parameters()

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.

Author
Vinicius L S Silva
Here is the call graph for this function:
Here is the caller graph for this function:

◆ comb_vel_matrix_diag_dist()

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

Here is the caller graph for this function:

◆ comb_vel_matrix_diag_dist_lump()

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.

Here is the caller graph for this function:

◆ compositional_assemble_solve()

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

Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state
multicomponent_stateLinked list containing all the fields used by compositional, just in case we are solving for components >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
CV_GIdimsGauss integration numbers for CV fields
CV_funsShape functions for the CV mesh
MsparsSparsity of the matrices
ndglnGlobal to local variables
MdisoptDiscretisation options
MmatMatrices for ICFERST
upwndSigmas to compute the fluxes at the interphase for porous media
multi_absorpAbsoprtion of associated with the transport field
DTTime step size
SUF_SIG_DIAGTEN_BCLike upwnd but for the boundary
GET_THETA_FLUX,USE_THETA_FLUX?????
THETA_GDIFF????
eles_with_pipeElements that have a pipe
pipes_auxInformation required to define wells
mass_eleMass of the elements
sum_theta_flux,sum_one_m_theta_flux,sum_theta_flux_j,sum_one_m_theta_flux_j????
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dg_oscilat_detect()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dg_visc_lin()

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...

Here is the caller graph for this function:

◆ diffus_cal_coeff_stress_or_tensor()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ force_bal_cty_assem_solve()

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.

Author
Chris Pain, Pablo Salinas, Asiri Obeysekara
Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
CV_GIdimsGauss integration numbers for CV fields
FE_GIdimsGauss integration numbers for FE fields
CV_funsShape functions for the CV mesh
FE_funsShape functions for the FE mesh
MsparsSparsity of the matrices
ndglnGlobal to local variables
MdisoptDiscretisation options
MmatMatrices for ICFERST
multi_absorpAbsoprtion of associated with the transport field
upwndSigmas to compute the fluxes at the interphase for porous media
eles_with_pipeElements that have a pipe
pipes_auxInformation required to define wells
velocitytensor field. Why do we pass it down instead of retrieving it from packed_state...
pressuretensor fieldWhy do we pass it down instead of retrieving it from packed_state...
DTTime step size
SUF_SIG_DIAGTEN_BCLike upwnd but for the boundary
V_SOURCESource term
VOLFRA_POREPorosity field (Mdimsnpres,Mdimstotele)
IGOT_THETA_FLUX,THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J????
calculate_mass_deltaThis is to compute mass conservation
outfluxesvariable containing the outfluxes information
pres_its_takenInteger containing the number of iterations performed by the solver to solve for pressure
nonlinear_itscurrent non-linear iteration
Courant_numberGlobal courant number and shock front courant number
Here is the call graph for this function:
Here is the caller graph for this function:

◆ force_min_max_principle()

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.

Here is the caller graph for this function:

◆ generate_and_solve_laplacian_system()

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. >

Parameters
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state
ndglnGlobal to local variables
MmatMatrices for ICFERST
MsparsSparsity of the matrices
CV_funsShape functions for the CV mesh
CV_GIdimsGauss integration numbers for CV fields
Sigma_fieldCoefficient multipliying the left-hand side term
field_namename of the field to be solved for
K_fieldsCoefficients multipliying the RHS terms
F_fieldsRHS fierlds
intface_val_type0 = no interpolation; 1 Harmonic mean; !20 for SP solver, harmonic mean considering charge; negative normal mean
solver_pathPath to select the type of solver
Here is the caller graph for this function:

◆ getoverrelaxation_parameter()

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.

Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
ndglnGlobal to local variables
OverrelaxationINOUT Field containing the outcome of this subroutine
Phase_with_PcPhase that will contain the Overrelaxation field
totally_min_maxMin max of the field (to normalise for transport)
for_transportTrue if the field is not saturation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ high_order_pressure_solve()

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. >

Parameters
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
ndglnGlobal to local variables
u_rhsINOUT Field to contain the outcome of this subroutine
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state
Numberof phases
u_absorbinAbsorption associated to the momentum equation/velocity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ impose_strong_bcs_wells()

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.

Author
Pablo Salinas, Geraldine Regnier
Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
pipes_auxInformation required to define wells >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
MmatMatrices for ICFERST
ndglnGlobal to local variables
CMC_petscpetsc_csr_matrix field containing the pressure matrix. Matrix to be modified here
rhs_pRHS associated to the pressure matrix.
Here is the caller graph for this function:

◆ intenerge_assem_solve()

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.

Author
Chris Pain, Pablo Salinas
Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
CV_GIdimsGauss integration numbers for CV fields
CV_funsShape functions for the CV mesh
MsparsSparsity of the matrices
ndglnGlobal to local variables
MdisoptDiscretisation options
MmatMatrices for ICFERST
upwndSigmas to compute the fluxes at the interphase for porous media
tracerTracer considered for the transport equation
densityDensity of the field
velocityVelocity of the field
multi_absorpAbsoprtion 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?????
THERMALIf true then we are solving for temperature
THETA_GDIFF????
eles_with_pipeElements that have a pipe
pipes_auxInformation required to define wells
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J????
DTTime step size
SUF_SIG_DIAGTEN_BCLike upwnd but for the boundary
VOLFRA_POREPorosity field (Mdimsnpres,Mdimstotele)
option_pathOption path of the tracer to be solved for
mass_ele_transpMass of the elements
saturationPhaseVolumeFraction field
Permeability_tensor_fieldPermeability field
icompNumber of components, if > 0 then compositional is solved param nonlinear_iteration Current non-linear iteration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ introduce_grad_rhs_field_term()

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

Parameters
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
MmatMatrices for ICFERST
RHS_fieldThe values to introduce, for capilalry pressure these are the evaluted values of CapPressureval
FE_funsShape functions for the FE mesh
DevfunsDerivatives of the FE_funs
X_ALLCoordinates of the nodes
LOC_U_RHSRHS INOUT field with the updated field
eleCurrent element
cv_ndglnGlobal to local variables of the CV mesh
x_ndglnGlobal to local variables of the nodes
ele2neighbouring element
ifacecurrent face being integrated
sdetweedge lenght associated to the current gauss integration point, i.e. edge lenght
SNORMXN_ALLnormal to the current surface
U_SLOC2LOCSurface local to local for velocity nodes
CV_SLOC2LOCSurface local to local for cv nodes
MAT_OTHER_LOCfor sub-CV the neighbouring one
Here is the caller graph for this function:

◆ linearise_field()

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

Here is the caller graph for this function:

◆ p0_dg_oscilat_detect()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tracer_assemble_solve()

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.

Author
Chris Pain, Pablo Salinas
Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
CV_GIdimsGauss integration numbers for CV fields
CV_funsShape functions for the CV mesh
MsparsSparsity of the matrices
ndglnGlobal to local variables
MdisoptDiscretisation options
MmatMatrices for ICFERST
upwndSigmas to compute the fluxes at the interphase for porous media
tracerTracer considered for the transport equation
velocityVelocity of the field
densityDensity of the field
multi_absorpAbsoprtion of associated with the transport field
DTTime step size
SUF_SIG_DIAGTEN_BCLike upwnd but for the boundary
VOLFRA_POREPorosity 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_pipeElements that have a pipe
pipes_auxInformation required to define wells
mass_ele_transpMass of the elements
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J????
icompNumber of components, if > 0 then compositional is solved
saturationPhaseVolumeFraction field
Permeability_tensor_fieldPermeability field param nonlinear_iteration Current non-linear iteration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_posinmat_c_store()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_posinmat_c_store_suf_dg()

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?)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ viscocity_tensor_les_calc()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ volumefraction_assemble_solve()

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.

Author
Chris Pain, Pablo Salinas
Parameters
stateLinked list containing all the fields defined in diamond and considered by Fluidity
packed_stateLinked list containing all the fields used by IC-FERST, memory partially shared with state
multicomponent_stateLinked list containing all the fields used by compositional, just in case we are solving for components >
MdimsData type storing all the dimensions describing the mesh, fields, nodes, etc
CV_GIdimsGauss integration numbers for CV fields
CV_funsShape functions for the CV mesh
MsparsSparsity of the matrices
ndglnGlobal to local variables
MdisoptDiscretisation options
MmatMatrices for ICFERST
multi_absorpAbsoprtion of associated with the transport field
upwndSigmas to compute the fluxes at the interphase for porous media
eles_with_pipeElements that have a pipe
pipes_auxInformation required to define wells
DTTime step size
SUF_SIG_DIAGTEN_BCLike upwnd but for the boundary
V_SOURCESource term
VOLFRA_POREPorosity field (Mdimsnpres,Mdimstotele)
igot_theta_flux????
mass_ele_transpMass of the elements
nonlinear_iterationCurrent non-linear iteration
time_stepcurrent time-step
SFPI_itsNumber of saturation fixed point iterations taken
Courant_numberGlobal courant number and shock front courant number
THETA_FLUX,ONE_M_THETA_FLUX,THETA_FLUX_J,ONE_M_THETA_FLUX_J????
Here is the call graph for this function:
Here is the caller graph for this function: