N-body codes for planetary system dynamics

In summary, there are a variety of code packages available for simulating planetary dynamics, with some researchers preferring older versions and others favoring more modern versions. It is important to do some research to find the best fit for your specific needs and to seek help from forums or other experts in the field if necessary.
  • #1
merovingian12
15
0
A while back I did research in planetary system dynamics that involved the code package Mercury. Unfortunately, I found that Mercury would occasionally crash for no reason or give nonsensical results. This happened for a small subset of initial conditions and while I spent some time debugging it, I could never fix everything. Moreover, I noticed that it's written in FORTRAN 77, uses 'goto' statements, etc.

I ended up switching to Swifter, which used the more modern Fortran 90, and overall appeared to be better written. I did get some underflow floating point exceptions, but they didn't seem to be an issue. The annoying things with Swifter were that it took Cartesian coordinate inputs rather than orbital elements (easy to work around) and that, for some reason, the close encounter subroutines only considered encounters between a test particle and massive body, but not between two massive bodies (not quite as easy). I'm thinking it would be better to expand Swifter's subroutines than try to figure out what's going on with Mercury.

When I asked around about these code packages, the two answers I got were either "Well, I don't know, I've never looked at the codes" or "Yeah, there are bugs [in Mercury]. Tough."

Despite all this, from what I've seen, many of the recent papers in planetary dynamics use either Mercury or Swifter.

Could someone who's familiar with the field comment on this? Is there some update to the ~2001 Fortran 77 version that I've missed? Or does everyone fix the bugs individually but not tell anyone else what they did? Is there another package I might look at?
 
Astronomy news on Phys.org
  • #2
The answer to this question likely depends on the kind of planetary dynamics you're doing. Generally speaking, there are several code packages available for simulating planetary dynamics. In recent years, there has been a shift towards using more modern Fortran 90/95 versions of code packages, such as Swifter. Some of these newer packages are more user friendly and offer better performance. That said, many researchers still use Mercury or other older packages because they are familiar with them, they have invested time in understanding and debugging them, and they may be used to the results they get from them. Additionally, some packages may have features that are not available in other packages, or may be better suited to a certain type of problem. If you are having difficulty getting reliable results from Mercury or Swifter, you could look into other code packages such as REBOUND, IAS15, or WHFAST. Each package has its own strengths and weaknesses, so it is best to do some research to find one that suits your needs. Additionally, there are usually forums where people discuss issues related to the code packages, and they can provide valuable insights.
 

Related to N-body codes for planetary system dynamics

1. What are N-body codes and how are they used in planetary system dynamics?

N-body codes are numerical algorithms used to simulate the motion of a group of particles, such as planets, in a system. In planetary system dynamics, N-body codes are used to model the gravitational interactions between planets and other celestial bodies, allowing scientists to study the evolution and stability of planetary systems over time.

2. How do N-body codes take into account the effects of relativity and other physical forces?

N-body codes typically use Newtonian mechanics to calculate the gravitational forces between particles. However, some codes also incorporate relativistic effects, such as the general theory of relativity, to accurately model the motion of particles under extreme conditions. Other physical forces, such as tidal forces and gas drag, can also be included in N-body simulations.

3. Can N-body codes simulate the formation of planetary systems?

Yes, N-body codes can be used to simulate the formation of planetary systems from protoplanetary disks. By incorporating the physical processes involved in planet formation, such as accretion and gravitational interactions, these codes can provide insights into the formation of our own solar system and other planetary systems.

4. How do scientists validate the results of N-body simulations?

Validation of N-body simulations involves comparing the results to observational data and other theoretical models. This can include comparing the simulated orbits and planetary configurations to those observed in real planetary systems, as well as performing sensitivity tests to assess the impact of different parameters and initial conditions on the simulation results.

5. What are the limitations of N-body codes in studying planetary system dynamics?

N-body codes are limited by the computational power and numerical accuracy of the computer systems on which they are run. This can make it challenging to simulate highly complex systems with a large number of particles, or to accurately model certain physical processes. Additionally, N-body simulations may not account for all relevant factors in planetary system dynamics, such as the influence of stellar evolution or external perturbations from nearby objects.

Similar threads

Replies
12
Views
2K
Replies
2
Views
627
  • Astronomy and Astrophysics
Replies
2
Views
1K
  • Astronomy and Astrophysics
Replies
6
Views
2K
Replies
17
Views
2K
  • Sci-Fi Writing and World Building
Replies
21
Views
1K
  • Astronomy and Astrophysics
Replies
4
Views
9K
  • Linear and Abstract Algebra
Replies
2
Views
1K
Replies
7
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
Back
Top