View on GitHub
Download this project as a .zip file Download this project as a tar.gz file
redbKIT
a MATLAB library for reduced-order modeling of PDEs

Essential boundary conditions

We describe here the way essential (also called Dirichlet) boundary conditions are imposed in the redbKIT library.

Poisson problem

For the sake of simplicity, we restrict the discussion to the following Poisson problem:

Its weak formulation reads: find such that

Finite element approximation

We seek an approximate solution to \eqref{eq:LaplWeak} in a discrete space $X_h \subset H^1(\Omega)$ of dimension $N$ made of Lagrange finite elements. We denote by ${\phi_1, \dots, \phi_N}$ the nodal basis of $X_h$ and by the associated nodes. We assume without loss of generality that the nodes located at the boundary are so that

Finally, we introduce the Lagrange interpolant of the essential data $g$, i.e.

The finite element approximation reads:

find $ u_h \in V_h = \{ v_h \in X_h : v_h|_{\Gamma} = g_h\} $ such that $$ \begin{equation} a(u_h,v_h) = F(v_h) \qquad \forall v \in V_{0h}. \label{eq:LaplWeakFE} \end{equation} $$

Algebraic formulation

At the algebraic level, we obtain the following linear system

where $\AA \in \R^{N \times N}$ is the stiffness matrix, $\mathbf{f} \in \R^{N}$ is a vector encoding the action of the forcing term, $\bu \in \R^{N}$ is the vector of FE degrees of freedom (dofs), i.e.

To distinguish the interior degrees of freedom from those associated with Dirichlet data, we denote by

the vector of unknowns split in two subvectors, the one ($\bu_\Gamma$) related with the nodes lying on the boundary $\Gamma$, and that ($\bu_I$) related with the internal nodes. At the algebraic level, problem \eqref{eq:LaplWeakFE} reads

where for $1 \leq i \leq N_{\Gamma}$.

As the subsytem associated with the Dirichlet dofs is trivial ($\bu_{\Gamma} = \mathbf{g}$), it is natural to eliminate the essential dofs $\bu_{\Gamma}$, yielding

The resulting linear system enjoys the following remarkable properties:

  • if $\AA$ is symmetric, then also $\AA_{II}$ is symmetric;
  • it has minimal size $N-N_{\Gamma}$, since only internal dofs are unknowns;
  • $\AA$ and $\AA_{II}$ have different sparsity pattern.

Extension to nonlinear problems

We now consider the case of nonlinear PDEs, whose finite element approximation results in a nonlinear system of equations

If such a system is solved by means of Newton’s method, at each iteration we are required to solve a linear system of the form

and then set $\bu^{k+1} = \bu^k + \delta \bu$. In this case we impose essential boundary conditions as follows:

we first set $$ \bu^{0} = \begin{pmatrix} \mathbf{g} \\[2pt] \bu^0_{I} \end{pmatrix}; $$ then, for $k=0,1,\dots$ until convergence, we solve $$ \JJ_{II}(\bu^{k}) \, \delta \bu_I = - \RR_I(\bu^k), $$ and update $\bu^{k+1}$ as follows $$ \bu^{k+1} = \bu^k + \begin{pmatrix} \mathbf{0} \\[2pt] \delta \bu_I \end{pmatrix}. $$

References

  • Ern, Alexandre, and Jean-Luc Guermond. Theory and practice of finite elements. Vol. 159. Springer Science & Business Media, 2013.