fluidsim.solvers.waves2d.solver

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

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

Bases: SimulBasePseudoSpectral

Pseudo-spectral solver for equations of 2D waves.

Notes

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}\]
InfoSolver

alias of InfoSolverWaves2d

static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

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

Compute the nonlinear tendencies.

This function has to be overridden in a child class.

Returns:
tendencies_fftfluidsim.base.setofvariables.SetOfVariables

An array containing only zeros.

Classes

InfoSolverWaves2d([only_root])

Simul(params)

Pseudo-spectral solver for equations of 2D waves.