Solve this Hamiltonian System in Several Ways

Click For Summary
SUMMARY

The discussion focuses on solving a Hamiltonian system represented by the equations \(\frac{dz}{dt} = \nabla_p H\) and \(\frac{dp}{dt} = -\nabla_z H\). The user Resi initially struggles with the interpretation of the solution, particularly when \(\nabla_p H = 0\), leading to \(z = \text{const.}\) and \(p = zt + p_0\). Another participant clarifies the correct interpretation of the Hamiltonian system using the equations \(\frac{dx}{dt} = \frac{\partial H}{\partial y}\) and \(\frac{dy}{dt} = -\frac{\partial H}{\partial x}\). Additionally, there is a request for clarification on calculating Energy-error and the meaning of \(L^2\) error.

PREREQUISITES
  • Understanding of Hamiltonian mechanics
  • Familiarity with partial derivatives and gradient notation
  • Knowledge of numerical methods for solving differential equations
  • Basic concepts of error analysis in numerical simulations
NEXT STEPS
  • Research Hamiltonian mechanics and its applications in physics
  • Learn about numerical methods for solving Hamiltonian systems
  • Study Energy-error calculation techniques in numerical simulations
  • Explore the concept of \(L^2\) error in the context of numerical analysis
USEFUL FOR

Physicists, mathematicians, and engineers working with Hamiltonian systems, as well as students and researchers interested in numerical methods and error analysis in simulations.

ResiRadloff
Messages
2
Reaction score
0
Homework Statement
Let us denote by ## \textbf{z} = (x,y) \in \mathbb{R}^2 ## the Cartesian coordinates of a point in the plane.

1. Given the Hamiltonian ## H(\textbf{z}) = \frac{|\textbf{z}|^2}{2} ##, write down the corresponding canonical Hamiltonian system for ##\textbf{z}(t)##.

2. Write down the analytical solution of this system.

In the following, assume that the system reads ##\frac{d}{dt}\textbf{z} = \textbf{F}((\textbf{z}(t)))## where ## \textbf{F} = (F_x,F_y) ##, and let ##t^n = n\Delta t## where ##\Delta t > 0## is the time step size. Also let ## \textbf{z}^n = \textbf{z}(t^n) ##.

3. Solve the Hamiltonian system numerically by using the following numerical methods. For each of them write down the scheme, plot your result vs. the analytical result, and plot energy (= Hamiltonian) and ##L^2 ##-error of the scheme. Start with a random point ##(x_0,y_0) \in [0,1]^2 ## at ## t = 0 ## and evolve ## \textbf{x}(t) ## forward in time. You may use ##\Omega = 2, \Delta t = 0.03 ##, and do 500 time steps.

(a) The explicit Euler method: ##\textbf{z}^{n+1} = \textbf{z}^n + \Delta t \textbf{F}(\textbf{z}^n) ; \textbf{z}^0 = \textbf{z}(t=0) ##

[...]
Relevant Equations
--
Good evening,
unfortunately I can't get to the solution of my task

I wrote for the system:

## \frac{dz}{dt} = \nabla_p H ; \\
\frac{dp}{dt} = - \nabla_z H ##

Then the solution would be (as ## \nabla_p H = 0) ##:

## \frac{dz}{dt} = 0 \Rightarrow z = const. ## and ## p = zt + p_0 ##.

But that can't be as now finding a numerical solution doesn't make sense?.🙁

I would be really happy if someone yould help me?

Thanks a lot
Resi

Danke schonmal und viele Grüße
 
Physics news on Phys.org
Are you not looking at \begin{split}<br /> \frac{dx}{dt} &amp;= \frac{\partial H}{\partial y} \\<br /> \frac{dy}{dt} &amp;= -\frac{\partial H}{\partial x}\end{split} That is how I would interpret "hamiltonian System" if given a "hamilonian" which is a function of exactly two variables.
 
Okay, thanks, yeah that makes more sense.

Does anyone know how to calculate the Energy-error and what is meant by ##L^2## error?
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
Replies
1
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K