kausalflow / hamilflow

Dataset of simple physical systems.
http://kausalflow.com/hamilflow/
MIT License
4 stars 1 forks source link

Add an interface of integrals of motion #35

Open cmp0xff opened 7 months ago

cmp0xff commented 7 months ago

In the Lagrangian action of an undamped simple harmonic oscillator (#34), one can easily find the first integral $$\frac{1}{2} m \dot x^2 + \frac{1}{2} m \omega^2 x^2 \equiv E \eqqcolon \frac{1}{2} m \omega^2 x_0^2\,,$$ where $E$ is the integral or motion (constant), having the interpretation of energy, and $x_0$ can be interpreted as the maximal displacement.

Integrating this first-order differential equation directly gives rise to another constant of motion $t_0$, $$t-t_0 = \frac{1}{\omega} \arccos \frac{x}{x_0}\,.$$ In other words, the motion of the system is directly given by the two constant $(x_0, t_0)$, in this framework of Lagrangian mechanics.

I propose we add the initial condition $(x_0, t_0)$, in addition to $(x_0, v_0)$, the latter of which is closer to the second-order differential equation of motion, which is less appealing in analytical mechanics.

cmp0xff commented 2 months ago

We have a few options to specify the system:

  1. initial conditions
  2. integrals of motion
  3. mathematical / geometric specifications

If we focus on closed systems with exact solutions, I suggest we focus on 2 and 3, making 1 optional.

Initial conditions

These are the King in numeric simulations. For exact solutions, however, they are often not the best specifications. For examples, in Kepler problem, we are likely to be forced to convert initial conditions to the energy and angular momentum, before we can proceed.

Integrals of motion

By definition, all exactly solvable conserved systems have integrals of motion. These quantities have special importance in analytical mechanics.

Typical examples include

  1. Energy and initial time (reaching maximum amplitude) for oscillators
  2. Energy and angular momentum for Kepler problem

Mathematical / geometric specifications

Good examples include

  1. Amplitudes and initial phase for oscillators
  2. Parameter and eccentricity for the Kepler problem
cmp0xff commented 1 month ago

Currently we provide users intermediate variables which are used for analytical or numerical purposes. Maybe we should remove them.