Contact: the Signorini problem#
Author: Jørgen S. Dokken
SPDX-License-Identifier: MIT
We consider a linear elastic half disk \(\Omega\) pressed against a rigid plane, as in the FEniCS workshop. The flat top \(\Gamma_D\) of the disk is moved downwards by a prescribed displacement \(u_D\), and the curved boundary \(\Gamma\) may come into contact with the plane, which is at a distance \(g\) from \(\Gamma\) in the direction \(\hat{n} = (0, -1)\). The displacement satisfies
with \(\sigma(u) = 2\mu\epsilon(u) + \lambda\mathrm{tr}(\epsilon(u))I\) and \(\sigma_n(u)\) the normal stress on \(\Gamma\), which is zero where the disk is not in contact.
The latent variable proximal point method#
We impose the inequality constraint with the latent variable proximal point (LVPP) method [KS24], as for contact problems in [DFK+25]. A latent variable \(\psi\) on \(\Gamma\) gives the gap \(g - u\cdot\hat{n} = e^{\psi}\), which is positive for any \(\psi\). Starting from \(\psi_0 = 0\), every proximal iteration \(k\) solves the nonlinear problem: find \((u, \psi)\) such that
for all \((v, w)\), with Newton’s method, and sets \(\psi_k = \psi\). The proximal parameter is doubled every iteration, \(\alpha_k = 2^k\alpha_0\). The contact pressure is \(\lambda = (\psi_k - \psi_{k-1})/\alpha_k \leq 0\).
Discretisation with a variable degree#
The displacement is continuous within each region \(\Omega_i\) of cells of degree \(i\), and the
regions are coupled with Nitsche’s method, as in
the continuous demo. The Dirichlet condition is also imposed with
Nitsche’s method. The latent variable lives on a submesh of the facets of \(\Gamma\) of each
degree \(i\), with the degree and continuity of the trace of the displacement. The nonlinear
problems are solved with dolfinx.fem.petsc.NonlinearProblem.
The integrals over \(\Gamma\) use a quadrature degree of \(2i + 4\): in the contact region, \(e^{\psi}\) varies by many orders of magnitude over a facet, and with the estimated quadrature degree Newton’s method does not converge for degrees above one.
import dolfinx
import matplotlib.pyplot as plt
import numpy as np
import ufl
from dolfinx_padapt.adaptivity import Refinement, solve_adaptive
from dolfinx_padapt.approaches import SubmeshApproach
from dolfinx_padapt.forms import Parameters
from dolfinx_padapt.mesh import (
HALF_DISK_CURVED,
HALF_DISK_FLAT,
create_half_disk,
half_disk_boundary_projection,
)
from dolfinx_padapt.models import SignoriniProblem
from dolfinx_padapt.plotting import Animation, plot_convergence
mesh, facet_tags = create_half_disk(MPI.COMM_WORLD, radius=0.5, centre=1.0, h=0.06)
u_D = 0.72
plane = -0.13
E, nu, alpha = 2e4, 0.4, 0.1
def displacement(x):
return ufl.as_vector((0.0, -u_D))
def gap(x):
# The distance from Γ to the plane y = plane, in the direction (0, -1)
return x[1] - plane
problem = SignoriniProblem(
mesh,
facet_tags,
dirichlet_marker=HALF_DISK_FLAT,
contact_marker=HALF_DISK_CURVED,
displacement=displacement,
gap=gap,
direction=(0.0, -1.0),
E=E,
nu=nu,
alpha=alpha,
)
# -
Error indicator#
The error indicator is the one of the elasticity demo, where the traction on \(\Gamma\) is replaced by its residual: the difference between the traction and the contact pressure,
There is no exact solution, so the adaptive loop stops at a given number of iterations, and we report the error indicator.
The adaptive loop#
Every iteration restarts the proximal iterations from \(\psi_0 = 0\) on the new spaces. We plot the magnitude of the displacement and the degree of each cell.
# + tags=["scroll-output"]
params = Parameters(pmin=1, pmax=3, continuous=True)
approach = SubmeshApproach(problem, params)
with Animation(mesh.comm, "signorini.gif") as animation:
history = solve_adaptive(approach, max_iterations=10, callback=animation)
# -
it dofs error eta update solve estim. values, degrees
0 354 7.994e+02 7.994e+02 0.046 0.030 0.000 proximal_iterations=4, newton_iterations=12, {1: 280}
1 506 7.151e+02 7.151e+02 0.046 0.054 0.000 proximal_iterations=5, newton_iterations=18, {1: 259, 2: 21}
2 674 6.898e+02 6.898e+02 0.052 0.187 0.000 proximal_iterations=7, newton_iterations=50, {1: 252, 2: 19, 3: 9}
3 796 6.402e+02 6.402e+02 0.046 0.135 0.000 proximal_iterations=4, newton_iterations=28, {1: 240, 2: 29, 3: 11}
4 821 6.072e+02 6.072e+02 0.046 0.066 0.000 proximal_iterations=4, newton_iterations=15, {1: 239, 2: 28, 3: 13}
5 1454 2.653e+02 2.653e+02 0.047 0.102 0.000 proximal_iterations=5, newton_iterations=15, {1: 101, 2: 157, 3: 22}
6 1969 1.699e+02 1.699e+02 0.048 0.300 0.001 proximal_iterations=9, newton_iterations=32, {1: 44, 2: 181, 3: 55}
7 2364 1.168e+02 1.168e+02 0.046 0.362 0.001 proximal_iterations=9, newton_iterations=32, {1: 4, 2: 185, 3: 91}
8 2401 1.107e+02 1.107e+02 0.048 0.354 0.001 proximal_iterations=9, newton_iterations=32, {1: 2, 2: 169, 3: 109}
9 2480 1.089e+02 1.089e+02 0.047 0.349 0.001 proximal_iterations=9, newton_iterations=32, {2: 147, 3: 133}
The contact pressure#
The contact pressure \(\lambda_h = (\psi_k - \psi_{k-1})/\alpha_k\) is in the space of the latent variable of each degree (a Lagrange space, so its coefficients are the values at the nodes). We plot it along \(\Gamma\). The total contact force is the integral of the pressure over \(\Gamma\).
# +
force = 0.0
points, pressures, degrees = [], [], []
for (i, name), psi in approach.solution.items():
if name != "psi":
continue
psi_prev = approach.previous_solution[(i, name)]
Q = psi.function_space
pressure = dolfinx.fem.Function(Q)
pressure.x.array[:] = (psi.x.array - psi_prev.x.array) / problem.alpha
force += dolfinx.fem.assemble_scalar(dolfinx.fem.form(pressure * ufl.dx(domain=Q.mesh)))
num_owned = Q.dofmap.index_map.size_local
points.append(Q.tabulate_dof_coordinates()[:num_owned, 0])
pressures.append(pressure.x.array[:num_owned])
degrees.append(np.full(num_owned, i))
force = mesh.comm.allreduce(force, op=MPI.SUM)
PETSc.Sys.Print(f"Total contact force: {force:.6g}")
Total contact force: -2377.99
data = [np.concatenate(values) for values in (points, pressures, degrees)]
data = [mesh.comm.gather(values, root=0) for values in data]
if mesh.comm.rank == 0:
x, p, d = (np.concatenate(values) for values in data)
fig, ax = plt.subplots(figsize=(8, 4))
for i in np.unique(d):
ax.plot(x[d == i], p[d == i], "o", markersize=3, label=f"$p = {i}$")
ax.set_xlabel("$x$")
ax.set_ylabel(r"Contact pressure $\lambda_h$")
ax.legend()
ax.grid(True)
fig.tight_layout()
fig.savefig("signorini_pressure.png")
# -

The highest degree is used along \(\Gamma\), where the residual of the traction is measured, and at the corners between \(\Gamma_D\) and \(\Gamma\).
hp-adaptivity#
The displacement is not smooth where the contact region ends, and at the corners between
\(\Gamma_D\) and \(\Gamma\). With p-refinement on a fixed mesh, the error indicator stagnates once
the cells there have the maximal degree. With hp-refinement (see the hp demo), these
cells are split instead, while the degree is increased where the displacement is smooth.
The new nodes on \(\Gamma\) are moved to the circle
(dolfinx_padapt.mesh.half_disk_boundary_projection()), and the facet tags are
transferred to the refined meshes, such that the latent variable lives on the facets of the
refined contact boundary. We start from a coarser mesh, and compare with p-refinement on the same
mesh.
# + tags=["scroll-output"]
histories = {}
for refinement in (Refinement.p, Refinement.hp):
PETSc.Sys.Print(f"{refinement.value}-refinement")
coarse_mesh, coarse_tags = create_half_disk(MPI.COMM_WORLD, radius=0.5, centre=1.0, h=0.1)
coarse_problem = SignoriniProblem(
coarse_mesh,
coarse_tags,
dirichlet_marker=HALF_DISK_FLAT,
contact_marker=HALF_DISK_CURVED,
displacement=displacement,
gap=gap,
direction=(0.0, -1.0),
E=E,
nu=nu,
alpha=alpha,
)
hp_approach = SubmeshApproach(coarse_problem, params)
kwargs = dict(
max_iterations=12,
refinement=refinement,
boundary_projection=half_disk_boundary_projection(radius=0.5, centre=1.0),
)
if refinement == Refinement.hp:
with Animation(MPI.COMM_WORLD, "signorini_hp.gif") as animation:
histories["hp-refinement"] = solve_adaptive(hp_approach, callback=animation, **kwargs)
else:
histories["p-refinement"] = solve_adaptive(hp_approach, **kwargs)
# -
p-refinement
hp-refinement
it dofs error eta update solve estim. values, degrees
0 145 1.273e+03 1.273e+03 0.046 0.025 0.000 proximal_iterations=4, newton_iterations=13, {1: 100}
1 383 6.909e+02 6.909e+02 0.048 0.038 0.000 proximal_iterations=4, newton_iterations=13, {1: 53, 2: 47}
2 421 6.629e+02 6.629e+02 0.046 0.038 0.000 proximal_iterations=4, newton_iterations=13, {1: 53, 2: 44, 3: 3}
3 574 5.838e+02 5.838e+02 0.046 0.050 0.000 proximal_iterations=5, newton_iterations=14, {1: 55, 2: 45, 3: 13}
4 855 3.976e+02 3.976e+02 0.047 0.067 0.000 proximal_iterations=5, newton_iterations=15, {1: 34, 2: 64, 3: 28}
5 1193 2.022e+02 2.022e+02 0.046 0.089 0.000 proximal_iterations=5, newton_iterations=15, {1: 6, 2: 77, 3: 51}
6 1332 1.472e+02 1.472e+02 0.046 0.127 0.000 proximal_iterations=6, newton_iterations=20, {1: 2, 2: 76, 3: 64}
7 1631 1.068e+02 1.068e+02 0.047 0.123 0.000 proximal_iterations=6, newton_iterations=16, {2: 86, 3: 83}
8 2808 6.615e+01 6.615e+01 0.046 0.216 0.001 proximal_iterations=5, newton_iterations=19, {2: 80, 3: 202}
9 4624 2.877e+01 2.877e+01 0.049 0.398 0.001 proximal_iterations=9, newton_iterations=24, {2: 69, 3: 408}
10 5532 1.809e+01 1.809e+01 0.047 0.476 0.001 proximal_iterations=9, newton_iterations=24, {2: 67, 3: 507}
11 6297 1.312e+01 1.312e+01 0.053 0.814 0.001 proximal_iterations=9, newton_iterations=37, {2: 55, 3: 596}
if MPI.COMM_WORLD.rank == 0:
plot_convergence(histories, "signorini_convergence.png", ylabel=r"$\eta$")

The cells are split along the edges of the contact region and at the corners, and the error indicator keeps decreasing, while it stagnates with p-refinement.
Jørgen S. Dokken, Patrick E. Farrell, Brendan Keith, Ioannis P. A. Papadopoulos, and Thomas M. Surowiec. The latent variable proximal point algorithm for variational problems with inequality constraints. Computer Methods in Applied Mechanics and Engineering, 445:118181, 2025. doi:10.1016/j.cma.2025.118181.
Brendan Keith and Thomas M. Surowiec. Proximal Galerkin: a structure-preserving finite element method for pointwise bound constraints. Foundations of Computational Mathematics, 26(1):385–481, 2024. doi:10.1007/s10208-024-09681-8.