< 2.3.1.3 Bodies 2.3.3 Display >

2.3.2  Compute position

Vectors required to compute the new position of a body are shown in Table 4:

 

Vector Sign
Position vector p
Velocity vector v
Force vector f

Table 4. Vectors

 

Vectors are in bold and italic type. Subindex to the current (starting) time: 0. p0 and v0 are given, but f0 shall be computed. To compute the force vector of n body in the System, the program uses an antisymmetrical matrix that shall be filled in by computing (n2 - n) / 2 elements. For instance, the gravitational vector matrix of a system consisting of 4 bodies is seen as follows:

 

Bodies Sun Earth Moon Mars
Sun 0 A B C
Earth -A 0 D E
Moon -B -D 0 F
Mars -C -E -F 0

 

To obtain the force vectors for the bodies Sun, Earth, Moon and Mars, 6 elements (A, B, C, D, E and F) shall be figured out. As seen, if the Sun attracts the Earth by force A, then according to Newton's third law, the Earth will attract the Sun by force –A of equal magnitude, but opposite direction. Values of each element are computed by Newton's vectorial gravitational formula:

 

 

where the minus sign refers to an attraction force, is the unit vector. The double subindex refers to that the force vector is meant from the first indexed one to the second. The final formula for the force vector is:

 

 

Thereby, the force vector in question is resulted:  where b is an index to the body.

Force vector of the body after dt time:

Position vector of the body after dt time:

The more precise the model computes, the smaller is the time unit dt.

 

 

 

 

 


< 2.3.1.3 Bodies 2.3.3 Display >