Jet-propelled medusae with impulse thrust, quadratic drag and boids-style steering in an ocean current.
running...
The science
Each medusa swims by jet propulsion. The bell contracts once per cycle and expels water: the momentum given to the water is returned as an impulse J = ρ · (0.3 V) · ujet, with bell volume V = (π/12)D³. During the power stroke the thrust is F = π f J sin(2π f t) (half-sine, so the impulse per pulse is exactly J); during recovery it is zero.
Motion follows (m + ma) dv/dt = F·h − ½ ρ Cd A |v−u| (v−u), where u is the ocean current, ma = 0.3 m is the added mass and h is the heading. Terminal cruise speed for mean thrust is v = √(2F̄ / (ρ Cd A)).
Collective behaviour is a boids-style rule set (cohesion, alignment, separation) that only steers the heading at a limited turn rate; the animals cannot sidestep, only reorient and keep pulsing. Polarization P = 1 means all heading the same way. Real blooms are formed largely by currents and fronts; this model adds only a weak social term.
Simplifications: jet strength is a fixed fraction of the bell volume (real medusae vary the stroke), the drag coefficient is constant, there is no wake interaction between animals, and the shape is a stylised bell. Checks above re-run the same integrator against exact results.