This is to help me relate continuous and discrete, predict what my scheme should be doing, and move toward using the method of manufactured solutions.
There's a solution for constant velocity $c$ advecting a quantity $u(x,t)$ over a 1D domain:
$$ \frac{\partial u}{\partial t} = - c\frac{\partial u}{\partial x} \\ u_t=-cu_x $$ of $\require{enclose} u(x,t) = \enclose{horizontalstrike}{f(x+ct) +} g(x-ct)$, where $g$ is a profile moving with velocity $c$. [edited]
But it's more complicated when the quantity being advected by velocity is the velocity itself:
$$ u_t=-uu_x $$
I worked out one solution $u(x,t)=x/t$: a simple linear profile, starting at $t_0 = 1$. It generalizes to $u(x,t) = (x+a)/(t+b)$, where $a$ changes the x-intercept, and $b$ changes the slope of the initial profile.
A positive slope is divergent (positive 1D $div$), and the line flattens over time as the quantity moves away. However, a negative slope (achieved with $b<1$) is compressive (negative 1D $div$), and leads to a singularity as $t+b \to 0$, and the quantity accelerates towards the x-intercept.
But is there a general solution? Although there's apparently no known solultion to the full navier-stokes equations, it seems to me there should be one for advection of velocity.
For example, I think $u(x, t_0) = cos x$ would diverge on the positive slopes (approaching zero), and compress on the negative slopes (becoming a step function) - but I can't work out a solution (maybe using Taylors series?).
Is there a general analytical solution to the 1D advection of velocity, $u_t=-uu_x$?