# 1-D viscous, unsteady Burgers' equation

In this section, exact and numerical solutions of the 1-D unsteady, viscous, Burgers' equation in conservative form are presented, using Dirichlet and periodic boundary conditions:
$$\frac{\partial u}{\partial t} + \frac{1}{2} \frac{\partial (u^2)}{\partial x} = \nu \frac{\partial^2 u}{\partial x^2},$$ where $\nu$ is kinematic viscosity.

# Exact solution

The exact solution of the unsteady Burgers' equation can be written as:
$$u = \frac{1 + (2a - 1) e^{(1-a)(x-at-x_0)/\nu}}{1 + e^{(1-a)(x-at-x_0)/\nu}}$$ The equation is solved in an interval of $[0,1]$, with the following parameters:
$$\nu = 0.001 \ , \ a = 0.5 \ , \ x_0 = 0.1.$$

# Numerical solution

Burgers' equation is to be solved with Dirichlet and also periodic boundary conditions on $u$. For discretisation, an explicit Euler scheme is employed using a uniform grid. For difussion term a centered, and for advection term a backward scheme is implemented:
$$\frac{u^{n+1} - u^n}{\Delta t} + \frac{1}{2} \frac{(u^2)^n_{i} - (u^2)^n_{i-1}}{\Delta x} = \nu \frac{u_{i+1} - 2u_i + u_{i-1}}{\Delta x^2}.$$ The numerical results together with the respective exact solution is plotted in Fig. d.6.

Fig. d.6: Exact vs. numerical solution for 1-D unsteady, viscous Burgers' equation.