Tools for Characterizing the Numerical Error of Stellar Oscillation Codes Facilities: We have made extensive use of NASA’s Astrophysics Data System Bibliographic Services.
R. H. D. Townsend, R. V. Kuenzi, J. Christensen-Dalsgaard · 2025
Read Tools for Characterizing the Numerical Error of Stellar Oscillation Codes Facilities: We have made extensive use of NASA’s Astrophysics Data System Bibliographic Services. by R. H. D. Townsend, R. V. Kuenzi, J. Christensen-Dalsgaard (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-20212.txt.
Introduction
Richard Townsend, Rianna Kuenzi, and Jørgen Christensen-Dalsgaard build tools to grade star vibration software in this 2025 paper. Such codes compute the tones at which a star model rings. Comparing codes against each other cannot show one code's own error, though.
Their error measures fill that gap. They test how the measures shift as settings change, like the number of grid points across the star. The results feed a simple model of how error behaves. Tests center on the GYRE code, but the tools suit other codes too. The work helps modelers trust their star tones.
Catalog record
| CREATOR | R. H. D. Townsend, R. V. Kuenzi, J. Christensen-Dalsgaard |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 47 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-20212
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Tools for Characterizing the Numerical Error of Stellar Oscillation Codes Facilities: We have made extensive use of NASA’s Astrophysics Data System Bibliographic Services. R. H. D. Townsend, R. V. Kuenzi, J. Christensen-Dalsgaard Abstract Stellar oscillation codes are software instruments that evaluate the normal-mode frequencies of an input stellar model. While inter-code comparisons are often used to confirm the correctness of calculations, they are not suitable for characterizing the numerical error of an individual code. To address this issue, we introduce a set of tools — ‘error measures’ — that facilitate this characterization. We explore the behavior of these error measures as calculation parameters, such as the number of radial grid points used to discretize the oscillation equations, are varied; and we summarize this behavior via an idealized error model. While our analysis focuses on the GYRE code, it remains broadly applicable to other oscillation codes. Astropy [ 4 , 5 , 6 ] , GYRE [ 56 , 54 , 25 , 50 ] , Matplotlib [ 29 ] , MESA [ 37 , 38 , 39 , 40 , 41 , 30 ] . Sample input files for GYRE and MESA are available on Zenodo under an open-source Creative Commons Attribution license: https://doi.org/10.5281/zenodo.15399940 (catalog 10.5281/zenodo.15399940) . I Introduction Recent space photometry missions, including MOST [ 59 ] , CoRoT [ 7 ] , Kepler [ 8 ] , and TESS [ 45 ] , have provided time-series measurements of oscillations in myriad stars spanning the Hertzsprung-Russell diagram. The technique of asteroseismology [ 1 , e.g.,] can leverage these data into quantitative constraints on the global properties (mass, radius, age, metallicity, etc.) and detailed interior structures of the stars observed. A key ingredient in asteroseismic modeling is a stellar oscillation code, a software instrument that evaluates the normal-mode frequencies of an input stellar model. Many such codes are described in the literature; examples include MAD [ 19 ] , LP-PUL [ 17 ] , PULSE [ 9 ] , ADIPLS [ 13 ] , GraCo [ 34 ] , NOSC [ 44 ] , OSC [ 47 ] , filou [ 49 ] , LNAWENR [ 51 ] , CAFEIN [ 58 ] , and GYRE [ 56 , 54 , 25 , 50 ] . Given the community’s increasing reliance on these complex software packages, it is important to verify that they yield results that are not only precise but also accurate. Historically, a number of papers have examined the problem of code verification. In considering the oscillations of polytropic models, Mullan & Ulrich [36] employ a convergence criterion that the change in mode frequencies, upon increasing the number of radial grid points used to discretize the oscillation equations, drops below a prescribed threshold. Such an approach can ensure that frequencies are precise, but does not by itself also guarantee accuracy. In a subsequent paper, Christensen-Dalsgaard & Mullan [16] expand on this work by undertaking a comprehensive comparison between the polytrope-model frequencies evaluated by a pair of independent oscillation codes. More recently, Moya et al. [35] compare many of the codes cited above, as applied to realistic stellar models. Inter-code comparisons provide confidence that oscillation codes are yielding reliable results. However, their utility is limited when it comes to characterizing the numerical error of an individual code — for instance, diagnosing the various mechanisms that contribute toward this error, and exploring whether these mechanisms behave as expected from theoretical considerations. Such characterizations can potentially highlight hidden bugs, and are key to deciding if and how the code can further be improved. Within this context, the present paper introduces a set of tools for characterizing the numerical error of oscillation codes. We introduce these tools — ‘error measures’ — in Section II , and demonstrate their application to the GYRE code in Section III . We summarize our findings in Section IV , and discuss some of the practicalities of using the tools in the context of asteroseismic studies. II Error measures The numerical error of an oscillation code can in principle be quantified by comparing the code’s outputs (eigenfrequencies, eigenfunctions, etc.) against exact solutions. In practice, however, the latter are known only for the simple and quite artificial case of the homogeneous compressible sphere [ 42 , see] . To proceed, therefore, we heed these words from Christensen-Dalsgaard & Berthomieu [14] : “The only practical way of estimating the numerical error in the computed frequencies is to compare results obtained with different numbers of mesh [grid] points”. The general process is straightforward: run a code multiple times while varying the number of radial grid points N , and explore how its outputs change with N . As a straightforward example, one might follow Mullan & Ulrich [36] and focus on how the frequency \sigma of a given mode depends on N . However, as we already mention above, this approach ensures precision but does not guarantee accuracy. The problem lies with the choice of \sigma as the output to monitor; by itself, it furnishes no indication that it lies close to the correct value. To address this, we introduce the concept of an error measure \mathcal{E} , fulfilling the following criteria: (i) \mathcal{E} must be calculable from the outputs of the oscillation code; (ii) \mathcal{E} must be insensitive to non-physical quantities such as the normalization of eigenfunctions; (iii) \mathcal{E} must approach zero as numerical solutions approach exact solutions of the oscillation equations. The last criterion is key to ensuring that precision and accuracy go hand-in-hand. In the subsections that follow, we introduce three specific definitions of the error measure. To keep the presentation compact, we defer much of the detailed mathematical formalism to Appendix A . Figure 1: The frequency error measure \mathcal{E}^{\sigma}_{n,\ell} plotted as a function of the number of grid points N , for n=1 , \ell=0,1,2 modes of the n_{\rm poly}=1 polytrope. The panels show differing choices of the discretization scheme, indicated at top. Solid (dashed) lines show data evaluated using the Newton-Coates (trapezoidal) quadrature schemes. To help asses the rate of convergence, the dotted lines indicate |\mathcal{E}^{\sigma}_{n,\ell}|=N^{-j} for j=1,\ldots,6 . Figure 2: As in Fig. 1 , except that the orthogonality error measure \mathcal{E}^{\mathcal{P}}_{n,n^{\prime},\ell} is now plotted for (n,n^{\prime})=(1,2) modes. Figure 3: As in Fig. 1 , except that the first-integral error measure \mathcal{E}^{I}_{n,\ell} is now plotted for n=1 modes. Note that this error measure is defined only for \ell=0,1 , and thus no \ell=2 curve is shown. Figure 4: The \mathcal{E}^{\sigma}_{n,\ell} , \mathcal{E}^{\mathcal{P}}_{n,n^{\prime},\ell} and \mathcal{E}^{I}_{n,\ell} error measures plotted as a function of the number of grid points N , for (n,n^{\prime})=(10,11) , \ell=0,1,2 modes of the n_{\rm poly}=1 polytrope. All calculations use the COLLOC_GL6 discretization scheme. The dotted lines are the same as in previous figures. No data are shown at small N because GYRE is unable to find the requisite modes on such coarse grids. II.1 Frequency error measure As discussed in Appendix A.2 , the frequency of a mode can be evaluated from various integrals over its eigenfunctions. For numerical solutions, this ‘integral’ frequency will not agree exactly with the eigenfrequency output by the oscillation code, and we introduce the frequency error measure \mathcal{E}^{\sigma}_{n,\ell}\equiv\frac{\sigma^{\rm e}_{n,\ell}-\sigma^{\rm i}_{n,\ell}}{\sigma^{\rm e}_{n,\ell}} (1) to quantify their relative