# Swarmalators

Swarmalators are generalizations of phase oscillators that swarm around in space as they synchronize in time. They were introduced to model the diverse real-world systems which both sync and swarm, such as vinegar eels, magnetic domain walls, and Japanese tree frogs. More formally, they are dynamical units with spatial degrees of freedom and internal degrees of freedom whose dynamics are coupled.

## Real world examples

Swarmalation occurs in diverse parts of Nature and technology some of which are discussed below. The Figure to the right plots some examples in a (discipline, number of particles) plot.
Biological microswimmers. Sperm, vinegar eels and potentially other swimmers such as C elegans swarm through space via the rhythmic beating of their tails. This beating may synchronize with the beating of a neighboring swimmer via hydrodynamic coupling, which in turn causes spatial attraction; sync links to self-assembly. This can lead to vortex arrays, trains metachronal waves and other collective effects.
Magnetic domain walls are key features in the field of magnetism and materials science, defined by the boundary between different magnetic domains in ferromagnetic materials. These domains are regions within a material where the magnetic moments of atoms are aligned in the same direction, creating a uniform magnetic field. The hold great promise as memory devices in next generation spintronics. In a simplified $q,\phi$ model, a domain wall can be described by its center of mass $q$ and the in-plane angle $\phi$ of its magnetic dipole vector, thereby classifying them as swarmalators. Experiments reveal that the interaction between two such domain walls leads to rich spatiotemporal behaviors some of which is captured by the 1D swarmalator model listed above.
Japanese Tree frogs. During courtship rituals, male Japanese Tree frogs attract the attention of females by croaking rhythmically. Neighboring males tend to alternate the croaking (croak $\pi$ degree out of phase) so as to avoid "speaking over each other". Evidence suggests this (anti)-synchronization influences the inter-frog spatial dynamics, making them swarmalators.
Janus particles are spherical particles with one hemisphere coated in a magnetic substance, the other remaining non-magnetic. They are named after the Roman God Janus who has two faces. This anisotropy gives the particles unusual magnetic properties. When subject to external magnetic fields, their magnetic dipoles vectors begins to oscillate which induces and couples to movements (thus qualifying as a swarmalators). The resultant "sync-selected self-assembly" gives rise novel superstructure with potential use in biomedicine contexts such as targeted drug delivery, bio imaging, and bio-sensing.
Quincke rollers are a class of active particle that exhibits self-propelled motion in a fluid due to an electrohydrodynamic phenomenon known as the Quincke effect. This effect occurs when a dielectric (non-conducting) particle is subject to an electric field. The rotation of the particle, combined with frictional interactions with the surrounding fluid and surface, leads to a rolling motion. Thus, the particle has a phase $\theta$ and a position $x$ which couple, as required of swarmalator. Collections of Quincke rollers produce rich emergent behavior such as activity waves and shock waves.
Embryonic cells are the foundational building blocks of an embryo, undergoing division and differentiation to form the complex structures of an organism. These cells exhibit remarkable plasticity, allowing them to transform into a wide range of specialized cell types. In the context of swarmalators, embryonic cells display a unique blend of synchronization and swarming behaviors. They coordinate their movements and genetic expression patterns in response to various cues, a process essential for proper tissue formation and organ development. This linking of sync and self-assembly make embryonic cells a compelling example of a real-world swarmalators.
Robot swarms. Land based rovers as well as aerial drones programmed with swarmalator models have been created and has recreated the five collective states of the swarmalator model (see Mathematical Models section for the plot of these states). The linking of sync and swarming defines a new kind of bio-inspired algorithm which several potential applications.

## 2D swarmalator model

A mathematical model for swarmalators moving in 2D has been proposed. This 2D swarmalator model in generic form is
    ${\begin{array}{rcl}{\dot {x}}_{i}&=&{\frac {1}{N}}\sum _{j}I_{att}(x_{j}-x_{i})F(\theta _{j}-\theta _{i})-I_{rep}(x_{j}-x_{i})\\{\dot {\theta }}_{i}&=&{\frac {1}{N}}\sum _{j}G_{sync}(\theta _{j}-\theta _{i})H(x_{j}-x_{i})\end{array}}$
The spatial dynamics combine pairwise interaction $I_{att}$ with pairwise $I_{rep}$, which produces swarming / aggregation. The novelty is the attraction is modified by a phase term $F$; thus the aggregation becomes phase-dependent. Likewise, the phase dynamics contain a sync term $G_{sync}$ modified by a spatial term so the synchronization becomes position dependent. In short, the swarmalators model the interaction between self-synchronization and self-assembly in space.
While in general the position could be in 2D or 3D, the instance of the swarmalator model originally introduced is a 2D model $x\in \mathbb {R} ^{2}$ and the choices for $I_{att}(x),I_{rep}(x)$ etc. were
    ${\begin{array}{rcl}{\dot {x}}_{i}&=&{\frac {1}{N}}\sum _{j}{\frac {(x_{j}-x_{i})}{|x_{j}-x_{i}|}}\left(1+J\cos(\theta _{j}-\theta _{i})\right)-{\frac {x_{j}-x_{i}}{|x_{j}-x_{i}|^{2}}}\\{\dot {\theta }}_{i}&=&{\frac {K}{N}}\sum _{j}{\frac {\sin(\theta _{j}-\theta _{i})}{|x_{j}-x_{i}|}}\end{array}}$
There are two parameters $J$ and $K$ are parameters: $J$ controls the strength of phase-space attraction/repulsion, while $K$ describes the phase coupling strength. The above can be considered a blending of the aggregation model introduced from biological swarming (the spatial part) and the Kuramoto model of phase oscillators (the phase part).

## Phenomena

The model above produces five collective states depicted in Figure 1:
* Static sync: Swarmalators form a disk in space and are fully synchronized in phase.
* Static async: Swarmalators form a disk in space and are fully asynchronous in phase.
* Static phase wave: Swarmalators form an annulus in space with a phase wave (e.g. a full color-wheel or rainbow.)
* Splintered phase wave: The phase wave splinters into clusters of synchronous swarmalators. Within each cluster, the swarmalators execute periodic motion in space and phase.
* Active phase wave: Swarmalators run in a space-phase vortex, with half running clockwise and the remaining half running counter-clockwise.
To demarcate where each state arises and disappears as a parameters are changed, the rainbow order parameters,
    ${\begin{array}{rcl}W_{\pm }&=&S_{\pm }e^{i\phi _{\pm }}=&{\frac {1}{N}}\sum _{j}e^{i(\phi _{j}-\theta _{i})}\end{array}}$
where $\phi _{i}:=\arctan(y_{i}/x_{i})$ are used. Figure 2 plots $S_{\pm }$ versus $K$ for fixed $J$. As can be seen, $S_{+}=1$ in the rainbow-like static phased wave state (at $K$ = 0), and then declines as $K$ decreases. A second order parameter $\gamma$, defined as the fraction of swarmalators that have completed at least one cycle in space and phase after transients in also plotted, which can distinguish between the active phase wave and splintered phase wave states.

## Puzzles

There are several unresolved puzzles and open questions related to swarmalators:
* Melting point $K_{m}(J)$: What is the value $K_{m}(J)$ at which the static async state melts into the active phase wave state?
* Splitting point $K_{s}(J)$: What is the splitting point $K_{s}$ at which the active phase wave splits into the splintered phase wave?
* Rainbow order parameters: Can you derive an expression for the supercritical branch of the $S_{\pm }(K)$ for fixed $J$ in the active phase wave and splintered phase wave states?
* $N_{c}$: What determines the number of clusters formed in the splintered phase wave?

## 1D swarmalator model

A simpler swarmalator model where the spatial motion is confined to a 1D ring $x_{i}\in \mathbb {S} ^{1}$ has also been proposed
    ${\begin{array}{rcl}{\dot {x}}_{i}&=\nu _{i}+{\frac {J}{N}}\sum _{j}\sin(x_{j}-x_{i})\cos(\theta _{j}-\theta _{i})\\{\dot {\theta }}_{i}&=\omega _{i}+{\frac {K}{N}}\sum _{j}\sin(\theta _{j}-\theta _{i})\cos(x_{j}-x_{i})\end{array}}$
where $\nu _{i},\omega _{i}$ are the (random) natural frequencies of the i-th swarmalator and are drawn from certain distributions $g(.)$. This 1D model corresponds to the angular component of the 2D swarmalator model. The restriction to this simpler topology allows for a greater analysis. For instance, the model with natural frequencies can be solved by defining the sum/difference coordinates $\xi ,\eta =x_{i}\pm \theta _{i}$ the model simplifies into a pair of linearly coupled Kuramoto models
    ${\begin{array}{rcl}{\dot {\xi }}_{i}&=\omega _{+,i}+J_{+}S_{+}\sin(\phi _{+}-\xi )+J_{-}S_{-}\sin(\phi _{-}-\eta )\\{\dot {\eta }}_{i}&=\omega _{-,i}+J_{-}S_{+}\sin(\phi _{+}-\xi )+J_{+}S_{-}\sin(\phi _{-}-\eta )\end{array}}$
where $J_{\pm }=(J\pm K)/2$, $\omega _{\pm }=\nu \pm \omega$ and the rainbow order parameters are the equivalent of the 2D model
    ${\begin{array}{rcl}W_{\pm }=S_{\pm }e^{i\phi _{\pm }}:=N^{-1}\sum _{j}e^{i(x_{j}\pm \theta _{j})}\\\end{array}}$
For unimodal distribution of $\omega ,\nu$ such as the Cauchy distribution, the model exhibits four collective states depicted in the figure on the right.
* Async or $(S_{+},S_{-})=(0,0)$ state. Swarmalators do not exhibit any coherence either in space or phase, being distributed uniformly in position and phase. This state is characterized by the absence of any synchronization or spatial clustering among the swarmalators, as reflected by the zero values of both order parameters $S_{+}=S_{-}=0$.
* Phase wave or $(S_{+},S_{-})=(S,0)$ state. In the phase wave state, swarmalators form a band or wave pattern with the position $x_{i}$ and phase $\theta _{i}$ are correlated. The wave can either run clockwise or counterclockwise.
* Mixed or $(S_{+},S_{-})=(S_{1},S_{2})$ state. Swaramlators again form a phase wave, but now the wave is distorted, forming two rough clusters; thus it is the a mixture of the phase wave and the sync state (described next).
* Sync or $(S_{+},S_{-})=(S,S)$ state. Swarmalators form two synchronous cluster in both space and phase. Single cluster states are formed for some initial conditions.
Note in each state, the swarmalators split into a locked/drifting sub-populations, just like the Kuramoto model. The locked population are the denser regions in the Figure, the drifters the light grey regions.
The figure to the right compares the bifurcations of the Kuramoto model to those of the 1D swarmalator model. For the Kuramoto model (top row), the sync order parameter $R:=|\langle e^{i\theta }\rangle |$ bifurcates from the async state ($R=0$) and then increases monontonically in the sync state ($R>0$). For the 1D swarmalator model, the bifurcations are richer. Starting with the phase coupling $K<K_{c}$ and increasing, $S_{+},S_{-}$ bifurcate from the async state ($S_{+}=S_{-}=0$) to the phase wave ($S_{+}=S_{pw},S_{-}=0$) then to the mixed state ($S_{+},S_{-}=S_{1},S_{2}$) before finally ending up in the sync state ($S_{+}=S_{-}=S_{sync}$). Note we have taken $S_{+}>S_{-}$ without loss of generality and $S,S_{1},S_{2}$ are constants that depend on $J,K\Delta$. Expressions for $S_{pw},S_{sync}$ have been worked out, those for $S_{1},S_{2}$ in the mixed state are unknown (see ref [25]).