celeries.perham3pla.PerHam3pla#

class celeries.perham3pla.PerHam3pla(degree, ang2pla=(), n0=(), ev=False, spatial=False, keplerian=False, disregard13=False, disregardInd=False, takeout_kn=False, verbose=False)#

Perturbative part of the 4-body (3-planet) Hamiltonian to second order in mass.

Computes 3-planet terms of the form \(e^{i(k_1 \lambda_1 + k_2 \lambda_2 + k_3 \lambda_3)}\).

These terms appear in the Hamiltonian at second order in mass of a Lie serie expansion after averaging out some or all 2-planet angles at first order in mass.

Refer to https://jeremycouturier.com/3pla/SecondOrderMass.pdf for the mathematical details

If ev is True, the semi-major axes and mean motions are evaluated to their nominal values n0 = \((n_1, n_2, n_3)\) The nominal semi-major axes do not need to be given as they are obtained from \(a_i/a_j = (n_j/n_i)^{2/3}\). If ev is False, a large serie should be expected as output, especially if degree is high. It is recommended to set celeries.series.setseparator(’n’).

ang2pla \(=[(i_1, j_1, p_1, q_1), \cdots, (i_N, j_N, p_N, q_N)]\) is a list of 4-tuples indicating 2-planet angles that must not be averaged. \((i_k, j_k)\) with \(1 \leq i_k < j_k \leq 3\) indicates the pair of planets and \((p_k, q_k)\) indicates that the angle \(p_k \lambda_{i_k} + q_k \lambda_{j_k}\) should not be averaged. The Lie series expansion to second-order in mass is performed by not averaging over these 2-planets angles and their harmonics, which remain at first order in mass in the Hamiltonian. For example, for the 3-planet angle \(2 \lambda_1 - 4 \lambda_2 + 3 \lambda_3\) formed by the difference of 2-planet angles \((2 \lambda_1 - 3 \lambda_2) - (\lambda_2 - 3 \lambda_3)\), if the system is still close from the 2-planet resonances, ang2pla can be set to [(1, 2, 2, -3), (2, 3, 1, -3), (1, 3, 2, -9)]. If the system is far from any low-order 2-planet resonance, ang2pla can be left to (). By default, ang2pla = () and all 2-planet angles are averaged. Only the fundamental of an angle or its opposite should be mentionned in ang2pla. ang2pla = [(1, 2, 2, -3), (1, 2, -2, 3)], ang2pla = [(1, 2, 2, -3), (1, 2, 4, -6)], ang2pla = [(1, 2, 4, -6)] are all invalid

If keplerian is True, the equality \(k_1 n_1 + k_2 n_2 + k_3 n_3 = 0\) is used to make sure that denominators of the form \(p n_i + q n_j\) are expressed with \(n_2\) and \(n_3\) only. This roughly halves the number of terms in the serie. This parameter is irrelevant when ev is True.

Author : Jeremy Couturier. https://jeremycouturier.com

Parameters:
degreePositive integer

Degree of the development in eccentricity and inclination.

ang2plaList of 4-tuples of integers

2-planet angles that should not be averaged out during the Lie serie expansion.

n0Tuple of float

The nominal mean motions \((n_1, n_2, n_3)\) in any units Does not need to be specified if ev is False.

evbool

Determines if the semi-major axes and mean motions should be evaluated to their nominal values in the returned serie.

spatialbool

Determines if the Hamiltonian is 3D or coplanar.

keplerianbool

Determines if the equality \(k_1 n_1 + k_2 n_2 + k_3 n_3 = 0\) should be assumed true to simplify the returned serie. Irrelevant when ev is True.

disregard13bool

Determines if Poisson brackets involving the pair (1, 3) are disregarded.

disregardIndbool

Determines if indirect terms (due to \(\mathbf{v}_i\cdot\mathbf{v}_j\) in the Hamiltonian) are disregarded.

takeout_knbool

Determines if denominators \((k \cdot n)^{-1}\) are taken out of the Poisson brackets before computing them, even though they depend on \(\Lambda\)

verbosebool

Determines if the computed Poisson brackets are printed.

Methods

angle(k)

Returns the terms of the perturbative part of the Hamiltonian proportional to \(e^{i(k_1 \lambda_1 + k_2 \lambda_2 + k_3 \lambda_3)}\).