TestTimeStepping solver

Description

System used to check Time-stepping methods accuracy. In this case, the collision integral is

\[St_{\bf k} = n_{\bf k}^2\]

so the kinetic equation has non trivial, but analytical solutions.

Solver

There is no coupling between different modes, so the implementation of the solver is straigthforward.

Diagnostics

The standard diagnostics should work for this system.

Theoretical predictions

The analytical solution for the wave action is

\[n_{\bf k}(t) = \frac{1}{2} \left( d_{\bf k} + c_{\bf k} \tan \left( \arctan \left( \frac{-d_{\bf k} + 2 n_{\bf k}(0)}{c_{\bf k}} \right) + \frac{c_{\bf k} t}{2} \right) \right)\]

where $c_{\bf k} = \sqrt{4 f_{\bf k} - d_{\bf k}^2 }$. The numerical prediction is compared to the analytical solution for different time-stepping methods in the run/tests/tests_time_stepping.jl script. It allows to check that the Runge-Kutta 2 RK2_step method is of order $2$ accurary with the time step $\mathrm{d}t$, as shown on the following figure

The other methods (e.g. Euler_step or RK4_step) can be tested as well.

List of structures and methods for TestTimeStepping solver

WavKinS.TestTimeSteppingType
TestTimeStepping

Simulation structure for TestTimeStepping system. It contains

name::String #name of the simulation type
Nk_arguments::Int # Number of arguments of ``n_k``. 1: (fully symetric) , 2: (cylindrical average in 3D or mirror symmetric in 2D), 3: Only mirror symmetric in 3D

Nk::wave_spectrum # wave action
Sk::wave_spectrum # collisional integral
F1::wave_spectrum # working field
partition::Vector{UnitRange{Int64}} # partition for multithreading

time_stepping::Time_Stepping

t::Float64 # current time
dimension::Int # physical dimension of the system (or of the isotropic sector)
dΩ::Float64 # surface of the unit sphere (or of the isotropic sector)

FD::force_dissipation # Contains all the terms about force and dissipation.