Variational Functionals and Weak Formulations

Elliptic Partial Differential Equations

As a model problem for an elliptic partial differential equation we consider the so called Poisson problem with Robin boundary conditions where we seek for a solution \(u \in C^2(\Omega)\cap C^1(\bar{\Omega})\) such that \[ -\Delta u = f \text{ in $\Omega$}, \quad n^T\nabla u = \alpha(u_D -u)\text{ on $\partial\Omega$}. \] Note that the Robin boundary conditions above are equivalent to the more abstract form \(n^T\nabla u + \alpha u = \beta \) with \(\beta=\alpha u_D\).

Weak Formulations

In a partial differential equation of second order, i.e., the above Poisson equation, the solutions must be twice differentiable functions \(u \in C^2(\Omega)\cap C^1(\bar{\Omega})\). In many situations of pratical interest however, such smooth solutions does not exist. In order to reduce the smoothness requirement, the concept of a weak solution was introduced. To find such a solution, one first need to derive the weak formulation of a partial differential equation. This is usually done by carrying out the following steps:

1. Multiply the PDE by a test function \(v \in V\) from a reasonable space \(V\).
2. Integrate the equation over the domain \(\Omega\).
3. Apply partial integration, i.e. the theorm of Gauss.
4. Substitute the boudnary conditions.

For the above Poisson equation we derive its weak formulation as follows. We first multiply the PDE by a test function \(v\in H^1(\Omega)\), integrate over the domain \( \Omega\) and get \[ \int_{\Omega}(\Delta u )v \,dx = \int_{\Omega} f v \, dx. \] By partially integrating the left hand side we then obtain \[ \int_{\Omega}\nabla u \cdot \nabla v \,dx -\int_{\partial \Omega} ( n^T\nabla u ) v \,ds = \int_{\Omega} f v \, dx \] where the dot \(\cdot\) between the gradients of \(u\) and \(v\) denotes the Euclidean inner product. Note that this equation does not contain a second derivative of \(u\) anymore.

Inserting the Robin boundary conditions yields \[ \int_{\Omega}\nabla u \cdot \nabla v \,dx + \alpha \int_{\partial \Omega} u \, v \,ds = \int_{\Omega} f v \, dx + \alpha \int_{\partial \Omega} u_D v \, ds. \]

We define the symmetric bilinearform \(a:H^1(\Omega)\times H^1(\Omega)\rightarrow \mathbb R \) and the linear functional \(b:H^1(\Omega)\rightarrow \mathbb R \), \[ a(u,v) = \int_{\Omega}\nabla u \cdot \nabla v \,dx + \alpha \int_{\partial \Omega} u \, v \,ds \qquad \text{and} \qquad \langle b,v \rangle = \int_{\Omega} f v \, dx + \alpha \int_{\partial \Omega} u_D v \, ds, \]

such that we can write the weak formulation in a compact way:

We seek for a weak solution \(u\in H^1(\Omega)\) such that \[ a(u,v)=\langle b,v \rangle\; \forall v \in H^1(\Omega). \]

Variational Functional

Many elliptic partial differential equations, in particular those describing stable stationary states of physical systems such as heat conduction or solid mechanics, can be reformulated as minimizing its energy. The total energy can be desrcibed by a so called variational functional. Solving the simplest elliptic equation, the above Poisson equation with source term \(f\) and Robin boundary conditions on a domain \(\Omega\subset\mathbb{R}^d\) for example, is equivalent to minimizing the functional, \[ J(u) = \int_\Omega \left( \frac{1}{2} \nabla u\cdot \nabla u - fu \right) \, dx + \int_{\partial\Omega} \frac{\alpha}{2} (u_D-u)^2 \, ds, \]

in the space \( C^2(\Omega)\cap C^1(\bar{\Omega}) \).

This means that we can solve the minimzation problem and get a solution for the Poisson problem with Robin boundary conditions.

Expanding the solution space \( C^2(\Omega)\cap C^1(\bar{\Omega}) \) to the Sobolev space \(H^1(\Omega)\) enables us to use important results about the existence and uniqueness of a solution. For an in-depth treatment, we refer to DeuflhardWeiser2012.

To find such a solution \(u\) we must make sure that it fulfills the following necessary condition,

\(\langle J’(u) , v \rangle = 0 \, \forall v\in H^1(\Omega),\)

where \(\langle J’(u) , v \rangle \) is the directional derivative of \(J\) at \(u\) in the direction of \(v\) and defined as the limit \(\text{lim}_{\,h\rightarrow 0}\frac{J(u+hv)-J(u)}{h}\).

Taking the directional derivatives of \(J\) will lead to the weak formulation above. Solving the minimization problem is therefore also equivalent to solving the weak formulation in \(H^1(\Omega)\).

Solving a PDE in Kaskade 7 is either based on minimizing the variational functional or solving the weak formulation.

In more complex situations, such as solid mechanics, the variable \(u\) can be vectorial, i.e. it contains \(m\) components (for solid mechanics, \(u\) would be the displacement with \(m=d\) components, usually \(d=3\)). In other situations, such as the Stokes system for incompressible viscous flow, there may be several variables \(u_1,\dots,u_n\), each of which can be scalar or vectorial (for Stokes, this would be the vectorial fluid velocity \(u\) and the scalar pressure \(p\)). The general form of a variational functional is then \[ J(u) = \int_\Omega F(x,u_1,\dots, u_n,\nabla u_1, \dots, \nabla u_n) \, dx + \int_{\partial\Omega} G(x,u_1,\dots,u_n) \, ds. \]

For treatment in Kaskade 7, such problems like the Possoin problem are specified by defining the variational functional \(J\), i.e. defining the functions \(F\) and \(G\), and the first and second directional derivatives of \(J\). The second directional can be used for the newton method to find the roots of the first directional derivative of \(J\).
In section Problem Definition: Variational Functionals we describe how this is done in general and you can find a Kaskade 7 implementation for solving the Poisson equation with homogenous Dirichlet boundary conditions in Examples: Poisson’s Equation.


However, not every differential equation yields a variational functional that describes the energy of a physical system. For nonsymmetric problems such as advection-diffusion equations which do not correspond to a functional to be minimized, one derives and solves their weak formulation as described above. Hence, for implementation, we have to distinguish between problems for which a variational formulation or only a weak formulation exists (see section Problem Definition: Variational Functionals).

Boundary Conditions

Kaskade 7 mainly supports Robin boundary conditions.

The most popular boundary conditions are Dirichlet boundary conditions \( u\vert_{\partial\Omega}=u_D \), Neumann boundary conditions \(n^T \nabla u = \beta\) on \(\partial\Omega_N\) and their combination, Robin conditions \( n^T\nabla u = \alpha(u_D -u)\) on \( \partial\Omega \). The latter ones introduce a boundary integral into the variational functional as we have seen before: \[ \int_{\partial\Omega} \frac{\alpha}{2} (u_D-u)^2 \, ds. \] A great benefit of the Robin boundary conditions is that threy treat Dirichlet as well as Neumann boundary conditions.

In the limit \(\alpha\to\infty\), Robin conditions approximate Dirichlet conditions (known as penalty approach) because minimizing the functional \(J\) for \(\alpha\to\infty\) will force the solution \(u\) to be as close to \(u_D\) as possible on \( \partial\Omega\) to make the difference \(|u_D-u|\) small. On the other hand they result in Neumann conditions for \(\alpha\to 0\) and \(\beta=\alpha u_D\). We refer the interested readers to Weiser2016.


Page last modified: 2022-01-11 14:20:01 +0100 CET