Looking for advice on solar system integrator

In summary, the conversation discusses the use of different integrators and their effectiveness in accurately simulating a solar system with added moons and planets. The project is still in development, with the purpose being undecided but focusing on real-time simulation, good graphics, and the ability to add bodies. Different integrators such as Adams-Bashforth, Runge-Kutta, and Euler are being used and the issue of decreasing step sizes when adding moons is addressed. There is also a discussion about using data from NASA HORIZONS and the use of perturbations in integrators. Further, there is mention of different methods such as Lagrange's planetary equations and the KL transform for dealing with orbital elements. The conversation ends with a mention of potential challenges in
  • #1
Deadstar
104
0
I've been building a solar system integrator using C++, OpenGL for graphics, Qt for UI and I would like some info about the choice of integrator. The project is at a pretty advanced stage now and I'm currently adding all moons since graphically it's doing well, I can move about the whole system freely and I've got several integrators available to use mid-simulation (as well as the option to add in bodies during the simulation and control over time steps etc). The purpose of this project is still sort of undecided. I want it to run in real time, have decent graphics, have the ability to move throughout the solar system and be able to add bodies when you like. I'm not trying to get a perfect simulator but would like it be as accurate as possible while maintaining the above conditions (obviously violated by the add body feature but besides that). All of this (except the graphics aren't great yet) is currently done but as I want to ask some questions before I advance things any further.

I am currently using an Adams-Bashforth stage 5 integrator although I can also use stage 3 and 4 Adams (easily extendable to higher orders), Runge-Kutta, Euler integrators and have a decent framework set up so that I can add more pretty easily. This is fine and the results are really good but adding moons makes things slightly more awkward in that step sizes have to decrease a bit for the orbits to be anywhere near accurate for a decent length of time. I use data from the NASA HORIZONS site btw.

So, question time.

I was wondering if there are any integrators (surely must be) that are built for this sort of problem and use keplers laws as a basis and adds perturbations? It would have to deal with the effects of extra planets that I randomly throw in so a pure keplerian integrator wouldn't do it as it wouldn't take into account any other body, just the one it orbits.The way I currently set the integration up is to calculate gravitational effects using the centre of mass of planet-moon system and only use the effect from individual moons when an object is within the planets hill sphere. Does this seem like a decent idea and will it be accurate enough for short term (<1000 year) simulations? I figure I currently have scaled units such that 1 unit of time is a day, 1 unit of distance is 1AU and 1 unit of mass is the mass of the earth. Does this seem reasonable or will it become problematic with precision when including smaller moons (since also radius of moons are scaled by 1AU, they can get pretty small). Would perhaps using mercury mass and semi major as base units help this or not? Quite difficult to find a balance between scale when dealing with 100km moons and billion kilometer semi major axis.Again, I don't exactly have clear defined goals yet. It's sort of an exercise in integration, programming, graphics and that sort of thing. I do have a certain idea I want to implement but that would be after everything else is done... I suppose I would be working towards something like Universe Sandbox (although I can't get it to run on my laptop, I've seen images of it and looks very interesting). I think that uses Euler integration though with tiny time steps and as I'm very much interested in numerical integration I'd prefer to use this as a chance to implement several different ones. I've also got a symplectic Runge Kutta written up somewhere but I imagine it would drop the frame rate too much if used...Thanks in advance for any info or advice.
 
Astronomy news on Phys.org
  • #2
You might want to have a look here for some ideas about integration methods. The site author has done some nifty simulations, particularly for Klemperer Rosettes.
 
  • #3
Deadstar said:
I was wondering if there are any integrators (surely must be) that are built for this sort of problem and use keplers laws as a basis and adds perturbations? It would have to deal with the effects of extra planets that I randomly throw in so a pure keplerian integrator wouldn't do it as it wouldn't take into account any other body, just the one it orbits.
Yes, there are. This is essentially what NASA used back in the 1960s to calculate precision orbits of the Apollo missions (Encke-Nystrom). This approach used a baseline elliptical trajectory propagated via Kepler's laws and a deviation from this baseline with perturbations caused by other bodies. Occasionally the baseline had to be re-anchored when the difference between calculated and baseline grew too large.

Another approach is to use Lagrange's planetary equations (variants: Gauss' planetary equations, Hill's planetary equations, ...). These give the partial derivatives of some set of orbital elements with respect to disturbing forces. Which set of orbital elements? That's why there are some many different sets of planetary equations. Another factor that comes into play is whether the forces are conservative (gravitation) or non-conservative (drag).

Yet another approach that falls into this camp are those that use the KL (Karhunen-Loève) transform. You may have heard the phrase "Euler angles are evil." So are orbital elements. In fact, the longitude of ascending node, the inclination, and the argument of periapsis are a ZXZ Euler sequence. One way around using Euler angles to describe rotations is to use quaternions. Can quaternions be used as an alternative to orbital elements? The answer is yes. The KL transform uses a pair of quaternions to get around those Euler angle type problems that are associated with orbital elements.

One problem with all of these techniques is that the states being integrated are not cartesian position and velocity. For an N-body problem, this means there is a lot of back and forth between the state as modeled by the integrator and the cartesian positions needed to compute planet-to-planet interactions. Another problem is that it is mean anomaly (or something very similar) rather than time that is the independent variable. This again creates problems with the N-body problem.

That said, there is a lot of renewed interest in these techniques as of late. They are potentially very useful for solving the orbital debris problem. Here, body-to-body gravitational interactions are essentially non-existent. The problem separates nicely into a bunch of independent orbit propagators of objects that follow perturbed ellipses. Not so nicely, the amount of debris is growing, rapidly. Compounding this is the desire to track ever smaller chunks of debris. The old techniques can't keep up, even with the help of Moore's law.
The way I currently set the integration up is to calculate gravitational effects using the centre of mass of planet-moon system and only use the effect from individual moons when an object is within the planets hill sphere. Does this seem like a decent idea and will it be accurate enough for short term (<1000 year) simulations?
Consider the Earth's Moon. It is essential to model the perturbations by the Sun on the Moon's orbit if you want to have even short term accuracy for its orbit about the Earth. Some of the solar perturbations were known to the ancients (obviously not the cause, but the effect certainly was). If you want to have long term accuracy (100s of years) you also need to model perturbations by Jupiter and Venus.

You may also need to model moon-to-moon interactions. For example, Io, Europa, and Ganymede are locked in a 1:2:4 orbital resonance. Accounting for these inter-moon interactions is essential for long term accuracy. (This pertains to the perturbations by the large moons. The perturbations by smaller moons don't matter.)

Bottom line: A Hill sphere approach won't cut it if you want long term accuracy.
I currently have scaled units such that 1 unit of time is a day, 1 unit of distance is 1AU and 1 unit of mass is the mass of the earth. Does this seem reasonable or will it become problematic with precision when including smaller moons (since also radius of moons are scaled by 1AU, they can get pretty small).
A bigger concern is your timestep. You need to have r/(vΔt) and v/(aΔt) be the "right size". Too small and numerical errors will kill your accuracy. Too large and deficiencies inherent in the integration technique will kill your accuracy. What that "right size" is depends on your integration technique. You can use adaptive step size techniques to overcome this to some extent, but now you have a new problem.

That new problem is stiffness. This is a stiff problem. Adaptive step size techniques tend to have a hard time with stiff problems. In fact, this stiffness is a bit pervasive. You need multiple integration rates to get Mercury and Neptune right. Jupiter is a fairly big perturber of Mercury's orbit, so once again, stiffness rears it's ugly head. It rears its ugly head yet again with the moons of the gas giants.
One last thing: You mentioned you are using NASA's Horizons to obtain initial conditions. Just something to beware of: The velocities most likely will kill your long term accuracy. The underlying data are sets of polynomial coefficients (Chebyshev polynomials) that yield position as a function of time. The coefficients are tuned to yield accurate positions and to make position piecewise continuous across set boundaries. While velocity is an easy calculation (it's just the time derivative of the polynomial that yields position), the coefficients are not tuned to yield good velocities.
 
  • #4
Hey D_H, late reply here. Thanks for your post.

Should probably clear up one or two things.

With regards to time step and units used. I suppose I was meaning in terms of finite computer precision and whether certain values 'work better' than others at not accumulating errors.

With regards to perturbations. I think I explained it wrong. Using any moon of Jupiter as an example... I would include perturbations from all other moons of Jupiter, the sun, and the centre of mass of all individual planet-moon systems. If I was say, flying a satellite through my solar system sim, I would calculate effects from all planet-moon centre of masses except if the satellite was inside the hill sphere of the planet and then I would use individual moons effects instead of the centre of mass approach. Sort of a barnes-hut tree approach using the planets hill sphere as a region.

I'm needing to properly learn about quaternions so I'll maybe use this as a chance.
 
  • #5


I would first like to commend you on your progress and the advanced stage of your project. It is clear that you have put a lot of thought and effort into the development of your solar system integrator.

In terms of your question about integrators that are specifically built for this type of problem, there are indeed several that are commonly used in astrophysics and planetary science. Some examples include the Bulirsch-Stoer method, the Wisdom-Holman integrator, and the Gauss-Radau method. These integrators are designed to handle perturbations and can incorporate Kepler's laws as a basis. I would recommend researching these options and seeing if they would be suitable for your project.

In regards to your approach of using the centre of mass for planet-moon systems and only accounting for individual moons within the planet's hill sphere, this can be a reasonable approach for short-term simulations. However, for longer-term simulations, it may not be as accurate as it does not take into account the effects of other planets and moons. You may want to consider incorporating interactions between multiple bodies in your integrator to improve the accuracy of your results.

Regarding your choice of units, it is important to find a balance between scale and precision. Using scaled units can make it easier to visualize and understand the results, but it may also introduce errors when dealing with smaller bodies. I would suggest considering using a combination of scaled units and real-world units, such as using AU for distance and Earth's mass for mass, but keeping the time unit as days. This may help with precision while still maintaining a reasonable scale for your simulations.

Finally, it is great that you have a clear idea of your goals for this project and that you are using it as an opportunity to implement different integration methods. I would suggest continuing to explore and experiment with different integrators to see which ones work best for your project.

Overall, my advice would be to continue researching and experimenting with different integrators, and to also consider incorporating interactions between multiple bodies to improve the accuracy of your simulations. Good luck with your project!
 

1. What is a solar system integrator?

A solar system integrator is a company or individual who specializes in designing, installing, and maintaining solar energy systems. They are knowledgeable about different types of solar panels, inverters, and other components, and can customize a system to meet a specific energy needs and budget.

2. How do I choose the right solar system integrator?

When looking for a solar system integrator, it is important to research and compare different companies. Look for experience, certifications, and customer reviews. You should also consider their pricing, warranties, and the quality of their products and services.

3. Can a solar system integrator help with financing options?

Yes, many solar system integrators offer financing options to help make the upfront cost of solar more affordable. They may have partnerships with financing companies or offer in-house financing options. Be sure to ask about financing options when consulting with a solar system integrator.

4. What types of solar systems can a solar system integrator install?

A solar system integrator can install various types of solar energy systems, including grid-tied, off-grid, and hybrid systems. They can also install different types of solar panels, such as monocrystalline, polycrystalline, and thin-film panels. The type of system recommended will depend on your energy needs and location.

5. How long does it take for a solar system integrator to install a solar energy system?

The timeline for installation can vary depending on the size and complexity of the system, as well as the availability of the integrator. On average, it can take anywhere from 1-3 months to complete the installation process. This includes design, permitting, and installation. However, some integrators may be able to complete the process in a shorter amount of time.

Similar threads

  • Astronomy and Astrophysics
Replies
15
Views
1K
  • Astronomy and Astrophysics
Replies
4
Views
2K
  • Astronomy and Astrophysics
Replies
6
Views
1K
  • Astronomy and Astrophysics
Replies
8
Views
2K
Replies
12
Views
2K
Replies
3
Views
398
  • Introductory Physics Homework Help
Replies
18
Views
1K
Replies
2
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
1K
  • Sci-Fi Writing and World Building
Replies
21
Views
1K
Back
Top