I've made a 3d particle simulator where particles are attracted to each other by the inverse of the square radius. The purpose of my experiment is to see if this alone would create a flat disk (like some galaxies) since the inverse of the radius is the same as gravity and we can consider the particles stars. The particles (or stars) are initially randomly distributed around a a point in space with a start velocity as the cross product of the vector pointing towards the center and the axis of rotation (to make sure there is a net angular momentum).
As you probably already guessed this is not enough to make it form a flat disc. I've been reading about galaxies and found that the cause of the disc shape is because angular momentum is hard to get rid of. However, angular momentum is not really a separate law right? I mean, by using the attraction by the inverse square of the radius the angular momentum should be constant? Please, correct me if I'm wrong.
So what am I missing? Dark matter? Dissertation? I realize that galaxy formation is a REALLY broad and advanced topic but my simulation is ONLY to get particles to form a disc shape.
Any help appreciated!