burgers_time_viscous, a MATLAB code which solves the time-dependent viscous Burgers equation using a finite difference discretization of the conservative form of the equation, and then carrying out a simple parabolic integration scheme.
The function u(x,t) is to be solved for in the equation:
du/dt + u * du/dx = nu * d^2u/dx^2for 0 < nu, a <= x <= b, tmin <= t <= tmax with initial condition
u(x,tmin) = uinit(x);and fixed Dirichlet conditions
u(a,t) = alpha, u(b,t) = beta
Problem data includes the spatial endpoints a and b, the Dirichlet boundary values u(a,t) = alpha, u(b,t) = beta, the time limits tmin and tmax, and the (positive) value of the viscosity nu.
The conservative form of the equation is
du/dt + 1/2 * d(u^2)/dx = nu * d^2u/dx^2and this is the version we discretize.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
burgers_time_viscous is available in a MATLAB version.
burgers, a dataset directory which contains some solutions to the viscous Burgers equation.
burgers_solution, a MATLAB code which evaluates an exact solution of the time-dependent 1D viscous Burgers equation.
burgers_steady_viscous, a MATLAB code which solves the steady (time-independent) viscous Burgers equation using a finite difference discretization of the conservative form of the equation, and then applying Newton's method to solve the resulting nonlinear system.
fd1d_burgers_lax, a MATLAB code which applies the finite difference method and the Lax-Wendroff method to solve the non-viscous Burgers equation in one spatial dimension and time.
fd1d_burgers_leap, a MATLAB code which applies the finite difference method and the leapfrog approach to solve the non-viscous time-dependent Burgers equation in one spatial dimension.