Friday, May 8, 2026

Understanding Nodal Interpolation vs L² Projection in Finite Element Method (FEM)




                                                        Figure 1: 2D Comparison



Figure 2: 1D Comparison


When solving engineering problems using the Finite Element Method (FEM), we often need to represent a continuous physical field (temperature, stress, velocity, etc.) on a discrete mesh. Two common ways to do this are nodal interpolation and L² projection.

The Exact FunctionFor demonstration, we used the following 2D oscillatory function as our "true" or exact solution:
f(x,y)=sin(2πx)cos(2πy)+0.8sin(4πx)sin(4πy)

This function contains multiple waves, making it a good test case to see how well different approximation techniques perform.1. Nodal InterpolationNodal interpolation is the simplest approach. We evaluate the exact function only at the mesh nodes and then use linear shape functions to create a piecewise linear surface across each triangle.
Characteristics:
  • The approximated surface passes exactly through the nodal values.
  • Easy to implement.
  • Can be "peaky" or overshoot/undershoot between nodes, especially on coarse meshes.
2. L² ProjectionL² projection finds the best possible piecewise linear function (in the finite element space) that approximates the exact function in the least squares sense.Mathematically, it minimizes the L² norm of the error:


This is achieved by solving a linear system involving the mass matrix M and the load vector b.Characteristics:
  • Does not necessarily pass exactly through the nodal values of the exact function.
  • Usually provides a smoother and more accurate overall approximation.
  • Better at capturing average behavior across each element.
Visual ComparisonI generated three 3D plots for the same coarse triangular mesh:
  • Left: Exact function — smooth and wavy.
  • Middle: Nodal Interpolation — follows the nodes but shows visible faceting and local inaccuracies.
  • Right: L² Projection — visibly smoother and closer to the true surface in the least-squares sense.
Even with a relatively coarse mesh, the difference between simple interpolation and L² projection is noticeable. L² projection generally reduces the overall error when representing continuous fields in FEM.Why Does This Matter?In real FEM simulations, we rarely have the "exact" solution. However, understanding these concepts helps engineers:
  • Choose proper post-processing techniques
  • Reduce approximation errors
  • Better interpret results from simulation software
Takeaway:
While nodal interpolation is fast and intuitive, L² projection often gives a superior representation of the solution — especially when accuracy across the entire domain is important.


References:
1. Larson, M. G., & Bengzon, F. (2013). The Finite Element Method: Theory, implementation, and applications. In Texts in computational science and engineering. https://doi.org/10.1007/978-3-642-33287-6
2. Grok

No comments:

Post a Comment