The Piecewise Cubic Method (PCM) for Computational Fluid Dynamics
We present a new high-order finite volume reconstruction method for hyperbolic conservation laws. The method is based on a piecewise cubic polynomial which provides its solutions a fifth-order accuracy in space. The spatially reconstructed solutions are evolved in time with a fourth-order accuracy by tracing the characteristics of the cubic polynomials. As a result, our temporal update scheme provides a significantly simpler and computationally more efficient approach in achieving fourth order accuracy in time, relative to the comparable fourth-order Runge-Kutta method. We demonstrate that the solutions of PCM converges in fifth-order in solving 1D smooth flows described by hyperbolic conservation laws. We test the new scheme in a range of numerical experiments, including both gas dynamics and magnetohydrodynamics applications in multiple spatial dimensions.
keywords:High-order methods; piecewise cubic method; finite volume method; gas dynamics; magnetohydrodynamics; Godunov’s method.
In this paper we are interested in solving multidimensional conservation laws of the Euler equations and the ideal MHD equations, written as
where is the vector of the conservative variables, and
is the flux vector.
We present a new high-order piecewise cubic method (PCM) algorithm that is extended from the classical PPM and WENO schemes colella1984piecewise (); jiang1996efficient (). These two algorithms, by far, have been extremely successful in various scientific fields where there are challenging computational needs for both high-order accuracy in smooth flows and well-resolved solutions in shock/discontinuous flows. With the advent of high-performance computing (HPC) in recent years, such needs have been more and more desired, and have become a necessary requirement in conducting large scale, cutting edge simulations of gas dynamics and magnetohydrodynamics (MHD) Dongarra2010 (); Dongarra2012 (); Subcommittee2014 (); Keyes2013 ().
As observed in the success stories of the PPM and WENO methods, discrete algorithms of data interpolation and reconstruction play a key role in numerical methods for PDE approximations LeVeque2002 (); leveque2007finite (); Toro2009 () within the broad framework of finite difference and finite volume discretization methods. In view of this, computational improvements of such interpolation and reconstruction schemes, particularly focused on the high-order property with great shock-capturing capability, take their positions at the center of HPC in modern computational fluid dynamics.
The properties of enhanced solution accuracy with lower numerical errors on a given grid resolution and faster convergence-to-solution rates are the key advantages in high-order schemes. The advantage of using high-order methods in HPC is therefore clear: one can obtain reproducible, admissible, and highly accurate numerical solutions in a faster computational time at the expense of increased rate of floating point operations, while at the same time, with the use of smaller size of grid resolutions. This is by no means exceedingly efficient in high-performance computing (HPC), in view of the fact that the increase of grid resolutions has a direct impact to an increase of memory footprints which are bounded in all modern computing architecture.
In this regards, our goal in this paper is to lay down a mathematical foundation in designing a new high-order method using piecewise cubic polynomials. We mainly focus on describing the detailed PCM algorithm in 1D finite volume framework for the scope of the current paper. For multidimensional problems, we adopt the classical “dimension-by-dimension” approach for simplicity. Although this approach has an advantage in its simplicity, it unfortunately fails to retain the high-order accurate property of the 1D baseline algorithm in multidimensional problems. Instead, it provides only a second-order accuracy in multidimensional nonlinear advection in finite volume method due to the lack of accuracy in approximating a face-averaged flux function as a result of mis-using an averaged quantity in place of a pointwise quantity, or vice versa shu2009high (); buchmuller2014improved (); zhang2011order (); mccorquodale2011high (). Although the baseline 1D PCM scheme can be extended to multiple spatial dimensions preserving its high-order accuracy by following more sophisticated treatments shu2009high (); buchmuller2014improved (); zhang2011order (); mccorquodale2011high (), more careful work is needed to carry out the detailed design, and this will be considered in our future research.
For a finite volume scheme in 1D we take the spatial average of Eq. (1) over the cell , yielding a semi-discrete form,
to get an equation for the evolution of the volume averaged variables, . Typically to achieve high-order accuracy in time the temporal update is done using a TVD Runge-Kutta scheme in method-of-lines form shu1988tvd (); mccorquodale2011high (). In this approach the high-order accuracy comes from taking the multiple Euler stages of the RK time discretizations, which require repeated reconstructions in a single time step, increasing the computational cost.
Instead, as will be fully described in Section 2, one of the novel ideas in PCM is to employ the simple single stage predictor-corrector type temporal update formulation in which we take the time-average of Eq. (3)
Here is the volume averaged quantity at , and is the time average of the interface flux from to . In this way high-order in space and time is accomplished with a single reconstruction in contrast to the multiple Euler stages of the RK time discretizations, providing significant benefits in computational efficiency per solution accuracy.
The organization of the paper is as follows: Section 2 describes the fifth-order accurate spatial reconstruction algorithm of PCM in 1D. We highlight several desirable properties of the PCM scheme in terms of computational efficiency and solution accuracy. Section 3 introduces the fourth-order accurate temporal updating scheme of PCM using a predictor-corrector type characteristic tracing, which is much simpler than the typical high-order Runge-Kutta ODE updates. In Section 5 we discuss how to extend the 1D scheme in Section 2 to multiple spatial dimensions following the dimension-by-dimension approach This approach is the same as the Class A approach in zhang2011order (), and should not be confused with the so-called dimensionally split approach. Our spatial integration scheme in this paper is directionally unsplit. buchmuller2014improved (); zhang2011order ().
In Section 6 we test the PCM scheme on a wide spectrum of benchmark problems in 1D, 2D and 3D, both for hydrodynamics and magnetohydrodynamics (MHD) applications. We also compare the PCM solutions with PPM and WENO solutions in order to examine numerical accuracy, capability and efficiency in both smooth and shock flow regimes. We conclude our paper in Section 7 with a brief summary.
2 The One-Dimensional Piecewise Cubic Method (PCM) Spatial Reconstruction
In this section we describe a new PCM scheme in a one-dimensional finite volume formulation for solving hyperbolic conservation laws of hydrodynamics and magnetohydrodynamics. The new PCM scheme is a higher-order extension of Godunov’s method godunov1959difference (), bearing its key components in the reconstruction algorithm on the relevant ideas of its high-order predecessors, the PPM scheme colella1984piecewise (), the WENO schemes jiang1996efficient (); shi2002technique (); borges2008improved (); castro2011high (), and Hermite-WENO schemes qiu2004hermite (); qiu2005hermite (); zhu2009hermite (); balsara2007sub ().
For the purpose of this section, we take the hyperbolic system of conservation laws of the 1D Euler equations
The notations used are the vector of the conservative variables and fluxes , respectively, defined as
Here is the fluid density, is the fluid velocity in -direction, and is the total energy as the sum of the internal energy and the kinetic energy obeying the ideal gas law,
where is the gas pressure, with the ratio of specific heats denoted as . We denote the cells in -direction by . We assume our grid is configured on an equidistant uniform grid for simplicity.
In addition to the system of the Euler equations in the conserved variables as given in Eq. (5), we often use the two other equivalent system of equations each of which can be written either in the primitive variables or in the characteristic variables . The characteristic variable is readily obtained from or by multiplying the left eigenvectors corresponding to either or , for instance, . In the latter ) represents the matrix obtained from diagonalizing the coefficient matrix , whose rows are the -th left eigenvectors , . The representation of the system in furnishes a completely linearly decoupled 1D system of equations,
The above system in the characteristic variables is therefore very handy for analyses, and also is a preferred choice of variable in order to furnish numerical solutions more accurate than third-order especially with better non-oscillatory controls, in particular when considering wave-by-wave propagations in a system of equations shu2009high (). In this reason the characteristic variable is taken as our default variable choice in the 1D PCM reconstruction steps via characteristic decompositions, albeit with an increased computational cost, among the other two choices of the primitive or the conservative variables .
The methodology presented below can be similarly applied to the 1D ideal MHD equations (see for instance, brio1988upwind ()).
2.1 Piecewise Cubic Profile
To begin with we first define a cubic polynomial to approximate a -th characteristic variable on each interval by
The goal is now to determine the four coefficients , , , which can be achieved by imposing the following four conditions:
is the cell-averaged quantity at on which is given as an initial condition;
are respectively the -th order accurate pointwise left and the right Riemann states at on the cell that are unknown yet but are to be determined as described below; and lastly
is the -th order accurate approximation to the slope of at evaluated at , which is again unknown at this point but is to be determined as below.
which, in turn, can be solved for all four , . The final expressions of the coefficients in terms of , and are given as:
Therefore once we figure out the three unknowns, , and , the cubic profile in Eq. (9) can be completely determined and is ready to approximate on each .
2.2 Reconstruction of the Riemann States and
We follow the fifth-order finite volume WENO approach, either of the classical WENO-JS jiang1996efficient () or WENO-Z borges2008improved (); castro2011high (), in order to reconstruct the left and right Riemann states, and , on each cell . For the sake of providing a full self-contained description of the PCM scheme, we briefly present the two WENO Riemann state reconstruction strategies here.
The main idea in WENO is to employ its reconstruction procedure according to the nonlinear smoothness measurements on three ENO sub-stencils, , , each of which consisting three cells , . Let us first define
Formulating the WENO reconstruction consists of the following three steps:
Step 1: ENO-Build
We begin with building a second degree polynomial for each ,
each of which is defined on , satisfying
for . After a bit of algebra, we obtain the coefficients that determine in Eq. (28).
and for ,
Lastly, for , we get
Then the three sets of left and right states follow as
where each of is the ENO approximation and is given by, first for ,
and for ,
and finally for ,
These left and right states respectively approximate the pointwise values at the interfaces with third-order accuracy, i.e., (see jiang1996efficient ()) by using the given cell-averaged quantities .
Step 2: Linear Constant Weights
The next step is to construct a fourth-degree polynomial
over the entire stencil which satisfies
for . We can show that the coefficients are given as
WENO uses to determine three linear constant weights , , with , such that
The values on the left-hand side become
Now, by inspection, we obtain a set of linear weights for the left state,
and for the right state,
Step 3: Nonlinear Weights
The last step that imposes the non-oscillatory feature in the WENO approximations is to measure how smoothly the three polynomials vary on . This is done by determining non-constant, nonlinear weights (three of them for each state) that rely on the so-called smoothness indicator , defined by
With this definition becomes small for smooth flows, and large for discontinuous flows.
For explicit expressions, we attain
Equipped with these , the nonlinear weights are defined as:
Here is any arbitrarily small positive number that prevents division by zero, for which we choose . One of the classical choice of in many WENO literatures is found to be jiang1996efficient (); shi2002technique (); however, it was suggested in borges2008improved () that should be chosen to be much smaller in order to force this parameter to play only its original role of avoiding division by zero in the definitions of the weights, Eqs. (62) and (63).
Another closely related point of discussion is with the value of , the power in the denominators in Eqs. (62) and (63). The parameter determines the rate of changes in , and most of the WENO literatures use . However, we observe that using resolves discontinuities sharper in most of our numerical simulations without exhibiting any numerical instability, so became the default value in our implementation. For more detailed discussions on the choices of and , see borges2008improved (); castro2011high ().
2.3 Reconstruction of the Derivative
The spatial reconstruction part of PCM proceeds to the next final step to obtain the derivative in Eq. (13). The approach is again to take the WENO-type reconstruction as before, but this time, to approximate a first derivative of a function shu2009high (), i.e., .
For this, we might consider using the same ENO-build strategy in Section 2.2 in which the three second degree ENO polynomials in Eq. (28) are constructed over the five-point stencil . However, this setup will provide only a third-order accurate approximation to the exact derivative . To see this, we first observe that the smoothness indicators with this setup will be including only a single term,
Through a Taylor expansion analysis on Eq. (65) we see
where the linear constant weights are assumed to exist, when is smooth in , such that
This finally implies the accuracy of is found out to be third-order,
In the last equality, we used the fact that, for each , is only a first degree polynomial which is accurate up to second-order when approximating .
For this reason, we want a better strategy to obtain an approximation at least fourth-order accurate in order that the overall nominal accuracy of the 1D PCM scheme achieves at least fourth-order accurate in both space and time.
Step 1: PPM-Build
An alternate strategy for this goal therefore would be to use a set of third degree polynomials instead. This can be designed using the two third degree polynomials, , from the PPM algorithm colella1984piecewise (),
Following the description of PPM, we carry out to determine the coefficients by imposing the following constraints on that are essential to keeping the volume averages on each cell :
After a bit of algebra we obtain the coefficients , with for , while for :
Step 2: Linear Constant Weights
Now that the polynomials are determined over the stencil , we use their first derivatives to obtain a convex combination with two linear weights and ,
This gives us
where is defined in Eq. (49). By inspection, we obtain
Step 3: Nonlinear Weights
The smoothness indicators are now constructed using as
They can be written explicitly as
Upon conducting Taylor series expansion analysis on , we can see that
where is a nonzero quantity independent of but might depend on , assuming on .
The final representation of the approximation becomes
Let us now verify that this approximation is fourth-order accurate after all, that is,