The mass used in the simulation can be 1g or 1kg or any other unit. It does not matter, the result will be the same (as long as all the particles used the same unit).

Because This is a two dimensional simulation, the mass is proportional to area (mass=density*area). And the area of a circle is , that is why the mass is proportional to r*r in a 2D simulation. (mass will be proportional to for a 3-D simulation.).