Molenspin is a Python library for kinematic simulation of rotating mechanical assemblies. It started in July 2025 as a personal project to understand Dutch windmill drivetrains and grew into something general enough to be worth releasing.
The name is straightforward: molen is Dutch for mill (windmill specifically), and spin is both the English word and a Dutch verb meaning to spin or rotate. The domain is .cfd — computational fluid dynamics — which isn't quite right for a kinematics library, but it was available, it sounds technical, and I liked it.
Gear trains, belt drives, bevel pairs, and fixed-pivot linkages. Fast simulation via a compiled Rust extension. Clean SVG animations with involute tooth geometry that you can embed anywhere. A constraint API that accepts residual-only implementations and handles Jacobians automatically.
Stress analysis, tribology, lubrication, finite-element anything. Dynamic force simulation (it's kinematic — velocities and positions, not forces and torques, except as a byproduct of constraints). If you need those things, look at Abaqus, KISSsoft, or Siemens NX.
My name is K. Bekker. I'm a software engineer by trade; mechanical engineering is a long-standing hobby that occasionally produces actual code. I live in the Netherlands, which explains the windmill thing.
I maintain this library in my spare time. It's not affiliated with any employer or institution.
The best way to reach me about Molenspin is to open an issue or discussion on GitHub. For anything else: hello [at] molenspin.cfd. I read everything; I don't always reply quickly.
The constraint solver architecture is loosely based on the approach in Computer-Aided Kinematics and Dynamics of Mechanical Systems by Haug (1989). The Rust extension uses PyO3. The SVG involute geometry is adapted from a public-domain implementation by Dr. A. Kapelevich. The benchmark infrastructure uses pytest-benchmark.
Apache 2.0. See LICENSE.txt. You can use Molenspin in commercial projects without restriction.