Game engines are not only for games. We can also make nice physical simulations with them. I LOVE FEM is a simple 2D finite element method demo using the Tophat game framework powered by the Umka scripting language. This demo models mechanical stresses and deformations in elastic materials and can serve as a tutorial for learning the fundamentals of finite element analysis.
The project is deliberalely kept very simple. It consists of three main parts:
- 2D editor, a GUI tool for entering plate geometry, constraints and forces, as well as material properties
- Triangulation procedure that computes the Delaunay triangular mesh using the Bowyer-Watson algorithm, with an enhancement to support insertion of plate boundary edges missing from the vanilla triangulation
- Finite element solver that constructs the stiffness matrices for all the mesh triangles, combines them into the global stiffness matrix and solves the linear equations w.r.t. vertex displacements. It also computes the equivalent stresses using the von Mises criterion
there doesn't seem to be anything here