Repository navigation
Releases
SSGW v1.0.0
SSGW computes steady periodic surface gravity waves of permanent form in water of any depth, from Stokes waves in deep water to long cnoidal waves, by the Babenko equation in conformal variables, a Fourier pseudo-spectral discretisation and Petviashvili iterations. The method is that of the article
D. Clamond and D. Dutykh, Accurate fast computation of steady two-dimensional surface gravity waves in arbitrary depth, Journal of Fluid Mechanics 844, 491–518 (2018).
https://doi.org/10.1017/jfm.2018.208
Please cite that article if you use this code; the button "Cite this repository" gives the reference.
Compared with the version of 8 February 2017, the kinetic energy is now returned in PP(11), which a misprint left at zero, and the list of outputs in the header of SSGW.m matches the code (PP(3) is the wave height, PP(15) the group velocity). The computed waves and the other outputs are unchanged. With the correction, the kinetic and potential energies of small waves become equal as they must: in deep water K/V − 1 = 5.0 × 10⁻⁷ at kH/2 = 0.001 and 5.0 × 10⁻³ at kH/2 = 0.1. The README now documents the method and every output, and shows four waves with their spectra.