Back to Blog

Understanding the Finite Element Method: Part 1

May 11, 2023 · 12 min read

The finite element method (FEM) is a numerical technique for finding approximate solutions to boundary value problems for partial differential equations. It uses variational methods to minimize an error function and produce a stable solution.

1.Introduction

Partial differential equations (PDEs) are fundamental in modeling physical phenomena, from heat transfer to fluid dynamics. However, analytical solutions to these equations are often impossible to obtain for complex geometries or boundary conditions. This is where numerical methods like FEM become invaluable.

Definition 1.1. A partial differential equation is an equation that involves an unknown function of several independent variables and its partial derivatives.

The general form of a second-order PDE can be written as:

$$a \frac{\partial^2 u}{\partial x^2} + b \frac{\partial^2 u}{\partial x \partial y} + c \frac{\partial^2 u}{\partial y^2} + d \frac{\partial u}{\partial x} + e \frac{\partial u}{\partial y} + f u = g$$

2.Weak Formulation

The first step in applying FEM is to convert the strong form of the PDE into its weak or variational form. This involves multiplying the equation by a test function and integrating over the domain.

Consider Poisson's equation:

$$-\nabla^2 u = f \quad \text{in} \quad \Omega$$
$$u = g \quad \text{on} \quad \Gamma_D$$
$$\frac{\partial u}{\partial n} = h \quad \text{on} \quad \Gamma_N$$

Where Ω is the domain, ΓD is the Dirichlet boundary, and ΓN is the Neumann boundary.

To derive the weak form, we multiply by a test function v and integrate:

$$\int_\Omega -\nabla^2 u \cdot v \, d\Omega = \int_\Omega f \cdot v \, d\Omega$$

Applying Green's first identity:

$$\int_\Omega \nabla u \cdot \nabla v \, d\Omega - \int_{\partial\Omega} \frac{\partial u}{\partial n} v \, d\Gamma = \int_\Omega f \cdot v \, d\Omega$$
Theorem 2.1. If u is a solution to the strong form of the PDE, then it also satisfies the weak form. Under certain conditions, the converse is also true.

3.Discretization

The next step is to discretize the domain into a mesh of elements. Within each element, we approximate the solution using basis functions, typically polynomials.

Let's denote the basis functions as φi(x), i = 1, 2, ..., n. The approximate solution can be written as:

$$u_h(x) = \sum_{i=1}^{n} U_i \phi_i(x)$$

Where Ui are the unknown coefficients to be determined.

Substituting this into the weak form and choosing v = φj for j = 1, 2, ..., n, we obtain a system of linear equations:

$$\sum_{i=1}^{n} U_i \int_\Omega \nabla \phi_i \cdot \nabla \phi_j \, d\Omega = \int_\Omega f \cdot \phi_j \, d\Omega + \int_{\Gamma_N} h \cdot \phi_j \, d\Gamma$$

This can be written in matrix form as:

$$KU = F$$

Where K is the stiffness matrix, U is the vector of unknown coefficients, and F is the load vector.

4.Conclusion

In this first part of our series on the Finite Element Method, we've introduced the basic concepts and mathematical foundations. We've seen how to transform a PDE into its weak form and how to discretize the problem to obtain a system of linear equations.

In Part 2, we will delve deeper into the error analysis and convergence properties of FEM, exploring how the choice of elements and mesh refinement affects the accuracy of the solution.

References
  1. Brenner, S. C., & Scott, L. R. (2008). The Mathematical Theory of Finite Element Methods. Springer.
  2. Hughes, T. J. R. (2000). The Finite Element Method: Linear Static and Dynamic Finite Element Analysis. Dover Publications.
  3. Zienkiewicz, O. C., Taylor, R. L., & Zhu, J. Z. (2013). The Finite Element Method: Its Basis and Fundamentals. Butterworth-Heinemann.
Next: Understanding the Finite Element Method: Part 2