Add non-zero surface term to fix homogeneous model $f$-modes - #33
Merged
Conversation
rboston628
marked this pull request as ready for review
July 4, 2026 14:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The uniform density (aka isopycnic) star model of Thrain was used model as a calibration tool, for comparing to the exact Pekeris solutions. However, it had a known flaw, that it consistently produced the wrong value for the$f$ -mode. See Issue #16 .
This problem is due to the non-vanishing surface density of the uniform density model. Unlike real stars, and even polytropes, the uniform density star's density does not taper to zero at the surface, but actually has a sharp$\Theta$ -function cutoff.
To account for this, Unno et al. mention the possible surface term. It can be seen from the perturbed gravitationl field equation,
$\frac{1}{r^2}\frac{d}{dr} \big(r^2 \frac{d\Delta\Phi}{dr}\big) - \frac{\ell(\ell+1)}{r^2}\Delta\Phi = 4\pi G\Delta\rho.$ $$\Delta\rho \rightarrow 0$ at the surface. For the uniform density model, it becomes
$$\Delta\rho = \rho_o \delta(R-r) \xi^r,$$
$$r\frac{d\Delta\Phi}{dr} = -(\ell+1) \Delta\Phi + 4\pi G \rho_o \xi^r r$$
For most starts,
and integrating
In Dziembowski variables, this term becomes
$$y_4 = -(\ell+1) y_3 - Uy_1.$$
Since for all non-uniform stars this final term is zero, we can add this extra term, which will appear only in the case of a star with a surface term.
Now, we get the correct value for the uniform star$f$ -mode. Also makes some changes to reduce the compiler warnings.
Closes #16