Boids (aka unipolar self-propelled particles) within a flexible mass/spring boundary. p5.js Javascript
The boids have a repel and steer/alignments. The boundary is soft, elastic and stiff (resists bending). The boundary particles are damped (a velocity dependent force).
The boids can push on the boundary, and the boundary causes the boids to circulate. The boundary can be unstable. Instability seems to involve matching the boid speed to waves of perturbations on the boundary.