## How we go about modelling

Cars/Fish/Whatever are $N$ particles with positions $X_n\in[0,2\pi)$ for $n=1,\dots,N$

$$\mathrm{d}X_n = \frac{1}{N}\sum_{m=1}^N f(X_m-X_n) \mathrm{d}t + \frac{\sqrt{2D}}{N}\sum_{m=1}^N g(X_m-X_n)\mathrm{d}W_n$$

## From small scale to large scale

$$\mathrm{d}X_n = \frac{1}{N}\sum_{m=1}^N f(X_m-X_n) \mathrm{d}t + \frac{\sqrt{2D}}{N}\sum_{m=1}^N g(X_m-X_n)\mathrm{d}W_n$$

Introduce a concept of density of particles: $$\rho(x,t) = \frac{1}{N}\sum_{n=1}^N \delta(x-X_n(t))$$

## From small scale to large scale

$$\rho_t + \underbrace{\left(\rho(f\ast\rho)\right)_x}_{\text{velocity}} - \underbrace{D\left(\rho\left(g\ast\rho\right)^2\right)_{xx}}_{\text{diffusion}} + \underbrace{\sqrt{\frac{2D}{N}}\left((g\ast\rho)\rho^{\frac{1}{2}}\eta\right)_x}_{\text{noise}} = 0$$

with $$(f\ast\rho)(x,t) = \int_0^{2\pi} f(x-y)\rho(y,t) \mathrm{d}y, \quad \langle \eta(x,t)\eta(y,s) \rangle = \delta(x-y)\delta(t-s)$$

If $g(x)=1$, this reduces to a known case (Dean 1996) $$\rho_t + \left(\rho(f\ast\rho)\right)_x - D\rho_{xx} + \sqrt{\frac{2D}{N}}(\rho^{\frac{1}{2}}\eta)_x = 0$$

## Whitham Model of Traffic

$$\rho_{t}+ \left(\rho v(\rho)\right)_x - D\rho_{xx}=0$$ with $v(\rho)=v_0\left(1-\frac{\rho}{\rho_{max}}\right)$

Without diffusion term we get shock fronts.

## Whitham Model of Traffic

Our particles describe the flow of cars along a single lane road

$$\rho_{t}+ \left(\rho v(\rho)\right)_x - D\rho_{xx}=0$$ with $v(\rho)=v_0\left(1-\frac{\rho}{\rho_{max}}\right)$

$$\rho_t + \left(\rho(f\ast\rho)\right)_x - D\left(\rho\left(g\ast\rho\right)^2\right)_{xx} = 0$$

\begin{aligned} f(x) & = v_0 - \frac{v_0}{\rho_{max}}\delta(x) \\ g(x) & = 1 \end{aligned}

## Swarming Model (Milewski 2008)

Our particles describe the swarming of some organism which only looks ahead of itself

$$\rho_{t}+\left(\rho(K\ast\rho)\right)_x - D(\rho^3)_{xx}=0$$

$$K(x) = \begin{cases} e^{-x}, x\geq 0\\ 0, x \le 0 \end{cases}$$

$$\rho_t + \left(\rho(f\ast\rho)\right)_x - D\left(\rho\left(g\ast\rho\right)^2\right)_{xx} = 0$$

\begin{aligned} \Rightarrow f(x) & = K(x) \\ g(x) & = \delta(x) \end{aligned}

## Density dependent diffusion

If we have $g(x)=\delta(x)$ then we have $$\rho_t = D\left(\rho^3\right)_{xx}.$$ The solution to this is a semi-ellipse which grows horizontally over time. $$\rho(x,t) = \frac{2}{\pi r(t)}\sqrt{1-\left(\frac{x}{r(t)}\right)^2}$$ with $r(t) = 2\left(3Dt/\pi^2\right)^{1/4}$.

## Diffusion Term

$$\rho_t = D\left(\rho\left(g\ast\rho\right)^2\right)_{xx} \quad , \quad \mathrm{d}X_n = \frac{1}{N}\sum_{m=1}^N g(X_m-X_n) \mathrm{d}W_n$$
$g(x)=1$ $$\rho_t = D\rho_{xx}$$

#### Fickian

$g(x)=\delta(x)$ $$\rho_t = D\left(\rho^3\right)_{xx}$$

#### Porous Medium

$g(x)=1-\alpha\cos(x)$ \begin{aligned} \rho_t & = D\left(\rho - 2\alpha\rho(\cos * \rho) \right.\\ & \left.\quad\quad +\alpha^2\rho(\cos * \rho)^2\right)_{xx} \end{aligned}

## Cosine Noise Coupling

$g(x)=1-\alpha\cos(x)$ \begin{aligned} \rho_t & = D\left(\rho - 2\alpha\rho(\cos * \rho) \right.\\ & \left.\quad\quad +\alpha^2\rho(\cos * \rho)^2\right)_{xx} \end{aligned}

Two possible stable steady states: $$\rho(x,t) = \begin{cases} \frac{1}{2\pi}, & 0 < \alpha < 1 \\ \frac{1}{4\pi}\left(\delta(x-\Delta) + \delta(x+\Delta)\right), & \alpha>1 \end{cases}$$ with $\cos^2(\Delta) = 1/\alpha$.

## Quantifying the Fluctuations

The Whitham model has a stable, homogeneous state, $\rho(x,t)=\rho_0$. $$\rho_{t}+ \left(\rho v(\rho)\right)_x - D\rho_{xx} + \sqrt{\frac{2D}{N}}\left(\rho^{\frac{1}{2}}\eta\right)_x = 0$$

We can characterise the frequency, spacing and strength of these fluctuations.

$$\rho(x,t) = \frac{1}{2\pi} + \frac{1}{\sqrt{N}}\xi(x,t)$$

Look at the the fourier series in space and FT in time of the density

$$\varrho_k(\omega) = \frac{1}{2\pi}\delta_{k,0}\delta(\omega) + \frac{1}{\sqrt{N}}\hat{\xi}_k(\omega)$$

## Quantifying the Fluctuations

$$\varrho_k(\omega) = \frac{1}{2\pi}\delta_{k,0}\delta(\omega) + \frac{1}{\sqrt{N}}\hat{\xi}_k(\omega)$$

$$\langle |\hat{\xi}_k(\omega)|^2 \rangle =\frac{D \tilde{g}_{0}^{2} k^{2}}{2 \pi^{2}\left|\left(-J_k^*-i\omega\right)\right|^{2}}$$ $$J_{k}=ik\left(\tilde{f}_{0}+\tilde{f}_{-k}\right)+k^{2} D \tilde{g}_{0}\left(\tilde{g}_{0}+2 g_{-k}\right)$$

## Ellipse Fluctuations

$$\rho_{t} - D(\rho^3)_{xx} + \sqrt{\frac{2D}{N}}\left(\rho^{\frac{3}{2}}\eta\right)_x = 0$$ We can also analyse this in a similar way $$\rho(x,t) = \rho^*(x,t) + \frac{1}{\sqrt{N}}\xi(x,t)$$

## Ellipse Fluctuations

$$\xi_t = \frac{1}{4t}\left[(r^2(t)-x^2)\xi_{xx} - 4x\xi_x - 2\xi\right] + \left((\rho^*)^{3/2}\eta\right)_x$$ Cumulative moments: $$M_n(t) := \int_{-\pi}^{\pi} x^n \rho(x,t) \mathrm{d}x$$

Fluctuations in the cumulative moments: $$Z_n(t) := \sqrt{N}\left(M_n(t) - M_n^*(t)\right)$$

## Fluctuations in the moments

$$Z_n(t) := \sqrt{N}\left(M_n(t) - M_n^*(t)\right)$$

$$Z_n'(t) = \frac{n(n-1)}{4t}\left[r^2 Z_{n-2} - Z_n\right] + \int_0^{2\pi} \zeta_n \mathrm{d}x$$

\begin{aligned} \langle Z_1(t)\rangle & = 0 , \quad \langle Z_1^2(t)\rangle = \frac{\sqrt{3Dt}}{\pi} \\ \langle Z_2(t)\rangle & = 0 , \quad \langle Z_2^2(t)\rangle = \frac{t}{4\pi^2} \end{aligned}

## Incorporating Velocity

If we want to explore more complex and interesting examples, we will have to look at particles with stochastic velocities. This might look like $$\mathrm{d}X_n = U_n \mathrm{d}t$$ $$\mathrm{d}U_n = \frac{1}{N}\sum_{m=1}^N f(X_m-X_n) \mathrm{d}t + \frac{1}{N}\sum_{m=1}^N g(X_m-X_n)\mathrm{d}W_n$$