eigenvectors#
Module: fridom.shallowwater.grid.cartesian.eigenvectors
Functions
|
The eigenvalues of the System matrix. |
|
The projection vectors of the system matrix. |
|
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:
with
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 \(|\boldsymbol{k}| > 0\) the eigenvectors that correspond to the mode \(s=0,+,-\) are given by:
For \(|\boldsymbol{k}| = 0\) we obtain the eigenvectors for the inertial modes:
Projection Vectors#
Projection vectors should satisfy
where the star denotes the hermitian transposed. Solving this equation for \(|\boldsymbol{k}| > 0\) yields:
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:
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 matrix is:
Eigenvalues#
The eigenvalues of the discrete system matrix are:
with
Eigenvectors#
The eigenvectors \(\boldsymbol{q^s}\) for \(|\boldsymbol{k}| > 0\) are:
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.