# PCE_BURGERS Polynomial Chaos Expansion for Burgers Equation

PCE_BURGERS is a C++ library 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.0
```
with 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.

### Languages:

PCE_BURGERS is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

HERMITE_POLYNOMIAL, a C++ library which evaluates the physicist's Hermite polynomial, the probabilist's Hermite polynomial, the Hermite function, and related functions.

PCE_ODE_HERMITE, a C++ program 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.

SDE, a C++ library which illustrates the properties of stochastic differential equations (SDE's), and common algorithms for their analysis, by Desmond Higham;

### Author:

The original FORTRAN90 version of this program was written by Gianluca Iaccarino.

### Reference:

1. Roger Ghanem, Pol Spanos,
Stochastic Finite Elements: A Spectral Approach,
Revised Edition,
Dover, 2003,
ISBN: 0486428184,
LC: TA347.F5.G56.
2. Dongbin Xiu,
Numerical Methods for Stochastic Computations: A Spectral Method Approach,
Princeton, 2010,
ISBN13: 978-0-691-14212-8,
LC: QA274.23.X58.

### List of Routines:

• MAIN is the main program for PCE_BURGERS.
• HE_DOUBLE_PRODUCT_INTEGRAL: integral of He(i,x)*He(j,x)*e^(-x^2/2).
• HE_TRIPLE_PRODUCT_INTEGRAL: integral of He(i,x)*He(j,x)*He(k,x)*e^(-x^2/2).
• R8_FACTORIAL computes the factorial of N.
• TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the C++ source codes.