I am interested in creating an orrery, ideally with SystemModeler. I have been experimenting with the MultiBody library since that allows you to do animations.
The most relevant example seems to be Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravity, but the problem is that it has a single point of gravity. You can change the gravity from the earth's gravity to something else, but for my orrery I would think each body needs to have gravity/mass. The bodies do have a settable mass, though, so does this mean I can just create one body for each planet, set the mass correctly and it will work?
So, in other words one way to set up the model would seem to be to make the "world" have the gravity of the sun and gravity type of
PointGravity, then have the planets as bodies moving around it. However, I don't think this will work right because the "world" object's gravity is constant, but in the solar system the force of gravity is a function of the distance.
Another idea I had was to make the "world" object have type
NoGravity, but then how do I constrain the planets? If I add in the sun as a body, and give the planets and the sun appropriate masses and distances and velocities will the simulator compute the instantaneous gravity between them, ie, solve the N-body problem automatically?
Afterthought: is there a way to customize the look of the "bodies"? In the example they are just blue spheres and you can change their color and size but that is it.