ChatPaper.aiChatPaper

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.
PDF11January 23, 2026