HNBody  Version 1.0.10
Functions
lunar.c File Reference

A simple custom driver adding the mean lunar quadrupole. More...

#include <math.h>
#include <hnbody/kernel.h>
Include dependency graph for lunar.c:

Functions

void lunar_version (FILE *f, const char *prefix)
 
void lunar_kick (double(*dv)[3], double t, double(*x)[3], const double m[], int nHL, int n, double dt, const hnb_data_t *sys)
 
double lunar_energy (double t, double(*x)[3], double(*v)[3], const double m[], int nNL, const hnb_data_t *sys)
 
int main (int argc, char *argv[])
 

Detailed Description

Id
lunar.c,v 1.7 2004/02/13 22:58:57 rauch Exp

SRC-Level: ISO C
  MT-Level: TBD

Author
Kevin P. Rauch

This custom driver includes the extra kick and energy due to the Sun's attraction on the mean Earth-Moon quadrupole, as derived by Quinn, Duncan, & Tremaine (1991). If QTD_DRIVER is defined, the expansion of the lunar orbit due to tidal dissipation is included and the standard correction factor f = 0.9473 is used. This fully duplicates the Quinn et al. calculation. Otherwise (and by default), the dissipation is neglected (it is useful mainly when Earth-Moon rigid body dynamics are being calculated, and it also breaks energy conservation at the rate of 1e-13 per Myr), and the correction f = 0.8525 is used. The latter was found by Varadi, Runnegar, & Ghil (2003) to minimize long-term errors in Earth's orbital elements (note that this turns out to be at the expense of short-term accuracy, however.)

Returns
EXIT_SUCCESS on success, else EXIT_FAILURE.
See also
hnb_argv_driver()