Skip to content

Fenu24/Resonant-Hamiltonian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resonant Hamiltonian for asteroids in a mean-motion resonance with a planet

Table of contents

Introduction

The motion of an asteroid in a mean-motion resonance with a planet of the Solar System can be modeled with a Hamiltonian system. The system is obtained by averaging the Hamiltonian of the N-body problem over the fast angles, by keeping the term given by the resonance. More details about this approach can be found in Fenucci et al., 2022.

This software implements the computation of the resonant Hamiltonian over a grid in the plane of semi-major axis $a$ and resonant angle $\sigma$.

Compilation

The code is structured into the following folders:

  • src: contains the source codes
  • bin: contains the binary files of the executable
  • lib: contains the QUADPACK library translated to Fortran90
  • tests: folder to run the executable
  • .mod: contains the .mod files needed at compilation time
  • .obj: contains the .o files needed at compilation time

Before using the program for the first time, the code needs to be compiled. To facilitate the user, the software comes with a Makefile that automatically perform the job. For the software to be compiled correctly, the GNU gfortran compiler should be installed and available.

To compile the code, run the Makefile by typing

        make

The executable binary hamiltonian.x will be placed in the bin directory. A symbolic link will be created in the tests directory.

Running the program

The program needs a namelist input file, containing the following parameters:

  • ecc: eccentricity of the asteroid;
  • inc: inclination of the asteroid (deg);
  • OmNod: right ascension of the ascending node of the asteroid (deg);
  • omega: argument of perihelion of the asteroid (deg);
  • res_pla: planet involved in the resonance. Integer numbers from 1 to 8 are accepltable, with 1 = Mercury, 2 = Venus, 3 = Earth, etc;
  • h1, h2: co-prime integer numbers defining the type of mean-motion resonance;
  • res_width: resonance width in semi-major axis (au);
  • a_n: number of points for the sampling of the semi-major axis $a$;
  • sigma_n: number of points for the sampling of the resonant angle $\sigma$;
  • fileout: name for the output file;
  • nsample: sample size for generating random couples in $(a,\sigma)$ and corresponding value of the Hamiltonian.

The program can be run from a terminal with

        ./hamiltonian.x <filepath>

where <filepath> is the path of the input file containing the input parameters.

The program will produce two output files, one containing the discretization of the Hamiltonian on a grid of points in the $(a, \sigma)$ plane, and another one containing a random sample of $(a,\sigma)$ values and corresponding value of the Hamiltonian. These output files are text files containing three columns:

  • Column 1: value of $\sigma$ (deg);
  • Column 2: value of $a$ (au);
  • Column 3: Value of the Hamiltonian function.

Python script for Earth coorbitals

The folder tests contain the Python script run_parallel.py which can be used to produce data to replicate the work by Fenucci et al. 2026. The script computes the level curves of the Hamiltonian for orbits in the Earth co-orbital space. Level curves are computed over a grid in the space of $(e,I,\omega)$ orbital elements for $e&lt;0.2$, $I&lt;20$ deg and $0 \text{ deg}&lt;\omega&lt;360 \text{ deg}$. The script can launch the computations over multiple cores, and it can be ran with

        ./hamiltonian.x --ncores

where ncores is the number of cores to be used.

Example

License and authors

This is an open-source software released under MIT license license, and it is developed and maintained by Marco Fenucci, European Space Agency NEO Coordination Centre (marco.fenucci@ext.esa.int).

References

About

Code to compute the averaged resonant Hamiltonian of an asteroid in a mean-motion resonance with a planet of the Solar System.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages