×

Tensor calculus in spherical coordinates using Jacobi polynomials. II: Implementation and examples. (English) Zbl 07785507

Summary: We present a simulation code which can solve a broad range of partial differential equations in a full sphere. The code expands tensorial variables in a spectral series of spin-weighted spherical harmonics in the angular directions and a scaled Jacobi polynomial basis in the radial direction, as described in Vasil et al. (2018; hereafter, Part-I). Nonlinear terms are calculated by transforming from the coefficients of the spectral series to the value of each quantity on the physical grid, where it is easy to calculate products and perform other local operations. The expansion makes it straightforward to solve equations in tensor form (i.e., without decomposition into scalars). We propose and study several unit tests which demonstrate the code can accurately solve linear problems, implement boundary conditions, and transform between spectral and physical space. We then run a series of benchmark problems proposed in [P. Marti et al., Geophys. J. Int. 197, No. 1, 119–134 (2014; doi:10.1093/gji/ggt518)], implementing the hydrodynamic and magnetohydrodynamic equations. We are able to calculate more accurate solutions than reported in [Marti et al., loc. cit.] by running at higher spatial resolution and using a higher-order timestepping scheme. We find the rotating convection and convective dynamo benchmark problems depend sensitively on details of timestepping and data analysis. We also demonstrate that in low resolution simulations of the dynamo problem, small changes in a numerical scheme can lead to large changes in the solution. To aid future comparison to these benchmarks, we include the source code used to generate the data, as well as the data and analysis scripts used to generate the figures.
For Part I, see [G. M. Vasil et al., J. Comput. Phys.: X 3, Article ID 100013, 31 p. (2019; Zbl 07785508)].

MSC:

65Mxx Numerical methods for partial differential equations, initial value and time-dependent initial-boundary value problems
65Nxx Numerical methods for partial differential equations, boundary value problems
65Lxx Numerical methods for ordinary differential equations

Citations:

Zbl 07785508

References:

[1] Ascher, Uri M.; Ruuth, Steven J.; Wetton, Brian T. R., Implicit-explicit methods for time-dependent partial differential equations. SIAM J. Numer. Anal., 3, 797-823 (1995) · Zbl 0841.65081
[2] Boyd, J. P., Chebyshev and Fourier Spectral Methods (2001), Dover · Zbl 0994.65128
[3] Boyd, J. P.; Yu, F., Comparing seven spectral methods for interpolation and for solving the Poisson equation in a disk: Zernike polynomials, Logan-Shepp ridge polynomials, Chebyshev-Fourier Series, cylindrical Robert functions, Bessel-Fourier expansions, square-to-disk conformal mapping and radial basis functions. J. Comput. Phys., 1408-1438 (2011) · Zbl 1210.65192
[4] Clyne, John; Mininni, Pablo; Norton, Alan; Rast, Mark, Interactive desktop analysis of high resolution simulations: application to turbulent plume dynamics and current sheet formation. New J. Phys., 8, 301 (2007)
[5] Clyne, John; Rast, Mark, A prototype discovery environment for analyzing and visualizing terascale turbulent fluid flow simulations, 284-294
[6] Featherstone, N. A.; Hindman, B. W., The spectral amplitude of stellar convection and its scaling in the high-Rayleigh-number regime. Astrophys. J., 32 (2016)
[7] Glatzmaier, G. A., Introduction to Modelling Convection in Planets and Stars (2013), Princeton University Press
[8] Hollerbach, R., A spectral solution of the magneto-convection equations in spherical geometry. Int. J. Numer. Methods Fluids, 773-797 (2000) · Zbl 0958.76065
[9] Hollerbach, R.; Nore, C.; Marti, P.; Vantieghem, S.; Luddens, F.; Léorat, J., Parity-breaking flows in precessing spherical containers. Phys. Rev. E, 5 (2013)
[10] James, R. W., New tensor spherical harmonics, for application to the partial differential equations of mathematical physics. Philos. Trans. R. Soc. Lond. A, Math. Phys. Eng. Sci., 1302, 195-221 (1976) · Zbl 0323.76021
[11] Joggerst, C. C.; Nelson, A.; Woodward, P.; Lovekin, C.; Masser, T.; Fryer, C. L.; Ramaprabhu, P.; Francois, M.; Rockefeller, G., Cross-code comparisons of mixing during the implosion of dense cylindrical and spherical shells. J. Comput. Phys., 154-173 (2014) · Zbl 1349.76004
[12] Lanczos, C., Trigonometric interpolation of empirical and analytical functions. J. Math. Phys., 1-4, 123-199 (1938) · Zbl 0020.01301
[13] Livermore, P. W.; Jones, C. A.; Worland, S. J., Spectral radial basis functions for full sphere computations. J. Comput. Phys., 1209-1224 (2007) · Zbl 1128.65016
[14] Marti, P.; Jackson, A., A fully spectral methodology for magnetohydrodynamic calculations in a whole sphere. J. Comput. Phys., 403-422 (2016) · Zbl 1349.76900
[15] Marti, P.; Schaeffer, N.; Hollerbach, R.; Cébron, D.; Nore, C.; Luddens, F.; Guermond, J.-L.; Aubert, J.; Takehiro, S.; Sasaki, Y.; Hayashi, Y.-Y.; Simitev, R.; Busse, F.; Vantieghem, S.; Jackson, A., Full sphere hydrodynamic and dynamo benchmarks. Geophys. J. Int., 119-134 (2014)
[16] Matsushima, T.; Marcus, P. S., A spectral method for polar coordinates. J. Comput. Phys., 365-374 (1995) · Zbl 0842.65051
[17] Miesch, M. S.; Elliott, J. R.; Toomre, J.; Clune, T. L.; Glatzmaier, G. A.; Gilman, P. A., Three-dimensional spherical simulations of solar convection. I. Differential rotation and pattern evolution achieved with laminar and turbulent states. Astrophys. J., 593-615 (2000)
[18] Phinney, R. A.; Burridge, R., Representation of the elastic-gravitational excitation of a spherical Earth model by generalized spherical harmonics. Geophys. J., 451-487 (1973) · Zbl 0287.73065
[19] Risbo, T., Fourier transform summation of Legendre series and D-functions. J. Geod., 383-396 (1996) · Zbl 0983.86507
[20] Vasil, G. M.; Burns, K. J.; Lecoanet, D.; Olver, S.; Brown, B. P.; Oishi, J. S., Tensor calculus in polar coordinates using Jacobi polynomials. J. Comput. Phys., 53-73 (2016) · Zbl 1380.65392
[21] Vasil, G. M.; Lecoanet, D.; Burns, K. J.; Oishi, J. S.; Brown, B. P., Tensor calculus in spherical coordinates using Jacobi polynomials. Part-I: Mathematical analysis and derivations. J. Comput. Phys. X (2019), in this issue
[22] Wang, Dong; Ruuth, Steven J., Variable step-size implicit-explicit linear multistep methods for time-dependent partial differential equations. J. Comput. Math., 838-855 (2008) · Zbl 1174.65037
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.