home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / astrnomy / de118i.zip / SSYSTEM.DOC < prev    next >
Text File  |  1992-09-07  |  19KB  |  425 lines

  1.             DE118i.ARC
  2.  
  3. Summary:
  4.  
  5. This program performs an N-body numerical integration of the Sun,
  6. Earth, Moon, and planets. The physics model includes
  7. gravitational harmonics of the Earth and Moon, Earth tides, Lunar
  8. librations, relativity theory corrections, and five asteroids. 
  9. The integrator is an Adams-Bashforth-Moulton predictor-corrector
  10. method that is initialized by several Runge-Kutta steps.
  11.  
  12. This version "i" is extremely accurate due to use of long double
  13. precision arithmetic throughout.  It has been used to compute
  14. ephemerides extending from 9,000 B.C. to 13,000 A.D.
  15.  
  16. An effort has been made to achieve exactly the same physics
  17. model as in the NASA-JPL integrations that form the basis of the
  18. Astronomical Almanac.  The numerical results compare favorably
  19. with JPL's DE118 and DE200 ephemerides.
  20.  
  21.  
  22. The Model:
  23.  
  24. The principal forces that determine the motions are Newtonian
  25. gravitational attractions between the solar system bodies modeled
  26. as point masses or spheres.  The Newtonian forces are modified by
  27. relativistic corrections as described in the first reference
  28. (Newhall et al, 1983).  The relativistic center of mass of the
  29. solar system is  constrained to stay at the origin of the
  30. coordinate system by adjusting the barycentric location and
  31. velocity of the Sun after each integration step.
  32.  
  33. The five asteroids Ceres, Pallas, Vesta, Iris, and Bamberga are
  34. included in JPL's model because of their perturbations on the
  35. motion of Mars.  Their motions are not integrated; the orbits are
  36. calculated by Chebyshev expansions that approximate fixed
  37. Keplerian ellipses.  Coefficients for these expansions are
  38. supplied in the documentation records on the JPL ephemeris tapes.
  39. The asteroids have a numerically significant effect (10^-12 au)
  40. on the location of the barycenter of the solar system.  Therefore
  41. it is important to include them in order to get an accurate
  42. short-term reproduction of JPL's ephemerides.  The asteroid
  43. orbits do not agree with the Russian Ephemerides of Minor
  44. Planets.
  45.  
  46. Also not integrated is the Earth's orientation.  This is computed
  47. by a precession matrix and a one-term nutation series.  The
  48. orientation is required for oblateness calculations. In the
  49. DE102, and apparently also the DE118, the precession was
  50. calculated using Newcomb's precession constant and as if the
  51. reference equatorial coordinate system were that of B1950. The
  52. method used to calculate nutation is uncertain; however, the 1977
  53. and 1980 IAU formulas give a good fit, at least in the tested
  54. neighborhood of the initial epoch.  The 10,000-year precession
  55. formulas of J. Laskar (1986) and the 1980 nutation formula are
  56. the ones actually distributed with DE118i.ARC.
  57.  
  58. Lunar librations are computed by integrating Euler's equations
  59. for the rotation of a rigid body, expressed in terms of the
  60. Euler angles that relate the Moon's orientation to the fixed
  61. reference equatorial coordinate system.  The rotation is
  62. affected by external torques from the Earth and the Sun. Two of
  63. the numerical parameters are ambiguous or not available in the
  64. documentation.  In the case of the DE102 model, the mean radius
  65. of the Moon is 1738.09 km.  In the DE118, the Lunar moment of
  66. inertia coefficient C/MR^2 was not specified; its value has been
  67. estimated to be 0.390689526131941 by fitting to the initial
  68. second derivatives of the libration angles.
  69.  
  70. The DE200 is identical to the DE118 except for a rotation of the
  71. computed states from B1950 to J2000.  Provision is made in this
  72. program to perform the rotation prior to writing out the
  73. results.  The default configuration produces DE200 outputs.
  74.  
  75.  
  76. The Integrator:
  77.  
  78. Numerical integration of the system of ordinary differential
  79. equations is carried out by an Adams-Bashforth-Moulton
  80. predictor-corrector method.  This has to be initialized by
  81. supplying a number of state variable points that have been
  82. calculated by some other means (or else by the same method
  83. but with very small initial steps).
  84.  
  85. In the integrator, if the Adams order is set to N, then the
  86. first N+1 steps are performed by the Runge-Kutta integrator
  87. subroutine runge.c.  These take about 7 times longer than the
  88. subsequent steps done by the Adams-Bashforth-Moulton integrator
  89. routine, adams4.c.
  90.  
  91. Neither the step size nor the approximation order has been made
  92. self-adjusting.  Some experimentation was required to achieve a
  93. balance between speed and accuracy.  The integrator settings
  94. adopted for most of the tests were an Adams order of 11 and step
  95. size of 3/16 day; these are near the optimum values for the
  96. Moon's motion using IEEE 754 double precision floating point
  97. arithmetic.  However, the Lunar librations are more accurate if
  98. the step size is smaller. The numerical accuracy can be improved
  99. by using IEEE 854 (80-bit) arithmetic and a step size of 1/8
  100. day.  The software has been written so that the parameter
  101. LDOUBLE in the file prec.h can select the extended precision
  102. arithmetic, for language compilers that support such a feature.
  103. Instability in the Moon's motion appears for step sizes of about
  104. 1/4 day or greater and Adams order >= 11.
  105.  
  106. JPL's integrator also uses an Adams method, but theirs has the
  107. capability to modify the step size independently and adaptively
  108. for all the integrated variables.  This ability makes it
  109. potentially faster and more accurate than an integrator with
  110. fixed step size. See the referenced book by Shampine and Gordon
  111. and the paper by Krogh for more details.
  112.  
  113.  
  114. Running the Program:
  115.  
  116.  
  117. When ssystem.exe is invoked, it asks several questions that
  118. require operator keyboard entries.
  119.  
  120. (1)
  121. Do you want to restore a previously saved integrator state?
  122.  
  123. If starting a new ephemeris, answer by typing the letter n
  124. and the Enter key.
  125.  
  126. To continue a computation that was interrupted, answer y.  In
  127. that event a valid checkpoint file named de118.sav must be
  128. available.  The program creates this file whenever it completes
  129. a run or is interrupted gracefully.
  130.  
  131. To continue, but with a different tabular output interval (see
  132. question (4) ), answer z.
  133.  
  134.  
  135. (2)
  136. Adams order ?
  137.  
  138. Asked only if the answer to (1) was n.  This is the integer
  139. degree of the interpolation polynomial employed by the Adams -
  140. Bashforth - Moulton integrator formula.  A small value gives less
  141. accurate results than a larger value; but if too large, the
  142. computation will be unstable and diverge to a meaningless result.
  143. Maximum allowed value is 13. Suggested answer is the number 12
  144. followed by Enter.
  145.  
  146. (3)
  147. step size, days ?
  148.  
  149. Asked only if (1) was n.  This is the duration of each internal
  150. integrator step.  A smaller step size gives a smaller error, down
  151. to a minimum error limit imposed by the accuracy of the
  152. arithmetic.  For accurate representation of the Lunar orbit, a
  153. suggested answer is the number 0.125.
  154.  
  155. (4)
  156. Interval between output samples, in steps ?
  157.  
  158. Asked if (1) was n or z.  This controls the tabulation interval
  159. of the output ephemeris. For a suggested answer 3200, one
  160. ephemeris record will be written for every 3200 integrator steps,
  161. or 0.125 x 3200 = 400 days.
  162.  
  163. (5)
  164. Output file name ?
  165.  
  166. Enter the name of a disc file.  The program will create this file
  167. and write the ephemeris records into it.  Caution: if the file
  168. already exists, its previous contents will be destroyed.
  169.  
  170. (6)
  171. Number of output samples ?
  172.  
  173. Enter the desired number of records to be written to the
  174. ephemeris file.  The program will stop, close files and exit
  175. after it has computed the indicated number of records.
  176. Be sure to rename the checkpoint file de118.sav that is
  177. produced, otherwise it will be overwritten the next time
  178. the program is run.
  179.  
  180.  
  181. At any desired time, the user may interrupt the integration by
  182. typing a capital S and the Enter key.  Computation will continue
  183. until the next record has been written to the output file. The
  184. file will then be closed and the complete internal state of the
  185. integrator will be saved in a file named de118.sav.  Note,
  186. the ability to detect that the user hit a key on the keyboard
  187. is system dependent; this functionality has been included
  188. only for IBM PC, using the library routine called kbhit().
  189.  
  190. It is important to retain all the .sav files so that it will be
  191. possible to rerun interesting intervals later at a higher time
  192. resolution. Copy each .sav file produced to a safe place,
  193. renaming it by any convenient serial ordering scheme.  In the
  194. event of equipment or power failure, the integration may be
  195. continued from the last .sav file, but this file must be renamed
  196. to have the name de118.sav. Note, the integrator does not merely
  197. "restart" from this information; it carries on as if it had never
  198. been interrupted at all.
  199.  
  200. The integrator output ephemeris files must be given different
  201. names also, as the program will overwrite and destroy the data if
  202. it is told a pre-existing file name for output.  Several output files
  203. may be concatenated into one large file by the ordinary MSDOS
  204. command of the form "copy /b name1+name2 name3". It is suggested
  205. that the files be limited to 1.2 megabytes in size so they can be
  206. copied onto floppy discs.
  207.  
  208. On startup, the program reads initial conditions and certain
  209. constant parameters, such as the speed of light, from a text
  210. file named aconst.h.  This file may be modified with a text
  211. editor to explore the results of varying the initial conditions.
  212.  
  213.  
  214. Numerical Comparisons:
  215.  
  216.  
  217. In researching the model and debugging the program, the
  218. discrepancy in the initial inertial acceleration of the Moon was
  219. taken as an indication of the closeness of fit between this
  220. program and JPL's original calculation. This discrepancy is less
  221. than 10^-18 astronomical units (au)  per day^2 in each coordinate.
  222.  
  223. A complete set of starting conditions has been published for the
  224. DE102. Using the DE102 model, the discrepancy in the geocentric
  225. Moon location between this program and DE102 was 4x10^-14 au
  226. after 400 days and 9x10^-12 au after 7200 days.  These results
  227. are in agreement with the published estimate for the drift in
  228. the DE102's Moon position, 10^-9 x days^1.7  kilometers.
  229.  
  230. The following table shows the result of estimating a set of
  231. initial conditions for the DE200.  The initial libration state
  232. was calculated by the analytical theory of Eckhardt, then
  233. adjusted to obtain a least squares fit of the Moon's position
  234. and velocity over a 6 year interval.  The table indicates the
  235. maximum observed discrepancies in barycentric position vectors
  236. between this program and DE200, measured in astronomical units,
  237. over the indicated integration periods.  Comparisons were made
  238. at 24-day intervals.
  239.  
  240.            408 days       7200 days
  241. Mercury    1.2e-14         1.8e-11
  242. Venus      7.0e-14         6.8e-12
  243. EMB        3.5e-14         7.2e-13
  244. Mars       2.0e-14         3.0e-13
  245. Jupiter    1.0e-14         1.2e-12
  246. Saturn     1.5e-14         2.9e-13
  247. Uranus     5.0e-14         5.5e-13
  248. Neptune    3.4e-14         5.4e-13
  249. Pluto      6.2e-14         7.2e-13
  250. Moon-Earth 2.8e-13         7.6e-12
  251. Sun        9.6e-18         1.2e-15
  252.  
  253. The step size was 3/16 day and the Adams order was 11. The
  254. 7200-day calculation in IEEE double precision arithmetic took
  255. about 6 hours on a 12MHz 68020/68882 computer.
  256.  
  257. Original 18-digit DE118 state vectors, including the librations,
  258. were kindly supplied by JPL.  These yielded the best comparisons
  259. to the DE200 Moon, so the DE118 model is the only one
  260. distributed with this program.  The effect of arithmetic
  261. precision can be seen in the following comparison of barycentric
  262. states to the DE118 after integrating forward 400 days with a
  263. 1/8 day step size.  "Double" refers to IEEE 754 arithmetic and
  264. "Long Double" is the 80-bit mode of an 80287 arithmetic
  265. coprocessor.  The third and fourth columns of the table are the
  266. results of 7200-day integrations in double arithmetic. The DE118
  267. model was used, the output was rotated to the DE200 equinox, and
  268. comparisons were made at 24-day intervals to the DE200
  269. ephemerides; the maximum discrepancy, in au, is reported. The
  270. last column is the same as the fourth but the integration was
  271. done in long double arithmetic.
  272.  
  273. Arithmetic  Double      Long Double   Double       Double  Long Double
  274. Interval     400 d        400 d       7200 d       7200 d    7200 d
  275. Step Size    1/8 d        1/8 d       3/16 d        1/8 d     1/8 d
  276.  
  277. Mercury    1.2e-13      3.4e-15      1.9e-12      2.4e-12     1.9e-12
  278. Venus      4.0e-14      3.9e-15      1.1e-12      6.9e-13     1.3e-12
  279. EMB        9.4e-14      2.1e-16      1.5e-12      3.0e-12     1.0e-12
  280. Mars       4.6e-14      1.7e-15      1.0e-12      1.3e-12     8.7e-13
  281. Jupiter    1.0e-14      5.9e-15      3.9e-13      4.2e-13     2.8e-13
  282. Saturn     1.5e-14      7.0e-15      1.6e-13      2.1e-13     3.3e-13
  283. Uranus     5.1e-15      2.4e-14      3.3e-13      4.7e-13     3.4e-13
  284. Neptune    9.4e-14      3.0e-14      3.7e-13      5.3e-13     4.2e-13
  285. Pluto      1.6e-14      2.6e-14      6.3e-13      2.7e-13     5.5e-13
  286. Moon-Earth 1.5e-14      1.6e-14      2.2e-12      6.4e-13     2.0e-13
  287. Sun        1.5e-17      5.9e-18      4.0e-16      4.1e-16     2.4e-16
  288. Librations 2.7e-12      2.6e-12         ?            ?           ?
  289.  
  290. Note that the variable step size in JPL's integrator was
  291. adjusted for an accuracy of 2 x 10^-16 au/day for the orbits and
  292. 2 x 10^-14 rad/day for the librations.  The former figure applied
  293. linearly with time would predict a magnitude error after 7200
  294. days of 2.5 x 10^-12 au for the orbits.  See Moshier (1992) for
  295. further comparison with the DE200.
  296.  
  297.  
  298. Computer Progam Files:
  299.  
  300. aconst.h        Text file of initial conditions read by the program.
  301.                 These may be changed without recompiling the software.
  302. de118.sav       Complete state of the integrator saved after each run.
  303.                 The program may carry on later by reading this file.
  304. prec.h        Sets arithmetic to double or long double precision
  305. int.h        Integrator settings
  306. mconf.h        Sets hardware (680x0, IBM PC, DEC PDP-11/VAX)
  307. ssystem.h    Software parameter settings
  308. ini118d.h    Compiled initial conditions and test states from DE118
  309. aconst.c    Compiled initial conditions for long double precision
  310. adams4.c    Adams-Bashforth integrator
  311. runge.c        Runge-Kutta integrator
  312. ssystem.c    Main program and force calculations
  313. jplmp.c        Asteroid orbit Chebyshev expansions
  314. oblate.c    Earth-Moon figure model and tides
  315. precess.c    Precession to or from basic epoch
  316. nut1t.c        One-term nutation series
  317. epsiln.c    Obliquity of Earth's equator to the ecliptic
  318. findcent.c      Adjusts initial state to place barycenter at origin
  319. asinl.c         Circular arcsine function in long double precision
  320. atanl.c         Circular arctangent function in long double precision
  321. sinl.c          Circular sine function in long double precision
  322. tanl.c          Circular tangent function in long double precision
  323. zatan2.c        Quadrant correct arctangent
  324. polevll.c       Polynomial evaluator for long double precision
  325. mtherr.c        Common error handler
  326. const.h         References to some constants
  327. rdnums.c        Reads initial conditions from aconst.h
  328. ieee.c          Extra precise arithmetic used to read decimal
  329.                 constants at run time from aconst.h
  330. econst.c        Extended precision numerical constants for ieee.c
  331. etodec.c        DEC/IEEE floating point format conversion
  332. ssysteml.mak    Microsoft makefile for long double precision
  333. ssystemd.mak    Microsoft makefile for regular double precision
  334. unix.mak        Unix makefile
  335. ssystem.opt     DEC VAX/VMS makefile
  336. descrip.mms     DEC VAX/VMS makefile
  337.  
  338. Program Output:
  339.  
  340. The data structure for the numbers that are written into the
  341. output file from ssystem.c is given in the file ini118d.h. Each
  342. output file record contains the Julian date followed by the
  343. current velocity and position states. The state variables are
  344. equatorial rectangular cartesian coordinates referred to a fixed
  345. equator and ecliptic (B1950 or J2000).  The origin is at the
  346. barycenter of the Solar system, and the unit of distance is the
  347. astronomical unit. The unit of time is the day (86400 ephemeris
  348. seconds).  All the numbers are floating point, either double or
  349. long double precision.  There are six numbers for each object,
  350. in the following order:
  351.  
  352. dx/dt, x, dy/dt, y, dz/dt, z
  353.  
  354. The vector (x, y, z) is the barycentric position vector of the
  355. object; the vector (dx/dt, dy/dt, dz/dt) is the barycentric
  356. velocity vector.
  357.  
  358. The order of the objects is Librations, Mercury, Venus, EMB,
  359. Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, MOON, Sun.
  360.  
  361. EMB is the arithmetic average of Earth and Moon, weighted by
  362. their masses. The coordinates of the MOON vector are the the
  363. solar system barycentric coordinates of the Moon minus those of
  364. the Earth.
  365.  
  366. The Librations "object" is used to find the the selenocentric
  367. direction of the Earth relative to the Lunar principal moment of
  368. inertia axes. The coordinates integrated are the three Euler
  369. angles, in radians, of the Moon's orientation relative to the
  370. fixed equatorial coordinate system.  See the DE102 paper given in
  371. the references for further explanation.
  372.  
  373.  
  374. Acknowledgments:
  375.  
  376.   I thank J. G. Williams and E. M. Standish, of JPL, and R.
  377. Babcock, of SAO, for their help in clarifying the details of the
  378. model.  These people of course had nothing to do with writing
  379. this program and bear no responsibility for my mistakes.
  380.  
  381.  
  382. References:
  383.  
  384. Eckhardt, Donald H., "Theory of the Libration of the Moon,"
  385. The Moon And the Planets 25, 3-49 (1981).
  386. The introduction explains Cassini's laws and the libration
  387. equations.
  388.  
  389. Goldstein, Herbert, _Classical Mechanics_, Addison-Wesley, 1950.
  390. Contains a useful tutorial on rigid body rotation.
  391.  
  392. Laskar, J., "Secular terms of classical planetary theories
  393. using the results of general theory," Astronomy and Astrophysics
  394. 157, 59070 (1986).
  395.  
  396. Moshier, S. L., "Comparison of a 7000-year Lunar ephemeris with
  397. analytical theory,"  Astronomy and Astrophysics (1992), in press.
  398. The output of this computer program is compared in detail
  399. with the analytical Lunar theory of Chapront and Chapront.
  400.  
  401. Newhall, X. X., E. M. Standish, and J. G. Williams, "DE102: a
  402. numerically integrated ephemeris of the Moon and planets
  403. spanning forty-four centuries," Astronomy and Astrophysics
  404. 125, 150-167 (1983).
  405. This is the primary summary reference for the physics model.
  406.  
  407. Standish, E. M., "Orientation of the JPL Ephemerides, DE200/LE200,
  408. to the Dynamical Equinox of J2000," Astronomy and Astrophysics
  409. 114, 297-302 (1982)
  410. Provides rotation matrices for conversions between DE102, DE118,
  411. and DE200.
  412.  
  413. Shampine, L. F. and M. K. Gordon, _Computer Solution of
  414. Ordinary Differential Equations_, W. H. Freeman, 1975.
  415. This book gives a detailed explanation of Adams integrators
  416. with either fixed or variable step size.
  417.  
  418. Thomas, Benku, "The Runge-Kutta Methods," BYTE magazine
  419. 11, #4, April 1986
  420.  
  421.  
  422. -Steve Moshier
  423.  2 April 1991
  424. Last update: 16 August 1992
  425.