WavKinS.jl : an efficient and modular Julia software for solving wave kinetic equations

Giorgio Krstulovic, Vincent Labarre · 2025

Read WavKinS.jl : an efficient and modular Julia software for solving wave kinetic equations by Giorgio Krstulovic, Vincent Labarre (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-00252.txt.

Introduction

Giorgio Krstulovic and Vincent Labarre present a Julia software kit that solves wave kinetic equations, in a 2025 arXiv paper. Such equations track how waves swap energy in wild systems, from sound in fluids to matter waves and ocean swells. Each system needs its own solver, a slow build from scratch.

Their kit, WavKinS, ships with solvers for many known wave systems built in. Its frame splits the work into shared parts, so a new solver for a fresh system can be put together from ready blocks. The kit runs fast and is free to use and change under an open license. The authors expect the shared frame to cut the time from a new wave model to a working code.

Catalog record

CREATORGiorgio Krstulovic, Vincent Labarre
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE24 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-00252

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

WavKinS.jl : an efficient and modular Julia software for solving wave kinetic equations Giorgio Krstulovic, Vincent Labarre Abstract This article describes the Wave Kinetic Solver WavKinS.jl , a software developed in the Julia language for solving different types of wave kinetic equations in an efficient and modular manner. WavKinS.jl already solves the wave kinetic equation describing the interaction of waves in several physical systems, such as acoustic waves, Bose-Einstein condensates, internal gravity waves and many others. Thanks to the structures and routines already implemented in WavKinS.jl , we expect that developing a new solver for a specific physical system to be straightforward. WavKinS.jl is an Open Source project distributed with EUPL-1.2 license agreement. https://github.com/gkrstulovic/WavKinS.jl https://gkrstulovic.github.io/WavKinS.jl/ Figure 1: WavKinS.jl logo. I Overview I Introduction I General description Wave kinetic equations arrive in many physical systems, such as plasmas, geophysical fluids, elastic plates, turbulent Bose-Einstein condensates, and many others Galtier, 2003 ; L’vov and Nazarenko, 2010 ; Dyachenko et al., 1992 ; Zhu et al., 2023 . When the nonlinearity is small, the theory of Weak Wave Turbulence (WWT) provides a close equation describing the evolution of the wave spectrum, which relates to the wave amplitude or energy at a given scale Zakharov et al., 1992 ; Nazarenko, 2011 . This article does not aim to provide an introduction to WWT, we provide however the physical context where wave kinetic equations are found. Let’s start by considering a general non-linear wave system, where the amplitudes of the Fourier modes a_{\textbf{k}} , having a linear dispersion relation \omega_{\textbf{k}} are described by the following Hamiltonian \displaystyle H \displaystyle= \displaystyle\sum_{\textbf{k}}\omega_{\textbf{k}}|a_{\textbf{k}}|^{2}+\sum_{\bf 123}V_{\bf 123}(a_{\bf 1}^{*}a_{\bf 2}a_{\bf 3}+c.c.)\delta^{\bf 1}_{\bf 23} (1) \displaystyle+\sum_{\bf 1234}T^{\bf 12}_{\bf 34}a_{\bf 1}a_{\bf 2}a_{\bf 3}^{*}a_{\bf 4}^{*}\delta^{\bf 12}_{\bf 34} Here, we consider waves in a d -dimensional periodic box of size L , such that wavevectors \textbf{k}\in\frac{2\pi}{L}\mathbb{Z} . We denote a_{\bf i}=a_{\bf k_{i}} and use the same convention for summation indexes. a_{\textbf{k}}^{*} denotes the complex conjugate of a_{\textbf{k}} . The tensors V_{\bf 123} and T^{\bf 12}_{\bf 34} are the interaction matrices that contain all the physics of the system, which for simplicity we consider here fully symmetric. Finally, \delta^{\bf 1}_{\bf 23} and \delta^{\bf 12}_{\bf 34} are \delta -Kronecker such that they are non-zero and equal to one only if \textbf{k}_{1}=\textbf{k}_{2}+\textbf{k}_{3} and \textbf{k}_{1}+\textbf{k}_{2}=\textbf{k}_{3}+\textbf{k}_{4} , respectively. Note that the wave dynamics is simply given by i\dot{a_{\textbf{k}}}=\frac{\partial H}{\partial a_{\textbf{k}}^{*}} . The WWT provides a statistical description for the waveaction spectrum n_{\textbf{k}}=\frac{L^{d}}{(2\pi)^{d}}\langle|a_{\textbf{k}}|^{2}\rangle in the limit of infinite box size and small nonlinearity (taken in that order). Rigorously, \langle\,\,\rangle denotes an average over initial conditions, although it is often considered as an average over different sources of fluctuations in the system. The statistical description of waves in the above mentioned limit is known as the kinetic description of weakly nonlinear waves. Note that if V_{\bf 123}\neq 0 , then the quartic terms in the Hamiltonian can be neglected in this limit. In the end, the WWT furnishes a closed equation for the waveaction spectrum called the wave kinetic equation (WKE) \frac{\mathrm{d}n_{\bf k}}{\mathrm{d}t}=St_{\bf k}, (2) where St_{\bf k} is the collisional integral. The collisional integral is a nonlinear integral functional of n_{\bf k} defined over a manifold, which will be discussed later. Finally note that in the Hamiltonian ( 1 ), one could have considered more general terms, such as U_{\bf 123}(a_{\bf 1}a_{\bf 2}a_{\bf 3}+c.c.) , however the WWT shows that in the kinetic limit, only those present in ( 1 ) survive and contribute to the dynamics of n_{\textbf{k}} . Moreover, the Hamiltonian structure of the nonlinear wave system considerably simplifies the analytical computations, but it is not necessarily required in the derivation of the WKE. The WKE can be classified by the number of waves interacting, which results in different degrees of nonlinearity and integrations to be performed. In the current version of WavKinS.jl , we consider two types of systems that can be generically written as follows. - 3 -wave canonical systems: In this case, the leading nonlinearity in ( 1 ) is cubic, and the collisional integral reads St_{\bf k}=\int(\mathcal{R}^{\bf k}_{12}-\mathcal{R}^{1}_{2{\bf k}}-\mathcal{R}^{2}_{{\bf k}1})\mathrm{d}{\bf k}_{1}\mathrm{d}{\bf k}_{2} (3) with \displaystyle\mathcal{R}^{\bf k}_{12}= \displaystyle 2\pi|V_{{\bf k}12}|^{2}(n_{1}n_{2}-n_{1}n_{\bf k}-n_{\bf k}n_{2}) (4) \displaystyle\times\delta({{\bf k}-{\bf k}_{1}-{\bf k}_{2}})\delta(\omega_{\bf k}-\omega_{1}-\omega_{2}). The integrals in the collisional integral are performed over the so-called resonant manifold defined by two \delta -Dirac, {\bf k}={\bf k}_{1}+{\bf k}_{2},\quad\omega_{\bf k}=\omega_{\bf 1}+\omega_{\bf 2}, (5) and permutation of indexes. The 3 -waves WKE conserves the total energy of the system given by E=\int\omega_{\bf k}n_{\bf k}d{\bf k}. (6) Depending on the physical system, other invariants might exist. Note that if wavevectors are in dimension d , then there are 2d-d-1=d-1 integrals to be performed for each value of a external wavevector {\bf k} . Therefore, if we use M points to discretise each coordinate of the wavevector space, then the numerical cost will be generically of the order of M^{2d-1} operations. However, by assuming full isotropy or isotropy in a plane one can drastically reduce the numerical cost, making calculations feasible. - 4 -wave canonical systems: In these systems, the cubic term in ( 1 ) is absent or the resonant manifold ( 5 ) is empty. In this case, the collisional integral is \displaystyle St_{\bf k}= \displaystyle\int|T^{{\bf k1}}_{\bf 23}|^{2}\delta({{\bf k}+{\bf k}_{1}-{\bf k}_{2}}-{\bf k}_{3})\delta(\omega^{{\bf k1}}_{\bf 23})n_{\bf k}n_{\bf 1}n_{\bf 2}n_{\bf 3} (7) \displaystyle\times\left(\frac{1}{n_{\bf k}}+\frac{1}{n_{\bf 1}}-\frac{1}{n_{\bf 2}}-\frac{1}{n_{\bf 3}}\right)\mathrm{d}{\bf k}_{1}\mathrm{d}{\bf k}_{2}\mathrm{d}{\bf k}_{2} with \omega^{{\bf k1}}_{\bf 23}=\omega_{\bf k}+\omega_{\bf 1}-\omega_{\bf 2}-\omega_{\bf 3} . The resonant manifold is in this case {{\bf k}+{\bf k}_{1}-{\bf k}_{2}}-{\bf k}_{3}=0,\quad\omega_{\bf k}+\omega_{\bf 1}-\omega_{\bf 2}-\omega_{\bf 3}=0 (8) Besides the energy ( 6 ), 4 -waves WKEs also conserves the total waveaction of the system N=\int n_{\bf k}d{\bf k}. (9) For 4 -wave systems there are 3d-d-1=2d-1 integrals to be performed, which implies in general a numerical cost of the order of M^{3d-1} operations per time step. I The Wave Kinetic Solver WavKinS.jl The Wave Kinetic Solver ( WavKinS.jl ) is a software developed in Julia language to solve WKEs of the kind ( 3 ) and ( 7 ). More precisely, it solves the following type of equations \frac{\mathrm{d}n_{\bf k}}{\mathrm{d}t}=St_{\bf k}+f_{\bf k}-d_{\bf k}n_{\bf k}, (10) where f_{\bf k} is a forcing term and d_{\bf k}\geq 0 a dissipation coefficient. Their definitions depend on the physical problem. WavKinS.jl provides all the structures and functions needed to solve several types of wave kinetic equations. The code runs well on personal computers and shared-memory clusters. WavKinS.jl is conceived in such a way that implementing a new physical system should be straightforward, provided that some basic mathematical knowledge of the physical system has been previously achieved (e.g., parametrisation of resonant manifolds, study of possible singularities of the integrands, etc.). WavKinS.jl is available in https://github.com/gkrstulovic/WavKinS.jl and its documentation here https://gkrstulovic.github.io/WavKinS.jl/ . WavKinS.jl is an Open Source project distributed with EUPL-1.2 license agreement. In the following, we provide the list of currently implemented physical systems in WavKinS.jl . The specific details about their implementation can be found in the documentation. - Acoustic waves WavKinS.jl solves the isotropic wave kinetic equation for acoustic waves in two and three dimensions. The dispersion relation is \omega_{k}=c|k| with c the speed of sound. The interaction matrix is V_{123}=V_{0}\sqrt{k_{1}k_{2}k_{3}} . The acoustic WKE is theoretically derived from a weakly dispersive system with dispersion relation \omega_{k}=ck(1+a^{2}k^{2}) in the limit a\to 0 Zakharov

Read the complete text