celeries.birkhoff.NormalForm#

class celeries.birkhoff.NormalForm(H, x, order, resonances=None)#

Birkhoff normal form of an Hamiltonian.

The Hamiltonian H should already be centered around an elliptical fixed point, and its quadratic part diagonalized: \(H = constant + i \sum_k \nu_k x_k \tilde{x}_k + O(x^3)\).

The change of variables is expressed as the flow at time 1 of an auxiliary Hamiltonian W: \(\bar{H} = \exp(L_W) H\), where \(L_W = \{W, f\}\) is the Lie derivative.

Parameters:
HSeries

Hamiltonian as of function of x.

x(2*ndof,) ndarray

Set of canonically conjugated variables with all math:x first, and all \(\tilde{x}\) after.

orderint

Order of the expansion of the normal form. Order 2 correspond to keeping only the quadratic part of H.

resonances(nr, ndof) ndarray or None

Resonances to keep in the normal form (as well as any combination).

Attributes:
HbSeries

Normal form of the Hamiltonian \(\bar{H}\).

phi(2*ndof,) ndarray

Expression (as Series) of the new coordinates from the original ones.

inv_phi(2*ndof,) ndarray

Expression (as Series) of the original coordinates from the new ones.

W(order - 1,) ndarray

Expansion of the auxiliary Hamiltonian for the change of variables.

Methods

eval_phi(x)

Evaluate the new coordinates as a function of the original ones.

eval_phi_inv(x)

Evaluate the original coordinates as a function of the new ones.

poisson(f, g)

Poisson bracket \(\{f, g\}\).