burgers_time_inviscid


burgers_time_inviscid, a MATLAB code which solves the time-dependent inviscid Burgers equation with one of six solution methods selected by the user, by Mikal Landajuela.

The function u(x,t) is to be solved for in the equation:

du/dt + u * du/dx = 0
for 0 < nu, a <= x <= b, 0 <= t <= t_max 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, and the final time t_max.

The conservative form of the equation is

du/dt + 1/2 * d(u^2)/dx = 0

There are six solution methods provided in this package:

  1. Upwind nonconservative;
  2. Upwind conservative;
  3. Lax Friedrichs;
  4. Lax Wendroff;
  5. MacCormack;
  6. Godunov.
and the user selects one such method for the computation.

The problem specification requires an initial condition, to be determined by a MATLAB function. Five such functions are provided, and the user is free to write a new one:

  1. ic_expansion.m, an expansion wave;
  2. ic_gaussian.m, a gaussian;
  3. ic_shock.m, a shock wave;
  4. ic_spike.m, a spike;
  5. ic_spline.m, a spline through data points.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

burgers_time_inviscid is available in a MATLAB version.

Related Data and Programs:

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.

burgers_time_inviscid_test

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.

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.

Reference:

  1. Daniel Zwillinger,
    Handbook of Differential Equations,
    Academic Press, 1997,
    ISBN: 0127843965,
    LC: QA371.Z88.

Source Code:


Last revised on 04 December 2018.