Sangkuriang:用于Korteweg-de Vries孤子模拟的伪谱法Python库
sangkuriang: A pseudo-spectral Python library for Korteweg-de Vries soliton simulation
January 17, 2026
作者: Sandy H. S. Herho, Faruq Khadami, Iwan P. Anwar, Dasapta E. Irawan
cs.AI
摘要
Korteweg-de Vries(KdV)方程作为非线性波物理的基础模型,描述了色散展宽与非线形陡化之间的平衡机制,该机制正是孤子产生的物理根源。本文介绍sangkuriang——一个基于Python的开源库,它采用傅里叶伪谱空间离散化结合自适应高阶时间积分法求解该方程。该实现通过即时编译技术提升计算效率,同时保持教学应用的易用性。验证工作涵盖逐级复杂的场景:包括孤立孤子传播、对称双波构型、异幅行波的追赶碰撞以及三体相互作用。在整个模拟过程中监测经典不变量守恒情况,所有测试案例的偏差均保持较小范围。实测孤子速度与基于可积系统特有的幅速关系理论预测高度吻合。结合信息论和递归分析的辅助诊断技术证实,计算解保持了完全可积动力学所预期的规则相空间结构。求解器以标准科学格式输出数据,兼容主流分析工具,并能生成时空波演化的可视化结果。通过在不苛刻的计算资源上实现数值精度与实用性的结合,sangkuriang为非线性波现象的课堂演示和孤子动力学的探索性研究提供了适宜平台。
English
The Korteweg-de Vries (KdV) equation serves as a foundational model in nonlinear wave physics, describing the balance between dispersive spreading and nonlinear steepening that gives rise to solitons. This article introduces sangkuriang, an open-source Python library for solving this equation using Fourier pseudo-spectral spatial discretization coupled with adaptive high-order time integration. The implementation leverages just-in-time (JIT) compilation for computational efficiency while maintaining accessibility for instructional purposes. Validation encompasses progressively complex scenarios including isolated soliton propagation, symmetric two-wave configurations, overtaking collisions between waves of differing amplitudes, and three-body interactions. Conservation of the classical invariants is monitored throughout, with deviations remaining small across all test cases. Measured soliton velocities conform closely to theoretical predictions based on the amplitude-velocity relationship characteristic of integrable systems. Complementary diagnostics drawn from information theory and recurrence analysis confirm that computed solutions preserve the regular phase-space structure expected for completely integrable dynamics. The solver outputs data in standard scientific formats compatible with common analysis tools and generates visualizations of spatiotemporal wave evolution. By combining numerical accuracy with practical accessibility on modest computational resources, sangkuriang offers a platform suitable for both classroom demonstrations of nonlinear wave phenomena and exploratory research into soliton dynamics.