- #1
Xilor
- 152
- 7
- TL;DR Summary
- I'm trying to build a solar system simulator and have questions
Hiya
Hiya. I'm trying to build a solar system simulator for research purposes, and this does not seem to be all that easy. As in, my firsts tests have the moon shooting out of the solar system... I was wondering if you folks could offer some guidance.
So, since it's for research, accuracy is the most important aspect. Velocities of the objects in the solar system are especially important to me, and I'd like to be able to get as close as possible to the true values over some timespans. Ideally, I'd like to be able to reach a precision of the movements of masses within about 0.1 m/s of the true value over a simulation period of a year. I imagine this optimistic precision is orders of magnitude away from what I can actually manage, but it's the figure I'd like to keep in mind while building the simulator.
Because of the things I'd like to test, I basically need to use gravitational acceleration, I can't use Kepler's planetary motion or similar hacks.So, problem one. Using timesteps obviously introduces small errors that build on each other. How do I best prevent these inaccuracies? Should I just use the Euler method with small timesteps, or is there some better method I could use (in terms of precision / execution time)?
Problem two. What masses do I actually need for my desired accuracy level? Would I need the satellites of other planets? How about the Kuiper belt? (and how would I model that?) Dwarf planets? How about stars in 'close' proximity to the sun or the galaxy itself? For performance reasons, and for ease of development, I'd obviously like as few masses as necessary. Would it be ok to just add the masses of the moons of other planets to their mass?
Problem three. I'm going to need a good grond truth for positions and velocities for both the start and end time of my simulation for the masses I decide to use. Both to get everything started realistically and to check how accurate I am. Ideally, the ground truth is something I can access programatically so I can easily alter my simulation period. The positions/velocities will also have to be in x,y,z coordinates or need to be convertable in those. I don't neccessarily care if the 'ground truth' actually perfectly matches the true historical data. As long as the 'end truth' is a correct (within my desired accuracy) result of the 'start truth' given what we know, then it works for me.
The best library I found so far is this https://github.com/mgvez/planet-positions which is used in the jsOrrery solar system simulation, and I'm using it now, but I'm not sure if it's usable/reliable enough. For starters, it only has data for the Sun, planets and moon, so I couldn't add larger moons like Titan if I went with this. Does anyone know of a better way to obtain ground truth data?
Problem four. Is Newtonian gravitational acceleration actually enough for the desired precision? Are there any GR effects I need to consider for my desired accuracy? How about radiation pressure? SR velocity addition? Anything else I might've missed?
Hiya. I'm trying to build a solar system simulator for research purposes, and this does not seem to be all that easy. As in, my firsts tests have the moon shooting out of the solar system... I was wondering if you folks could offer some guidance.
So, since it's for research, accuracy is the most important aspect. Velocities of the objects in the solar system are especially important to me, and I'd like to be able to get as close as possible to the true values over some timespans. Ideally, I'd like to be able to reach a precision of the movements of masses within about 0.1 m/s of the true value over a simulation period of a year. I imagine this optimistic precision is orders of magnitude away from what I can actually manage, but it's the figure I'd like to keep in mind while building the simulator.
Because of the things I'd like to test, I basically need to use gravitational acceleration, I can't use Kepler's planetary motion or similar hacks.So, problem one. Using timesteps obviously introduces small errors that build on each other. How do I best prevent these inaccuracies? Should I just use the Euler method with small timesteps, or is there some better method I could use (in terms of precision / execution time)?
Problem two. What masses do I actually need for my desired accuracy level? Would I need the satellites of other planets? How about the Kuiper belt? (and how would I model that?) Dwarf planets? How about stars in 'close' proximity to the sun or the galaxy itself? For performance reasons, and for ease of development, I'd obviously like as few masses as necessary. Would it be ok to just add the masses of the moons of other planets to their mass?
Problem three. I'm going to need a good grond truth for positions and velocities for both the start and end time of my simulation for the masses I decide to use. Both to get everything started realistically and to check how accurate I am. Ideally, the ground truth is something I can access programatically so I can easily alter my simulation period. The positions/velocities will also have to be in x,y,z coordinates or need to be convertable in those. I don't neccessarily care if the 'ground truth' actually perfectly matches the true historical data. As long as the 'end truth' is a correct (within my desired accuracy) result of the 'start truth' given what we know, then it works for me.
The best library I found so far is this https://github.com/mgvez/planet-positions which is used in the jsOrrery solar system simulation, and I'm using it now, but I'm not sure if it's usable/reliable enough. For starters, it only has data for the Sun, planets and moon, so I couldn't add larger moons like Titan if I went with this. Does anyone know of a better way to obtain ground truth data?
Problem four. Is Newtonian gravitational acceleration actually enough for the desired precision? Are there any GR effects I need to consider for my desired accuracy? How about radiation pressure? SR velocity addition? Anything else I might've missed?