BURGERS_STEADY_VISCOUS is a MATLAB library 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.

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

u * du/dx = nu * d^2u/dx^2
for 0 < nu, a <= x <= b.

Problem data includes the endpoints a and b, the Dirichlet boundary values u(a) = alpha, u(b) = beta, and the value of the viscosity nu.

We can discretize the problem by specifying a sequence of n (perhaps equally spaced) points x, and applying standard finite difference approximations to the derivatives in the continuous equation. A piecewise linear discretization of the solution can then be computed by bsv().

When alpha and beta have opposite sign, the solution must cross the x-axis (at least once). The location x0 of this crossing is of interest, and can be computed by bsv_crossing().

The crossing location may be quite susceptible to the values of alpha and beta.

The conservative form of the equation is

1/2 * d(u^2)/dx = nu * d^2u/dx^2
and this is the version we discretize. The residual associated with node i is then
f(i) = 1/2 * ( u(i+1)^2 - u(i-1)^2 / ( 2 * dx ) - nu * ( u(i-1) - 2 * u(i) + u(i+1) ) / dx^2
and we can apply Newton's method to seek a solution u for which f is zero.

### Languages:

BURGERS_STEADY_VISCOUS is available in a MATLAB version.

### Related Data and Programs:

BURGERS, a dataset directory which contains some solutions to the viscous Burgers equation.

BURGERS_CHARACTERISTICS, a MATHEMATICA program which solves the time dependent inviscid Burgers equation using the method of characteristics, by Mikel Landajuela.

BURGERS_SOLUTION, a MATLAB library which evaluates an exact solution of the time-dependent 1D viscous Burgers equation.

BURGERS_TIME_VISCOUS, a MATLAB library 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 program 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 program which applies the finite difference method and the leapfrog approach to solve the non-viscous time-dependent Burgers equation in one spatial dimension.

PCE_BURGERS, a MATLAB program which defines and solves a version of the time-dependent viscous Burgers equation, with uncertain viscosity, using a polynomial chaos expansion in terms of Hermite polynomials, by Gianluca Iaccarino.

### Reference:

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

### Source Code:

• bsv.m, applies Newton's method to a discretized steady viscous Burgers equation.
• bsv_crossing.m, determines a point X0 where a discretized solution satisfies U(X0) = 0.
• bsv_upwind.m, applies Newton's method to a discretized steady viscous Burgers equation, using upwinding on the flux term.
• r8_sign.m, returns the sign of an R8.
• timestamp.m, prints the YMDHMS date as a timestamp.

### Examples and Tests:

• bsv_test.m, runs all the tests.
• bsv_test01.m, runs a simple test with A = -1, ALPHA = +1, B = +1, BETA = -1, NU = 0.1.
• bsv_test02.m, runs a simple test with A = -1, ALPHA = +1, B = +1, BETA = -1, and a range of NU values.
• bsv_test03.m, runs a simple test with A = -1, B = +1, BETA = -1, NU = 0.1. and a range of ALPHA values.
• bsv_test04.m, runs a simple test with ALPHA = +1, B = +1, BETA = -1, NU = 0.1. and a range of A values.
• bsv_test05.m, examines the location of the zero-crossing of the solution as ALPHA is varied.
• bsv_test06.m, estimates the expected value of the zero crossing assuming ALPHA is a Gaussian variable with mean 1 and standard deviation 0.05.
• bsv_test07.m, estimates the variance of the zero crossing assuming ALPHA is a Gaussian variable with mean 1 and standard deviation 0.05.
• bsv_test08.m, compares BSV and BSV_UPWIND for NU = 0.1 and NU = 0.01.
• bsv_test01.png, a plot of the solution as displayed by bsv_test01.
• bsv_test02.png, a plot of the solutions as displayed by bsv_test02.
• bsv_test03.png, a plot of the solutions as displayed by bsv_test03.
• bsv_test04.png, a plot of the solutions as displayed by bsv_test04.
• bsv_test05.png, a plot of the relation between ALPHA and the zero crossing.
• bsv_test08.png, a plot comparing two runs of BSV and BSV_UPWIND.
• bsv_output.txt, the output file.

• tanh_plot.m, plots a sequence of functions u = tanh(2^j*x/2), scaled to be +1 at x=-1, suggesting the behavior of solutions of Burgers equation.
• tanh_plot.png, the plot created by tanh_plot.m.

You can go up one level to the MATLAB source codes.

Last revised on 15 April 2012.