If you're into physical particle systems, Cyrille & Damien Henry have aPMPD would be a good tool for exploring gravity - but you would have to explore the escape velocity scenario, where links (springs) are broken if an object attains a certain angular momentum, and a different (repulsive) mechanism comes into effect (and what about dark matter/energy or as it should be termed, the foo fudge factor (FooFF)).
mass/spring plugin, which was called PMPD when I saw their performance.
Else, GridFlow could do things like that too, but it can also do density
models, which are more like "we have the space and then there's matter in
it" whereas particle systems are more like "we have matter and then it's
somewhere in space".