2D waves solver (fluidsim.solvers.waves2d.solver)

class fluidsim.solvers.waves2d.solver.Simul(params)[source]

Bases: fluidsim.base.solvers.pseudo_spect.SimulBasePseudoSpectral

Pseudo-spectral solver for equations of 2D waves.


This class is dedicated to solve wave 2D equations:

\[ \begin{align}\begin{aligned}\partial_t \hat f = \hat g - \gamma_f \hat f,\\\partial_t \hat g = -\Omega^2 \hat f - \gamma_g \hat g,\end{aligned}\end{align} \]

This purely linear wave equation can alternatively be written as as \(\partial_t X = M X\), with

\[\begin{split}X = \begin{pmatrix} \hat f \\ \hat g \end{pmatrix} \ \ \text{and}\ \ M = \begin{pmatrix} -\gamma_f & 1 \\ -\Omega^2 & -\gamma_g \end{pmatrix},\end{split}\]

where the three coefficients usually depend on the wavenumber. The eigenvalues are \(\sigma_\pm = - \bar \gamma \pm i \tilde \Omega\), where \(\bar \gamma = (\gamma_f + \gamma_g)/2\) and

\[\tilde \Omega = \Omega \sqrt{1 + \frac{1}{\Omega^2}(\gamma_f\gamma_g - \bar \gamma^2)}.\]

The (not normalized) eigenvectors can be expressed as

\[\begin{split}V_\pm = \begin{pmatrix} 1 \\ \sigma_\pm + \gamma_f \end{pmatrix}.\end{split}\]

The state can be represented by a vector \(A\) that verifies \(X = V A\), where \(V\) is the base matrix

\[\begin{split}V = \begin{pmatrix} 1 & 1 \\ \sigma_+ + \gamma_f & \sigma_- + \gamma_f \end{pmatrix}.\end{split}\]

The inverse base matrix is given by

\[\begin{split}V^{-1} = \frac{i}{2\tilde \Omega} \begin{pmatrix} \sigma_- + \gamma_f & -1 \\ -\sigma_+ - \gamma_f & 1 \end{pmatrix}.\end{split}\]
static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

tendencies_nonlin(self, state_spect=None, old=None)[source]

Compute the nonlinear tendencies.

This function has to be overridden in a child class.


An array containing only zeros.



Pseudo-spectral solver for equations of 2D waves.