Mesh Refinement & Convergence | Computational Mechanics Visualization | Skill-Lync Resources

50% OFF - Ends Soon!

Lesson 7 of 11 15 min

Mesh Refinement & Convergence

FEM solutions improve with mesh refinement, but at increasing computational cost. Understanding convergence helps you balance accuracy and efficiency.

h-Refinement

The most common approach: make elements smaller (reduce mesh size $h$).

As elements shrink:

Sponsored

3,000+ engineers placed at Mahindra, Bosch, TATA ELXSI

Including Continental, Capgemini, Ola Electric & 500+ more companies

See Where They Work
  • Shape functions better approximate the true solution
  • Stress gradients are captured more accurately
  • Peak stress values converge toward the exact answer
Use the slider to adjust mesh density. Watch how the solution approaches the analytical answer.

Convergence Study

A proper mesh convergence study:

  • Run analysis with coarse mesh → get result $R_1$
  • Refine mesh (e.g., halve element size) → get $R_2$
  • Continue refining until change is small:

$$\text{Error} = \frac{|R_{n+1} - R_n|}{R_n} < \epsilon$$

Typically $\epsilon = 5\%$ or $2\%$ is acceptable.

Sponsored

70% of India's auto industry trusts Skill-Lync

For training their engineers in CAD, CAE & simulation

Learn More
🎯 3,000+ Engineers Placed
Sponsored
Harshal Sukenkar

Harshal

Fiat Chrysler

Abhishek

Abhishek

TATA ELXSI

Srinithin

Srinithin

Xitadel

Ranjith

Ranjith

Core Automotive

Gaurav Jadhav

Gaurav

Automotive Company

Bino K Biju

Bino

Design Firm

Aseem Shrivastava

Aseem

EV Company

Puneet

Puneet

Automotive Company

Vishal Kumar

Vishal

EV Startup

Python Animation Code

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

def fem_1d_poisson(n_elements, L=1.0, f=-4.0):
    """Solve u'' = f with u(0)=u(L)=0 using linear FEM."""
    n_nodes = n_elements + 1
    x = np.linspace(0, L, n_nodes)
    h = L / n_elements

    # Assembly (simplified)
    K = np.zeros((n_nodes, n_nodes))
    F = np.zeros(n_nodes)

    for e in range(n_elements):
        Ke = (1/h) * np.array([[1, -1], [-1, 1]])
        Fe = (f * h / 2) * np.array([1, 1])
        K[e:e+2, e:e+2] += Ke
        F[e:e+2] += Fe

    # Apply BCs and solve
    u = np.zeros(n_nodes)
    u[1:-1] = np.linalg.solve(K[1:-1, 1:-1], F[1:-1])

    return x, u

# Analytical solution: u = 0.5*f*x^2 - 0.5*f*L*x
x_exact = np.linspace(0, 1, 100)
u_exact = -2*x_exact**2 + 2*x_exact

# Create animation showing convergence
fig, ax = plt.subplots()

for n in [2, 3, 5, 10, 20]:
    x, u = fem_1d_poisson(n)
    ax.plot(x, u, 'o-', label=f'{n} elements')

ax.plot(x_exact, u_exact, 'k--', label='Exact')
ax.legend()
plt.show()

When to Stop Refining

ScenarioStop When
Global quantities (displacement)<2% change with refinement
Local stress<5% change at hotspots
Fatigue lifeLife prediction changes <10%
Comparison studyBoth models converged similarly

Automotive Application: Bolt Hole Stress

Stress concentration at a bolt hole in a suspension arm:

  • Analytical stress concentration factor: $K_t \approx 3$
  • Coarse mesh (2 elements at hole): $K_t = 1.8$ (40% error)
  • Medium mesh (4 elements): $K_t = 2.5$ (17% error)
  • Fine mesh (8 elements): $K_t = 2.9$ (3% error)

Rule of thumb: At least 4-6 elements around stress concentration features.

Key Takeaways

  • h-refinement: Smaller elements → better accuracy
  • Convergence study: Refine until results stabilize
  • 5% criterion: Common threshold for acceptable error
  • Diminishing returns: Beyond a point, more elements waste CPU time

What's Next

In the next lesson, we'll create complete Matplotlib animations — full Python tutorial for stress tensor visualization.

3,000+ Engineers Placed in Top Companies
Career Growth

3,000+ Engineers Placed in Top Companies

Join the ranks of successful engineers at Bosch, Tata, L&T, and 500+ hiring partners.