Numerical simulations of partial differential equations (PDEs) are indispensable across science and engineering. For simple geometries, spectral methods are a powerful class of techniques that produce exceptionally accurate solutions for wide ranges of equations. But many variations of these methods exist, each with distinct properties and performance, and developing the best method for a complex nonlinear problem is often quite challenging.
In this context, we present a framework that unifies all polynomial and trigonometric spectral methods, from classical “collocation” to the more recent “ultraspherical” schemes. In particular, we examine the exact discrete equations solved by each method and characterize their deviation from the original PDE in terms of perturbations called “tau corrections”. By analyzing these corrections, we can precisely categorize existing methods and design new solvers that robustly accommodate new boundary conditions, eliminate spurious numerical modes, and satisfy exact conservation laws.
This approach conceptually separates what discrete model a spectral scheme solves from how it solves it. This separation provides much more freedom when building and optimizing new numerical models. We will illustrate these advantages with some examples from fluid dynamics using Dedalus, an open-source package for solving PDEs with modern spectral methods.