Table of Contents
Fetching ...

amangkurat: A Python Library for Symplectic Pseudo-Spectral Solution of the Idealized (1+1)D Nonlinear Klein-Gordon Equation

Sandy H. S. Herho, Siti N. Kaban

TL;DR

This paper presents amangkurat, a Python library for simulating the nonlinear Klein-Gordon equation in $(1+1)$D using a pseudo-spectral spatial discretization and a symplectic Størmer-Verlet time integrator. The approach delivers spectral accuracy for smooth solutions while preserving Hamiltonian structure over long times, aided by adaptive CFL-limited timestepping and Numba-based parallelization. The work validates the solver across four regimes—linear dispersive waves, phi^4 kinks, sine-Gordon breathers, and kink-antikink collisions—and introduces a comprehensive analysis framework based on information-theoretic entropy, kernel density estimation, and phase-space reconstruction to characterize distinct dynamical phenotypes. The open-source implementation, NetCDF4 outputs, and animated visualizations provide a practical, reproducible platform for research and education in nonlinear field theory, with clear pathways for extension and dimensional upgrades.

Abstract

This study introduces amangkurat, an open-source Python library designed for the robust numerical simulation of relativistic scalar field dynamics governed by the nonlinear Klein-Gordon equation in $(1+1)$D spacetime. The software implements a hybrid computational strategy that couples Fourier pseudo-spectral spatial discretization with a symplectic Størmer-Verlet temporal integrator, ensuring both exponential spatial convergence for smooth solutions and long-term preservation of Hamiltonian structure. To optimize performance, the solver incorporates adaptive timestepping based on Courant-Friedrichs-Lewy (CFL) stability criteria and utilizes Just-In-Time (JIT) compilation for parallelized force computation. The library's capabilities are validated across four canonical physical regimes: dispersive linear wave propagation, static topological kink preservation in phi-fourth theory, integrable breather dynamics in the sine-Gordon model, and non-integrable kink-antikink collisions. Beyond standard numerical validation, this work establishes a multi-faceted analysis framework employing information-theoretic entropy metrics (Shannon, Rényi, and Tsallis), kernel density estimation, and phase space reconstruction to quantify the distinct phenomenological signatures of these regimes. Statistical hypothesis testing confirms that these scenarios represent statistically distinguishable dynamical populations. Benchmarks on standard workstation hardware demonstrate that the implementation achieves high computational efficiency, making it a viable platform for exploratory research and education in nonlinear field theory.

amangkurat: A Python Library for Symplectic Pseudo-Spectral Solution of the Idealized (1+1)D Nonlinear Klein-Gordon Equation

TL;DR

This paper presents amangkurat, a Python library for simulating the nonlinear Klein-Gordon equation in D using a pseudo-spectral spatial discretization and a symplectic Størmer-Verlet time integrator. The approach delivers spectral accuracy for smooth solutions while preserving Hamiltonian structure over long times, aided by adaptive CFL-limited timestepping and Numba-based parallelization. The work validates the solver across four regimes—linear dispersive waves, phi^4 kinks, sine-Gordon breathers, and kink-antikink collisions—and introduces a comprehensive analysis framework based on information-theoretic entropy, kernel density estimation, and phase-space reconstruction to characterize distinct dynamical phenotypes. The open-source implementation, NetCDF4 outputs, and animated visualizations provide a practical, reproducible platform for research and education in nonlinear field theory, with clear pathways for extension and dimensional upgrades.

Abstract

This study introduces amangkurat, an open-source Python library designed for the robust numerical simulation of relativistic scalar field dynamics governed by the nonlinear Klein-Gordon equation in D spacetime. The software implements a hybrid computational strategy that couples Fourier pseudo-spectral spatial discretization with a symplectic Størmer-Verlet temporal integrator, ensuring both exponential spatial convergence for smooth solutions and long-term preservation of Hamiltonian structure. To optimize performance, the solver incorporates adaptive timestepping based on Courant-Friedrichs-Lewy (CFL) stability criteria and utilizes Just-In-Time (JIT) compilation for parallelized force computation. The library's capabilities are validated across four canonical physical regimes: dispersive linear wave propagation, static topological kink preservation in phi-fourth theory, integrable breather dynamics in the sine-Gordon model, and non-integrable kink-antikink collisions. Beyond standard numerical validation, this work establishes a multi-faceted analysis framework employing information-theoretic entropy metrics (Shannon, Rényi, and Tsallis), kernel density estimation, and phase space reconstruction to quantify the distinct phenomenological signatures of these regimes. Statistical hypothesis testing confirms that these scenarios represent statistically distinguishable dynamical populations. Benchmarks on standard workstation hardware demonstrate that the implementation achieves high computational efficiency, making it a viable platform for exploratory research and education in nonlinear field theory.
Paper Structure (10 sections, 160 equations, 4 figures)

This paper contains 10 sections, 160 equations, 4 figures.

Figures (4)

  • Figure 1: Spatiotemporal evolution $\phi(x,t)$ for (a) linear wave, (b) static kink, (c) breather, (d) kink-antikink collision. Unified color scale $[-3.42, +3.42]$ (determined by breather maximum). Dashed curves: energy centroid $\langle x \rangle(t)$. Resolutions: (a) $512 \times 201$, (b) $1024 \times 201$, (c) $512 \times 301$, (d) $1024 \times 401$.
  • Figure 2: Field profiles $\phi(x,t)$ at initial, middle, final times. Rows: (a--c) linear wave, (d--f) kink, (g--i) breather, (j--l) collision. Note dispersive spreading (a--c), profile invariance despite overshoot (d--f), breather breathing (g--i), post-collision radiation (j--l).
  • Figure 3: Field intensity statistics. (a) Kernel density estimates (peak-normalized). (b) Box plots (median, quartiles, range). Kruskal-Wallis $H = 2.14 \times 10^4$, $p < 0.001$. Note linear wave near-zero concentration, kink bimodality, breather heavy tail, collision intermediate spread.
  • Figure 4: Phase space $(\phi(x=0,t), \partial_t \phi(x=0,t))$. Global limits: $\phi \in [-3.04, 4.01]$, $\partial_t \phi \in [-3.63, 3.82]$. (a) Linear: diffuse cloud, $\rho = -0.12$. (b) Kink: tight cluster, $\rho = 0.85$. (c) Breather: near-closed orbit, $\rho = -0.22$. (d) Collision: complex trajectory, $\rho = -0.05$.