Source-linked AI summary
An Open-Source Pseudo-Spectral Solver for Idealized Korteweg-de Vries Soliton Simulations
Dasapta E. Irawan, Sandy H. S. Herho, Faruq Khadami, Iwan P. Anwar, Karina A. Sujatmiko, Alfita P. Handayani, Faiz R. Fajary, Rusmawan Suwarman
TL;DR
Numerical tools are needed to assess conservation, dispersion, and phase-space regularity in idealized multi-soliton KdV dynamics. The paper presents sangkuriang, an open-source Fourier pseudo-spectral solver with adaptive eighth-order Runge–Kutta integration, whose validated simulations conserve key invariants and reproduce theoretical soliton velocities within 5%.
Problem
Numerical assessment of conservation, amplitude-dependent dispersion, and phase-space regularity remains important for studying transient and multi-soliton KdV interactions beyond closed-form analysis.
Method
The paper develops sangkuriang, an open-source Python KdV solver using Fourier pseudo-spectral spatial discretization and adaptive eighth-order Runge–Kutta time integration.
Results
Conservation errors ranged from O(10^-7) to O(10^-4), while measured soliton velocities differed from theoretical predictions by less than 5% across four increasingly complex test cases.
Takeaways & Limitations
The solver provides a practical platform for reproducible idealized nonlinear dispersive-wave studies on commodity hardware and supports diagnostics of integrability preservation.
Takeaways & Limitations
The study uses approximate sech^2 initial conditions, periodic boundaries, and the standard leading-order KdV model rather than exact solutions or realistic variable-coefficient settings.
Abstract
from arXiv · showhide
The Korteweg-de Vries (KdV) equation governs the propagation of nonlinear internal and surface gravity waves in shallow ocean environments, where the balance between nonlinear steepening and frequency-dependent dispersion produces solitons. This article presents sangkuriang, an open-source Python library that solves the KdV equation using Fourier pseudo-spectral spatial discretization and adaptive eighth-order Runge-Kutta time integration, accelerated via just-in-time (JIT) compilation. Validation across four progressively complex scenarios-isolated soliton propagation, symmetric interactions, overtaking collisions, and three-body interactions-demonstrates high-fidelity conservation of mass, momentum, and energy, with relative errors below $O(10^{-4})$. Measured soliton velocities agree with theoretical predictions within $5\%$, and complementary diagnostics based on spectral entropy and recurrence quantification analysis (RQA) confirm that computed solutions preserve the regular phase-space structure characteristic of integrable Hamiltonian systems. Running on a standard laptop, sangkuriang provides a robust, lightweight platform for reproducible numerical investigation of idealized nonlinear dispersive wave dynamics relevant to coastal and ocean engineering applications.
1 Introduction
The introduction frames the KdV equation as an integrable model of solitons arising from balanced nonlinear steepening and dispersion, with applications to energetic oceanic internal solitary waves. It motivates flexible numerical tools and presents sangkuriang as an open-source Python solver combining Fourier pseudo-spectral discretization, adaptive eighth-order Runge–Kutta integration, and quantitative diagnostics.
- Scientific context: The KdV equation models localized, shape-preserving solitons produced by a balance between nonlinear steepening and linear dispersion.As a completely integrable PDE, it admits soliton solutions that survive mutual collisions with only phase shifts.
- Scientific context: KdV frameworks describe energetic nonlinear internal solitary waves in coastal and deep oceans, including waves that affect acoustic propagation and turbulent mixing.Observations document large-amplitude internal solitary waves in marginal seas such as the South China Sea, Andaman Sea, and Sulu Sea.
- Motivation: Numerical simulation is needed to explore parameter regimes, validate approximate initial conditions, and quantify conservation, amplitude-dependent dispersion, and phase-space regularity.These transient and multi-soliton behaviors can resist closed-form description.
- Contribution: sangkuriang is an open-source Python library using Fourier pseudo-spectral spatial discretization and adaptive eighth-order Runge–Kutta time integration via DOP853.Numba JIT compilation and multi-core parallelization support research-grade simulations on commodity hardware.
- Evaluation: The work benchmarks single-soliton propagation, symmetric and overtaking two-soliton configurations, and three-body interactions using spectral and recurrence-based diagnostics.The diagnostics include spectral entropy, LMC statistical complexity, Fisher information, and recurrence quantification analysis.
2 Materials and Methods
The methods derive the KdV equation from idealized shallow-water fluid dynamics under weakly nonlinear, weakly dispersive scaling, then formulate numerical solutions on a periodic grid. Diagnostics assess whether computed dynamics preserve the regular structure expected of the idealized KdV system.
- Physical formulation: The derivation begins with three-dimensional incompressible Euler equations for an inviscid fluid beneath a free surface and above a rigid seabed.The model represents shallow coastal or continental-shelf wave propagation under gravity.
- Physical formulation: Unidirectional propagation is imposed by setting v = 0 and ∂/∂y = 0, reducing the system to two-dimensional long-crested wave dynamics.This reduction targets waves propagating along the x-axis over a continental shelf or waveguide.
- Asymptotic scaling: The KdV regime assumes α = a/h0 ≪1 and β = (h0/λ)^2 ≪1, with α ∼ β ∼ O(δ) so nonlinear steepening balances dispersion.This balance produces solitary-wave solutions, while the competing effects sustain them in shallow ocean environments.
- Numerical discretization: The spatial domain is periodic, with length L = xmax − xmin, N uniformly spaced points, and resolution Δx = L/N represented through the DFT.Although ocean domains are not strictly periodic, periodicity is implicitly enforced by the discrete Fourier representation.
- Dynamical diagnostics: Recurrence diagnostics use diagonal-line structures with ℓmin = 2 typically, where high determinism indicates preservation of regular idealized KdV dynamics.The determinism measure counts recurrence points forming diagonal lines of length at least ℓmin.
3 Results
The results show that sangkuriang efficiently resolves increasingly complex KdV soliton dynamics while maintaining small conservation errors. Simulated solitons preserve expected propagation, collision, velocity–amplitude, and spectral characteristics.
- Computational performance: Cases 1–3 sustained approximately 1300–1370 steps/s, while Case 4 achieved roughly 1030 steps/s and remained suitable for interactive research workflows.The reduction is associated with larger-grid memory bandwidth demands and nominal O(N log N) FFT scaling.
- Conservation: The single-soliton case had maximum relative deviations of 7.64 × 10−5 for mass, 2.98 × 10−7 for momentum, and 1.73 × 10−7 for energy.These values are consistent with the specified integration tolerances.
- Conservation: Maximum conservation errors increased during multi-soliton interactions, reaching 3.33×10−4 for mass in Case 3 and 2.56 × 10−4 for Case 4.Transient excursions correlate with collision events and intensified nonlinear coupling.
- Soliton dynamics: The isolated soliton maintained its characteristic shape while its amplitude increased from approximately 4.0 m to a global maximum of 5.21 m.The evolution reflects adjustment of the approximate initial profile toward a true soliton through radiation of small-amplitude dispersive waves.
- Soliton dynamics: The overtaking collision involved a 6.0 m soliton passing through a 2.0 m soliton near t ≈35 s and x ≈0 m, producing the characteristic X-shaped intersection.The waves exhibit elastic scattering and emerge with their identities preserved.
- Velocity validation: The measured single-soliton velocity was 0.349 m/s versus vtheo = εA/3 = 0.337 m/s, a discrepancy of approximately 3.6%, with R2 = 0.9998.Across tracked solitons, data points clustered along the theoretical relation v = εA/3.
4 Discussion
The discussion finds that sangkuriang reproduces KdV soliton dynamics with accurate conservation, velocities, trajectories, and integrability diagnostics while remaining practical on laptop-class hardware. It also identifies limitations from approximate initial conditions and periodic boundaries, plus directions for extending the solver to more realistic coastal applications.
- Numerical accuracy: Conservation errors ranged from O(10^-7) to O(10^-4), with momentum and energy conserved more accurately than mass across the test cases.The discussion attributes this performance to pseudo-spectral spatial discretization combined with eighth-order adaptive time integration.
- Numerical accuracy: Absence of systematic drift indicates that DOP853 produced primarily oscillatory rather than secular errors over the integration times considered.The passage cautions that longer simulations could accumulate problematic errors and might benefit from structure-preserving integrators.
- Soliton validation: < 5% discrepancy between measured and theoretical soliton velocities confirms the amplitude–velocity relationship governing KdV soliton propagation.The same scaling explains why larger-amplitude oceanic internal solitary waves propagate faster than smaller ones.
- Soliton validation: R2 > 0.99 for all tracked trajectories supports soliton behavior, including preservation of identity through post-collision segments.The discussion contrasts this linear trajectory behavior with dispersive wave packets that would spread and decelerate.
- Integrability diagnostics: Spectral entropy, statistical complexity, and Fisher information showed bounded variations with transient collision excursions that subsequently relaxed, while DET > 0.99 indicated regular phase-space dynamics.Fisher information was especially sensitive to transient gradient steepening, and RQA is proposed as a model-independent integrability diagnostic.
- Performance and scope: Approximately 1000–1400 time steps per second enabled research-grade simulations in minutes on a laptop-class workstation.The implementation used Numba acceleration, with throughput decreasing from ∼1300 to ∼1030 as grid size increased from N = 512 to N = 1024.
- Limitations and future work: The study used approximate sech2 initial conditions and periodic boundaries, limiting validation against exact N-soliton solutions and realistic boundary interactions.Future extensions include inverse-scattering initial conditions, variable-coefficient models, and rotational effects through the Ostrovsky equation.
5 Conclusions
The study presents sangkuriang as a validated open-source pseudo-spectral KdV solver whose canonical test cases establish a foundation for more realistic ocean-wave studies. Its diagnostic framework also offers a transferable approach for assessing integrability preservation in nonlinear dispersive PDE simulations.
- sangkuriang combines Fourier-based spatial discretization with adaptive eighth-order Runge–Kutta time integration for KdV simulations.
- Four progressively complex test cases confirmed conservation of KdV invariants, with relative errors below 10^-5 for momentum and energy.The cases range from isolated soliton propagation to three-body interactions.
- The benchmarks capture essential nonlinear dispersive dynamics relevant to oceanic solitary waves and establish a verified computational foundation for more realistic ocean-wave studies.Examples include internal soliton trains on continental shelves and long gravity waves in coastal basins.
- The diagnostic framework combines conservation monitoring, spectral information measures, and recurrence quantification to assess integrability preservation in nonlinear dispersive PDE solutions.The methodology is positioned for geophysical fluid dynamics applications.
- The framework can support extensions to variable-coefficient KdV variants for realistic bathymetry and higher-order dispersive equations such as the Kawahara equation.
Conflicts of Interest
The authors report no conflicts of interest, and the funders had no role in the study’s design, execution, interpretation, writing, or publication decision.
- The authors declare no conflicts of interest, while funders had no role in study design, data collection, analysis, interpretation, manuscript writing, or the decision to publish.
Abbreviations
This section defines abbreviations used for numerical methods, computational tools, wave physics, and data formats in the paper.
- Numerical methods: Numerical-analysis abbreviations include DFT (Discrete Fourier Transform), FFT (Fast Fourier Transform), IFFT (Inverse Fast Fourier Transform), ODE (Ordinary Differential Equation), and DOP853 (Dormand–Prince 8(5,3) method).
- Computational tools: Computational abbreviations include CPU (Central Processing Unit), JIT (Just-In-Time), LLVM (Low Level Virtual Machine), MKL (Math Kernel Library), OpenMP (Open Multi-Proce), and FFTW (Fastest Fourier Transform in the West).
- Domain and data terms: Domain and data abbreviations include KdV (Korteweg–de Vries), ISW (Internal Solitary Wave), GFD (Geophysical Fluid Dynamics), NetCDF (Network Common Data Format), CF (Climate and Forecast), and LMC (L´opez–Ruiz–Mancini–Calbet).