Skip to content

Commit

Permalink
Update test of granite and zero initial condition for Biot contact model
Browse files Browse the repository at this point in the history
  • Loading branch information
IvarStefansson committed Jul 30, 2019
1 parent eec441f commit 7585573
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/porepy/models/contact_mechanics_biot_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def initial_condition(self):

for g, d in self.gb:
# Initial value for the scalar variable.
initial_scalar_value = 1.0 * np.ones(g.num_cells)
initial_scalar_value = np.zeros(g.num_cells)
d[pp.STATE].update({self.scalar_variable: initial_scalar_value})
if g.dim == self.Nd:
bc_values = d[pp.PARAMETERS][self.mechanics_parameter_key]["bc_values"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def discretize(self, g_h, g_l, data_h, data_l, data_edge):
matrix_dictionary_edge[self.SURFACE_DISCRETIZATION_KEY] = A

# Discretization of the contact mechanics is done by a ColumbContact
# object.
# object.
# The resulting equations are located at the lower-dimensional grid,
# however, the discretization is inherently linked to the mortar grid.
# It is therefore constructed here.
Expand Down Expand Up @@ -667,9 +667,7 @@ def assemble_matrix_rhs(
# forces by
# T_contact - n dot I p,
# hence the minus.
slave_pressure_to_contact_traction = -(
n_dot_I * mg.slave_to_mortar_int(nd=1)
)
slave_pressure_to_contact_traction = -(n_dot_I * mg.slave_to_mortar_int(nd=1))
# Minus to obtain -T_slave + T_master = 0, i.e. from placing the two
# terms on the same side of the equation, as also done in PrimalContactCoupling.
cc[mortar_ind, slave_ind] = -slave_pressure_to_contact_traction
Expand Down
6 changes: 3 additions & 3 deletions test/unit/test_rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def test_granite(self):
R = pp.Granite()
self.assertEqual(R.PERMEABILITY, 1e-8 * pp.DARCY)
self.assertEqual(R.POROSITY, 0.01)
self.assertEqual(R.YOUNG_MODULUS, 4 * pp.GIGA * pp.PASCAL)
self.assertEqual(R.YOUNG_MODULUS, 40 * pp.GIGA * pp.PASCAL)
self.assertEqual(R.POISSON_RATIO, 0.2)
self.assertEqual(R.DENSITY, 2700 * pp.KILOGRAM / pp.METER ** 3)
self.assertEqual(R.LAMBDA, 1111111111.1111112)
self.assertEqual(R.MU, 1666666666.6666667)
self.assertEqual(R.LAMBDA, 11111111111.1111112)
self.assertEqual(R.MU, 16666666666.6666667)

def test_shale(self):
R = pp.Shale()
Expand Down

0 comments on commit 7585573

Please sign in to comment.