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
the gradient taken
and
also be accurate
and
also be quick to evaluate.
FIGURE 26. Applying a star's potential to mesh points
O n g
(
)
Previous page    Home    Table of Contents    Next page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
This document is best viewed as n-body.pdf because the translation to html was buggy.