  This paper presents a computational approach for finding the optimal shapes
of peristaltic pumps transporting rigid particles in Stokes flow. In
particular, we consider shapes that minimize the rate of energy dissipation
while pumping a prescribed volume of fluid, number of particles and/or distance
traversed by the particles over a set time period. Our approach relies on a
recently developed fast and accurate boundary integral solver for simulating
multiphase flows through periodic geometries of arbitrary shapes. In order to
fully capitalize on the dimensionality reduction feature of the boundary
integral methods, shape sensitivities must ideally involve evaluating the
physical variables on the particle or pump boundaries only. We show that this
can indeed be accomplished owing to the linearity of Stokes flow. The forward
problem solves for the particle motion in a slip-driven pipe flow while the
adjoint problems in our construction solve quasi-static Dirichlet boundary
value problems backwards in time, retracing the particle evolution. The shape
sensitivities simply depend on the solution of one forward and one adjoint (for
each shape functional) problems. We validate these analytic shape derivative
formulas by comparing against finite-difference based gradients and present
several examples showcasing optimal pump shapes under various constraints.
