HNBody Version 1.2.1

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Macros | Functions
ems.c File Reference

An advanced custom driver adding an explicit lunar sub-integration. More...

`#include <math.h>`
`#include <hnbody/errors.h>`
`#include <hnbody/expert.h>`
`#include <hnbody/kepler.h>`
`#include <hnbody/output.h>`
Include dependency graph for ems.c:

## Macros
#define | IBARY 3
#define | IPMIN 1
#define | IPMAX 0
#define | IMERC 0
#define | IMARS 0

## Functions
void | ems_version (FILE *f, const char *prefix)
void | ems_kick (double(*dv)[3], double t, double(*x)[3], const double m[], int nHL, int n, double dt, const hnb_data_t *sys)
void | ems_drift (double(*dx)[3], double(*dv)[3], double t, double(*x)[3], double(*v)[3], const double m[], int nHL, int n, double dt, const hnb_data_t *sys)
void | ems_halfstep (hnb_data_t *sys)
double | ems_energy (double t, double(*x)[3], double(*v)[3], const double m[], int n, const hnb_data_t *sys)
void | ems_init (hnb_data_t *ss, const char *initfile)
int | main (int argc, char *argv[])

## Detailed Description

Id
  ems.c,v 1.19 2004/07/14 13:41:20 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 tidal attraction on the extended Earth-Moon system, using an explicit lunar sub-integration. The expansion of the lunar orbit due to tidal dissipation is neglected. This file makes use of low-level primitives to advance the lunar integration in lock step with the planets, and should be considered an "expert" application of the HNBody package. The physical error in the lunar model produces relative errors ~1e-6 per orbit; for the Earth-Moon berycenter corresponding error (mainly phase) is ~1e-10 per orbit near the initial epoch.

Returns
  EXIT_SUCCESS on success, else EXIT_FAILURE.

See also
  hnb_argv_driver()