Many initial boundary value problems require solving for unknown vector
fields, such as solving for displacements in a mechanical problem.
Discretization of weak forms of such problems leads to higher-order linear
systems which need to be reshaped to be solved by regular linear solvers. There
are also more indices involved than a scalar problem, which can be confusing. In
this post, I’ll try to elucidate the procedure by deriving for a basic
higher-order system and giving an example.
The weak formulation of a linear vectorial problem reads
where $\cbr{u_i}_{i=1}^{\ndim}$ are the components corresponding to the
basis vectors and $\ndim=\dim V$. Here, we chose Cartesian basis vectors for simplicity.
These systems cannot be solved readily with existing software. In order to be
able to solve them with existing software, we need to reshape them by
defining a matrix of matrices
$\BAhat$ and vector of vectors $\Buhat$ and $\Bbhat$:
Beginning with this post, I’ll be publishing about the basics of finite element
formulations, from personal notes that accumulated over the years. This one is
about linear and scalar problems which came to be the “Hello World” for FE.
Details regarding spaces and discretization are omitted for the sake of brevity.
For those who want to delve into theory, I recommend “The Finite Element Method:
Theory, Implementation, and Applications”
by Larson and Bengzon.
The weak formulation of a canonical linear problem reads
The discretization $u_h$ is a linear combination of basis functions
$N^J$ and corresponding scalars $u^J$, $J=1,\dots,\nnode$ so that $V_h$ is a
subset of $V$.
The discretization of \eqref{eq:femlinear1} then reads
\[\begin{equation}
\begin{alignedat}{4}
- \Var u &= f \quad && \text{in} \quad && \Omega \\
u &= 0 \quad && \text{on} \quad && \del\Omega
\end{alignedat}
\end{equation}\]
The weak formulation reads
Find $u\in V$ such that
\[\begin{equation}
- \int_\Omega \Delta(u) v \dv= \int_\Omega f v \dv
\end{equation}\]
for all $v\in V$ where $V=H^1_0(\Omega)$.
Applying integration by parts and divergence theorem on the left-hand side
\[\begin{equation}
\begin{aligned}
\int_\Omega \Delta(u) v \dv
&= \int_\Omega \nabla \dtp (\nabla (u) v) \dv
- \int_\Omega \nabla u\dtp\nabla v \dv \\
&= \underbrace{\int_{\del\Omega} v (\nabla u\dtp\Bn) \da}_{v = 0
\text{ on } \del\Omega}
- \int_\Omega \nabla u\dtp\nabla v \dv \\
\end{aligned}
\end{equation}\]
We have the following variational forms:
\[\begin{equation}
\begin{aligned}
a(u,v) &= \int_{\Omega} \nabla u \dtp \nabla v \dv\\
b(v) &= \int_{\Omega} f \, v \dv\\
\end{aligned}
\end{equation}\]
Following \eqref{eq:femlinear3}, we can calculate the stiffness matrix
$\BA$ as