Skip to content

ConformalEulerDeepWater v1.2.0

Latest

Choose a tag to compare

@dutykh dutykh released this 15 Nov 08:00

ConformalEulerDeepWater solves the full Euler equations of irrotational water waves in deep water, written in the conformal variables of Dyachenko, Kuznetsov, Spector and Zakharov (1996), by a Fourier pseudo-spectral method with an exponential filter, exact integration of the linear terms and an adaptive Runge–Kutta scheme of Cash and Karp. Its example is the Peregrine breather. This version corrects the time step, takes the example from the wave-tank experiment of Shemer and Alperovich (2013), and gives the run a final time that is a time.

What was wrong. The run of version 1.1.0 practically stalled: at t = 25.7 s its highest crest reached 77 mm (k0 η = 0.55), the time step fell below 10⁻⁴ s, and after five minutes of computing in GNU Octave it had covered 28 s of the 223 s requested. The physics was not the cause. The stages of the Runge–Kutta scheme evaluated the nonlinear terms at the stage value in the variable rotated by the linear flow, instead of the physical state exp(sL) w: the scheme was only of first order, and it fed energy into the waves, by 10% in 10 s and by 50% in 26 s, which drove the breather into a spurious steep crest before the computation broke down. The exact linear rotation that ends each step also used the step proposed for the next step instead of the step just taken, so the linear dynamics ran ahead of the clock. Finally the final time was written Tf = 95 T0 √g, whose unit is the square root of a metre.

What changed. The stages again rotate the state forward before the nonlinear terms are evaluated, as the first version of the code (2014) did (the method of Lawson, 1967), and each step ends with the rotation over the step taken. The run follows the experiment of Shemer and Alperovich (Physics of Fluids 25, 051701, 2013, https://doi.org/10.1063/1.4807055): carrier period 0.587 s (wavelength 0.538 m), amplitude 10 mm (steepness ε = a0 k0 = 0.0826), the maximum of the Peregrine solution 9 m from the wavemaker, a group of 70 periods with tapers of two, and the envelope of their equation (4). It starts when the centre of the group leaves the wavemaker and ends at Tf = Xend/cg = 19.64 s, when the centre reaches Xend = 9 m. Beyond that distance the computation enters the onset of breaking: towards the last gauge of the experiment, at 13.3 m, the crests passing through the peak of the group steepen beyond 45° near 11 m, the filter removes 3 to 4% of the energy, and with 32768 Fourier modes the surface overturns at 12.2 m. The calm water now lies at η = 0, the results are written sixteen times per period, the drawing runs in GNU Octave 11, and the figure of the README is redrawn from the corrected run.

How it was checked. With constant steps the former scheme is of first order (an error of about 5% of the amplitude after one second at the usual steps), while the corrected one converges at fifth order (its error is divided by 35, 33 and 32 when the step is halved from 5 ms to 0.625 ms, without the filter). The default run takes about two minutes in GNU Octave on one thread; the energy (the Hamiltonian of the conformal formulation) changes by 7.5 × 10⁻⁶ of its value, the momentum by 8.4 × 10⁻⁶ and the mass by 1.0 × 10⁻⁷ m², and with 32768 modes the change of the energy falls to 3.3 × 10⁻⁷. The highest crests computed at the gauges at 2.25 m, 6.25 m and 9 m are 17.0, 19.1 and 25.7 mm, where the experiment measured 14.2, 20.1 and 25.2 mm: at the distance of the maximum of the Peregrine solution the computation and the measurement agree within 2%, and both stay below the 30 mm of the Peregrine envelope, the growth being slower than the nonlinear Schrödinger equation predicts, as Shemer and Alperovich observed. The former setting, with a carrier of period 0.75 s, also runs without difficulty with the corrected step: 60 s of physical time in two and a half minutes, with the energy conserved to 9 × 10⁻⁷.

How to cite. No article accompanies this code; please cite the software as given by the button "Cite this repository" (CITATION.cff), version 1.2.0, and the works it rests on, listed in the README.