geodynamics / Rayleigh

Rayleigh: Pseudo-spectral MHD
GNU General Public License v3.0
59 stars 48 forks source link

This commit adds two jupyter notebooks exhibiting the Ultraspherical polynomials. #476

Closed kyle-augustson closed 1 year ago

kyle-augustson commented 1 year ago

The file Scalar_Diffusion.ipnb has some mathematical details about the Ultraspherical polynomials regarding how to build sparse spectral representations of operators such as derivatives. It also details how to maintain sparsity of those operators even if they are multiplied by non-constant coefficients. The example problem is the 1D diffusion equation both with and without a spatially variable diffusion coefficient for scalar quantity q. This uses the second order Crank-Nicholson method for time stepping. The file Reaction_Diffusion.ipynb shows how to construct a non-linear PDE using the Newell–Whitehead-Segel equation as an example.