I find it kind of counter intuitive, that the result of an advection gets more smeared out at the borders when decreasing the timestep (which should make it more accurate).Let there be a equally spaces grid $x_1, \dots, x_n$ with a constant 1D advection $v=1$. Let the initial values be $$u^0=[0, 0, 1, 1, 0, 0]$$with the corresponding divergence field$$\nabla\cdot (uv) = [0,0,1,0,-1,0]$$With a timestep of $\delta_t = 1$ we get for one timestep with the explicit euler forward time scheme and forward differences for the derivative:$$u^1=[0, 0, 0, 1, 1, 0]$$But with a smaller timestep $\delta_t=0.5$ we get:$$u^{0.5}=\left[0,0,\frac{1}{2}, 1, \frac{1}{2}, 0\right]\\u^1=\left[0,0,\frac{1}{4}, \frac{1}{2}, \frac{1}{2}, \frac{1}{4}\right]$$So while the CFL number requires a smaller timestep for stability, in this case a smaller number leads to unsharp boundaries and decreasing the $\delta_x$ helps.Is there some other stablity condition than CFL and Peclet numbers for this problem?
More Smearing with decreasing timestep in advection problems
stability;advection
You solve the 1D-advection equation with c a constant velocity :$$\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x}=0~~~~~~~~(1)$$When you discretize this equation (with an explicit scheme in time and an upwind scheme in space for instance), you get :$$\frac{u_i^{n+1} - u_i^n}{\Delta t}+\frac{u_i^n-u_{i-1}^{n}}{\Delta x} = 0 ~~~~~~~~(2)$$BUT here you approximate your solution and by doing so you commit an error, called the truncation error. Let's find it :The key idea is to use the Taylor expansion for each of your discretized quantity :$$u_i^{n+1} = u_i^n + \Delta t \frac{\partial u}{\partial t}+\frac{\Delta t^2}{2}\frac{\partial^2 u }{\partial t^2}+O(\Delta t^3)$$$$u_{i-1}^{n} = u_{i}^n - \Delta x \frac{\partial u}{\partial x}+\frac{\Delta x^2}{2}\frac{\partial^2 u }{\partial x^2}+O(\Delta x^3)$$Then you plug those expressions into (2). You should find :$$\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x} + \frac{1}{2}\Delta t \frac{\partial^2 u }{\partial t^2} - c \frac{\Delta x}{2} \frac{\partial^2 u }{\partial x^2} = 0$$You recognize the first two terms, it is your equation (1) and by putting the rest in the right hand size, you find that this equation is now equal to :$$\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x}= Err$$with $$Err = - \frac{1}{2}\Delta t \frac{\partial^2 u }{\partial t} + c \frac{\Delta x}{2} \frac{\partial^2 u }{\partial x^2} ~~~~~~~(3)$$which is NOT equation (1). Let's simplify a little this expression. You use the fact that from (1), you derive in time :$$\frac{\partial^2 u}{\partial t} + c\frac{\partial^2 u}{\partial t\partial x}=0$$Omitting mathematical arguments, you can switch partial derivatives and by using (1) again, you get :$$\frac{\partial^2 u}{\partial t} = c^2\frac{\partial^2 u}{\partial x^2} ~~~~~(4)$$Plug (4) into (3) and by introducing the CFL number : $$CFL=\frac{c\Delta t}{\Delta x}$$ you should end up with :$$Err = \frac{c\Delta x}{2}\frac{\partial^2 u}{\partial x^2}(1-CFL) $$This is the error you commit by approximating derivatives. The truncation error depends on the second derivative in space which is called a diffusion term, hence a smearing effect (think about the heat equation). Now you understand that when you CFL tends to 1 (that is to say a larger dt for c and dx fixed), the error vanishes and so you solve exactly (1), that is your first result. On the other hand, when your CFL decreases (small dt), the error gets larger and your solution is smeared, as you have experienced in your second example. Indeed, decreasing dx helps because by doing so you increase your CFL even if your time step is fixed by your stability condition. You recover the fact the results get better with a refined mesh, fortunately !