# Stokesian Dynamics as a game! (HTML5, javascript)

Above, a suspension of Brownian, hard spheres. The particles are small, suspended in an otherwise
unbounded viscous fluid and are confined to a monolayer. **They interact hydrodynamically**. Click a particle and drag it throughout the space.
In the targeting game, a series of target regions are generated. Your goal is to drag one particle into each of the targets. When
all the particles are entirely within the targets, you win.

## Stokesian Dynamics in essense

The velocity of the fluid phase surrounding the particles, $ \mathbf{u}( \mathbf{x} ) $, satisfies the Stokes equations: $ \eta \nabla ^2 \mathbf{u} = \nabla p $ and $ \nabla \cdot \mathbf{u} = 0 $, where $ \eta $ is the fluid viscosity and $ p $ is the pressure. The boundary condtions are that $ \mathbf{u}( \mathbf{x} ) = \mathbf{U}_i + \mathbf{\Omega} \times ( \mathbf{x} - \mathbf{x}_i ) $ on the surface of particle $ i $ with center at $ \mathbf{x}_i $ and $ \mathbf{U}_i $ and $ \mathbf{\Omega}_i $ the translational and rotational velocity of those particles. We assume here that the fluid is quiescent far from the particles. Exact solutions to this equation are known for the translational and rotational motion of a single spherical particle or even two spheres. However, the problem is far too complex when many bodies perturb the motion of the fluid phase.

In most particulate flows we are not interested in the detailed motion of the fluid. Instead we want to know how the particles move. The Stokes equations can be reformulated as an integral equation such that $ \mathbf{u}( \mathbf{x} ) \sim \int \mathbf{J}( \mathbf{x} - \mathbf{y} ) \cdot \sigma( \mathbf{y} ) \cdot \mathbf{n} d \mathbf{y} $, where $ J( \mathbf{r} ) $ is the Green's function for the Stokes equations termed the Stokeslet, $ \sigma( \mathbf{x} ) $ is the hydrodynamic stress tensor and the integral is over all surfaces of particles undergoing rigid body motion. With this formulation it is possible to write the solution of this integral equation as:

$\left(\begin{array}{c} \mathbf{U} \\ \mathbf{\Omega} \\ 0 \\ \vdots \end{array}\right) = -\mathbf{M}^\infty \cdot \left(\begin{array}{c} \mathbf{F}^H \\ \mathbf{L}^H \\ \mathbf{S}^H \\ \vdots \end{array}\right)$

where $ \mathbf{U} $ and $ \mathbf{\Omega} $ are vectors containing the translational and rotational velocities of all the particles, $ \mathbf{M}^\infty $ is termed the grand mobility tensor, and $ \mathbf{F}^H $, $ \mathbf{L}^H $, $ \mathbf{S}^H $ are the moments: zeroth, anti-symmetric first and symmetric first respectively, of the hydrodynamic force density $ \sigma( \mathbf{x} ) \cdot \mathbf{n} $ that the fluid exerts on the particles. The grand mobility tensor depends only on the spatial configuration of the particles and is independent of how they move or what forces are exerted on them. The vertical dots indicate that the number of terms in the velocity vector and force moment vector are unbound. If the velocities of the particles are known, then this expression can be used to determine the hydrodynamic forces on the particles. If the forces on the particles are known, then this expression can be used to determine the particle velocities. Ultimately the accuracy of this solution is dictated by how many terms are retained in the force moment and velocity moment vectors. To accurately describe nearly touching particles, no terms can be neglected since the hydrodynamic force is singular in the separation between the particles' surfaces.

Stokesian Dynamics [Brady and Bossis, Ann. Rev. Fluid Mech. 1988] offers an alternative that allows for truncation of the grand mobility tensor while accounting properly for nearly touching particles. We write the hydrodynamic force moments in terms of the velocity moments as

$ \left(\begin{array}{c} \mathbf{F}^H \\ \mathbf{L}^H \\ \mathbf{S}^H \end{array}\right) = -\left[ \left( \mathbf{M}^\infty \right)^{-1} + \mathbf{R}_\mathrm{2B}^\mathrm{exact} - \mathbf{R}_\mathrm{2B}^\infty \right] \cdot \left(\begin{array}{c} \mathbf{U} \\ \mathbf{\Omega} \\ 0 \end{array}\right)$

where $ (\mathbf{M}^\infty)^{-1} $ is the inverse of the grand mobility tensor after truncating at a prescribed level and $ \mathbf{R}_\mathrm{2B}^\mathrm{exact} $ is a tensor that contains the exact solutions of the Stokes equations for a pair of particles, projecting moments of their surface velocity on to the hydrodynamic force moments. This latter term has the effect of building the divergent resistance of nearly touching particles explicitly into the governing equation for the hydrodynamic force. This is now an expression that can be used in a force balance for the particle phase and ultimately solved for the particle velocities in terms of external, inter-particle or Brownian forces.