Skip to main content

Research Repository

Advanced Search

Stokesian Dynamics in Python

Townsend, Adam

Stokesian Dynamics in Python Thumbnail



This is a Python 3 implementation of the Stokesian Dynamics method for polydisperse spheres suspended in a 3D Newtonian background fluid. The fluid-filled domain may be unbounded or a periodic cube. Physical setups and custom forces on the particles are easily implemented using Python; meanwhile, the computational speed is handled by Numba.

This software is aimed at researchers in low Reynolds number fluid dynamics who are looking for an easy-to-use yet flexible implementation of this popular method. The startup cost of writing a Stokesian Dynamics code is high, given the need for pre-computed resistance scalars.

Several minus sign errors in the literature also need resolving first. These have been resolved and validated before being implemented in this code. The hope is that many months of future researchers’ time (often PhD students’ time) will be saved by no longer reinventing the wheel.


Townsend, A. (2024). Stokesian Dynamics in Python. The Journal of Open Source Software, 9(94), Article 6011.

Journal Article Type Article
Acceptance Date Feb 22, 2024
Online Publication Date Feb 22, 2024
Publication Date Feb 22, 2024
Deposit Date Feb 22, 2024
Publicly Available Date Feb 23, 2024
Journal The Journal of Open Source Software
Publisher Open Journals
Peer Reviewed Peer Reviewed
Volume 9
Issue 94
Article Number 6011
Public URL


You might also like

Downloadable Citations