I'm having difficulty with numerically solving the inviscid burgers equation.Godunov's scheme is used in most of what I've found in literature . Now my question is if using a crank nicolson shceme is wrong or not?
$\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x}=0$
with this BC:
at $t> 0 ,x=0$ : $u=1$
using a finite volume method:
$\frac{\partial }{\partial t}\int udv + \int u\frac{\partial u}{\partial x}dv=0 $
$\frac{\partial u}{\partial t}\Delta v +(uuA) _{e}-(uuA) _{w}=0$
$\frac{\partial u}{\partial t} + F_{e}u_{e}-F_{w}u_{w}=0 $
$F=\frac{u}{\Delta x}$
and for discretization in time I used Crank-Nicolson
$u_{p}^{n+1}-u_{p}^{n}=\frac{\Delta t}{2}(-F_{e}u_{e}+F_{w}u_{w})^{n+1}+\frac{\Delta t}{2}(-F_{e}u_{e}+F_{w}u_{w})^{n}$
the final form of equation is as (upwind scheme) :
$(1+\frac{\Delta t}{2}F_{e})u_{P}^{n+1}=(-\frac{\Delta t}{2}F_{w}) u_{W}^{n+1} +u_{P}^{n}+\frac{\Delta t}{2}(F_{w}u_{w}-F_{e}u_{e})^{n} $
and for the first block :
$(1+\frac{\Delta t}{2}F_{e})u_{P}^{n+1}= u_{P}^{n}+\frac{\Delta t}{2}(-F_{e}u_{e})^{n}+\Delta t F_{w}u_{w}$
and after that I tried to solve a set of linear algebraic equation. The result in every time step seems to converge but with time passing the magnitude of velocity is also increasing which is an indication of a mistake.