eigenvectors#
Module: fridom.nonhydro.grid.cartesian.eigenvectors
Functions
|
Return eigenvalues of the System matrix. |
|
Return the projection vectors of the System matrix. |
|
Return eigenvectors of the System matrix and the divergence vector. |
Eigenvalues and eigenvectors of the system matrix of the nonhydrostatic model.
Continuous Case#
The System Matrix#
We start from the scaled linearized nonhydrostatic equations in spectral space:
and the diagnostic pressure equation obtained by taking the divergence of the momentum equations:
Solving the diagnostic pressure equation for the pressure and substituting it back into the momentum equations, we obtain the following system of equations:
with
with the wavenumbers:
Eigenvalues#
The system matrix has three eigenvalues. One eigenvalue is zero, corresponding to the geostrophic mode:
The other two eigenvalues correspond to the inertial-gravity wave modes:
Eigenvectors#
For the eigenvectors we have to separately consider the case of purely vertical, e.g. \(k_x = k_y = 0\), and the general case of nonzero horizontal wavenumbers. For the purely vertical case, the eigenvectors are:
For the general case of nonzero horizontal wavenumbers, the eigenvectors are:
Projection Vectors#
Projection vectors should satisfy
where the star denotes the hermitian transposed. Add divergent vector \(\boldsymbol{q^d} = \begin{pmatrix} k_x & k_y & k_z & 0 \end{pmatrix}\) such that \((\boldsymbol{q^0}, \boldsymbol{q^+}, \boldsymbol{q^-}, \boldsymbol{q^d})\) form a basis.
For the purely vertical case, the projection vectors are identical to the eigenvectors: \(\boldsymbol{p^s} = \boldsymbol{q^s}\). For the general case of nonzero horizontal wavenumbers, the projection vectors are:
with
The projection vectors are normalized such that \({\boldsymbol{p^s}}^* \cdot \boldsymbol{p^s} = 1\).
Discrete Case#
Lets define the forward and backward finite difference operators as:
A fourier transform yields the discrete spectral operators:
Similarly, we define the forward and backward linear interpolation operators as:
A fourier transform yields the discrete spectral operators:
Using these discretization operators, the discrete linear system of equations in spectral space can be written as:
and the diagnostic pressure equation:
System Matrix#
Following the same procedure as in the continuous case, we obtain the discrete system matrix:
with
Eigenvalues#
with
Eigenvectors#
For the purely vertical case, the discrete eigenvectors are identical to the continuous eigenvectors. For the general case of nonzero horizontal wavenumbers, the discrete eigenvectors are:
The divergent vector is given by \(\boldsymbol{q^d} = (\hat{k}_x^+, \hat{k}_y^+, \hat{k}_z^+, 0)\). All eigenvectors are orthogonal to the divergent vector. Hence no eigenvector project onto divergent velocity fields.
Projection Vectors#
Similar to the continuous case, the projection vectors of the purely vertical case are identical to the eigenvectors. Hence, we only show the projection vectors for the general case of nonzero horizontal wavenumbers:
with
- fridom.nonhydro.grid.cartesian.eigenvectors.omega(mset: ModelSettings, s: int, k: tuple[float] | tuple[ndarray], use_discrete: bool = False) ndarray[source]#
Return eigenvalues of the System matrix.
Parameters#
- msetnh.ModelSettings
The model settings.
- sint
The mode of the eigenvector. (0, 1, -1)
- ktuple[float] | tuple[ndarray]
The wavenumbers.
- use_discretebool (default: False)
If True, the discrete eigenvalues are returned. Otherwise, the continuous eigenvalues are returned.
- fridom.nonhydro.grid.cartesian.eigenvectors.vec_q(mset: ModelSettings, s: int | str, use_discrete: bool = True) None[source]#
Return eigenvectors of the System matrix and the divergence vector.
Parameters#
- msetModelSettings
The model settings.
- sint | str
The mode of the eigenvector. 0 => geostrophic, “d” => divergent, 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.
Description#
For the continuous case, and \(k_x = k_y = 0\), the eigenvectors are:
\[\begin{split}\boldsymbol{q^0} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} \quad, \quad \boldsymbol{q^\pm} = \begin{pmatrix} \mp i \\ 1 \\ 0 \\ 0 \end{pmatrix} \quad, \quad \boldsymbol{q^d} = \begin{pmatrix} k_x \\ k_y \\ k_z \\ 0 \end{pmatrix}\end{split}\]For the general case of nonzero horizontal wavenumbers, the eigenvectors are:
\[\begin{split}\boldsymbol{q^0} = \begin{pmatrix} -k_y \\ k_x \\ 0 \\ fk_z \end{pmatrix} \quad, \quad \boldsymbol{q^\pm} = \begin{pmatrix} k_z ( -i \omega^\pm k_x + f k_y) \\ k_z ( -i \omega^\pm k_y - f k_x) \\ i\omega^\pm k_h^2 \\ N^2 k_h^2 \end{pmatrix} \quad, \quad \boldsymbol{q^d} = \begin{pmatrix} k_x \\ k_y \\ k_z \\ 0 \end{pmatrix}\end{split}\]The discrete projection vector is given in the docstring of the eigenvectors.
- fridom.nonhydro.grid.cartesian.eigenvectors.vec_p(mset: ModelSettings, s: int | str, use_discrete: bool = True) None[source]#
Return the projection vectors of the System matrix.
Parameters#
- msetModelSettings
The model settings.
- sint
The mode of the eigenvector. 0 => geostrophic, “d” => divergent, 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.
Description#
For the continuous case, and \(k_x = k_y = 0\), the projection vectors are:
\[\begin{split}\boldsymbol{p^0} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} \quad, \quad \boldsymbol{p^\pm} = \begin{pmatrix} \mp i \\ 1 \\ 0 \\ 0 \end{pmatrix} \quad, \quad \boldsymbol{p^d} = \begin{pmatrix} k_x \\ k_y \\ k_z \\ 0 \end{pmatrix}\end{split}\]For the general case of nonzero horizontal wavenumbers, the projection vectors are:
\[\begin{split}\boldsymbol{p^0} = \begin{pmatrix} -N^2 k_y \\ N^2 k_x \\ 0 \\ f k_z \end{pmatrix} \quad, \quad \boldsymbol{p^\pm} = \begin{pmatrix} k_z ( -i \omega^\pm k_x + f \gamma k_y) \\ k_z ( -i \omega^\pm k_y - f \gamma k_x) \\ i\omega^\pm k_h^2 \\ \gamma k_h^2 \end{pmatrix} \quad, \quad \boldsymbol{p^d} = \begin{pmatrix} k_x \\ k_y \\ k_z \\ 0 \end{pmatrix}\end{split}\]The discrete projection vector is given in the docstring of the eigenvectors.