Conversation
The Sun has no Hill sphere, so it was tracked for its distance but never listed. It is now flagged by a fixed distance (SUN_ENCOUNTER_AU = 0.1 AU) in the same encounter list, with hill_radius_au and n_hill set to None. The Sun also gets its physical radius for impact detection. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
The Sun has no Hill radius, so
REBOUND.pytracked its distance but never listed it as a close encounter, and it could not be hit either. This adds both, with a small change.SUN_ENCOUNTER_AU = 0.1AU goes into the same encounter list as the planets, in time order. The Sun gets a fixed distance threshold, not a fake Hill radius, so its entries havehill_radius_auandn_hillset toNone. The terminal and report lines show the distance in solar radii instead of R_Hill, and the headers state both rules:SUN_RADIUS_AU(695,700 km) is added to the defaultbody_radii, so an orbit that dives into the Sun ends in an impact.sun_encounter_aunext ton_hill_threshold. Readers of"encounters"must allown_hillto beNone, and the example inREBOUND.mdis updated for this.Tests
Notes
n_hill.🤖 Generated with Claude Code