The Discretized Linear Wave
The linear wave equation in one dimension has the following Hamiltonian (see e.g. [2]):
\[ \mathcal{H}_\mathrm{cont}(q, p; \mu) := \frac{1}{2}\int_\Omega \mu^2(\partial_\xi q(t, \xi; \mu))^2 + p(t, \xi; \mu)^2 d\xi,\]
where the domain is $\Omega = (-1/2, 1/2)$. We then divide the domain into $\tilde{N}$ equidistantly spaced points[1] $\xi_i = i\Delta_\xi - 1/2$ for $i = 1, \ldots, \tilde{N}$ and $\Delta_\xi := 1/(\tilde{N} + 1)$.
\[ \mathcal{H}_h(z) = \frac{1}{2} \sum_{i = 1}^{\tilde{N} + 2} p_i^2 + \frac{\mu^2}{4\Delta_\xi^2} \sum_{i = 2}^{\tilde{N} + 1} \left[ (q_i - q_{i - 1})^2 + (q_{i+1} - q_i)^2 \right].\]
The discretized linear wave equation is an example of a completely integrable system, i.e. a Hamiltonian system evolving in $\mathbb{R}^{2n}$ that has $n$ Poisson-commuting invariants of motion (see [3]).
For evaluating the system we specify the following initial[2] and boundary conditions:
\[\begin{aligned} q_0(\omega;\mu) := & q(0, \omega; \mu) \\ p(0, \omega; \mu) = \partial_tq(0,\xi;\mu) = & -\mu\partial_\omega{}q_0(\xi;\mu) \\ q(t,\omega;\mu) = & 0, \text{ for } \omega\in\partial\Omega. \end{aligned}\]
Library functions
GeometricProblems.LinearWave — Module
The discretized version of the 1d linear wave equation.
It is a prime example of a non-trivial completely integrable system.
The system is discretized on N interior points — the $\tilde{N}$ of the documentation page — so the state has N + 2 components once the two boundary points are included.
Like the number of lattice sites of TodaLattice, N fixes the size of the system: it sets the number of degrees of freedom and the summation bounds, so it cannot survive symbolize and hence cannot be a system parameter. It is instead a leading positional argument of the problem constructors, defaulting to Ñ = 256, and hamiltonian/lagrangian take it as a trailing argument. The only system parameter proper is $\mu$.
- [2]
- P. Buchfink, S. Glas and B. Haasdonk. Symplectic model reduction of Hamiltonian systems on nonlinear manifolds and approximation with weakly symplectic autoencoder. SIAM Journal on Scientific Computing 45, A289–A311 (2023).
- 1In total the system is therefore described by $N = \tilde{N} + 2$ coordinates, since we also have to consider the two boundary points. The resulting (semi-discrete) Hamiltonian, matching the implementation, then is:
- 2The precise shape of $q_0(\cdot;\cdot)$ is described in the chapter on initial conditions.