1. Introduction
Viscous contact problems are time-dependent fluid flow problems in which the fluid is in contact with a solid surface from which it can detach and reattach. Contact problems of this type arise when modelling glacial ice flow, which is typically treated as a viscous fluid flow (Schoof & Hewitt Reference Schoof and Hewitt2013). On a large scale, they are relevant to marine ice sheets with a grounding line (Schoof Reference Schoof2007, Reference Schoof2011) and, on a smaller scale, to the formation of subglacial cavities when the ice slides over bedrock undulations (Fowler Reference Fowler1986; Schoof Reference Schoof2005; Gagliardini et al. Reference Gagliardini, Cohen, Raback and Zwinger2007). These problems share a very similar mathematical structure and are of great importance for understanding ice sheet dynamics and predicting future sea level rise.
In this paper, we present a novel numerical approach for solving viscous contact problems in an accurate and robust way. This method relies on the formulation of the contact problem as a variational inequality. There exist many different approaches to solving variational inequalities with finite element methods. Of these, we find that solving the contact problem with a piecewise constant Lagrange multiplier is particularly well suited since it allows us to satisfy a discrete version of the contact boundary conditions exactly in the discretisation. We find that this latter property of the numerical scheme enables us to evolve the surface of the viscous flow in a robust way. To the best of our knowledge, viscous contact problems have been solved previously as variational inequalities only in Stubblefield, Spiegelman & Creyts (Reference Stubblefield, Spiegelman and Creyts2021), where a penalty method is used.
Although the numerical method presented in this paper is suitable for any viscous contact problem, here we focus on subglacial cavitation and its application to glacial sliding. Glacial sliding represents a fundamental component of glacier dynamics and is one of the major uncertainties in ice sheet modelling (Ritz et al. Reference Ritz, Edwards, Durand, Payne, Peyaud and Hindmarsh2015). It involves a variety of physical mechanisms, among which is cavitation. Sliding with cavitation has been studied theoretically by means of linearised approaches (Fowler Reference Fowler1986; Schoof Reference Schoof2005) and these investigations are limited to relatively simple scenarios with two-dimensional geometries, smooth bedrocks with small variations, and steady conditions. Numerical methods, on the other hand, allow the extension to more complicated situations in a more straightforward manner (Gagliardini et al. Reference Gagliardini, Cohen, Raback and Zwinger2007; Helanow et al. Reference Helanow, Iverson, Zoet and Gagliardini2020). In this work, we attempt to more fully exploit the mathematical structure of the viscous contact problem, to improve the accuracy and robustness of the numerical methods employed.
In § 2, we introduce our algorithm for solving viscous contact problems, using the set-up of the glacial cavitation problem to provide a concrete context. We then present two applications of the algorithm. First, in § 3, we compute the steady sliding law for flow over a sinusoidal bed for linear and nonlinear rheologies, expanding on the results in Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007). Furthermore, in this section we compare our results with those obtained from the linearised theory to validate the algorithm. Then, in § 4, we explore the effects of unsteady water pressures on glacial sliding by calculating the basal sliding velocities and cavity shapes under oscillating water pressures.
2. Formulation and approximation of the problem of subglacial cavitation
We focus here on formulating the viscous contact problem of subglacial cavitation and describing a finite element scheme to approximate it. The problem described here is the same, though with some different notation, as the subglacial cavitation problem studied in Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007). A linearised version, assuming small amplitude of the bed bump, is equivalent to the problem studied in Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005). Subglacial cavitation is very similar mathematically to the problem of a marine ice sheet with a grounding line. Therefore, the extension of the finite element scheme presented here to grounding line problems requires minor modifications, such as the inclusion of non-zero tangential stress (a friction law), and a free surface at the ice–atmosphere interface.
Subglacial cavitation occurs at the ice–bedrock interface, over length scales corresponding to the size of the bedrock obstacles. These length scales are generally several orders of magnitude smaller than those of the glacier. For this reason, the computational domain
$\varOmega$ in which we model the formation of cavities is a thin layer of ice of finite height located under a larger mass of ice; see figure 1. We assume the bedrock, and therefore also
$\varOmega$, to be periodic in the horizontal direction. The upper boundary
$\varGamma _t$ represents a fictional boundary separating
$\varOmega$ from the ice above. The height of the bedrock is given by the function
$b(x)$, and the height of the lower boundary is given by
$\theta (x,t)$. The lower boundary is divided into an attached region
$\varGamma _a$ where
$\theta (x, t) = b(x)$, and a detached (i.e. cavitated) region
$\varGamma _d$ where
$\theta (x, t) > b(x)$.
The periodic domain
$\varOmega$ on which we model the evolution of a subglacial cavity.

Glacial ice is generally modelled with the Stokes equations. If we denote the velocity and pressure by
$\boldsymbol {u} = (u,v)$ and
$p$, respectively, these can be written as
Here,
$\eta = \eta (|\varepsilon (\boldsymbol {u})|)$ is the effective viscosity of the ice, which is usually modelled with Glen's law (Glen Reference Glen1958),
where
$n\approx 3$ for ice, and
$A$ is a potentially temperature-dependent parameter that we treat as constant. The tensor
$\varepsilon (\boldsymbol {u})$ represents the strain rate of the ice and is given by the symmetric component of the velocity gradient,
For a given velocity and pressure field, we define the stress tensor
$\sigma = \sigma (\boldsymbol {u},p)$ by
where
$I$ is the identity tensor field. If
$\boldsymbol {n}$ denotes the outwards-pointing normal vector to the boundary of
$\varOmega$, then the normal and tangential stresses at the boundary are defined by
The Stokes equations (2.1) must be complemented with a set of boundary conditions. Along the cavitated region
$\varGamma _d$ of the lower boundary, we assume the ice to be in contact with water at pressure
$p_w$, and we prescribe
For the subglacial cavity problem, we assume this water pressure to be uniform along the length of the bedrock because gravity is unimportant on the spatial scales under consideration.
On the attached region
$\varGamma _a$, we assume the ice to be lubricated by a thin layer of water connected to the subglacial drainage system. For this reason, we allow the ice to slide freely and set
$\boldsymbol {\sigma }_{nt} = 0$. The possibility of detachment is realised by enforcing the contact boundary conditions
Notice that here we are enforcing the ice either to remain attached (i.e.
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} = 0$) whenever the compressive normal stress is larger than the water pressure, or to have the possibility of detaching (
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} < 0$) if the stress equals the water pressure.
On the top boundary
$\varGamma _t$, we enforce the boundary condition
$\sigma _{nn} = -p_i$, where
$p_i$ is the overburden ice pressure. Finally, we close the system with either the Dirichlet boundary condition
or the Neumann boundary condition
where
$\tau _b$ is the basal shear stress. As explained further in § 3, we remark that the horizontal velocity
$u_i$ is not the same as the basal sliding speed (though they become approximately equal in the linearised theory). However, the value of
$\tau _b$ in (2.9) coincides with the basal shear stress along the base of the domain (see (3.1) below) due to the overall balance of forces in the horizontal direction.
The Stokes equations must be coupled to a local advection equation that describes the evolution in time of the cavity roof:
Since
$\theta$ is time-dependent, so are the domain
$\varOmega$ and the attached and detached regions
$\varGamma _a$ and
$\varGamma _d$ along the lower boundary.
Our goal in the rest of this section is to make use of the fact that the instantaneous Stokes problem (2.1) together with the contact boundary conditions (2.7a–c) is equivalent to a variational inequality. This mathematical structure can be exploited by a finite element discretisation.
2.1. A Stokes variational inequality
The finite element method can be used to compute approximate solutions of the Stokes equations with the contact boundary conditions (2.7a–c). As a first step, we must find a weak formulation by multiplying (2.1) by suitable test functions and integrating by parts. Weak formulations of partial differential equations are formulated in terms of weak derivatives, and the solutions are generally sought in Sobolev spaces (Adams & Fournier Reference Adams and Fournier2003). In order to keep the notation simpler, we assume in this subsection and in § 2.2 that we enforce the Neumann boundary condition (2.9) instead of (2.8). In this case, a suitable space of test functions is the vector-valued Sobolev space
$V = \boldsymbol {W}^{1,\kappa }(\varOmega )$ for the velocity, and the Lebesgue space
$Q = L^{\kappa '}(\varOmega )$ for the pressure. Here,
$\kappa = 1 + 1/n$, where
$n$ is the coefficient in Glen's law, and
$\kappa ' = \kappa /(\kappa -1)$ is the Hölder conjugate of
$\kappa$.
Due to the contact boundary conditions (2.7a–c), the associated weak formulation of the Stokes equations is a variational inequality. Given the convex set of admissible velocity fields
the weak formulation of (2.1) is: find
$(\boldsymbol {u},p)\in K\times Q$ such that
Here, the operators
$a : V\times V\to \mathbb {R}$ and
$b:Q\times V\to \mathbb {R}$ are defined by
and the linear functional
$f:V\to \mathbb {R}$ is defined by
As we assume that the water pressure
$p_w$ is constant along the bedrock, the incompressibility of the flow velocity can be used to rewrite the right-hand side as
where
$N = p_i - p_w$ is the effective pressure. Consequently, the solution depends only on
$N$, not on the particular values of
$p_i$ and
$p_w$.
The variational inequality (2.12) is equivalent to the Stokes equations (2.1) in the sense that if the velocity
$\boldsymbol {u}$ is at least twice differentiable and the pressure
$p$ is differentiable, then integration by parts can be performed in order to arrive at (2.1) with the boundary conditions introduced in the previous section. Of the three conditions in (2.7a–c), only the kinematic condition
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} \leq 0$ is enforced explicitly in the definition of
$K$; the remaining conditions are enforced implicitly in (2.12).
There exist many different approaches for solving a variational inequality with the finite element method (Glowinski, Lions & Trémoliéres Reference Glowinski, Lions and Trémoliéres1981). For example, in the penalty method, the constraint
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} \leq 0$ in the definition of
$K$ is enforced via the addition of a nonlinear penalty term in (2.12a), and the variational inequality is transformed into a variational equality over
$\boldsymbol {W}^{1,\kappa }(\varOmega )$. This is the approach used in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). We find that what works best in combination with the advection equation (2.10) is a mixed method with Lagrange multipliers that enforces an average-wise contact condition. We remark that such a condition could also be enforced via a penalty term, but in this case the contact boundary conditions would not be enforced exactly.
The contact boundary conditions (2.7a–c) can be enforced explicitly in (2.12) with a Lagrange multiplier that essentially represents the sum of the normal stress and the water pressure,
$\sigma _{nn} + p_w$, along the attached region
$\varGamma _a$. In order to introduce this reformulation of (2.12), we need to define a suitable set of admissible Lagrange multipliers. We define the range of the normal trace operator onto
$\varGamma _a$ by
The space of admissible Lagrange multipliers is then the convex cone of elements in the dual space
$\varSigma '$ satisfying a weak equivalent of the dynamic contact boundary condition
$\sigma _{nn} + p_w \leq 0$ in (2.7a–c):
The mixed formulation of the variational inequality (2.12) may be written as: find
$(\boldsymbol {u},p,\lambda )\in V\times Q\times \varSigma '$ such that
Equation (2.18a) can be obtained by multiplying (2.1a) by a test function
$\boldsymbol {v}$, integrating by parts, and setting
Formulation (2.18) offers several advantages for finite element approximation in comparison to (2.12). First, there is no longer any need to build an approximation of the convex set
$K$ because we seek the velocity in the space
$V$. Second, the conditions (2.18c), which are a weak analogue of the contact boundary conditions (2.7a–c), can be rewritten as a nonlinear equation at the discrete level; see (2.22c) below. This means that the contact boundary conditions can be enforced exactly by solving the finite element system analogous to (2.18). As we explain shortly, this leads to a robust and stable numerical method for solving the complete subglacial cavitation system.
Under certain conditions on the geometry of the domain and the linear functional
$f$, the variational inequality (2.12) has a unique solution. A proof can be found in de Diego, Farrell & Hewitt (Reference de Diego, Farrell and Hewitt2021), together with an analysis of the finite element approximation of the mixed system (2.18).
2.2. A numerical method for subglacial cavitation
In this subsection, we present a numerical algorithm for solving the complete subglacial cavitation problem that results from coupling the Stokes equations (2.1) to the time-dependent advection equation (2.10). We write the discrete counterparts to these equations and explain how they are coupled by deforming the domain according to a contact criterion. The resulting algorithm is summarised in Algorithm 1. The solver is implemented in Firedrake (Rathgeber et al. Reference Rathgeber, Ham, Mitchell, Lange, Luporini, McRae, Bercea, Markall and Kelly2016), using the version available at zenodo/Firedrake-20211103.0 (2021). The code for the viscous contact solver presented in Algorithm 1 is openly available, as described in the data availability statement below.
Subglacial cavitation is a time-dependent problem, so its discretisation requires a partition of a given time interval
$[0,T]$ into intervals of length
${\rm \Delta} t$. At each time step
$t_k = k {\rm \Delta} t$ for
$k = 0,1,\ldots, N_T = T/{\rm \Delta} t$, we must consider a discrete cavity roof
$\theta _h^{k}$ and domain
$\varOmega ^{k}$ given by
Additionally, the lower boundary is the union of the attached and detached regions
$\varGamma _a^{k}$ and
$\varGamma _d^{k}$, respectively. These are also time-dependent and are determined at each time step by the contact criterion (2.29) below.
Solution procedure for the subglacial cavity problem

2.2.1. Finite element approximation of the Stokes variational inequality
On each domain
$\varOmega ^{k}$, we seek a finite element approximation to (2.18). To this end, we consider a triangulation of
$\varOmega ^{k}$ and the finite element spaces
$V_h$,
$Q_h$ and
$\varSigma _h$ given by piecewise continuous quadratic vector fields, piecewise constant scalar fields and piecewise constant scalar functions on
$\varGamma _a^{k}$, respectively. This velocity–pressure pair is known to be inf-sup stable in two dimensions (Boffi, Brezzi & Fortin Reference Boffi, Brezzi and Fortin2013). Furthermore, as we explain in § 2.2.2, working with a piecewise constant Lagrange multiplier enables the use of a very simple upwinding scheme for solving the advection equation (2.10) in a manner consistent with the discrete contact boundary conditions.
We write
$V_h = \operatorname {span}{\{\boldsymbol {v}_i\}}_{i=1}^{N_v}$,
$Q_h = \operatorname {span}{\{q_j\}}_{j=1}^{N_q}$ and
$\varSigma _h = \operatorname {span}{\{\mu _k\}}_{k=1}^{N_\mu }$, where
$N_v = \dim {V_h}$,
$N_q = \dim {Q_h}$ and
$N_\mu = \dim {\varSigma _h}$. For the functions
$(\boldsymbol {u}_h, p_h, \lambda _h) \in V_h\times Q_h\times \varSigma _h$, we denote the respective degrees of freedom in
$\mathbb {R}^{N_v}$,
$\mathbb {R}^{N_q}$ and
$\mathbb {R}^{N_\mu }$ by
$\mathbf{u}$,
$\mathbf{p}$ and
$\boldsymbol{\lambda }$. In order to write an algebraic counterpart of (2.18c), we need the operator
that returns the average normal components of a vector
$\boldsymbol {v}_h\in V_h$ along the edges on
$\varGamma _a^{k}$. The discrete counterpart to (2.18) is
Here, we have introduced the matrices
$\boldsymbol {B}\in \mathbb {R}^{N_v\times N_q}$ and
$\boldsymbol {D}\in \mathbb {R}^{N_v\times N_\mu }$, the vector
$\boldsymbol {f}\in \mathbb {R}^{N_v}$, and the nonlinear operators
$\boldsymbol {A}:\mathbb {R}^{N_v}\to \mathbb {R}^{N_v}$ and
$\boldsymbol {C}:\mathbb {R}^{N_\mu }\times \mathbb {R}^{N_v}\to \mathbb {R}^{N_\mu }$. The matrices are given by the elements
$\boldsymbol {B}_{ij} = b(\boldsymbol {v}_i,q_j)$ and
$\boldsymbol {D}_{ij} = \int _{\varGamma ^{k}_a} \mu _j (\boldsymbol {v}_i \boldsymbol {\cdot } \boldsymbol {n})\,\mathrm {d} s$, and the vector
$\boldsymbol {f}$ is given by
The nonlinear operator
$\boldsymbol {A}$ is given by
where
$\eta _\epsilon$ is a regularised form of (2.2) that prevents infinite viscosity at zero strain rates, defined by
for a regularisation parameter
$\epsilon > 0$ that we set to
$\epsilon = 10^{-2}$. The nonlinear function
$\boldsymbol {C}$ is
for an arbitrary
$c>0$ that we set to
$c = 1$. We find the computations carried out in this paper to be insensitive to the value of
$c > 0$ when
$c\in [10^{-6},10^{6}]$. In (2.26), the
$\max$ operation is understood to be carried out for each of the elements in the vector
$-\boldsymbol{\lambda } + c (\boldsymbol {\gamma _n}\mathbf{u})\in \mathbb {R}^{N_\mu }$. The use of (2.26) is a common way of expressing contact conditions; a particular advantage is that the nonlinear system (2.22) can be solved with a semi-smooth Newton method (Hintermüller, Ito & Kunisch Reference Hintermüller, Ito and Kunisch2002). Moreover, (2.22c) is equivalent to enforcing
a discrete equivalent of (2.7a–c). By solving (2.27a–c), we see that on each edge on
$\varGamma _a^{k}$, we have that the edge wishes either to detach (
$\boldsymbol {\gamma _n} \mathbf{u} < 0$) or to remain attached to the bed (
$\boldsymbol{\lambda } \leq 0$ and
$\boldsymbol {\gamma _n} \mathbf{u} = 0$). At the continuous level, one cannot write (2.18c) as in (2.22c) because in general the Lagrange multiplier
$\lambda$ is only an element of the dual space
$\varSigma '$ and may not even be a function on
$\varGamma _a$ (Stadler Reference Stadler2007).
2.2.2. The discrete advection equation and a contact criterion
In order to write a discretisation of (2.10), we introduce some further notation. We denote the points along the lower boundary by
$(x_i,\theta _i)$, with the index
$i$ increasing from left to right as in figure 2. The edge between
$(x_{i-1},\theta _{i-1})$ and
$(x_i,\theta _i)$ is denoted by
$e_i$. We write
$u^{k}_{n,i}$ for the value of
$\boldsymbol {\gamma _n}\mathbf{u}$ associated with
$e_i$ at time
$t_k$ (by the definition of
$\boldsymbol {\gamma _n}$, this value corresponds to the average value of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ along
$e_i$).
Notation and ordering for nodes
$\{(x_i,\theta _i)\}$ and edges
$\{e_i\}$ along the attached region
$\varGamma _a^{k}$.

A numerical scheme that solves the advection equation (2.10a) should satisfy two conditions. First, it must be stable, as described in standard textbooks (LeVeque Reference LeVeque2007) (in Appendix A.2 we present results with and without stabilisation of (2.10a)). Additionally, the scheme should be compatible with the discrete contact boundary conditions (2.27a–c), in the sense that if for two edges
$e_i$ and
$e_{i+1}$ we have that
$u_{n,i}^{k} = 0$ and
$u_{n,i+1}^{k} = 0$, then we should have that
$\theta ^{k+1}_{i} = \theta ^{k}_{i}$; that is, the node in between the edges remains unchanged. This means that the discrete counterpart of
$\boldsymbol {u}\boldsymbol {\cdot } (\partial \theta /\partial x, -1)^{{\text{T}} }$ should be defined in terms of
$\boldsymbol {\gamma _n} \mathbf{u}$. If not, then we generally find that all edges will detach within a few time steps due to approximation errors. Here, we propose the following explicit scheme:
\begin{equation} \frac{\theta_i^{k+1} - \theta_i^{k}}{{\rm \Delta} t} = \left(\left(\frac{\theta^{k}_i - \theta^{k}_{i-1}}{x_i - x_{i-1}}\right)^{2} + 1 \right)^{1/2} u^{k}_{n,i}, \end{equation}
where the velocity at each node is taken from the edge located immediately upstream. This results in an upwinding scheme with the property that penetration cannot occur along
$\varGamma _a$, because the average values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ along the edges are non-positive; see (2.27a–c). However, a node on a previously detached edge can penetrate the bedrock. To avoid this and enforce (2.10b), we simply set
$\theta ^{k+1}_i = b(x_i)$ whenever
$\theta ^{k+1}_i < b(x_i)$.
Given a cavity roof
$\theta _h^{k}$ at
$t_k$, we must set the attached and detached regions
$\varGamma _a^{k}$ and
$\varGamma _d^{k}$ to solve the Stokes variational inequality at
$t_k$. This is carried out by assigning each edge
$e_i$ with endpoints
$(x_{i-1},\theta ^{k}_{i-1})$ and
$(x_i,\theta ^{k}_i)$ to either
$\varGamma _a^{k}$ or
$\varGamma _d^{k}$. We do this by looking at the node downstream of the edge, in accordance with the scheme for the advection equation:
where the tolerance
$\mathrm {tol}$ is set to
$10^{-9}$. Consequently, given a cavity roof
$\theta ^{k}_h$ at time
$t_k$, the attached and detached regions
$\varGamma ^{k}_a$ and
$\varGamma ^{k}_d$ are fully determined.
Once we have computed a new cavity roof
$\theta ^{k+1}_h$, the Stokes problem is then solved over a new domain
$\varOmega ^{k+1}$. This means that the mesh is deformed according to
$\theta ^{k+1}_h$. Since we use vertically extruded meshes for the computations in this paper, a simple algorithm is used that moves each node vertically in a linear manner with respect to the original position of the nodes at
$t = 0$. If we denote the mesh nodes over
$x_i$ by
$y_{ij}$, and let
$y = H$ be the upper boundary of the domain, then we compute the new vertical positions of the nodes via
for given
$y^{0}_{ij}$,
$\theta ^{0}_i$ and
$\theta ^{k+1}_i$.
3. Steady sliding with cavitation
The sliding of a glacier over its bedrock has been studied widely since Weertman's seminal work in 1957 (Weertman Reference Weertman1957). In general, these studies attempt to build a function known as the sliding law that captures the steady relationship between the basal sliding speed
$u_b$, the basal shear stress
$\tau _b$, and other variables such as the water pressure
$p_w$. This sliding law can then be used to prescribe a boundary condition at the ice–bedrock interface in large-scale glacier models that do not resolve the smaller-scale shape of that interface.
As a first application of the algorithm described in the previous section, we build the sliding law for ice flowing over a sinusoidal bed. We first present detailed results for a particular steady state in § 3.1 to evaluate the accuracy of the solver and the effect of mesh refinement. Then in § 3.2 we compute sliding laws for different values of the parameter
$n$ in Glen's law (2.2).
The computations presented in this section and in § 4 have been carried out under the assumption that the water pressure
$p_w$ is uniform along the lower boundary. As explained in the previous section, the problem then depends only on the effective pressure
$N = p_i - p_w$, rather than individually on
$p_i$ or
$p_w$. (After subtracting
$p_w$ from the stress, the boundary conditions become
$\sigma _{nn} = - N$ on
$\varGamma _t$,
$\sigma _{nn} = 0$ on
$\varGamma _d$, and
$\sigma _{nn} \leq 0$ on
$\varGamma _a$.) We non-dimensionalise the calculations by scaling lengths with the wavelength of the bed
$L$, velocities with a characteristic velocity scale
$U$, and stresses with the characteristic stress scale
$(U/(2AL))^{1/n}$. The resulting problem depends only on the non-dimensional amplitude
$r$ of the sinusoidal bed, the non-dimensional velocity
$u_i$ prescribed along the upper boundary, and the non-dimensional effective pressure
$N$.
3.1. Steady subglacial cavities
The steady state of (2.1) and (2.10) with the boundary conditions
$u = u_i$ and
$\sigma _{nn} = -N$ on the top boundary
$\varGamma _t$ can be found with Algorithm 1 by evolving the cavity from an initial state until the norm of the discrete derivative
$(\theta ^{k+1} - \theta ^{k})/{\rm \Delta} t$ is below a prescribed threshold
$10^{-4}$. In this subsection, we find the steady cavity for a Newtonian flow (
$n = 1$ in Glen's law (2.2)) over a sinusoidal bed of small amplitude
$r = 0.01$ given by
$b(x) = rL \cos {(2{\rm \pi} x/L)}$. The non-dimensional effective pressure is set to
$N = 0.3$, and the non-dimensional horizontal velocity to
$u_i = 1$. We first consider a linear rheology and a bedrock of small amplitude in order to compare our results with the analytical solution of the linearised cavitation problem considered in Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005). A brief description of this method is included in Appendix B.
We use five different meshes with
$n_e$ vertices distributed uniformly along the lower boundary. In table 1, we present the non-dimensional basal shear stress
$\tau _b$ and sliding speed
$u_b$ along the cavities. These values are calculated with
where
$\boldsymbol {n} = (n_x,n_y)$. The expression for
$\tau _b$ can be derived from the expression for the force exerted by the ice on the bed as in Schoof (Reference Schoof2005). Recall that the Lagrange multiplier
$\lambda$ represents the normal stress
$\sigma _{nn} + p_w$ along
$\varGamma _a$ (see (2.19)); therefore
$\tau _b$ can be calculated from
$\lambda$ via
As we show in the next subsection, the values of
$\tau _b$ and
$u_b$ can be used to construct a sliding law.
Information about the different meshes used to compute the steady cavity states together with calculations of the basal shear stress
$\tau _b$, the basal sliding speed
$u_b$, and the detachment and reattachment points of the cavity.

The formula for
$u_b$ presented in (3.1b) might seem strange if the subglacial cavity domain is interpreted as a boundary layer between an ice sheet and the bedrock. This would suggest that we take the sliding speed to be the average value of the horizontal velocity along the top boundary
$\varGamma _t$. However, our computations indicate that if the height of the domain
$H$ is sufficiently large, then we can expect the shear stress to approach a constant value and the horizontal velocity to vary with
$y^{n}$ as
$y$ approaches
$H$, where
$n$ here is the exponent in Glen's law (2.2). Therefore, the horizontal velocity along the top boundary depends strongly on the height of the domain. For this reason, and following Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007), we use (3.1b) to calculate
$u_b$. In this case, we find that
$u_b$ is independent of
$H$ for sufficiently large values of
$H$. In particular, throughout this paper we set
$H=L$. In agreement with Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007), we find this value of
$H$ to be sufficiently large.
In figure 3, we present the steady cavity shape and normal stresses
$\sigma _{nn}$ along the attached region
$\varGamma _a$ for the different meshes. We can see from these figures that the cavity shape is computed accurately even with the coarsest mesh. Additionally, we also present the stress distribution obtained from the linearised theory, which is determined uniquely for an effective pressure
$N$ and a sliding speed
$u_b$. The result from the linearised theory plotted in figure 3 is computed with the value of
$u_b$ calculated with the most refined mesh.
(a) Steady cavity shapes and (b) normal stresses along the attached region computed with different mesh sizes. The stress distribution obtained from the linearised theory is shown in black. Here, the amplitude of the obstacle is set to
$r = 0.01$, the scaled effective pressure to
$N = 0.3$, and the scaled horizontal velocity at the top to
$u_i = 1$.

The plot for the normal stress distribution demonstrates that the contact conditions (2.7a–c) are satisfied exactly at the discrete level for all of the meshes, because
$\sigma _{nn} + p_w \leq 0$. This plot also exhibits the singularity of the normal stresses at the reattachment point. This singularity complicates the approximation of the normal stresses along the attached region and can lead to very inaccurate computations of the sliding law in largely cavitated states. However, figure 3 also indicates that with increasing mesh refinement, the solver appears to converge towards the linearised solution.
At the discrete level, the Lagrange multiplier
$\lambda$, which we use to calculate
$\tau _b$, is piecewise constant on each edge along the lower boundary. In figure 3, these values, the degrees of freedom of
$\lambda$, are plotted at the midpoints of each edge. Due to the contact criterion (2.29), the edge immediately upstream of the first reattached node is treated as part of
$\varGamma _a$ (this is required in order to allow for the possibility of subsequent detachment there), which explains why there are non-zero values of
$\sigma _{nn} + p_w$ left of the reattachment node in figure 3. This is particularly visible for the coarsest mesh with
$n_e = 16$.
3.2. Computation of the linear and nonlinear steady sliding law
We next perform calculations similar to those of § 3.1 but for varying effective pressure
$N$ and power-law exponent
$n$. This allows us to map out a steady sliding law for ice sliding over a hard bed with cavitation as in Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007). The steady sliding law can be mapped out by varying only
$N$ and keeping
$u_i$ fixed, since dimensional analysis of the steady problem shows that the scaled basal shear stress
$\tau _b/N$ depends only on the ratio
$u_b/(ALN^{n})$, and not independently on
$u_b$ or
$N$ (Fowler Reference Fowler1986) (the same will not be true of the unsteady problem in § 4).
Several previous studies have suggested what form the sliding law should take, both with and without cavitation (Kamb Reference Kamb1970; Fowler Reference Fowler1981, Reference Fowler1986; Gudmundsson Reference Gudmundsson1997; Schoof Reference Schoof2005; Gagliardini et al. Reference Gagliardini, Cohen, Raback and Zwinger2007). The law proposed in Gudmundsson (Reference Gudmundsson1997) for the uncavitated case can be written as
where
$r = a/L$, and
$\alpha (n)$ is a function depending on
$n$. The function
$\alpha (n)$ is related to the parameter
$c_0$ (which also depends on
$n$) considered in Gudmundsson (Reference Gudmundsson1997) by
For a Newtonian flow, the complex analysis method presented in Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005) yields an exact solution to the linearised problem. In particular, for high effective pressures, no cavitation occurs and a linear sliding law as in (3.3) with
$c_0 = 1$ is found. For effective pressures lower than a critical value
$8{\rm \pi} ^{2} r \eta u_b / L$, cavitation occurs and the sliding law becomes nonlinear, varying with
$N$ as well as
$u_b$.
We compute the sliding law over a sinusoidal bed of different amplitudes
$r$ and for
$n=1$, 3 and 5, and we plot the results in figure 4 using the scaling suggested by (3.3). The mesh has 192 vertices along the lower boundary, and 7296 cells. The locations of the cavity endpoints are also plotted in figure 4, along with the solution to the linearised problem calculated with the method from Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005). For each
$n$, the parameter
$\alpha (n)$ is computed by calculating the slope of the curve near the origin (where there is no cavitation) for the lowest value of
$r$. The corresponding values of the parameter
$c_0$ can then be calculated from (3.4); these values can be found in table 2 together with those obtained in Gudmundsson (Reference Gudmundsson1997) and Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007). We see that the results obtained in these works are broadly similar to ours and that the value
$c_0 = 1$ obtained in the linearised theory is approached in all cases when
$n = 1$.
(a) Computed sliding law for steady glacial sliding with cavitation. (b) Cavity endpoints. The parameter
$n$ in Glen's law (2.2) is set to
$n = 1$ (green), 3 (blue) and 5 (red). For each
$n$, we compute the sliding law for beds of amplitude
$r = 0.01$ (circles, light), 0.04 (squares) and 0.08 (triangles, dark). For these computations, we set the scaled velocity at the top of the domain to
$u_i = 1$ and the scaled viscosity parameter to
$A = 0.5$. We use a mesh with 192 cells along the lower boundary. The parameter
$\alpha (n)$ is computed from the slope of the curve near the origin for the lowest
$r$.

Value of the parameter
$c_0$ associated with the sliding laws. This parameter is computed with the slope of these curves near the origin.

The computed sliding laws with cavitation in figure 4 are multivalued for
$\tau _b/(rN)$ as expected (Fowler Reference Fowler1986; Schoof Reference Schoof2005). This aspect of the law justifies the use of the Dirichlet boundary condition
$u = u_i$ instead of the alternative Neumann boundary condition. We find that if we use the Neumann boundary condition
$\boldsymbol {\sigma }_{nt} = \tau _b(1,0)^{{\text{T}} }$ and initiate the cavity from a fully attached state, then the solver always evolves to the steady state associated with the upsloping region of the curve (see also § 4). From figure 4, we also deduce that the validity of the sliding law (3.3) along the linear segment of the curves (where either little or no cavitation has occurred) decreases with increasing values of
$r$ and
$n$. For example, when
$n = 5$, one can observe that the linear segment of the sliding law for
$r = 0.08$ clearly does not collapse onto the corresponding linear segment for
$r = 0.01$. As soon as the cavity size increases and the sliding laws cease to be linear, the aspects of these curves largely differ for different values of
$n$.
In figure 4, we use a scaling different to the one used in Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007). In Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007), the computed maximum value reached by
$\tau _b/N$ is included in the scaling for the sliding law. In this way, the maximum value reached by the scaled sliding law equals 1 by design. However, we preferred the scaling based on (3.3) because it contains fewer terms that are unknown a priori. It is also worth mentioning that for different values of
$n$, the curves in figure 4 do not collapse into a single curve when plotted with the scaling from Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007).
For the linear case with
$n = 1$, the numerical results computed with the finite element solver highly resemble those obtained with the linearised solution. For
$r=0.08$, a slight difference from the linearised solution can be seen near the peak of the sliding law. This difference is probably a consequence of nonlinear effects that are accentuated with increasing amplitudes of bedrock roughness.
4. Unsteady sliding
In the previous section, the sliding law was constructed by computing steady cavity states. However, field measurements from alpine glaciers and from the Greenland Ice Sheet have found short-term variations in the water pressure, on time scales down to hours (Iken Reference Iken1981; Iken & Bindschadler Reference Iken and Bindschadler1986; Sugiyama & Gudmundsson Reference Sugiyama and Gudmundsson2004; Andrews et al. Reference Andrews, Catania, Hoffman, Gulley, Lüthi, Ryser, Hawley and Neumann2014; Hoffman et al. Reference Hoffman, Andrews, Price, Catania, Neumann, Lüthi, Gulley, Ryser, Hawley and Morriss2016). In these studies, variations of water pressure have been correlated with variations in surface speeds, vertical strain and uplift. Subglacial cavitation has been considered a possible mechanism causing these correlations (Iken & Bindschadler Reference Iken and Bindschadler1986; Mair, Sharp & Willis Reference Mair, Sharp and Willis2002; Sugiyama & Gudmundsson Reference Sugiyama and Gudmundsson2004). These observations motivate an investigation of glacier sliding under unsteady conditions. In this section, we therefore compute the evolution in time of subglacial cavities under oscillating water pressures and calculate the corresponding unsteady basal sliding speed and shear stresses. The study published by Iken of the transient stages between steady cavity shapes (Iken Reference Iken1981) is the only numerical investigation of unsteady cavitation solving the Stokes problem known to the authors.
We initialise the computations from a steady state corresponding to a point in the sliding law determined by an effective pressure
$N_0$, a basal sliding speed
$u_{b,0}$, and a basal shear stress
$\tau _{b,0}$. Instead of prescribing the Dirichlet boundary condition
$u = u_i$ on
$\varGamma _t$, we enforce the Neumann boundary condition
$\boldsymbol {\sigma }_{nt} = \tau _{b,0} (1,0)^{{\text{T}} }$ on
$\varGamma _t$. We consider it more physically realistic to have the basal shear stress fixed rather than the sliding speed because we can expect the basal stresses to balance the gravitational driving stresses, which are essentially fixed on these time scales. In practice, if water pressure variations are spatially localised, then the driving stress can be transferred to neighbouring regions of the bed, but it is not easy to account for this within the current boundary layer treatment of the problem. We set
$n = 3$ in Glen's law to model the nonlinear rheology of ice. Algorithm 1 is used with a mesh with 192 elements along the lower boundary over a sinusoidal bed of amplitude
$r = 0.08$.
The effects of unsteady water pressures differ depending on the initial steady state from which we evolve the cavity. To illustrate this, we first evolve two different points along the upsloping component of the steady sliding law by oscillating the effective pressure with amplitude
$0.1 N_0$ and fixed non-dimensional frequency 0.4. As a reference, note that one non-dimensional time unit is approximately the time taken for ice at the top of the domain to traverse one wavelength of the bed. The results are plotted in figure 5. These results indicate that with increasing cavitation, the amplitude of the sliding speed increases. For the case of small cavitation (figure 5a), the sliding speed is slightly out of phase with the effective pressure. However, this phase difference disappears with larger cavitation, as observed in figure 5(d) and also in figures 6 and 7 below. This implies that the maximum sliding speed is most often reached when the effective pressure is lowest. Field measurements have also found maximum surface speeds to take place at moments of maximum water pressure (Iken & Bindschadler Reference Iken and Bindschadler1986; Sugiyama & Gudmundsson Reference Sugiyama and Gudmundsson2004). On the other hand, the phase difference between the sliding speeds and the cavity volume appears to change in each numerical test: in figure 5(a), one can observe that the maximum sliding speed is reached when the cavity is still growing, while in figure 5(d), it is reached at the time of maximum cavitation. There are slight oscillations in the computed sliding speed when the cavity volume is at its largest. These are numerical artefacts due to the stress singularity at the reattachment point of the cavity having an increasing effect on the overall solution of the problem as the cavity volume grows. In these situations, a small displacement of the reattachment point has a large effect on the stress distribution along the bed and therefore also on the computed sliding speed.
Unsteady cavitation for imposed oscillating effective pressures
$N$ and fixed basal shear stress
$\tau _b$ around the states with (a–c)
$(u_{b,0}, N_0) = (1, 2.2281)$, and (d–f)
$(1, 1.8843)$. In (a,d), the evolution of the cavity volume
$V$ (right-hand axis) and basal sliding speed
$u_b$ (left-hand axis, also for
$N$) are plotted. One period of each solution is superimposed on the steady sliding law in (b,e), as indicated by the coloured dots. In (c, f), the cavity shapes are plotted at different time instants with coloured lines; the dotted lines represent the steady cavity shapes for
$(u_{b,0},N_0)$.

Unsteady cavitation around the state with
$(u_{b,0}, N_0) = (1, 1.8843)$ for imposed oscillating effective pressures
$N$, with non-dimensional frequencies (a–c)
$0.4$, and (d–f)
$2$, and fixed basal shear stress
$\tau _b$ . In (a,d), the evolution of the cavity volume
$V$ (right-hand axis) and basal sliding speed
$u_b$ (left-hand axis, also for
$N$) are plotted. The effective pressure is plotted against the sliding speed in (b,e) in coloured dots, together with the steady solution in black. In (c, f), the cavity shapes are plotted at different time instants with coloured lines; the dotted lines represent the steady cavity shapes for
$(u_{b,0},N_0)$.

Unsteady cavitation around the state with
$(u_{b,0}, N_0) = (1, 1.0937)$ for imposed oscillating effective pressures
$N$, with amplitudes (a–c)
$0.1N_0$, and (d–f)
$0.01N_0$, and fixed basal shear stress
$\tau _b$. In (a,d), the evolution of the cavity volume
$V$ (right-hand axis) and basal sliding speed
$u_b$ (left-hand axis, also for
$N$) are plotted. One period of each solution is superimposed on the steady sliding law in (b,e), as indicated by the coloured dots. In (c, f), the cavity shapes are plotted at different time instants with coloured lines; the dotted lines represent the steady cavity shapes for
$(u_{b,0},N_0)$.

As mentioned above, the non-dimensional time that it takes a fluid particle to traverse the domain is of order
$t\approx 1$. Therefore, the scaled frequency
$f = 0.4$ can be considered a relatively slow frequency that allows the cavity to follow approximately the steady shapes associated with the effective pressure at each instant in time as calculated in § 3. In figure 6, we compare results obtained with frequencies
$f = 0.4$ and
$f = 2$ to examine the effect of faster oscillations in the water pressure. With a higher frequency, the magnitude of the change of cavity volume is significantly lower. In contrast, the amplitude of the sliding speed increases slightly with a higher frequency. The phase difference between the velocity and the cavity volume also changes when the frequency is increased. For a high frequency, the maximum velocity is no longer attained when the cavity reaches its largest extent, but before, when the cavity is still growing. More specifically, figure 6(d) indicates that the maximum of the sliding speed and of the rate of change of the cavity volume occur simultaneously.
We can therefore expect a phase difference between the sliding speed and the cavity volume to arise for large frequencies. For very low frequencies, at each time instant
$t$, the cavity shape is approximately that of the corresponding steady state for the values of
$N(t)$,
$u_b(t)$ and
$\tau _b(t)$. Therefore, since
$u_b$ increases with the cavity volume under steady conditions, this phase difference will disappear. When comparing panels (a) and (d) of figure 5, we see that this phase difference is larger when the cavity is smallest. This could indicate that the characteristic time scale with respect to which we measure the frequency increases for smaller cavity volumes.
Following Sugiyama & Gudmundsson (Reference Sugiyama and Gudmundsson2004), in figure 6 we also plot the sliding speed against the effective pressure throughout one cycle. For the lower frequency
$f = 0.4$, a clear loop arises in which the sliding speed is greater during cavity growth. For the higher frequency
$f = 2$, the loop nearly collapses into a single line. These plots can be compared with those obtained from field measurements in Sugiyama & Gudmundsson (Reference Sugiyama and Gudmundsson2004, figure 5); a qualitative similarity between both is that higher speeds are reached when
$N$ decreases. Additionally, similar plots are presented in Andrews et al. (Reference Andrews, Catania, Hoffman, Gulley, Lüthi, Ryser, Hawley and Neumann2014, Extended Data figure 4). These plots also show the extent to which unsteady sliding can differ from its steady counterpart.
The downsloping section of the friction curve produces a so-called rate-weakening sliding regime in which, for a supposed fixed effective pressure, an increase in the sliding speed is accompanied by a decrease in the basal drag. Rate-weakening sliding has been observed in a laboratory setting for ice sliding over a sinusoidal bed (Zoet & Iverson Reference Zoet and Iverson2015), although several authors have questioned whether such a sliding regime can arise for more realistic bed geometries (Fowler Reference Fowler1987; Schoof Reference Schoof2005; Helanow et al. Reference Helanow, Iverson, Woodard and Zoet2021). An implication of rate-weakening sliding is that the sliding law becomes double-valued, as seen in figure 4. This invalidates the commonly used shallow ice approximation of the Stokes equations, which requires the friction law to be invertible (Schoof & Hewitt Reference Schoof and Hewitt2013).
In figure 7, we perturb a steady state along the downsloping section of the curve with an oscillating effective pressure of non-dimensional frequency
$f = 0.4$, with the amplitude set to
$0.1N_0$ (figures 7a–c) and
$0.01N_0$ (figures 7d–f). As shown in figures 7(b) and 7(d), we observe that for perturbations with both large and small amplitudes, the cavity quickly evolves towards the steady state along the upsloping section for a similar value
$\tau _{b,0}/N_0$. In fact, we find that this phenomenon continues to occur for different frequencies in the oscillations of the effective pressure and different steady states along the downsloping section of the sliding law. This finding could offer an additional reason to not use a sliding law with a rate-weakening regime: since such a regime is unstable in the sense described above, we could expect it to be unachievable under natural conditions.
5. Discussion and conclusions
In this work, we have presented a novel numerical method for solving viscous contact problems by formulating the Stokes variational inequality as a mixed problem with Lagrange multipliers. We have also introduced a numerical scheme for the advection equation specifically designed to ensure both stability and coherence with the contact conditions of the Stokes problem. This combination leads to a robust and simple method for solving viscous contact problems. Although we have applied our method only to the problem of subglacial cavitation, it can be extended to the ice-ocean grounding line problem. In § 3, we have used this method to compute steady cavity configurations. In particular, we have validated the numerical method by comparing our results over bedrocks with small amplitudes to the linearised approach in Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005), and we have reconstructed steady sliding laws for different values of the parameter
$n$ in Glen's law (2.2).
Finally, in § 4, we have explored the temporal evolution of cavities under unsteady effective pressures and its effect on glacial sliding. One of the features of unsteady sliding studied in this work is the phase difference between the sliding speed, the cavity volume and the effective pressures. Our results show that with increasing frequencies, the phase difference between the sliding speed and cavity volume increases. They also seem to indicate that the maximum sliding speed occurs at the point of minimum effective pressure, at least for sufficiently cavitated states. Similar phase differences have been found in data obtained from field measurements (Iken & Bindschadler Reference Iken and Bindschadler1986; Sugiyama & Gudmundsson Reference Sugiyama and Gudmundsson2004; Andrews et al. Reference Andrews, Catania, Hoffman, Gulley, Lüthi, Ryser, Hawley and Neumann2014). Although our results could offer an explanation in terms of an idealised model, it should be noted that changes in measurements of surface elevation of an ice sheet can be the result of many cavities in different states. Finally, we also find that when we fix the value of
$\tau _b$ as a Neumann boundary condition, the downsloping section of the sliding law, also known as the rate-weakening regime, is unstable under finite perturbations. In particular, if we perturb a steady state along the downsloping section, then the cavity evolves quickly towards the corresponding point with a similar value of
$\tau _b/N$ along the upsloping part.
We have compared our method with those from Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007) and Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). When computing the points along the steady sliding law in figure 4 with our method, the number of time steps required to converge to a steady state can become very large (of order 1000) in the highly cavitated stages along the downsloping region of the curve. This is due to very-small-scale oscillations that travel across the cavity but have a significant effect on the calculated values of
$\tau _b$ due to the stress singularity at the reattachment point. Contrastingly, when using the method from Gagliardini et al. (Reference Gagliardini, Cohen, Raback and Zwinger2007), these oscillations seem to dampen and the method can converge in about 100 iterations for highly cavitated states. We speculate that this is due to the use of a numerical stabilisation in Elmer when solving the advection equation; see (11) in Gagliardini & Zwinger (Reference Gagliardini and Zwinger2008). Despite this difference in computational times, we find that the basal stress computations carried out with our method appear to be more accurate due to the exact enforcement of discrete contact conditions (see figure 3 and compare with Gagliardini et al. Reference Gagliardini, Cohen, Raback and Zwinger2007, figure 1).
We also attempted to solve the subglacial cavity problem with the numerical method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). Although this method is suitable for solving the grounding line and subglacial lake problems presented in that reference, we found that it was not able to evolve the cavity correctly. This method solves the variational inequality via a penalty method, in which the constraint
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} \leq 0$ in (2.11) is enforced pointwise at the discrete level on the attached region via a penalisation term. However, due to the discretisation of the advection equation used in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021), enforcing this condition does not guarantee that the term
$\boldsymbol {u} \boldsymbol {\cdot } (\partial \theta /\partial x, -1 )$ is exactly zero where
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} = 0$ at the discrete level. Moreover, according to our computations, when applying this penalty method to the subglacial cavity problem, the computed values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ along the attached region appear to be much less accurate than when using the method presented here, as shown in Appendix A.1. We also remark that the method in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) does not include any stabilisation of the advection equation. As demonstrated in Appendix A.2, without stabilisation, numerical oscillations appear along the cavity roof after some time steps. For these reasons, we expect that the numerical method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) should be modified for the subglacial cavity problem.
In the numerical method introduced in this paper, we are essentially solving a Stokes variational inequality by enforcing the average values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ to be less than or equal to 0 along the attached region. When formulated as a mixed problem, we arrive at system (2.18). However, many other possibilities exist at the discrete level; for example, we could enforce that the projection of
$\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n}$ onto a space of piecewise linear functions along the attached region of the boundary be less than or equal to zero. Alternatively, we could also enforce this constraint to hold for the values of
$\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n}$ at the midpoints of the edges. We are currently exploring these different discretisations in combination with different time stepping schemes for the advection equation (2.10). We believe that suitable combinations of these methods could yield further improvements in terms of the speed and robustness of the algorithm. We are also exploring extensions of this method to three-dimensional problems; in particular, generalising the scheme for the advection equation is not obvious and requires further consideration.
Acknowledgements
We acknowledge helpful discussions with O. Gagliardini and A. Stubblefield.
Funding
This work was supported by the Engineering and Physical Sciences Research Council (P.E.F., grant nos EP/V001493/1 and EP/R029423/1). G.G.d.D. was supported by a University of Oxford Mathematical Institute Graduate Scholarship.
Data availability statement
The code for the viscous contact solver presented in Algorithm 1 is openly available in the archived repository de Diego (Reference de Diego2021) and in https://bitbucket.org/gonzalogddiego/subglacialcavitysolver_2021/src/master/. The solver is implemented in Firedrake Rathgeber et al. (Reference Rathgeber, Ham, Mitchell, Lange, Luporini, McRae, Bercea, Markall and Kelly2016), using the version available at zenodo/Firedrake-20211103.0 (2021).
Declaration of interests
The authors report no conflict of interest.
Appendix A. Additional numerical tests
A.1. Comparison with a penalty method
The method introduced in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) solves the variational inequality (2.12) by penalising the values of
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n}$ that are positive on
$\varGamma _a$. When enforcing the Neumann boundary condition (2.9), this is achieved by solving the variational equality
where
$\delta > 0$ is the penalty parameter. The finite element method in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) solves (A1) with Taylor–Hood elements. As
$\delta \to 0$, the penalty term
$\int _{\varGamma _a} (\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} + |\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n}|) (\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n})\,\mathrm {d} s$ also tends to 0, which means that the contact condition
$\boldsymbol {u}\boldsymbol {\cdot } \boldsymbol {n}\leq 0$ is enforced on
$\varGamma _a$. We remark that in the limit
$\delta \to 0$, this method is equivalent to a Lagrange multiplier method in which the discrete contact boundary conditions set
$(\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n})(\boldsymbol {x})\leq 0$ for all
$\boldsymbol {x}\in \varGamma _a$, as opposed to forcing the average values of
$\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n}$ to be non-positive as we do in our method.
Additionally, in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021), the advection equation (2.10a) is solved explicitly with
where
$(u_i,v_i)$ are the values of
$\boldsymbol {u}_h$ at the vertices in
$\varGamma _a$, and
$\partial \theta _h^{k}/\partial x$ is the projection of the (distributional) derivative of
$\theta _h$ onto the space of piecewise linear functions on
$\varGamma _a$.
In § 2.2.2, we explain the need for a compatibility between the discrete contact boundary conditions and the discretisation of the advection equation (2.10a) in order to have a robust numerical method for viscous contact problems. One might expect that solving (A1) directly should make the design of a compatible discretisation of the advection equation simpler, because we are enforcing
$\boldsymbol {u}\boldsymbol {\cdot } \boldsymbol {n}\leq 0$ on
$\varGamma _a$ in a pointwise manner at the discrete level. However, our numerical tests on the subglacial cavity problem indicate that this is not the case. This appears to be because the discretisation of the advection equation in (A2) is not compatible with the discrete contact boundary conditions in the sense that
$\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n}(\boldsymbol {x}) = 0$ for all
$\boldsymbol {x}\in \varGamma _a$ does not necessary imply that
on a vertex
$(x_i,\theta _i)\in \varGamma _a$. Moreover, the values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ computed with the penalty method appear to be less accurate then the corresponding values computed with the method presented in this work. Due to this lack of accuracy, we no longer have a clear distinction between regions that detach (
$\boldsymbol {u}\boldsymbol {\cdot }\boldsymbol {n} < 0$) and those that stay attached (
$\boldsymbol {u}\boldsymbol {\cdot } \boldsymbol {n} = 0$).
This latter issue is illustrated in figure 8. In this test, we evolve the cavity by solving the variational inequality equipped with the Dirichlet boundary conditions (2.8) with the penalty method described above with
$r = 0.08$ over a mesh with 16 elements along the lower boundary. We set
$N = 1$,
$u_i = 1$,
${\rm \Delta} t = 0.01$,
$n = 1$,
$A = 0.5$ and
$\delta = 10^{-6}$ in (2.1a). Additionally, in order to avoid detachment, we increase the tolerance in (2.29) to
$\mathrm {tol} = 10^{-3}$. In figures 8(a–d) we present the evolution of the cavity from a fully attached state when computed by our implementation of the method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). Our numerical results show that by
$t = 0.5$, the cavity shape is deforming excessively. In figures 8(e) and 8( f), we also compare the computed values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ in the first time step with the penalty method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) and with our method, respectively. As seen in figure 8(e), we have points where
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n} > 0$ in between points where
$\boldsymbol {u}_h\boldsymbol {\cdot } \boldsymbol {n} = 0$.
(a–d) Evolution of a subglacial cavity with the method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). (e) Values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ at the endpoints and midpoint of each edge computed with the penalty method from Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021) after a single time step. ( f) Average values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ at each edge computed after a single time step with the method presented in this work. We set
$r = 0.08$,
$N = 1$,
$u_i = 1$,
${\rm \Delta} t = 0.01$,
$n = 1$ and
$A = 0.5$.

We have carried out further computations with more refined meshes, and these indicate that the lack of accuracy in
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ persists when using the penalty method. We would like to emphasise that this numerical issue does not arise when solving the problems presented in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021). It must therefore be due to some particularity of the subglacial cavity problem.
A.2. On the use of upwinding when solving the advection equation
In § 2.2.2, we state that the advection equation (2.10a) should be stabilised with e.g. an upwinding method. Since no stabilisation is required for the numerical tests solved in Stubblefield et al. (Reference Stubblefield, Spiegelman and Creyts2021), here we demonstrate that without upwinding, the subglacial cavity problem quickly becomes unstable.
In order to show this, we solve the same problem as in Appendix A.1 with a new method that is identical to the one presented in this paper except for the fact that the advection equation is discretised as
\begin{equation} \frac{\theta_i^{k+1} - \theta_i^{k}}{{\rm \Delta} t} = \left( \left(\frac{\theta^{k}_i - \theta^{k}_{i-1}}{x_i - x_{i-1}}\right)^{2} + 1 \right)^{1/2} \left( \frac{u^{k}_{n,i} + u^{k}_{n,i+1}}{2} \right) \end{equation}
instead of (2.28). That is, instead of taking the average values of
$\boldsymbol {u}_h\boldsymbol {\cdot }\boldsymbol {n}$ along the edge immediately upstream of each node, the average of the edges upstream and downstream is taken. In this way, we still have compatibility with the discrete boundary conditions but no upwinding. In figure 9, we can see the evolution of the cavity with and without upwinding. Clearly, oscillations arise in the cavity roof at
$t = 1$ when no upwinding is used.
Evolution of the cavity roof (a–d) with upwinding, and (e–h) without upwinding. For this numerical test, we set
$r = 0.08$,
$N = 1$,
$u_i = 1$,
${\rm \Delta} t = 0.05$,
$n = 1$ and
$A = 0.5$.

Appendix B. Linearised solution
For a Newtonian flow (
$n = 1$) and small-amplitude topography, the theory of Fowler (Reference Fowler1986) and Schoof (Reference Schoof2005) can be used to find solutions with which the numerical calculations can be compared. The method involves linearisation of the boundary conditions and use of complex variables to solve a Riemann–Hilbert problem for the velocities and stresses. We summarise the result for the particular case when
$b = r L \cos (2{\rm \pi} x/L)$.
It is convenient to parameterise the solution in terms of the scaled cavity endpoints
$c$ and
$d$, such that the cavity occupies the region
$d<\hat {x}< c+1$, where
$\hat {x} = x/L$. The velocity is
$\boldsymbol {u} = (u,v)$ with
$u \approx u_b$, and on the cavitated region, the vertical velocity
$v$ satisfies
\begin{align} \frac{\partial v}{\partial x} &={-}\frac{4{\rm \pi}^{2} r u_b}{L} \cos\left( \frac{2{\rm \pi} x}{L}\right) + \frac{4{\rm \pi}^{2} r u_b}{L} \left| \frac{\sin{\rm \pi}(d-\hat{x})}{\sin{\rm \pi}(\hat{x}-c)}\right|^{1/2} \nonumber\\ &\quad \times\left[\cos {\rm \pi}\left(2\hat{x}+\frac{1}{2}(d-c)\right) -\sin{\rm \pi}(c+d)\sin\frac{\rm \pi}{2}(d-c) \right]. \end{align}
The linearised steady kinematic condition for the cavity roof is
$u_b ({\partial \theta }/{\partial x}) = v$, and integrating this subject to the condition that
$\theta = b$ at the cavity endpoints provides a constraint between
$c$ and
$d$. In addition,
$c$ and
$d$ are related to the effective pressure by
Thus for given values of
$N$ and
$u_b$, these two constraints determine the endpoints
$c$ and
$d$. Further, the normal stress on the contact region
$c < \hat {x} < d$ is given by
\begin{align} \sigma_{nn} +p_w &={-} \frac{8{\rm \pi}^{2} r \eta u_b}{L} \left| \frac{\sin{\rm \pi}(d-\hat{x})}{\sin{\rm \pi}(\hat{x}-c)}\right|^{1/2} \nonumber\\ &\quad \times\left[\cos{\rm \pi}\left(2\hat{x}+\frac{1}{2}(d-c)\right) -\sin{\rm \pi}(c+d)\sin\frac{\rm \pi}{2}(d-c) \right], \end{align}and the integral in (3.1) then gives the basal shear stress as
\begin{align} \tau_b &= \frac{{\rm \pi}^{3} r^{2} \eta u_b}{L} [5 - \sin 2{\rm \pi}(c+d) \sin 2{\rm \pi}(d-c)- \cos 2{\rm \pi}(d-c)-4\cos{\rm \pi}(d-c) \nonumber\\ &\quad -\cos{\rm \pi}(3c+d)+\cos{\rm \pi}(c+3d)]. \end{align}
This cavitated solution requires
$N < 8 {\rm \pi}^{2} r \eta u_b/L$. Otherwise, there is no cavity and we have
$\tau _b = 8{\rm \pi} ^{3} r^{2} \eta u_b/L$.




































































