Symplectic Algorithm for Non-Separable Hamiltonian

  • Context: Graduate 
  • Thread starter Thread starter Heimdall
  • Start date Start date
  • Tags Tags
    Algorithm Symplectic
Click For Summary

Discussion Overview

The discussion centers around the implementation of a symplectic algorithm for solving a non-separable Hamiltonian system. Participants explore the theoretical foundations of symplectic methods, their differences from standard numerical methods, and the challenges of coding such algorithms.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents a Hamiltonian with non-separable variables and seeks a symplectic algorithm, specifically mentioning the Runge-Kutta method.
  • Another participant questions the initial conditions necessary for the equations derived from the Hamiltonian.
  • A different participant expresses a desire to understand symplectic methods before applying them in Mathematica, suggesting a foundational approach by starting with simpler systems like a pendulum.
  • One participant acknowledges their earlier equations as incorrect due to a lack of familiarity with Hamiltonian systems, but emphasizes the importance of symplectic methods in preserving the Hamiltonian's constancy in numerical solutions.
  • Another participant discusses the concept of integral invariants in Hamiltonian systems, explaining how certain measures are preserved during Hamiltonian flows and how symplectic methods are designed to maintain these properties.
  • Examples of non-symplectic and symplectic methods for a simple pendulum are provided, illustrating the differences in energy conservation and phase portraits.

Areas of Agreement / Disagreement

Participants express varying levels of understanding and familiarity with Hamiltonian systems and symplectic methods. There is no consensus on the correctness of the initial equations presented, and multiple viewpoints on the approach to learning and implementing symplectic algorithms remain evident.

Contextual Notes

Some participants note limitations in their understanding of Hamiltonian systems and the specific requirements for symplectic methods, indicating that further exploration and clarification are needed.

Heimdall
Messages
38
Reaction score
0
Hi,

I have this hamiltonian
K = \frac{1}{2}(P_1^2 + P_2^2) + P_1 Q_2 - P_2 Q_1 - (\frac{1-\mu}{R_1}+\frac{\mu}{R_2})
(see this link if there is any latex problem)

with non separable variables.

I am looking for a symplectic algorithm (runge kutta would be good) to solve the correspondant first order equations, but I can't find it on the internet.

moreover it seems difficult and I don't understand enough what is a symplectic algorithm to code do it by myself..

thx a lot.
 
Last edited:
Physics news on Phys.org
Well, for starters are these those:

\frac{dP_1}{dt}=\frac{\partial K}{\partial P_2},\quad \frac{dP_2}{dt}=-\frac{\partial K}{\partial P_1}

\frac{dQ_1}{dt}=\frac{\partial K}{\partial Q_2},\quad \frac{dQ_2}{dt}=-\frac{\partial K}{\partial Q_1}

\frac{dR_1}{dt}=\frac{\partial K}{\partial R_2},\quad \frac{dR_2}{dt}=-\frac{\partial K}{\partial R_1}

What then are the initial conditions?
 
Know what, I'm just gonna' run with this. Someone in the group just recently said, "you don't do mathematics by just staring at the problem and hope it comes to you".

Anyway, Mathematica has a method called "SymplecticPartitionedRungeKutta". I shall wish to try this method once I figure out how symplectic methods differ from just regular numerical methods as I advocate learning the technique (in general) before using it in some math package. Perhaps I should just start with a pendulum first. Someone else said, "sometimes you have to take two steps backwards in order to move forwards". Might take a while.:smile:
 
For the record my equations posted above are totally incorrect and stems from my lack of familiarity with Hamilitoian systems in general. But that's ok cus' I ain't staring and I'm not standing still. So it's 3:00a and I need to get up in a few hours to go to work. Well, that would mean I'm already sleeping but I'm fiddling with this instead. Whatever. Anyway I've learned that the Hamiltonian is conserved in Hamiltonian systems and that is the origin of the problem to seek symplectic methods in their numerical solution: most numerical methods do not preserve the constancy of the hamiltonian. Methods which do are called symplectic. Anyway, I have some references to work with and will pick it up later. Think I'll try and get in an hour or 2 of sleep. :zzz:
 
Some time ago I worked on what I considered a very beautiful problem (well ugly if you're a . . . nevermind). It's called an integral invariant of Poincare'. At the time, I didn't understand the connection to Hamiltonian systems. If you allow a set of initial points to evolve according to a Hamiltonian flow (run all the Hamiltonian differential equations for some time on a set of initial points and then compare the initial set of points to the set of final points), then a certain "measure" of the points is preserved in the flow. This is compactly expressed by the following integral invariant:

\sum_{i=n}\oint_{\omega_i} p_idq_i=C

That is, the sum of areas projected onto the set of (p_i,q_i) planes is constant. This is shown graphically in the attached plot. I wish to verify this with a real set of Hamiltonian equations but I digress.

Well, symplectic numerical methods are designed to preserve this measure. Consider first the undamped pendulum:

\frac{dq}{dt}=p

\frac{dp}{dt}=-Sin(q)

The Hamiltonian function is:

H(q,p)=1/2 p^2-Cos(q)

The standard (non-symplectic) Euler method for this system would be:

q_{k+1}=q_k+hp_k

p_{k+1}=p_k-hSin(q_k)

A phase portrait (q vs. p) for 100 seconds is shown in the second plot. It's dissapating and not reflective of the actual dynamics of an undamped pendulum. A plot of the hamiltonian function would reveal a curve with a non-constant slope.

We can slightly modify this method and convert it to a symplectic form as follows:

q_{k+1}=q_k+hp_{k+1}

p_{k+1}=p_k-hSin(q_k)

The phase-portrait of this numerical simulation for 100 seconds is shown in the 3rd plot and reflects the actual dynamics of an undamped pendulum (back and forth and never loosing energy, that is the energy remains constant and reflects the invariant measure of Hamiltonian systems. A plot of the hamiltonian function for this simulation would be a straight line with zero slope. (can we get two more spaces for plots?)
 

Attachments

  • Invariant.gif
    Invariant.gif
    2 KB · Views: 693
  • non-symplectic Euler.JPG
    non-symplectic Euler.JPG
    21.8 KB · Views: 580
  • symplectic euler.JPG
    symplectic euler.JPG
    7.2 KB · Views: 628
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K