Algorithm Search⌘K

Techniqueadvanced

Nitsche's method

Also called Nitsche method.

Imposes Dirichlet conditions weakly by consistency and penalty terms on the boundary, keeping optimal convergence without a conforming space.

Nitsche's method imposes a Dirichlet condition u=gu = g on the boundary weakly: the finite element space does not satisfy the condition, and the variational form gets boundary terms that make the discrete solution satisfy it approximately. Unlike the plain penalty method, the added terms keep the form consistent, so the exact solution satisfies the discrete equations, and the method keeps the optimal order of convergence with a penalty parameter of fixed size. Unlike a Lagrange multiplier, it adds no unknowns and the matrix stays symmetric positive definite, provided the penalty parameter is larger than a constant from an inverse inequality. It is the standard way to impose boundary and interface conditions on meshes that do not fit the boundary, on spline spaces, and between the elements of a discontinuous Galerkin method.

In plain words

A finite element program usually forces the boundary values directly into the unknowns. That is easy when there are mesh nodes on the boundary, and hard when the boundary cuts through elements or when the shape functions do not take the boundary values at nodes. Nitsche's method leaves the boundary values free and adds a few terms on the boundary to the equations. One term pulls the solution toward the given boundary values, like a spring. The other terms correct for the fact that the boundary values are not exact, so the method stays as accurate as with forced values. The spring must be stiff enough, with a strength that depends on the mesh size and on the polynomial degree.

When it applies

  • A second-order elliptic problem, or a system such as elasticity or Stokes flow, with Dirichlet conditions on all or part of the boundary.
  • The finite element space cannot satisfy the condition easily: cut and unfitted meshes, isogeometric spline spaces, enriched spaces and meshless shape functions.
  • Interface conditions between subdomains with nonmatching meshes, between patches of a spline model, or across a material interface inside an element.
  • The interior faces of a discontinuous Galerkin method, where the same terms give the symmetric interior penalty method.
  • A constant CIC_I in the inverse inequality below must be known or estimated. When small cut cells make CIC_I large, extra stabilization is needed.

The template

Notation. The model problem is −Δu=f-\Delta u = f in Ω\Omega and u=gu = g on ∂Ω\partial\Omega, with outward unit normal nn and ∂nu=∇u⋅n\partial_nu = \nabla u\cdot n. Vh⊂H1(Ω)V_h \subset H^1(\Omega) is a finite element space with no boundary constraint, hFh_F is the size of the element at the boundary face FF, γ>0\gamma > 0 is the penalty parameter, and ⟨⋅,⋅⟩\langle\cdot, \cdot\rangle is the L2L^2 inner product on ∂Ω\partial\Omega. The method finds uh∈Vhu_h \in V_h with ah(uh,v)=ℓh(v)a_h(u_h, v) = \ell_h(v) for all v∈Vhv \in V_h, where

ah(u,v)=(∇u,∇v)−⟨∂nu,v⟩−⟨∂nv,u⟩+⟨γhu,v⟩,ℓh(v)=(f,v)−⟨∂nv,g⟩+⟨γhg,v⟩.a_h(u, v) = (\nabla u, \nabla v) - \langle\partial_nu, v\rangle - \langle\partial_nv, u\rangle + \langle\tfrac{\gamma}{h}u, v\rangle, \qquad \ell_h(v) = (f, v) - \langle\partial_nv, g\rangle + \langle\tfrac{\gamma}{h}g, v\rangle.
  1. NITSCHE(f, g, mesh, γ)
  2. 1choose a space V_h with no boundary constraint ▷ hole: fitted, cut or spline space
  3. 2A[i, j] ← (∇φ_j, ∇φ_i) and F[i] ← (f, φ_i) ▷ hole: quadrature for the integrals
  4. 3for each boundary face F with size h_F do
  5. 4A[i, j] ← A[i, j] - ⟨∂_n φ_j, φ_i⟩_F - ⟨∂_n φ_i, φ_j⟩_F + (γ/h_F) ⟨φ_j, φ_i⟩_F
  6. 5F[i] ← F[i] - ⟨∂_n φ_i, g⟩_F + (γ/h_F) ⟨g, φ_i⟩_F ▷ hole: γ from the inverse inequality
  7. 6solve A U = F ▷ A is symmetric positive definite for γ > C_I²
  8. 7return u_h = Σ_j U[j] φ_j

Consistency (theorem). If uu is smooth and solves the problem, then ah(u,v)=ℓh(v)a_h(u, v) = \ell_h(v) for all v∈Vhv \in V_h. Integration by parts gives (∇u,∇v)−⟨∂nu,v⟩=(f,v)(\nabla u, \nabla v) - \langle\partial_nu, v\rangle = (f, v), and the two other terms are equal on both sides because u=gu = g on ∂Ω\partial\Omega. So the error u−uhu - u_h is orthogonal to VhV_h in the form aha_h, as in the Galerkin method.

Coercivity (theorem). Assume the inverse inequality ∥h1/2∂nv∥∂Ω≤CI∥∇v∥Ω\|h^{1/2}\partial_nv\|_{\partial\Omega} \le C_I\|\nabla v\|_\Omega for all v∈Vhv \in V_h. By the Cauchy-Schwarz and Young inequalities, 2∣⟨∂nv,v⟩∣≤δ∥∇v∥2+(CI2/δ)∥h−1/2v∥∂Ω22|\langle\partial_nv, v\rangle| \le \delta\|\nabla v\|^2 + (C_I^2/\delta)\|h^{-1/2}v\|_{\partial\Omega}^2 for every δ>0\delta > 0, so

ah(v,v)≥(1−δ)∥∇v∥2+(γ−CI2δ)∥h−1/2v∥∂Ω2.a_h(v, v) \ge (1 - \delta)\|\nabla v\|^2 + \Bigl(\gamma - \frac{C_I^2}{\delta}\Bigr)\|h^{-1/2}v\|_{\partial\Omega}^2.

If γ>CI2\gamma > C_I^2, any δ\delta with CI2/γ<δ<1C_I^2/\gamma < \delta < 1 makes both coefficients positive. With consistency this gives the error bounds ∥∇(u−uh)∥+∥h−1/2(u−uh)∥∂Ω≤Chk∣u∣Hk+1\|\nabla(u - u_h)\| + \|h^{-1/2}(u - u_h)\|_{\partial\Omega} \le Ch^k|u|_{H^{k+1}} for elements of degree kk, and ∥u−uh∥≤Chk+1∣u∣Hk+1\|u - u_h\| \le Ch^{k+1}|u|_{H^{k+1}} on a convex domain (theorem, Nitsche 1971). For piecewise polynomials of degree kk, CI2C_I^2 grows like k2k^2, so γ\gamma is usually chosen as a fixed multiple of k2k^2 (heuristic).

The threshold in 1D, by hand. Take linear elements on a mesh of size hh and a function vv with v(0)=av(0) = a and v(h)=bv(h) = b. On the first element v′=(b−a)/hv' = (b - a)/h, ∂nv(0)=−v′(0)\partial_nv(0) = -v'(0), and the boundary part of ah(v,v)a_h(v, v) plus the energy of the first element is

h v′2+2v′(0)v(0)+γha2=1h[(b−a)2+2(b−a)a+γa2]=1h[b2+(γ−1)a2].h\,v'^2 + 2v'(0)v(0) + \frac{\gamma}{h}a^2 = \frac{1}{h}\bigl[(b - a)^2 + 2(b - a)a + \gamma a^2\bigr] = \frac{1}{h}\bigl[b^2 + (\gamma - 1)a^2\bigr].

So CI=1C_I = 1 here, and the bound γ>1\gamma > 1 is sharp: for γ=1\gamma = 1 the hat function at x=0x = 0 has ah(v,v)=0a_h(v, v) = 0, and for γ<1\gamma < 1 it has ah(v,v)=(γ−1)/h<0a_h(v, v) = (\gamma - 1)/h < 0.

A full example, by hand. Solve −u′′=2-u'' = 2 on (0,1)(0, 1) with u(0)=0u(0) = 0 imposed by Nitsche's method and u(1)=0u(1) = 0 imposed strongly, on 2 elements of size h=1/2h = 1/2. The exact solution is u=x(1−x)u = x(1 - x). The unknowns are u0=uh(0)u_0 = u_h(0) and u1=uh(1/2)u_1 = u_h(1/2). The stiffness matrix is (2−2−24)\begin{pmatrix} 2 & -2 \\ -2 & 4\end{pmatrix}, the consistency terms add (−4220)\begin{pmatrix} -4 & 2 \\ 2 & 0\end{pmatrix} and the penalty adds 2γ2\gamma to the first entry, so

(2γ−2004)(u0u1)=(1/21),u0=14(γ−1),u1=14.\begin{pmatrix} 2\gamma - 2 & 0 \\ 0 & 4\end{pmatrix}\begin{pmatrix} u_0 \\ u_1\end{pmatrix} = \begin{pmatrix} 1/2 \\ 1\end{pmatrix}, \qquad u_0 = \frac{1}{4(\gamma - 1)}, \quad u_1 = \frac14.

The value u1u_1 is exact, and the boundary value u0u_0 goes to 00 as γ\gamma grows. For γ=10\gamma = 10, u0=1/36u_0 = 1/36.

Refinement (measurement). On m=2,4,8,16,32m = 2, 4, 8, 16, 32 elements, computed exactly in rational arithmetic, the boundary value is uh(0)=h2/(γ−1)u_h(0) = h^2/(\gamma - 1) for γ=2,10,100\gamma = 2, 10, 100, and it is the largest nodal error in each case. So the boundary condition holds to O(h2)O(h^2), the same order as the nodal error of the interior, for every fixed γ>1\gamma > 1.

Classic examples

  • Symmetric interior penalty Galerkin. Nitsche's terms on every interior face, with the jump of uhu_h in place of uh−gu_h - g, couple the discontinuous elements.
  • Cut finite element method. The boundary cuts through the elements of a fixed background mesh, and Nitsche's terms impose the condition on the cut part of each element.
  • Unfitted interface problems (Hansbo and Hansbo 2002). The solution is doubled on the cut elements, and Nitsche's terms impose the continuity of the solution and of the flux across the interface.
  • Isogeometric analysis. Spline basis functions do not interpolate the boundary values, and the patches of a model may not match, so both the boundary conditions and the patch coupling use Nitsche's terms.
  • Extended finite element method. Conditions on cracks and interfaces that are not mesh lines.
  • Comparison with the penalty method. The penalty method keeps only ⟨γhu,v⟩\langle\frac{\gamma}{h}u, v\rangle and is not consistent, so its error has a term of order 1/γ1/\gamma, and γ\gamma must grow as h→0h \to 0, which hurts the condition number.
  • Comparison with a Lagrange multiplier. A multiplier on the boundary needs a pair of spaces with an inf-sup bound. Stenberg (1995) showed that a stabilized multiplier method gives Nitsche's method after the multiplier is eliminated, with −∂nuh-\partial_nu_h as the discrete multiplier.

Variations

  • Nonsymmetric Nitsche. Change the sign of ⟨∂nv,u⟩\langle\partial_nv, u\rangle and of ⟨∂nv,g⟩\langle\partial_nv, g\rangle. Then ah(v,v)=∥∇v∥2+γ∥h−1/2v∥∂Ω2a_h(v, v) = \|\nabla v\|^2 + \gamma\|h^{-1/2}v\|_{\partial\Omega}^2, which is coercive for every γ>0\gamma > 0 (theorem), at the cost of a nonsymmetric matrix. The duality argument for the L2L^2 estimate needs the symmetric form, so the L2L^2 bound of the nonsymmetric version is weaker.
  • Robin and general conditions (Juntunen and Stenberg 2009). For ϵ∂nu+u=g\epsilon\partial_nu + u = g, a modified penalty gives a method that is uniformly accurate from the Neumann limit to the Dirichlet limit.
  • Variable coefficients. For −∇⋅(κ∇u)=f-\nabla\cdot(\kappa\nabla u) = f the terms use κ∂nu\kappa\partial_nu, and γ\gamma is scaled with κ\kappa on the face.
  • Elasticity and contact. The same construction with the traction σ(u)n\sigma(u)n in place of ∂nu\partial_nu, and nonlinear forms of it for frictionless and frictional contact.
  • Ghost penalty. On cut meshes, terms that penalize the jumps of derivatives across faces near the boundary make CIC_I independent of how the boundary cuts the elements.

Pitfalls

  • Penalty too small. For γ≤CI2\gamma \le C_I^2 the matrix can be singular or indefinite, as the 1D threshold shows. A wrong estimate of CIC_I gives a method that works on one mesh and fails on another.
  • Penalty too large. The boundary condition is then imposed almost strongly, and the condition number grows like γ\gamma. Keep γ\gamma a moderate multiple of the bound, for example a factor of 2 to 10 above it (heuristic).
  • Small cut cells. If the boundary cuts off a tiny part of an element, ∥h1/2∂nv∥\|h^{1/2}\partial_nv\| on that part is not controlled by ∥∇v∥\|\nabla v\| on the same part, and CIC_I is unbounded. Use a ghost penalty or merge small cells with their neighbors.
  • Missing load terms. The terms −⟨∂nv,g⟩-\langle\partial_nv, g\rangle and ⟨γhg,v⟩\langle\frac{\gamma}{h}g, v\rangle in ℓh\ell_h are needed for consistency when g≠0g \ne 0. Without the first one the method loses its order.
  • Normal and sign errors. The normal must be the outward normal of the domain, and on interfaces each side must use the same normal for the jump and the average.
  • Higher degree. The constant CI2C_I^2 grows like k2k^2, so a γ\gamma that works for linear elements can fail for degree k≥2k \ge 2.

Exercises

  1. Show that the exact solution of −Δu=f-\Delta u = f, u=gu = g satisfies ah(u,v)=ℓh(v)a_h(u, v) = \ell_h(v) for every v∈Vhv \in V_h, and say which step fails for the penalty method.
  2. In the 2-element example, compute uh(0)u_h(0) for the penalty method with the same γ\gamma, that is with the consistency terms removed, and compare it with 1/(4(γ−1))1/(4(\gamma - 1)).
  3. Prove that the nonsymmetric version is coercive for every γ>0\gamma > 0, and compute u0u_0 and u1u_1 for it in the 2-element example with γ=1\gamma = 1.
  4. For linear elements in 1D, show that the inverse inequality holds with CI=1C_I = 1, and for quadratic elements find the best CIC_I on one element.

References

  1. J. Nitsche, Über ein Variationsprinzip zur Lösung von Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen Randbedingungen unterworfen sind, Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg 36(1) (1971) 9-15, the modified variational form with the consistency terms and the penalty term on the boundary, and the error estimates in the energy and L2 norms
  2. Rolf Stenberg, On some techniques for approximating boundary conditions in the finite element method, Journal of Computational and Applied Mathematics 63(1-3) (1995) 139-148, the derivation of Nitsche's method from a stabilized Lagrange multiplier method by eliminating the multiplier
  3. Mika Juntunen and Rolf Stenberg, Nitsche's method for general boundary conditions, Mathematics of Computation 78(267) (2009) 1353-1374, the extension to Robin conditions that is uniform from the Neumann limit to the Dirichlet limit
  4. Anita Hansbo and Peter Hansbo, An unfitted finite element method, based on Nitsche's method, for elliptic interface problems, Computer Methods in Applied Mechanics and Engineering 191(47-48) (2002) 5537-5552, the use of Nitsche terms on an interface that cuts through the elements of a fixed mesh

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises