Example: Celestial dynamics

In the simplest example we define a system, which consists of similar subsystems. The input file below shows a model describing the motion of the earth, the moon and the sun:

Here, all three subsystems are treated equally. We have two levels of systems:

Expand for input file with two levels of nesting

While this is a perfectly fine definition of the system, sometimes it is beneficial to group systems together. For instance, we might define a “Earth” as the combined system of “Terra” and “Luna”, which is orbiting the sun:

Expand for input file with three levels of nesting