From 71c4c778d0053231dde0bf0b501f6dcfe00131c6 Mon Sep 17 00:00:00 2001 From: Eirik Keilegavlen Date: Tue, 2 Jul 2019 16:49:27 +0200 Subject: [PATCH] Minor formating of contact mechanics modules --- src/porepy/models/contact_mechanics_biot_model.py | 6 ++++-- src/porepy/models/contact_mechanics_model.py | 7 +++++++ .../interface_laws/contact_mechanics_interface_laws.py | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/porepy/models/contact_mechanics_biot_model.py b/src/porepy/models/contact_mechanics_biot_model.py index 64b3cefe0e..19ac384d2d 100644 --- a/src/porepy/models/contact_mechanics_biot_model.py +++ b/src/porepy/models/contact_mechanics_biot_model.py @@ -3,10 +3,12 @@ The domain $[0, 2]\times[0, 1]$ with six fractures. We do not consider any fluid, and solve only for the linear elasticity coupled to the contact + +NOTE: This module should be considered an experimental feature, which will likely +undergo major changes (or be deleted). + """ import numpy as np -import scipy.sparse as sps -from scipy.spatial.distance import cdist import porepy as pp from porepy.utils import assign_discretizations diff --git a/src/porepy/models/contact_mechanics_model.py b/src/porepy/models/contact_mechanics_model.py index ca6b9487b2..fffe39b97a 100644 --- a/src/porepy/models/contact_mechanics_model.py +++ b/src/porepy/models/contact_mechanics_model.py @@ -4,10 +4,15 @@ The setup handles parameters, variables and discretizations. Default (unitary-like) parameters are set. A "run script" function for setting up the class and solving the nonlinear contact mechanics problem is also provided. + +NOTE: This module should be considered an experimental feature, which will likely +undergo major changes (or be deleted). + """ import numpy as np import scipy.sparse as sps from scipy.spatial.distance import cdist + import porepy as pp @@ -43,6 +48,7 @@ def create_grid(self): gb (pp.GridBucket): The produced grid bucket. Nd (int): The dimension of the matrix, i.e., the highest dimension in the grid bucket. + """ # List the fracture points self.frac_pts = np.array([[0.2, 0.8], [0.5, 0.5]]) @@ -261,6 +267,7 @@ def extract_iterate(self, assembler, solution_vector): Returns: (np.array): displacement solution vector for the Nd grid. + """ dof = np.cumsum(np.append(0, np.asarray(assembler.full_dof))) diff --git a/src/porepy/numerics/interface_laws/contact_mechanics_interface_laws.py b/src/porepy/numerics/interface_laws/contact_mechanics_interface_laws.py index c0ee5a0345..0dd02a2065 100644 --- a/src/porepy/numerics/interface_laws/contact_mechanics_interface_laws.py +++ b/src/porepy/numerics/interface_laws/contact_mechanics_interface_laws.py @@ -398,13 +398,18 @@ class MatrixScalarToForceBalance: We account for the grad P 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: + \lambda_contact - p_check I \dot n = boundary_traction_hat + This is taken care of by FracturePressureToForceBalance. + """ def __init__(self, keyword, discr_master, discr_slave): @@ -542,6 +547,7 @@ class FractureScalarToForceBalance: For the contact mechanics, we only want to consider the _contact_ traction. Thus, we have to subtract the pressure contribution, i.e. + \lambda_contact - p_check I \dot n = boundary_traction_hat, since the full tractions experienced by a fracture surface are the sum of the