Stiffness matrix
In the finite element method for the numerical solution of elliptic partial differential equations, the stiffness matrix is a matrix that represents the system of linear equations that must be solved in order to ascertain an approximate solution to the differential equation.
The stiffness matrix for the Poisson problem
For simplicity, we will first consider the Poisson problem
- [math]\displaystyle{ -\nabla^2 u = f }[/math]
on some domain Ω, subject to the boundary condition u = 0 on the boundary of Ω. To discretize this equation by the finite element method, one chooses a set of basis functions {φ1, …, φn} defined on Ω which also vanish on the boundary. One then approximates
- [math]\displaystyle{ u \approx u^h = u_1\varphi_1+\cdots+u_n\varphi_n. }[/math]
The coefficients u1, u2, …, un are determined so that the error in the approximation is orthogonal to each basis function φi:
- [math]\displaystyle{ \int_{x \in \Omega} \varphi_i\cdot f \, dx = -\int_{x \in \Omega} \varphi_i\nabla^2u^h \, dx = -\sum_j\left(\int_{x \in \Omega} \varphi_i\nabla^2\varphi_j\,dx\right)\, u_j = \sum_j\left(\int_{x \in \Omega} \nabla\varphi_i\cdot\nabla\varphi_j\, dx\right)u_j. }[/math]
The stiffness matrix is the n-element square matrix A defined by
- [math]\displaystyle{ \mathbf A_{ij} = \int_{x \in \Omega} \nabla\varphi_i\cdot\nabla\varphi_j\, dx. }[/math]
By defining the vector F with components [math]\displaystyle{ \mathbf F_i = \int_\Omega\varphi_i f\,dx, }[/math] the coefficients ui are determined by the linear system Au = F. The stiffness matrix is symmetric, i.e. Aij = Aji, so all its eigenvalues are real. Moreover, it is a strictly positive-definite matrix, so that the system Au = F always has a unique solution. (For other problems, these nice properties will be lost.)
Note that the stiffness matrix will be different depending on the computational grid used for the domain and what type of finite element is used. For example, the stiffness matrix when piecewise quadratic finite elements are used will have more degrees of freedom than piecewise linear elements.
The stiffness matrix for other problems
Determining the stiffness matrix for other PDEs follows essentially the same procedure, but it can be complicated by the choice of boundary conditions. As a more complex example, consider the elliptic equation
- [math]\displaystyle{ -\sum_{k,l}\frac{\partial}{\partial x_k}\left(a^{kl}\frac{\partial u}{\partial x_l}\right)= f }[/math]
where [math]\displaystyle{ \mathbf A(x) = a^{kl}(x) }[/math] is a positive-definite matrix defined for each point x in the domain. We impose the Robin boundary condition
- [math]\displaystyle{ -\sum_{k,l}\nu_k a^{kl}\frac{\partial u}{\partial x_l} = c(u-g), }[/math]
where νk is the component of the unit outward normal vector ν in the k-th direction. The system to be solved is
- [math]\displaystyle{ \sum_j\left(\sum_{k,l}\int_\Omega a^{kl}\frac{\partial\varphi_i}{\partial x_k}\frac{\partial\varphi_j}{\partial x_l}dx+\int_{\partial\Omega}c\varphi_i\varphi_j\, ds\right)u_j = \int_\Omega\varphi_i f\, dx+\int_{\partial\Omega}c\varphi_i g\, ds, }[/math]
as can be shown using an analogue of Green's identity. The coefficients ui are still found by solving a system of linear equations, but the matrix representing the system is markedly different from that for the ordinary Poisson problem.
In general, to each scalar elliptic operator L of order 2k, there is associated a bilinear form B on the Sobolev space Hk, so that the weak formulation of the equation Lu = f is
- [math]\displaystyle{ B[u,v] = (f,v) }[/math]
for all functions v in Hk. Then the stiffness matrix for this problem is
- [math]\displaystyle{ \mathbf A_{ij} = B[\varphi_j,\varphi_i]. }[/math]
Practical assembly of the stiffness matrix
In order to implement the finite element method on a computer, one must first choose a set of basis functions and then compute the integrals defining the stiffness matrix. Usually, the domain Ω is discretized by some form of mesh generation, wherein it is divided into non-overlapping triangles or quadrilaterals, which are generally referred to as elements. The basis functions are then chosen to be polynomials of some order within each element, and continuous across element boundaries. The simplest choices are piecewise linear for triangular elements and piecewise bilinear for rectangular elements.
The element stiffness matrix A[k] for element Tk is the matrix
- [math]\displaystyle{ \mathbf A^{[k]}_{ij} = \int_{T_k}\nabla\varphi_i\cdot\nabla\varphi_j\, dx. }[/math]
The element stiffness matrix is zero for most values of i and j, for which the corresponding basis functions are zero within Tk. The full stiffness matrix A is the sum of the element stiffness matrices. In particular, for basis functions that are only supported locally, the stiffness matrix is sparse.
For many standard choices of basis functions, i.e. piecewise linear basis functions on triangles, there are simple formulas for the element stiffness matrices. For example, for piecewise linear elements, consider a triangle with vertices (x1, y1), (x2, y2), (x3, y3), and define the 2×3 matrix
- [math]\displaystyle{ \mathbf D = \left[\begin{matrix}x_3 - x_2 & x_1 - x_3 & x_2 - x_1 \\ y_3 - y_2 & y_1 - y_3 & y_2 - y_1\end{matrix}\right]. }[/math]
Then the element stiffness matrix is
- [math]\displaystyle{ \mathbf A^{[k]} = \frac{\mathbf D^\mathsf{T} \mathbf D}{4\operatorname{area}(T)}. }[/math]
When the differential equation is more complicated, say by having an inhomogeneous diffusion coefficient, the integral defining the element stiffness matrix can be evaluated by Gaussian quadrature.
The condition number of the stiffness matrix depends strongly on the quality of the numerical grid. In particular, triangles with small angles in the finite element mesh induce large eigenvalues of the stiffness matrix, degrading the solution quality.
References
- Ern, A.; Guermond, J.-L. (2004), Theory and Practice of Finite Elements, New York, NY: Springer-Verlag, ISBN 0387205748
- Gockenbach, M.S. (2006), Understanding and Implementing the Finite Element Method, Philadelphia, PA: SIAM, ISBN 0898716144
- Grossmann, C.; Roos, H.-G.; Stynes, M. (2007), Numerical Treatment of Partial Differential Equations, Berlin, Germany: Springer-Verlag, ISBN 978-3-540-71584-9
- Johnson, C. (2009), Numemerical Solution of Partial Differential Equations by the Finite Element Method, Dover, ISBN 978-0486469003
- Zienkiewicz, O.C.; Taylor, R.L.; Zhu, J.Z. (2005), The Finite Element Method: Its Basis and Fundamentals (6th ed.), Oxford, UK: Elsevier Butterworth-Heinemann, ISBN 978-0750663205
![]() | Original source: https://en.wikipedia.org/wiki/Stiffness matrix.
Read more |