Final answer:
To measure the accuracy of your n-body simulation and overcome the issue of units, you can use a method called dimensional analysis. For more realistic and manageable simulations, rescaling the units used can be employed.
Step-by-step explanation:
To measure the accuracy of your n-body simulation and overcome the issue of units, you can use a method called dimensional analysis. This involves establishing the relationships between different physical quantities by comparing their units. For example, you can analyze how the outcome of your simulation varies with changes in the time step or the number of bodies. You can also compare your results with known analytical solutions or experimental data if available.
To make your simulation more realistic and to handle larger values, you can rescale the units used in your simulation. For example, you can scale down distances and times to fit within the display window while maintaining the same relative ratios between them. By doing this, you can still accurately represent the dynamics of the system without dealing with extremely large numbers.