 Efficient Force Function Evaluation Methods
June 9, 1996
47
4.4 Replace the Force Functions With a Potential Mesh
Instead of calculating the force that each star places on each other star, it is possi-
ble to calculate the force field that each star generates and apply this field to the universe.
This is generally done by having all stars have applied their masses to the mesh points to
create a mass density function. The potential of the each individual star can be calculated
by interpolating along the mesh points. By taking the gradient of this potential we can get
the direction that is "down hill" from the star and also find how steep the "hill" is. This
result is equivalent to the results of calculating the force function.
This method replaces the calculation among every pair of particles with calculat-
ing the potential at many mesh points. This changes the evaluation method from being an
O(n
2
)
method to an
method, where
g
is the number of mesh points. Due to the
other calculations involved with this method, using a mesh is only useful if the number of
mesh points that you must apply the star to is substantially less than the number of stars in
the system. Since gravity is a very long range force, we end up having to apply the star to
each mesh point in the universe. Other forces, such as electric or magnetic dipoles or short
ranged forces such as the nuclear forces have to consider only the mesh points that are
within a certain range of the body.
The accuracy of this method is very dependant on the number of mesh points, but
the more mesh points used means more memory must be used. Since this method also
spreads the body's force over an area, this method does not give very accurate results
when two objects are close together. Finally, the math involved in this method tends to get
quite deep. It is hard to find formulas that can store the potential information
and
also have