Demo Gallery: Finite Element Solver

This is a finite-element solver built from scratch in Python for PDEs and structural mechanics, with applications including stress analysis, heat/wave propagation, buckling, and topology optimization. Includes the full numerical pipeline: geometry and mesh generation, element formulation and assembly, sparse linear/eigenvalue solvers, error estimation and adaptive refinement, and convergence validation. Every demo below comes with the code that produced it.

16 of 16 rendered, by examples/cli.py gallery, on every push to main.

Meshing & solving PDEs

outline_to_mesh

Four outlines, traced and generated, meshed and solved with one pipeline.

heatanimated

Warm a finned heatsink from a cold start, then compare it with a solid block and with beam theory.

waveanimated

A wave front meeting a harbor breakwater, diffracting through its gap into the sheltered water behind.

poisson

Poisson's equation as potential flow over a NACA airfoil, on P2 elements.

Solids & structures

linear_elastic

A cantilever under a tip load in 2D and 3D, with four stress invariants of the 2D solve.

elasticity_models

One clamped block stretched by a linear solve, by energy minimisation, and by two finite-strain material laws; then the same stretch walked up from zero, so the force-stretch curve separates the laws quantitatively.

stress_concentration

A plate with a hole, from outline to the stress concentration at its rim, against Kirsch and Howland.

pressurized_cylinder

A thick-walled cylinder pressurized past first yield: the plastic front marches outward through the wall, tracked against Hill's classical solution.

bracket

The stress at an L-bracket's inner corner, sharp and filleted, as the mesh refines into it.

buckling

Buckling loads and modes of a slender column, checked against Euler's column formula.

modalanimated

Natural frequencies and modes of a steel tuning fork meshed from its outline, against beam theory; then the fork struck and ringing down.

topology_optimizationanimated

SIMP topology optimization of a beam to half its material, compared with the solid beam.

Accuracy & performance

l2_projection

An oscillatory function projected onto a coarse mesh's P1 and P2 spaces, showing what each can represent.

convergence

Convergence rates in space and time against manufactured solutions, P1 against P2, and the load built two ways.

refinement

Adaptive refinement driven by an error estimator on a peaked Poisson source, against uniform refinement at the same cost.

timing_benchmark

Timing of assembly and both solve backends on a 3D elastic box over a range of sizes.