Weak Form and Finite Element Formulation

Learning objectives

By the end of this lesson, you should be able to:

  • Write the weak forms for displacement and damage in phase-field fracture.
  • Identify trial functions, test functions, and finite element spaces.
  • Understand how boundary conditions enter the finite element equations.
  • Translate the formulation into implementation-ready residual notation.

1. Starting point

A common brittle phase-field fracture energy is

\[ \Pi_\ell(u,d) = \int_\Omega g(d)\psi_e(\varepsilon(u))\,d\Omega + \int_\Omega G_c\left(\frac{d^2}{2\ell}+\frac{\ell}{2}|\nabla d|^2\right)d\Omega - W_{\text{ext}}(u). \]

The unknowns are:

  • displacement \(u\),
  • damage field \(d\in[0,1]\).

A common degradation function is

\[ g(d)=(1-d)^2+k, \]

where \(k\ll1\) is a residual stiffness used to avoid singular stiffness matrices in fully damaged regions.


2. Function spaces

For a body \(\Omega\subset\mathbb{R}^m\), choose

\[ u_h\in \mathcal{U}_h,\qquad d_h\in\mathcal{D}_h, \]

with test functions

\[ v_h\in\mathcal{V}_h,\qquad q_h\in\mathcal{Q}_h. \]

Typical choices are:

displacement: vector CG1 or CG2
damage:       scalar CG1

If \(u=\bar u\) is prescribed on \(\Gamma_D\), then the displacement test function satisfies \(v=0\) on \(\Gamma_D\).


3. Kinematics and stress

For small strain,

\[ \varepsilon(u)=\frac12(\nabla u+\nabla u^T). \]

For isotropic linear elasticity,

\[ \psi_e(\varepsilon)=\frac12\lambda(\operatorname{tr}\varepsilon)^2+\mu\varepsilon:\varepsilon, \]

and

\[ \sigma_0(u)=\lambda\operatorname{tr}(\varepsilon(u))I+2\mu\varepsilon(u). \]

With isotropic degradation,

\[ \sigma(u,d)=g(d)\sigma_0(u). \]

4. Weak form for displacement

Assume external work

\[ W_{\text{ext}}(u)=\int_\Omega b\cdot u\,d\Omega+ \int_{\Gamma_N}\bar t\cdot u\,dS. \]

The displacement weak form is

\[ \int_\Omega \sigma(u,d):\varepsilon(v)\,d\Omega = \int_\Omega b\cdot v\,d\Omega+ \int_{\Gamma_N}\bar t\cdot v\,dS. \]

Equivalently, define the residual

\[ R_u(u,d;v)= \int_\Omega \sigma(u,d):\varepsilon(v)\,d\Omega - \int_\Omega b\cdot v\,d\Omega - \int_{\Gamma_N}\bar t\cdot v\,dS. \]

The finite element problem is

\[ R_u(u,d;v)=0\qquad \forall v. \]

5. Weak form for damage

Taking variation with respect to \(d\) gives

\[ \int_\Omega g'(d)\psi_e(\varepsilon(u))q\,d\Omega + \int_\Omega G_c\left(\frac{d}{\ell}q+ \ell\nabla d\cdot\nabla q\right)d\Omega=0. \]

So the damage residual is

\[ R_d(u,d;q)= \int_\Omega g'(d)\psi_e(\varepsilon(u))q\,d\Omega + \int_\Omega G_c\left(\frac{d}{\ell}q+ \ell\nabla d\cdot\nabla q\right)d\Omega. \]

The damage problem is

\[ R_d(u,d;q)=0\qquad \forall q. \]

For \(g(d)=(1-d)^2+k\),

\[ g'(d)=-2(1-d). \]

6. Damage strong form and natural boundary condition

The damage weak form corresponds to

\[ g'(d)\psi_e+G_c\left(\frac{d}{\ell}-\ell\Delta d\right)=0 \qquad\text{in }\Omega. \]

The natural damage boundary condition is

\[ \nabla d\cdot n=0\qquad\text{on }\partial\Omega. \]

In FEM, this natural condition is automatically applied if no essential damage boundary condition is prescribed.


7. Tension-compression split

Degrading the full elastic energy may create damage under compression. To avoid this, many models split the energy:

\[ \psi_e=\psi_e^+ + \psi_e^-. \]

Only the tensile part is degraded:

\[ \psi_e(\varepsilon,d)=g(d)\psi_e^+(\varepsilon)+\psi_e^-(\varepsilon). \]

Then the damage residual becomes

\[ R_d(u,d;q)= \int_\Omega g'(d)\psi_e^+(\varepsilon(u))q\,d\Omega + \int_\Omega G_c\left(\frac{d}{\ell}q+ \ell\nabla d\cdot\nabla q\right)d\Omega. \]

8. Implementation-ready structure

In a finite element code, the core ingredients are:

def eps(u):
    return sym(grad(u))

def psi_e(u):
    return 0.5*lmbda*tr(eps(u))**2 + mu*inner(eps(u), eps(u))

def g(d):
    return (1-d)**2 + k

def sigma(u,d):
    return g(d)*(lmbda*tr(eps(u))*I + 2*mu*eps(u))

Ru = inner(sigma(u,d), eps(v))*dx - dot(b,v)*dx - dot(tbar,v)*ds

Rd = g_prime(d)*psi_e(u)*q*dx \
     + Gc*(d*q/ell + ell*dot(grad(d),grad(q)))*dx

This residual form is the bridge between the variational theory and the finite element implementation.