10. Symplectic Maps

The celmech.maps module implements a couple of area-preserving maps, StandardMap and EncounterMap.

10.1. Chirikov Standard Map

The Chirikov standard map is a symplectic map that depends on a single parameter, \(K\), defined by the equations

\[\begin{split}p' &= p + K \sin\theta \\ \theta' &= \theta + p'~.\end{split}\]

10.2. Encounter Map

The encounter map is a symplectic map that approximates the dynamics of a pair of closely-spaced planets. The map depends on three parameters , \(\epsilon,y\), and \(J\). The map is defined by the equations

\[\begin{split}x' &= x + \epsilon f(\theta;y) \\ \theta' &= \theta + 2\pi(J-x')\end{split}\]

where

\[f(\theta;y) = -\frac{4\pi}{3}\sum_{k}s_k(y)k\sin(k\theta)\]

and the \(s_k(y)\) are the resonance amplitude functions given by the sk() function.

10.3. API

class celmech.maps.EncounterMap(m, J, y0, Nmax=7, mod=True)[source]

A class representing the encounter map. The map depends on three parameters, \(\epsilon,y\), and \(J\). The map is defined by the equations

\[\begin{split}\begin{align} x' &= x + \epsilon f(\theta;y) \\ \theta' &= \theta + 2\pi(J-x') \end{align}\end{split}\]

By default, the map is defined on the cylinder with the \(\theta\) coordinate taken mod \(2\pi\). The parameter mod_p=True can be set to take the \(p\) coordinate modulo \(2\pi\) as well.

Parameters
  • K (float) – Map non-linearity parameter.

  • mod_theta (bool, optional) – If True, the \(\theta\) coordinate is taken modulo \(2\pi\). Default is True

  • mod_p (bool, optional) – If True, the \(p\) coordinate is taken modulo \(2\pi\). Default is False.

inv_partial_derivs(x0, Nmax)[source]

Get the partial derivatives of the map up to order Nmax evaluated at point x0.

partial_derivs(x0, Nmax)[source]

Get the partial derivatives of the map up to order Nmax evaluated at point x0.

class celmech.maps.StandardMap(K, mod_theta=True, mod_p=False)[source]

A class representing the Chirikov standard map. The map depends on a single parameter, \(K\) and is defind by

\[\begin{split}\begin{align} p' &=& p + K \sin\theta\\ \theta' &=& \theta + p' \end{align}\end{split}\]

By default, the map is defined on the cylinder with the \(\theta\) coordinate taken mod \(2\pi\). The parameter mod_p=True can be set to take the \(p\) coordinate modulo \(2\pi\) as well.

Parameters
  • K (float) – Map non-linearity parameter.

  • mod_theta (bool, optional) – If True, the \(\theta\) coordinate is taken modulo \(2\pi\). Default is True

  • mod_p (bool, optional) – If True, the \(p\) coordinate is taken modulo \(2\pi\). Default is False.

inv(x)[source]

The inverse mapping

\[\begin{split}\begin{align} \theta &=& p' - \theta' \\ p &=& p' - K \sin\theta \end{align}\end{split}\]
Parameters

x (array-like) – The point \((\theta',p')\)

Returns

The point \((\theta,p)\)

Return type

array-like

inv_partial_derivs(x, Nmax)[source]

Get the partial derivatives of the inverse map evaluated at the point x0 up to order Nmax.

Parameters
  • x (array-like) – The point at which derivatives are to be evaluated

  • Nmax (int) – Maximum order of the partial derivatives

Returns

T – The partial derivatives of the map. Writing the value of the map at a point \((x_1,x_2)\) as \(T(x_1,x_2) = (T_1(x_1,x_2),T_2(x_1,x_2))\), the entry T[i,n,m] stores

\[\frac{\partial^{(n+m)}}{\partial x_1^n \partial x_2^m} T_i\]

Note that T[:,0,0] give the value of the map.

Return type

array, shape (2,Nmax+1,Nmax+1)

jac(x)[source]

Evaluate the Jacobian map at \(x=(\theta,p)\), given by

\[\begin{split}DT(x) = \begin{pmatrix} 1 + K\cos\theta & 1 \\ K\cos\theta & 1 \end{pmatrix}\end{split}\]
xarray

Point(s) at which to evaluate the Jacobian.

Returns

DT – Value of the Jacobain at point x.

Return type

array

property mod_theta

Is the coordinate \(\theta\) calculated modulo \(2\pi\)?

partial_derivs(x, Nmax)[source]

Get the partial derivatives of the map evaluated at the point x0 up to order Nmax.

Parameters
  • x (array-like) – The point at which derivatives are to be evaluated

  • Nmax (int) – Maximum order of the partial derivatives to return

Returns

T – The partial derivatives of the map. Writing the value of the map at a point \((x_1,x_2)\) as \(T(x_1,x_2) = (T_1(x_1,x_2),T_2(x_1,x_2))\), the entry T[i,n,m] stores .. math:

\frac{\partial^{(n+m)}}{\partial x_1^n \partial x_2^m} T_i

Note that T[:,0,0] give the value of the map.

Return type

array, shape (2,Nmax+1,Nmax+1)