porepy.numerics.interface_laws.contact_mechanics_interface_laws module
Implementation of contact conditions for fracture mechanics, using a primal formulation.
We provide a class for coupling the higher-dimensional mechanical discretization to the tractions on the fractures. Also, in the case of coupled physics (Biot and the like), classes handling the arising coupling terms are provided.
- class DivUCoupling(variable, discr_primary, discr_secondary, keyword=None)[source]
Bases:
AbstractInterfaceLaw
Coupling conditions for DivU term.
For mixed-dimensional flow in coupled to matrix mechanics, i.e. Biot in the matrix and conservation of a scalar quantity (usually fluid mass) in matrix and fractures. We have assumed a primal displacement mortar variable, which will contribute to the div u term in fracture (“div aperture”) and matrix.
- assemble_matrix_rhs(sd_primary, sd_secondary, intf, sd_data_primary, sd_data_secondary, intf_data, matrix)[source]
Assemble the mortar displacement’s contribution as a internal Dirichlet contribution for the higher dimension, and source term for the lower dimension. :param sd_primary: Grid on one neighboring subdomain. :param sd_secondary: Grid on the other neighboring subdomain. :param sd_data_primary: Data dictionary for the primary suddomain :param sd_data_secondary: Data dictionary for the secondary subdomain. :param intf_data: Data dictionary for the edge between the subdomains :param matrix: original discretization matrix, to which the coupling terms will be
added.
- Parameters
- Return type
- discretize(sd_primary, sd_secondary, intf, sd_data_primary, sd_data_secondary, intf_data)[source]
Nothing to do
- ndof(intf)[source]
- Parameters
intf (MortarGrid) –
- Return type
- class FractureScalarToForceBalance(discr_primary, discr_secondary, keyword=None)[source]
Bases:
AbstractInterfaceLaw
This class adds the fracture pressure contribution to the force balance posed on the mortar grid by PrimalContactCoupling and modified to account for matrix pressure by MatrixPressureToForceBalance.
For the contact mechanics, we only want to consider the _contact_ traction. Thus, we have to subtract the pressure contribution, i.e.
T_contact - p_check I dot n = boundary_traction_hat,
since the full tractions experienced by a fracture surface are the sum of the contact forces and the fracture pressure force.
- assemble_matrix_rhs(sd_primary, sd_secondary, intf, sd_data_primary, sd_data_secondary, intf_data, matrix)[source]
Assemble the pressure contributions of the interface force balance law.
- Parameters
sd_primary (Grid) – Grid on one neighboring subdomain.
sd_secondary (Grid) – Grid on the other neighboring subdomain.
sd_data_primary (dict) – Data dictionary for the primary suddomain
sd_data_secondary (dict) – Data dictionary for the secondary subdomain.
intf_data (dict) – Data dictionary for the edge between the subdomains
matrix (spmatrix) – original discretization matrix, to which the coupling terms will be added.
intf (MortarGrid) –
- Return type
- ndof(intf)[source]
- Parameters
intf (MortarGrid) –
- Return type
- class MatrixScalarToForceBalance(keyword, discr_primary, discr_secondary)[source]
Bases:
AbstractInterfaceLaw
This class adds the matrix scalar (pressure) contribution to the force balance posed on the mortar grid by PrimalContactCoupling.
We account for the scalar variable contribution to the forces on the higher-dimensional internal boundary, i.e. the last term of:
boundary_traction_hat = stress * u_hat + bound_stress * u_mortar + gradP * p_hat
Note that with this approach to discretization of the boundary pressure force, it will only be included for nonzero values of the biot_alpha coefficient.
If the scalar is e.g. pressure, subtraction of the pressure contribution is needed:
T_contact - p_check I dot n = boundary_traction_hat
This is taken care of by FracturePressureToForceBalance.
- Parameters
keyword (str) –
- assemble_matrix_rhs(sd_primary, sd_secondary, intf, sd_data_primary, sd_data_secondary, intf_data, matrix)[source]
Assemble the pressure contributions of the interface force balance law.
- Parameters
sd_primary (
pp.Grid
) – Grid on one neighboring subdomain.sd_secondary (
pp.Grid
) – Grid on the other neighboring subdomain.intf (
pp.MortarGrid
) – interface between subdomainssd_data_primary (dict) – Data dictionary for the primary suddomain
sd_data_secondary (dict) – Data dictionary for the secondary subdomain.
intf_data (dict) – Data dictionary for the edge between the subdomains
matrix (spmatrix) – original discretization matrix, to which the coupling terms will be added.
- Return type
- ndof(intf)[source]
- Parameters
intf (MortarGrid) –
- Return type
- class PrimalContactCoupling(keyword, discr_primary, discr_secondary, use_surface_discr=False)[source]
Bases:
AbstractInterfaceLaw
Implement the coupling conditions for the pure mechanics problem.
The primary variables for this formulation are displacement in the ambient dimension, displacements at the boundary of the highest dimensional grid (represented as mortar variables), and contact forces on grids of co-dimension 1.
- The conditions represented here are
KKT condition for the traction / displacement in the normal direction.
Conditions for the tangential traction / displacement, according to whether the fracture is sliding, sticking or free.
Linear elasticity on the surface displacements, with the tangential contact force as a driving force.
The mortar displacements act as Dirichlet boundary conditions for the higher-dimensional domain.
When solving contact problems, the sought fracture displacement (jumps) are defined relative to an initial state. For transient problems, this initial state is the solution at the previous time step. The state should be available in
d[pp.STATE][self.mortar_displacement_variable],
and may usually be set to zero for stationary problems. See also contact_conditions.py
- assemble_intf_coupling_via_high_dim(g_between, data_between, intf_primary, sd_pair_primary, intf_data_primary, intf_secondary, sd_pair_secondary, intf_data_secondary, matrix, assemble_matrix=True, assemble_rhs=True)[source]
Assemble the stress contribution from the mortar displacement on one edge on the stress balance on a neighboring edge, in the sense that the two edges share a node located at the corner.
The impact of the boundary condition gives an additional term in the stress balance on the primary mortar.
- Parameters
g_between (
pp.Grid
) – Grid of the higher dimensional neighbor to the main interfacedata_between (
dict
) – Data dictionary of the intermediate grid.intf_primary (
tuple of grids
) – The grids of the primary edgeintf_data_primary (
dict
) – Data dictionary of the primary interface.intf_secondary (
tuple of grids
) – The grids of the secondary edge.intf_data_secondary (
dict
) – Data dictionary of the secondary interface.matrix (spmatrix) – original discretization.
sd_pair_primary (tuple[porepy.grids.grid.Grid, porepy.grids.grid.Grid]) –
sd_pair_secondary (tuple[porepy.grids.grid.Grid, porepy.grids.grid.Grid]) –
assemble_matrix (bool) –
assemble_rhs (bool) –
- Returns
- Block matrix of size 3 x 3, whwere each block represents
coupling between variables on this interface. Index 0, 1 and 2 represent the primary grid, the primary and secondary interface, respectively.
- np.array: Block matrix of size 3 x 1, representing the right hand
side of this coupling. Index 0, 1 and 2 represent the primary grid, the primary and secondary interface, respectively.
- Return type
np.array
- assemble_matrix_rhs(sd_primary, sd_secondary, intf, sd_data_primary, sd_data_secondary, intf_data, matrix)[source]
Assemble the dicretization of the interface law, and its impact on the neighboring domains. :param sd_primary: Grid on one neighboring subdomain. :param sd_secondary: Grid on the other neighboring subdomain. :param sd_data_primary: Data dictionary for the primary suddomain :param sd_data_secondary: Data dictionary for the secondary subdomain. :param intf_data: Data dictionary for the edge between the subdomains :param matrix: original discretization matrix, to which the coupling terms will be
added.
- Parameters
- Return type
- ndof(intf)[source]
Get the number of dof for this coupling.
It is assumed that this method will only be called for mortar grids of co-dimension 1. If the assumption is broken, this will not work.
- Parameters
intf (MortarGrid) –
- Return type