LDDS

Tutorial 6: Lagrangian descriptors for a user-defined 2 DoF Hamiltonian

The goal of this notebook in to illustrate how to compute Lagrangian descriptors on different phase space slices for a 2 DoF Hamiltonian system defined by the user.

We begin by importing the LDDS module, and from it, all the functions necessary to calculate and plot LDs.

The Double Well Hamiltonian System with 2 DoF

The Hamiltonian function that defines a double well system with two degrees of freedom is:

\begin{equation*} H(x, y, p_x, p_y) = T(p_x,p_y) + V(x,y) = \frac{1}{2} (p_x^2 + p_y^2) + \dfrac{\omega}{2}y^2 - \dfrac{\alpha}{2}x^2 + \dfrac{\beta}{4} x^4 \end{equation*}

where $\alpha,\, \beta,\, \omega > 0$ are the model parameters. Hamilton's equations describing the dynamical system are:

\begin{align*} \dot{x} &= \frac{\partial H}{\partial p_x} = p_x \\[.2cm] \dot{y} &= \frac{\partial H}{\partial p_y} = p_y \\[.2cm] \dot{p}_x &= -\frac{\partial H}{\partial x} = \alpha \, x - \beta \, x^3 \\[.2cm] \dot{p}_y &= -\frac{\partial H}{\partial y} = -\omega \, y \\[.2cm] \end{align*}

Define the DoubleWell2D function containing the four-dimensional dynamical system

Define the potential energy surface for the double well:

\begin{equation*} V(x,y) = \dfrac{\omega}{2}y^2 - \dfrac{\alpha}{2}x^2 + \dfrac{\beta}{4} x^4 \end{equation*}

Setup the vector field and potential energy surface

Define Total Energy

We will calculate LDs for an energy level $H = H_0$

Define phase space slice to compute LDs

We will use the plane $x-p_x$ where $y = 0$ and directionality is given by $p_y >0$

Compute and draw LDs at time $t = 0$

Define phase space slice to compute LDs

We will use the plane $y-p_y$ where $x = \dfrac{\sqrt{2}}{2}$ and directionality is given by $p_x >0$

Compute and draw LDs at time $t = 0$