eigenvectors#

Module: fridom.shallowwater.grid.cartesian.eigenvectors

Functions

omega(mset, s, k[, use_discrete])

The eigenvalues of the System matrix.

vec_p(mset, s[, use_discrete])

The projection vectors of the system matrix.

vec_q(mset, s[, use_discrete])

The eigenvectors of the system matrix

Eigenvalues and eigenvectors of the system matrix of the shallow water model.

Continuous Case#

The System Matrix#

Linearizing the shallow water equations (i.e. taking the limit \(Ro \rightarrow 0\)) and performing a spatial Fourier transform, we obtain the following system:

\[\partial_t \boldsymbol{z} = -i \mathbf{A} \cdot \boldsymbol{z}\]

with

\[\begin{split}\boldsymbol{z} = \begin{pmatrix} u \\ v \\ p \end{pmatrix} \quad, \quad \mathbf{A} = \begin{pmatrix} 0 & if & k_x \\ -if & 0 & k_y \\ c^2 k_x & c^2 k_y & 0 \end{pmatrix} \end{split}\]

Eigenvalues#

The system matrix has three eigenvalues. One eigenvalue is zero, corresponding to the geostrophic mode:

\[\omega^0 = 0\]

The other two eigenvalues correspond to the inertial-gravity wave modes:

\[\omega^\pm = \pm \sqrt{f^2 + c^2 (k_x^2 + k_y^2)}\]

Eigenvectors#

For \(|\boldsymbol{k}| > 0\) the eigenvectors that correspond to the mode \(s=0,+,-\) are given by:

\[\begin{split}\boldsymbol{q^s} = \begin{pmatrix} \omega^s k_x - i f k_y \\ \omega^s k_y + i f k_x \\ f^2 - (\omega^s)^2 \end{pmatrix}\end{split}\]

For \(|\boldsymbol{k}| = 0\) we obtain the eigenvectors for the inertial modes:

\[\begin{split}\boldsymbol{q^s} = \begin{pmatrix} -is \\ s^2 \\ 1 - s^2 \end{pmatrix}\end{split}\]

Projection Vectors#

Projection vectors should satisfy

\[{\boldsymbol{p^s}}^* \cdot \boldsymbol{q^{s'}} = \delta_{s,s'}\]

where the star denotes the hermitian transposed. Solving this equation for \(|\boldsymbol{k}| > 0\) yields:

\[\begin{split}\boldsymbol{p^s} = \begin{pmatrix} q^s_x \\ q^s_y \\ c^{-2} q^s_z \end{pmatrix}\end{split}\]

where \(q^s_i\) denotes the \(i\)-th component of the eigenvector \(\boldsymbol{q^s}\).

For the inertial modes (i.e. \(|\boldsymbol{k}| = 0\)), the projection vectors are equal to the eigenvectors. All projection vectors are normalized such that \({\boldsymbol{p^s}}^* \cdot \boldsymbol{p^s} = 1\) holds.

Discrete Case#

Lets define the forward and backward finite difference operators as:

\[\delta_x^+ u = \frac{u(x + \Delta x) - u(x)}{\Delta x} \quad, \quad \delta_x^- u = \frac{u(x) - u(x - \Delta x)}{\Delta x}\]

A fourier transform yields the discrete spectral operators:

\[\delta_x^+ u \rightarrow \frac{e^{ik_x \Delta x} - 1}{\Delta x} = i \hat{k}_x^+ u \quad, \quad \delta_x^- u \rightarrow \frac{1 - e^{-ik_x \Delta x}}{\Delta x} = i \hat{k}_x^- u\]

Similarly, we define the forward and backward linear interpolation operators as:

\[\overline{u}^{x+} = \frac{u(x + \Delta x) + u(x)}{2} \quad, \quad \overline{u}^{x-} = \frac{u(x) + u(x - \Delta x)}{2}\]

A fourier transform yields the discrete spectral operators:

\[\overline{u}^{x+} \rightarrow \frac{e^{ik_x \Delta x} + 1}{2} = \hat{1}_x^+ u \quad, \quad \overline{u}^{x-} \rightarrow \frac{1 + e^{-ik_x \Delta x}}{2} = \hat{1}_x^- u\]

Using these discretization operators, the discrete linear system matrix is:

\[\begin{split}\mathbf{A} = \begin{pmatrix} 0 & i f \hat{1}_x^+ \hat{1}_y^- & \hat{k}_x^+ \\ -i f \hat{1}_x^- \hat{1}_y^+ & 0 & \hat{k}_y^+ \\ c^2 \hat{k}_x^- & c^2 \hat{k}_y^- & 0 \end{pmatrix}\end{split}\]

Eigenvalues#

The eigenvalues of the discrete system matrix are:

\[\omega^0 = 0 \quad \text{and} \quad \omega^\pm = \sqrt{\hat{1}_x^2 \hat{1}_y^2 f^2 + c^2 (\hat{k}_x^2 + \hat{k}_y^2)}\]

with

\[\hat{1}_x^2 = \hat{1}_x^+ \hat{1}_x^- \quad \text{and} \quad \hat{k}_x^2 = \hat{k}_x^+ \hat{k}_x^-\]

Eigenvectors#

The eigenvectors \(\boldsymbol{q^s}\) for \(|\boldsymbol{k}| > 0\) are:

\[\begin{split}\boldsymbol{q^s} = \begin{pmatrix} \omega^s \hat{k}_x^+ - i \hat{1}_x^+ \hat{1}_y^- f \hat{k}_y^+ \\ \omega^s \hat{k}_y^+ + i \hat{1}_x^- \hat{1}_y^+ f \hat{k}_x^+ \\ \hat{1}_x^2 \hat{1}_y^2 f^2 - (\omega^s)^2 \end{pmatrix}\end{split}\]

For \(|\boldsymbol{k}| = 0\) the eigenvectors are identical to the continuous case. The projection vectors are the same as in the continuous case, but by using the discrete eigenvectors.

fridom.shallowwater.grid.cartesian.eigenvectors.omega(mset: ModelSettings, s: int, k: tuple[float] | tuple[ndarray], use_discrete: bool = False) ndarray[source]#

The eigenvalues of the System matrix.

Computes the continuous or discrete eigenvalues as described in eigenvectors.

Parameters#

msetModelSettings

The model settings.

sint

The mode of the eigenvector. 0 => geostrophic, 1 => positive inertial-gravity, -1 => negative inertial-gravity

ktuple[float] | tuple[ndarray]

The wavenumber tuple \((k_x, k_y)\).

use_discretebool (default: True)

If True, the discrete eigenvectors are returned. Otherwise, the continuous eigenvectors are returned.

Returns#

ndarray

The eigenvalues of the System matrix.

fridom.shallowwater.grid.cartesian.eigenvectors.vec_q(mset: ModelSettings, s: int, use_discrete=True) State[source]#

The eigenvectors of the system matrix

Computes the continuous or discrete eigenvectors as described in eigenvectors.

Parameters#

msetModelSettings

The model settings.

sint

The mode of the eigenvector. 0 => geostrophic, 1 => positive inertial-gravity, -1 => negative inertial-gravity

use_discretebool (default: True)

If True, the discrete eigenvectors are returned. Otherwise, the continuous eigenvectors are returned.

Returns#

State

The eigenvectors of the system matrix.

fridom.shallowwater.grid.cartesian.eigenvectors.vec_p(mset: ModelSettings, s: int, use_discrete: bool = True) State[source]#

The projection vectors of the system matrix.

Computes the continuous or discrete projection vectors as described in eigenvectors.

Parameters#

msetModelSettings

The model settings.

sint

The mode of the eigenvector. 0 => geostrophic, 1 => positive inertial-gravity, -1 => negative inertial-gravity

use_discretebool (default: True)

If True, the discrete eigenvectors are returned. Otherwise, the continuous eigenvectors are returned.

Returns#

State

The projection vectors of the system matrix.