pce_burgers, a MATLAB code 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.
The time-dependent viscous Burgers equation to be solved is:
du/dt = - d ( u*(1/2-u)) /dx + nu d2u/dx2 for -3.0 <= x <= 3.0with boundary conditions
u(-3.0) = 0.0, u(+3.0) = 1.0.
The viscosity nu is assumed to be an uncertain quantity with normal distribution of known mean and variance.
A polynomial chaos expansion is to be used, with Hermite polynomial basis functions h(i,x), 0 <= i <= n.
Because the first two Hermite polynomials are simply 1 and x, we have that
nu = nu_mean * h(0,x) + nu_variance * h(1,x).We replace the time derivative by an explicit Euler approximation, so that the equation now describes the value of U(x,t+dt) in terms of known data at time t.
Now assume that the solution U(x,t) can be approximated by the truncated expansion:
U(x,t) = sum ( 0 <= i <= n ) c(i,t) * h(i,x)In the equation, we replace U by its expansion, and then multiply successively by each of the basis functions h(*,x) to get a set of n+1 equations that can be used to determine the values of c(i,t+dt).
This process is repeated until the desired final time is reached.
At any time, the coefficients c(0,t) contain information definining the expected value of u(x,t) at that time, while the higher order coefficients can be used to determine higher moments.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
pce_burgers is available in a C version and a C++ version and a Fortran90 version and a MATLAB version.
burgers_characteristics, a MATHEMATICA program which solves the time dependent inviscid Burgers equation using the method of characteristics, by Mikel Landajuela.
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_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 Burgers equation in one spatial dimension and time.
hermite_polynomial, a MATLAB code which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.
pce_legendre, a MATLAB code which assembles the system matrix of a 2D stochastic PDE, using a polynomal chaos expansion in terms of Legendre polynomials;
pce_ode_hermite, a MATLAB code which sets up a simple scalar ODE for exponential decay with an uncertain decay rate, using a polynomial chaos expansion in terms of Hermite polynomials.
The original FORTRAN90 version by Gianluca Iaccarino. MATLAB version by John Burkardt.