Tensor calculus in spherical coordinates using Jacobi polynomials. Part-II: Implementation and examples

Daniel Lecoanet , Geoffrey M. Vasil , Keaton J. Burns , Benjamin P. Brown , Jeffrey S. Oishi
{"title":"Tensor calculus in spherical coordinates using Jacobi polynomials. Part-II: Implementation and examples","authors":"Daniel Lecoanet ,&nbsp;Geoffrey M. Vasil ,&nbsp;Keaton J. Burns ,&nbsp;Benjamin P. Brown ,&nbsp;Jeffrey S. Oishi","doi":"10.1016/j.jcpx.2019.100012","DOIUrl":null,"url":null,"abstract":"<div><p>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 Marti et al. (2014), implementing the hydrodynamic and magnetohydrodynamic equations. We are able to calculate more accurate solutions than reported in Marti et al. (2014) 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.</p></div>","PeriodicalId":37045,"journal":{"name":"Journal of Computational Physics: X","volume":"3 ","pages":"Article 100012"},"PeriodicalIF":0.0000,"publicationDate":"2019-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/j.jcpx.2019.100012","citationCount":"27","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computational Physics: X","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590055219300289","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 27

Abstract

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 Marti et al. (2014), implementing the hydrodynamic and magnetohydrodynamic equations. We are able to calculate more accurate solutions than reported in Marti et al. (2014) 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.

球面坐标系中使用雅可比多项式的张量演算。第二部分:实施和实例
我们提出了一个模拟代码,可以在一个完整的球体中求解广泛的偏微分方程。如Vasil等人(2018;下文,第一部分)所述,该代码在角方向上扩展了自旋加权球面谐波的频谱序列中的张量变量,在径向上扩展了缩放雅可比多项式基。非线性项是通过将谱级数的系数转换为物理网格上每个量的值来计算的,在物理网格上很容易计算乘积并执行其他局部运算。该展开使求解张量形式的方程变得简单(即,无需分解为标量)。我们提出并研究了几个单元测试,证明该代码可以准确地解决线性问题,实现边界条件,以及在光谱和物理空间之间转换。然后,我们运行了Marti等人提出的一系列基准问题。(2014),实现了流体动力学和磁流体动力学方程。我们能够计算出比Marti等人报道的更准确的解。(2014)通过以更高的空间分辨率运行并使用更高阶的时间步长方案。我们发现旋转对流和对流发电机基准问题敏感地依赖于时间步长和数据分析的细节。我们还证明,在发电机问题的低分辨率模拟中,数值格式的微小变化可能会导致解的巨大变化。为了帮助将来与这些基准进行比较,我们包含了用于生成数据的源代码,以及用于生成数字的数据和分析脚本。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Computational Physics: X
Journal of Computational Physics: X Physics and Astronomy-Physics and Astronomy (miscellaneous)
CiteScore
6.10
自引率
0.00%
发文量
7
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信