In this section, we discuss the solution of the inviscid Burgers equation which is a nonlinear hyperbolic partial differential equation.
The hyperbolic equations admit discontinuities, and the numerical schemes used for solving hyperbolic PDEs need to be higher-order accurate for smooth solutions, and non-oscillatory for discontinuous solutions.
The inviscid Burgers equation is given below
We refer readers to a text by Shu for a comprehensive overview of the development of WENO schemes,
their mathematical formulation, and the application of WENO schemes for convection dominated problems.
We will use WENO-5 scheme for one-dimensional inviscid Burgers equation with the shock developed by a sine wave.
We will discuss how one can go about applying WENO reconstruction for finite difference schemes.
The finite difference approximation to the inviscid Burgers equation in non-conserved form can be written as
where we define \(u^{+}_{i}=max(u_{i},0)\) and \(u^{-}_{i}=min(u_{i},0)\). the reconstruction of \(u^{L}_{i+1/2}\) uses a biased stencil with one more point to the left,
and that for \(u^{R}_{i+1/2}\) uses a biased stencil with one more point to the right. The stencil used for reconstruction of left and right side state
(i.e., \(u^{L}_{i+1/2}\) and \(u^{R}_{i+1/2}\)) is shown in the following figure. The WENO-5 reconstruction for left and right side reconstructed values is given as
We use \(d^{L}_{0}=1/10,\quad d^{L}_{1}=3/5,\quad d^{L}_{2}=3/10\) to compute nonlinear weights for calculation of left side state
and \(d^{R}_{0}=3/10,\quad d^{R}_{1}=3/5,\quad d^{R}_{2}=1/10\) to compute nonlinear weights for calculation of right side state.
We set \(\epsilon =1\times10^{-6}\) to avoid division by zero.
We demonstrate two types of boundary conditions for the inviscid Burgers equation. The first one is the Dirichlet boundary condition. For Dirichlet boundary condition, we use
\(u(x=0)=0\) and \(u(x=1)=0\). For computing numerical state at the interface, we need the information of five neighboring grid points.
When we compute the left side state at \(i+1/2\) interface, we use three points on left side (i.e., \(u_{i-2},u_{i-1},u_{i}\) )
and two points on right side (i.e., \(u_{i+1},u_{i+2}\)). Therefore, we use two ghost points on the left side of the domain and one ghost point on right side of the domain for computing left side state
(i.e., \(u^{L}\) at \(x=3/2\) and \(x=N-1/2\) respectively). Similarly, we use one ghost points on the left side of the domain and two ghost point on right side of the domain for computing right side state
(i.e., \(u^{R}\) at \(x=3/2\) and \(x=N-1/2\) respectively).
We use linear interpolation to compute the value of discrete field u at ghost points. The computation of \(u\) at ghost points is given below
where \(u\) is stored from \(1\) to \(N+1\) from left \((x=0)\) to right boundary \((x=L)\) on the computational domain respectively.
We also use the periodic boundary condition for the same problem. For periodic boundary condition, we do not need to use any interpolation formula to compute the variable at ghost points. The periodic boundary condition for two left and right side points outside the domain is given below
We also use the periodic boundary condition for the same problem. For periodic boundary condition, we do not need to use any interpolation formula to compute the variable at ghost points. The periodic boundary condition for two left and right side points outside the domain is given below
High-order WENO schemes have wider stencils as the order increases. The fifthorder Compact Reconstruction WENO (CRWENO) [Ghosh & Baeder, 2012] uses implicit interpolation to obtain higher resolution than its explicit counterpart while having
smaller candidate stencils, although since the smoothness indicators are the same, in
practice the overall stencil ends up being the same as the fifth-order WENO scheme.
The same procedure explained for the WENO5 applies to this scheme. There exist
optimal weights \(\left\{ c_{k}\right\}^{r}_{k=1}\) such that if \(\omega_{k}=c_{k}\ \forall k\), a \((2r − 1)-\text{th}\) accurate interpolation
is obtained. For the CRWENO5 the coefficients are:
The underlying scheme is the compact fifth-order interpolation that can be obtained
by weighting the stencils with the optimal weights can be expressed as:
The WENO schemes are based on the idea of
combining lower order candidate stencils at an interface to get a higher order interpolation in smooth regions and a nonoscillatory interpolation near discontinuities. The
general form of the interface flux reconstructed by the WENO scheme is
where \(r\) is the number of candidate stencils (of \(r\text{th}\) order), \(\hat{f}^{k}_{j+1/2}\) is the interpolated
flux at \(x_{j+1/2}\) using the \(k\text{th}\) candidate stencil, and \(\omega_{k}\) is the weight of \(k\text{th}\) stencil
in the convex combination. There exist optimal weights \(c_{k}, k = 1, . . . , r\), such that if \(\omega_{k}=c_{k}\quad \forall k\),
the resulting interpolation is \((2r − 1)\text{th}\) order accurate.
The WENO limiting process causes the stencil weights to attain their optimal values where the
solution is smooth. Across or near a discontinuity, the weight of the stencil containing
the discontinuity approaches zero to yield a nonoscillatory interpolated flux. This is
achieved by scaling the optimal weights by smoothness indicators of the respective
stencils, i.e.,
where \(\beta_{k}\) is the smoothness indicator of the \(k\text{th}\) stencil, is a small number to prevent division by zero, and \(m\) is chosen such that the weights for nonsmooth stencils
approach zero quickly (in the present study, \(m=2\) is used for all cases). To ensure
convexity, the weights \(\alpha_{k}\) are normalized as
The resulting interpolation is thus \((2r − 1)\text{th}\) order accurate in smooth regions of the
solution and nonoscillatory near discontinuities.
The main drawback of the WENO-5 scheme is that we have to increase the stencil size to get more accuracy. Compact reconstruction of WENO-5 scheme has been developed that uses smaller stencil without reducing the accuracy of the solution.
CRWENO-5 scheme uses compact stencils as their basis to calculate the left and right side state at the interface. The procedure for CRWENO-5 is similar to the WENO-5 scheme. However, its candidate stencils are implicit and hence smaller stencils can be used to get the same accuracy.
The implicit system used to compute the left and right side state is given below
The linear weights are given by
\(d^{L}_{0}=1/5\), \(d^{L}_{1}=1/2\), and \(d^{L}_{2}=3/10\) and
\(d^{R}_{0}=3/10\), \(d^{R}_{1}=1/2\), and \(d^{R}_{2}=1/5\).
For some other sparse problems, the Sherman-Morrison formula cannot be
directly applied for the simple reason that storage of the whole inverse matrix \(\mathbf{A}^{-1}\)
is not feasible. If you want to add only a single correction of the form \(\mathbf{p}\otimes\mathbf{q}\),
and solve the linear system
We use the Sherman-Morrison formula, treating the system as tridiagonal plus
a correction. In the notation of equation, define vectors \(\mathbf{p}\) and \(\mathbf{q}\) to be