Finite Element Simulation with FreeFEM and Machine Learning
A free course in which you write the solver first, check it against answers you can work out by hand, and only then train a neural network to imitate it. Because a simulation nobody verified is just an expensive picture.
What you build
- A finite element solver in FreeFEM for heat conduction, linear elasticity and viscous flow, verified against exact solutions and a published benchmark.
- A data generator, by driving that solver over a parameter sweep and keeping what it produces.
- A neural surrogate in PyTorch trained on that data, together with an honest map of where it stops being trustworthy.
Every exercise is graded on a number you compute yourself
Each lesson ends in one value you produce by running code on your own machine: a maximum displacement, an observed convergence order, a drag coefficient, a test error. You type it in and the server checks it against the value measured when the lesson was written.
Nothing here can be passed by reading. There is no multiple-choice final, no participation credit and no video to sit through. The concept checks inside lessons are ungraded practice and gate nothing.
Who this course is for
Engineers and graduate students who can program, have met calculus and linear algebra, and want to know whether a simulation result is right rather than only how to produce one. You need a machine that runs FreeFEM and a browser for the training half, which uses Colab.
It is the wrong course if you want a tour of a commercial GUI, or a machine learning course with the physics left out, or a credential without the work behind it.
The 11 modules
1. Setup and the FreeFEM language
Installing FreeFEM, building a mesh from parametrised borders, orientation and holes, P1 and P2 elements, integrating over a mesh.
2. From strong form to weak form
Integration by parts, the Galerkin step, essential and natural boundary conditions, what on() does to the matrix, the weak form of linear elasticity.
3. Poisson, solved and verified
The method of manufactured solutions, measuring convergence order, and what mesh refinement does and does not buy you.
4. Linear elasticity and the cantilever
Plane stress against plane strain, stress concentration at a fillet, and reading a result you cannot check by hand.
5. From solver to data generator
Parameter sweeps, scripting FreeFEM in batch, and the cost of generating a dataset from a solver.
6. A first surrogate in PyTorch
Training a network to predict what the solver would have said, and the train and test split that makes that claim mean something.
7. Making the surrogate honest
Error metrics that do not flatter, holdout design, and the difference between fitting and predicting.
8. Where the surrogate stops being trustworthy
Extrapolation, distribution shift, and finding the boundary of the region where a trained model can be believed.
9. Flow, against a benchmark you cannot fudge
Navier-Stokes, the inf-sup condition, and drag on a cylinder measured against a published benchmark.
10. The surrogate that pays for itself
Counting the compute a surrogate saves against the compute it cost, and when the trade is worth making.
11. Capstone: plate with an elliptical hole
A full study end to end, from geometry and mesh to trained surrogate and a defended conclusion.
What exists today
The course is being written in the open. 8 of its 57 lessons are published, covering 2 of 11 modules. The remaining modules, the 20 question final examination and the certificate are not built yet, and there is no date for them.
Every answer key in the published lessons was measured on FreeFEM 4.17 before the lesson was written around it. Where a measurement contradicted the plan, the plan changed.
Questions people ask first
What does it cost?
Nothing. There is no payment page, no card is ever collected, and there is no paid tier that the free one is a sample of.
What software do I need?
FreeFEM 4.17, which is free and open source, on Windows or Linux. macOS has no installer after 4.15, so Mac users run it through Docker. The machine learning half runs in Google Colab, so no local PyTorch install is required.
How long does it take?
An estimated 59 hours. That figure is a notional learning hours estimate built from stated per-lesson assumptions, not a measurement, because nobody has yet walked the course with a clock.
Is the certificate accredited?
No. It is a statement that you completed this course and passed its examination, carrying a serial that anyone can check against the verification page. It is worth what the exercises behind it are worth, which is why they cannot be passed without running the code.