From https://en.wikipedia.org/wiki/Shallow_water_equations#Conservative_form
System of Equations:
$h = $ height above sea floor, in $[m]$.
$D = $ resting height above minimum, in $[m]$.
$B = $ bathymetry = distance from minimum to seafloor, in $[m]$.
$H = D - B = $ distance from sea floor to resting height, in $[m]$.
$v^i = $ fluid velocity in $[\frac{m}{s}]$.
$g = $ acceleration due to gravity in $[\frac{m}{s^2}]$.
$g_{ij} = $ metric tensor, in units $[1]$.
$\nabla_i =$ metric-cancelling covariant derivative with Levi-Civita connection.
$\tilde{g}_{\tilde{i}\tilde{j}} =$ coordinate metric and coordinate indexes.
$\partial_t (h) + \nabla_j (h v^j) = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^j + \frac{1}{2} g h^2 g^{ij}) = g h \nabla^i H$
How about primitive variables:
$\partial_t (h) + \nabla_j (h v^j) = 0$
$\partial_t (h) = -\nabla_j (h v^j)$
$\partial_t (h) = -v^j \nabla_j (h) - h \nabla_j (v^j)$
$\partial_t (h v^i)
+ \nabla_j (
h v^i v^j
+ \frac{1}{2} g h^2 g^{ij}
)
= g h \nabla^i H
$
$
v^i \partial_t (h)
+ h \partial_t (v^i)
+ \nabla_j (
h v^i v^j
)
+ g h \nabla^i (h)
= g h \nabla^i (H)
$
$
h \partial_t (v^i)
- v^i \nabla_j (h v^j)
+ h v^j \nabla_j (v^i)
+ v^i \nabla_j (h v^j)
+ g h \nabla^i (h)
= g h \nabla^i (H)
$
$
\partial_t (v^i)
+ v^j \nabla_j (v^i)
+ g \nabla^i (h - H)
= 0
$
$\partial_t (h) + \nabla_j (h v^j) = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^j + \frac{1}{2} g h^2 g^{ij}) - g g^{ij} h \nabla_j H = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^j + \frac{1}{2} g h^2 g^{ij} - g g^{ij} h H) + g g^{ij} H \nabla_j h = 0$
For an arbitrary normal, assuming $\frac{1}{|n|^2} n_k n^j = \delta^j_k$:
One option is using the simplification $\nabla_k n^k = \partial_k n^k + {\Gamma^k}_{km} n^m$
$= \partial_k n^k + ({\Gamma^k}_{mk} - {c_{mk}}^k) n^m$
$= \partial_k n^k + (\frac{1}{\sqrt{|g|}} \partial_m ( \sqrt{|g|} ) - {c_{mk}}^k) n^m$
$= \frac{1}{\sqrt{|g|}} \partial_k (( \sqrt{|g|} ) n^k ) - {c_{mk}}^k n^m$
Now for shallow water specifically:
$\partial_t (h)
+ \nabla_j (\frac{1}{|n|^2} h v^k n_k) n^j
= -(\nabla_j n^j) (\frac{1}{|n|^2} h v^k n_k)$
$\partial_t (h v^i)
+ \nabla_j (\frac{1}{|n|^2} h v^i v^k n_k n^j + \frac{1}{2} \frac{1}{|n|^2} g h^2 n^i) n^j
= g h \nabla^i d - (\nabla_j n^j) (\frac{1}{|n|^2} h v^i v^k n_k n^j + \frac{1}{2} \frac{1}{|n|^2} g h^2 n^i)$
Notice how this compares with the normal definition given in the 'wave quation hyperbolic form' or 'Euler equations in contravariant form' worksheets.
Those assume $n_k n^j = |n|^2 \delta^j_k$. So this is similar except it assumes $|n| = 1$. Notice that later in the flux eigensystem this constraint is no longer relaxed, so how about removing it here too?
$\partial_t (h) + \nabla_j (h v^k n_k n^j) = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^k n_k n^j + \frac{1}{2} g h^2 n^i n^j) = g h \nabla^i d$
Assuming $\nabla_i n_j = 0$:
Notice, $K_{ij} = \perp \nabla_i n_j$ is the definition of extrinsic curvature.
So once again this formulation is more strict than the 'wave equation hyperbolic form' and 'Euler fluid equation in contravariant form' worksheets.
Once thing that arbitrary manifold formulation in those two worksheets is that it only considers extrinsic curvature and normals in the direction of the time advection (courtesy of general relativity), but not extrinsic curvature in the spatial dimension as if the equations were solved on a curved surface.
Of course, the extrinsic curvature here is spatial extrinsic curvature, and the extrinsic curvature in 'wave equation hyperbolic form' is the spatial-hypersurface extrinsic curvature.
$\partial_t (h) + \nabla_j (h v^k n_k) n^j = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^k n_k + \frac{1}{2} g h^2 n^i) n^j = g h \nabla^i d$
For my entertainment, let's expand those connections:
$\partial_t (h) + n^j \partial_j (h v^k n_k) = 0$
$\partial_t (h v^i) + n^j (\partial_j (h v^i v^k n_k + \frac{1}{2} g h^2 n^i) + {\Gamma^i}_{jm} (h v^m v^k n_k + \frac{1}{2} g h^2 n^m)) = g h g^{ij} \partial_j d$
Then we can do something about summing across all normals, and making $n^j n_k \approx \delta^j_k$, and then the connection trace becomes the volume element ...
What if I just assumed coordinate-aligned normals?
$\partial_t (h) + \nabla_j (h v^j) = 0$
$\partial_t (h v^i) + \nabla_j (h v^i v^j + \frac{1}{2} g h^2 g^{ij}) = g h g^{ij} \partial_j d$
And expand connections, using Voss-Weyl identity when possible:
TODO distinguish between derivatives and non-coordinate basis operators.
$\partial_t (h) + e_j (h v^j) + {\Gamma^j}_{jk} (h v^k) = 0$
$\partial_t (h v^i)
+ e_j (h v^i v^j + \frac{1}{2} g h^2 g^{ij})
+ {\Gamma^i}_{jm} (h v^m v^j + \frac{1}{2} g h^2 g^{mj})
+ {\Gamma^j}_{jm} (h v^i v^m + \frac{1}{2} g h^2 g^{im})
= g h g^{ij} e_j (d)$
apply Voss-Weyl, using $V = \sqrt{det(g_{ij})}$ as the volume element, and move the remaining connection to the right hand side:
$\partial_t (h) + \frac{1}{V} \partial_\tilde{j} (V {e_j}^\tilde{j} h v^j) = 0$
$\partial_t (h v^i)
+ \frac{1}{V} \partial_\tilde{j} (V {e_j}^\tilde{j} (h v^i v^j + \frac{1}{2} g h^2 g^{ij}))
=
- {\Gamma^i}_{jm} (h v^m v^j + \frac{1}{2} g h^2 g^{mj})
+ g h g^{ij} {e_j}^\tilde{j} \partial_\tilde{j} d$
Don't forget to integrate, if you plan to apply this to a finite-volume scheme:
$\int \left( \partial_t (h) + \frac{1}{V} \partial_\tilde{j} (V {e_j}^\tilde{j} h v^j) \right) dt dx^3 = 0$
$\int \left(
\partial_t (h v^i)
+ \frac{1}{V} \partial_\tilde{j} (V {e_j}^\tilde{j} (h v^i v^j + \frac{1}{2} g h^2 g^{ij}))
\right) dt dx^3
=
\int \left(
- {\Gamma^i}_{jm} (h v^m v^j + \frac{1}{2} g h^2 g^{mj})
+ g h g^{ij} {e_j}^\tilde{j} \partial_\tilde{j} d
\right) V dt dx^3
$
Apply integrals:
Let $\mathcal{V} = \int dV = \int V dx^3$
$\mathcal{V} \cdot (h(t + \Delta t) - h(t)) + \Delta t \int \left( \partial_\tilde{j} (V {e_j}^\tilde{j} h v^j) \right) dx^3 = 0$
$
\mathcal{V} \cdot (
(h v^i)(t + \Delta t)
- (h v^i)(t)
)
+ \Delta t \int \left( \partial_\tilde{j} (V {e_j}^\tilde{j} (h v^i v^j + \frac{1}{2} g h^2 g^{ij})) \right) dx^3
=
\int \left(
- {\Gamma^i}_{jm} (h v^m v^j + \frac{1}{2} g h^2 g^{mj})
+ g h g^{ij} {e_j}^\tilde{j} \partial_\tilde{j} d
\right) V dt dx^3
$
$h(t + \Delta t) = h(t) - \frac{\Delta t}{\mathcal{V}} \int \left( \partial_\tilde{j} (V {e_j}^\tilde{j} h v^j) \right) dx^3$
$(h v^i)(t + \Delta t)
= (h v^i)(t)
- \frac{\Delta t}{\mathcal{V}} \int \left( \partial_\tilde{j} (V {e_j}^\tilde{j} (h v^i v^j + \frac{1}{2} g h^2 g^{ij})) \right) dx^3
+ \Delta t \int \left(
\underbrace{- {\Gamma^i}_{jm} (h v^m v^j + \frac{1}{2} g h^2 g^{mj})}_{connection}
+ \underbrace{g h g^{ij} {e_j}^\tilde{j} \partial_\tilde{j} d}_{source}
\right) V dx^3
$
TODO next Substitute our $x^i \in \{\theta, \phi\}$:
TODO Substitute our metric and connection values:
TODO use Earth model, and switch out $\theta, \phi$ with lat/lon.
As a balance law:
$\partial_t U^I + \nabla_j F^I(n) n^j = S^I$
State and Primitive Variables:
$U = \left[ \begin{matrix}
h \\
h v^i
\end{matrix} \right]$
$W = \left[ \begin{matrix}
h \\
v^i
\end{matrix} \right]$
$\frac{\partial U^I}{\partial W^J} = \downarrow I \overset{\rightarrow J}{
\left[ \begin{matrix}
1 & 0 \\
v^i & h \delta^i_j
\end{matrix} \right]
}$
$\frac{\partial W^I}{\partial U^J} = \downarrow I \overset{\rightarrow J}{
\left[ \begin{matrix}
1 & 0 \\
-\frac{1}{h} v^i & \frac{1}{h} \delta^i_j
\end{matrix} \right]
}$
Let $h > 0$ to maintain that $\frac{\partial W^I}{\partial U^J}$ is non-singular.
$F^I(n) = \left[ \begin{matrix}
h v^k n_k \\
h v^i v^k n_k + \frac{1}{2} g h^2 n^i
\end{matrix} \right]$
$\frac{\partial F^I}{\partial W^J} = \downarrow I \overset{\rightarrow J}{
\left[ \begin{matrix}
v_n &
h n_j \\
v^i v_n + g h n^i &
h (\delta^i_j v_n + v^i n_j)
\end{matrix} \right]
}$
...for $v_n = v^k n_k$
$\frac{\partial F}{\partial U} = \frac{\partial F}{\partial W} \frac{\partial W}{\partial U}$
$= \left[ \begin{matrix}
v_n &
h n_x &
h n_y \\
v^x v_n + g h n^x &
h (v_n + v^x n_x) &
h v^x n_y \\
v^y v_n + g h n^y &
h v^y n_x &
h (v_n + v^y n_y) \\
\end{matrix} \right]
\left[ \begin{matrix}
1 & 0 & 0 \\
-\frac{1}{h} v^x & \frac{1}{h} & 0 \\
-\frac{1}{h} v^y & 0 & \frac{1}{h}
\end{matrix} \right]$
$= \left[ \begin{matrix}
0 &
n_x &
n_y \\
g h n^x - v^x v_n &
v_n + v^x n_x &
v^x n_y \\
g h n^y - v^y v_n &
v^y n_x &
v_n + v^y n_y
\end{matrix} \right]$
$= \left[ \begin{matrix}
0 & n_j \\
g h n^i - v_n v^i & v^i n_j + v_n \delta^i_j
\end{matrix} \right]$
Create the acoustic plus wavespeed matrix:
$\frac{\partial W^I}{\partial U_K} \frac{\partial F^K}{\partial W_J} = \downarrow I \overset{\rightarrow K}{
\left[ \begin{matrix}
1 & 0 \\
-\frac{1}{h} v^i & \frac{1}{h} \delta^i_k
\end{matrix} \right]
} \cdot \downarrow K \overset{\rightarrow J}{
\left[ \begin{matrix}
v_n &
h n_j \\
v^k v_n + g h n^k &
h (\delta^k_j v_n + v^k n_j)
\end{matrix} \right]
}$
$\frac{\partial W^I}{\partial U_K} \frac{\partial F^K}{\partial W_J} = \downarrow I \overset{\rightarrow J}{
\left[ \begin{matrix}
v_n &
h n_j \\
g n^i &
\delta^i_j v_n
\end{matrix} \right]
}$
Separate out the acoustic matrix:
${A^I}_J = \frac{\partial W^I}{\partial U^K} \frac{\partial F^K}{\partial W^J} - \delta^I_J v_n$
${A^I}_J = \downarrow I \overset{\rightarrow J}{
\left[ \begin{matrix}
0 &
h n_j \\
g n^i &
0
\end{matrix} \right]
}$
Solve for the eigenvalues of ${A^I}_J$:
${A^I}_J (R_A)^J = \lambda (R_A)^J$
$({A^I}_J - \lambda \delta^I_J) (R_A)^J = 0$
$|{A^I}_J - \lambda \delta^I_J| = 0$
$\left| \begin{matrix}
-\lambda &
h n_j \\
g n^i &
-\lambda \delta^i_j
\end{matrix} \right| = 0$
Expand components for 2D:
$\left| \begin{matrix}
-\lambda &
h n_x &
h n_y \\
g n^x &
-\lambda &
0 \\
g n^y &
0 &
-\lambda
\end{matrix} \right| = 0$
$-\lambda \left| \begin{matrix}
-\lambda & h n_x \\
g n^x & -\lambda
\end{matrix} \right|
+ g n^y \left| \begin{matrix}
h n_x & h n_y \\
-\lambda & 0
\end{matrix} \right|
= 0$
$-\lambda (
\lambda^2
- g h n_x n^x
)
+ \lambda g h n^y n_y
= 0$
$-\lambda (\lambda^2 - g h (n_x n^x + n^y n_y)) = 0$
Let $|n|^2 = n_k n^k = n_x n^x + n_y n^y$
$-\lambda (\lambda^2 - g h |n|^2) = 0$
$-\lambda (\lambda - |n| \sqrt{gh}) (\lambda + |n| \sqrt{gh}) = 0$
This has solutions: $\lambda = \{ 0, \pm |n| \sqrt{gh} \}$
Let $c = \sqrt{gh}$ be the wavespeed (difference from the center wave $v_n$).
Then we find: $\lambda = \{ 0, \pm |n| c \}$
Solve for the right-eigenvectors:
Case $\lambda = 0$:
$\left[ \begin{matrix}
0 &
h n_x &
h n_y \\
g n^x &
0 &
0 \\
g n^y &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Rescale first row by $\frac{1}{h}$.
Rescale second and third row by $\frac{1}{g}$
$\left[ \begin{matrix}
0 &
n_x &
n_y \\
n^x &
0 &
0 \\
n^y &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
For $n^x \ne 0$:
Subtract $\frac{n^y}{n^x}$ by the second row to the first row to cancel it.
Also swap rows to give us a leading diagonal:
$\left[ \begin{matrix}
n^x &
0 &
0 \\
0 &
n_x &
n_y \\
0 &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
$X^h = 0$
For $n^x \ne 0, n_x \ne 0$:
Let $u = X^{v^y}$
$n_x X^{v^x} + u n_y = 0$
$X^{v^x} = -u \frac{n_y}{n_x}$
Therefore our right-eigenvector is:
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= u \left[ \begin{matrix}
0 \\
-\frac{n_y}{n_x} \\
1
\end{matrix} \right]$
Rescale by $n_x$:
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= u \left[ \begin{matrix}
0 \\
-n_y \\
n_x
\end{matrix} \right]$
For $n^x \ne 0, n_x = 0$:
By $|n|^2 = n^x n_x + n^y n_y > 0$ we know that $n_y \ne 0$.
(When does $n^x \ne 0$ but $n_x = \Sigma_k g_{xk} n^k = 0$? Whenever $g_{xx} n^x = -g_{xy} n^y$.)
$\left[ \begin{matrix}
n^x &
0 &
0 \\
0 &
0 &
n_y \\
0 &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Let $u = -X^{v^x}$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= u \left[ \begin{matrix}
0 \\
-1 \\
0
\end{matrix} \right]$
For $n^x = 0$:
$\left[ \begin{matrix}
0 &
n_x &
n_y \\
0 &
0 &
0 \\
n^y &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Swap rows to get leading diagonal:
$\left[ \begin{matrix}
n^y &
0 &
0 \\
0 &
n_x &
n_y \\
0 &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
For $n^x = 0, n_x \ne 0$:
$\left[ \begin{matrix}
n^y &
0 &
0 \\
0 &
n_x &
n_y \\
0 &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Let $u = X^{v^y}$
$n_x X^{v^x} + n_y X^{v^y} = 0$
$n_x X^{v^x} + n_y u = 0$
$X^{v^x} = -\frac{n_y}{n_x} u$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= u \left[ \begin{matrix}
0 \\
-\frac{n_y}{n_x} \\
1
\end{matrix} \right]$
Rescale by $u \rightarrow n_x u$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= u \left[ \begin{matrix}
0 \\
-n_y \\
n_x
\end{matrix} \right]$
For $n^x = 0, n_x = 0$:
By $|n|^2 > 0$ we know that $n^y n_y \ne 0$
$\left[ \begin{matrix}
0 &
0 &
n_y \\
0 &
0 &
0 \\
n^y &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Swap for leading row.
$\left[ \begin{matrix}
n^y &
0 &
0 \\
0 &
0 &
n_y \\
0 &
0 &
0
\end{matrix} \right]
\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= 0$
Let $u = -X^{v^x}$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= \left[ \begin{matrix}
0 \\
-1 \\
0
\end{matrix} \right]$
So for all conditions:
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right]
= \left[ \begin{matrix}
0 \\
-n_y \\
n_x
\end{matrix} \right]$
Case $\lambda = |n| c$:
$\left[ \begin{matrix}
-|n| \sqrt{gh} &
h n_x &
h n_y \\
g n^x &
-|n| \sqrt{gh} &
0 \\
g n^y &
0 &
-|n| \sqrt{gh}
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Scale first row by $\frac{1}{|n| \sqrt{gh}}$.
Scale second row by $\frac{1}{|n| \sqrt{gh}}$
Scale third row by $\frac{1}{|n| \sqrt{gh}}$
$\left[ \begin{matrix}
-1 &
\sqrt{\frac{h}{g}} \frac{n_x}{|n|} &
\sqrt{\frac{h}{g}} \frac{n_y}{|n|} \\
\sqrt{\frac{g}{h}} \frac{n^x}{|n|} &
-1 &
0 \\
\sqrt{\frac{g}{h}} \frac{n^y}{|n|} &
0 &
-1
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Set second row to $\sqrt{\frac{g}{h}} n^x$ times first row plus $|n|$ times second row.
Set third row to $\sqrt{\frac{g}{h}} n^y$ times first row plus $|n|$ times third row.
Scale first row by $|n| \sqrt{\frac{g}{h}}$.
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
n_x &
n_y \\
0 &
-n_y n^y &
n_y n^x \\
0 &
n_x n^y &
-n_x n^x
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
For $n_x = 0$ (therefore $n_y \ne 0$):
Scale second row by $\frac{1}{n_y}$
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
0 &
n_y \\
0 &
-n^y &
n^x \\
0 &
0 &
0
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Let $u = X^{v^y}$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = u \left[ \begin{matrix}
\sqrt{\frac{h}{g}} \frac{n_y}{|n|} \\
\frac{n^x}{n^y} \\
1
\end{matrix} \right]$
Scale by $u \rightarrow n^y u$.
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = u \left[ \begin{matrix}
\sqrt{\frac{h}{g}} \frac{n_y n^y}{|n|} \\
n^x \\
n^y
\end{matrix} \right]$
Notice that $n_x = 0$ implies $|n|^2 = n_x n^x + n_y n^y = n_y n^y$.
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = u \left[ \begin{matrix}
\sqrt{\frac{h}{g}} |n| \\
n^x \\
n^y
\end{matrix} \right]$
For $n_y = 0$ (therefore $n_x \ne 0$):
Therefore $|n|^2 = n_x n^x$
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
n_x &
0 \\
0 &
0 &
0 \\
0 &
n_x n^y &
-n_x n^x
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Scale third row by $\frac{1}{n_x}$.
Exchange 2nd and 3rd rows.
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
n_x &
0 \\
0 &
n^y &
-n^x \\
0 &
0 &
0
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Let $u = X^{v^x}$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = u \left[ \begin{matrix}
\sqrt{\frac{h}{g}} \frac{n_x}{|n|} \\
1 \\
\frac{n^y}{n^x}
\end{matrix} \right]$
Scale by $u \rightarrow u n^x$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = u \left[ \begin{matrix}
\sqrt{\frac{h}{g}} |n| \\
n^x \\
n^y
\end{matrix} \right]$
For $n_x \ne 0, n_y \ne 0$:
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
n_x &
n_y \\
0 &
-n_y n^y &
n_y n^x \\
0 &
n_x n^y &
-n_x n^x
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
For $n_x \ne 0, n_y \ne 0$:
Scale second row by $\frac{1}{n_y}$.
Scale third row by $\frac{1}{n_x}$ and add second to it.
$\left[ \begin{matrix}
-|n| \sqrt{\frac{g}{h}} &
n_x &
n_y \\
0 &
-n^y &
n^x \\
0 &
0 &
0
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Let $u = X^{v^y}$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = \left[ \begin{matrix}
\sqrt{\frac{h}{g}} \frac{1}{|n|} (\frac{n_x n^x}{n^y} + n_y) \\
\frac{n^x}{n^y} \\
1
\end{matrix} \right]$
Let $u \rightarrow n^y u$
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = \left[ \begin{matrix}
\sqrt{\frac{h}{g}} |n| \\
n^x \\
n^y
\end{matrix} \right]$
So for all conditions:
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = \left[ \begin{matrix}
\sqrt{\frac{h}{g}} |n| \\
n^x \\
n^y
\end{matrix} \right]$
Case $\lambda = -|n| c$:
$\left[ \begin{matrix}
|n| \sqrt{gh} &
h n_x &
h n_y \\
g n^x &
|n| \sqrt{gh} &
0 \\
g n^y &
0 &
|n| \sqrt{gh}
\end{matrix} \right] \left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = 0$
Same as above but with the sign flipped:
$\left[ \begin{matrix}
X^h \\
X^{v^x} \\
X^{v^y}
\end{matrix} \right] = \left[ \begin{matrix}
-\sqrt{\frac{h}{g}} |n| \\
n^x \\
n^y
\end{matrix} \right]$
Eigenvalues:
$\Lambda_A = \left[ \begin{matrix}
-|n| c & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & |n| c
\end{matrix} \right]$
Right eigenvectors:
$R_A = \left[ \begin{matrix}
-\sqrt{\frac{h}{g}} |n| &
0 &
\sqrt{\frac{h}{g}} |n| \\
n^x &
-n_y &
n^x \\
n^y &
n_x &
n^y
\end{matrix} \right]$
In index form:
For $(n_2)_i$ is orthogonal to $n_i$, such that $(n_2)^i n_j = \delta^i_j$
${(R_A)^I}_J = \left[ \begin{matrix}
-\sqrt{\frac{h}{g}} |n| &
0 &
\sqrt{\frac{h}{g}} |n| \\
n^i &
(n_2)_i &
n^i
\end{matrix} \right]$
Left eigenvectors:
$L_A = (R_A)^{-1}$
$L_A = \left[ \begin{matrix}
-\frac{1}{2 |n|} \sqrt{\frac{g}{h}} &
\frac{n_x}{2 |n|^2} &
\frac{n_y}{2 |n|^2} \\
0 &
-\frac{n^y}{|n|^2} &
\frac{n^x}{|n|^2} \\
\frac{1}{2 |n|} \sqrt{\frac{g}{h}} &
\frac{n_x}{2 |n|^2} &
\frac{n_y}{2 |n|^2}
\end{matrix} \right]$
In index form:
$L_A = \left[ \begin{matrix}
-\frac{1}{2 |n|} \sqrt{\frac{g}{h}} & \frac{n_i}{2 |n|^2} \\
0 & \frac{(n_2)^i}{|n|^2} \\
\frac{1}{2 |n|} \sqrt{\frac{g}{h}} & \frac{n_i}{2 |n|^2}
\end{matrix} \right]$
$\frac{\partial F^I}{\partial U^J} = \frac{\partial F}{\partial W} \frac{\partial W}{\partial U}
= \frac{\partial U}{\partial W} \frac{\partial W}{\partial U} \frac{\partial F}{\partial W} \frac{\partial W}{\partial U}
= \frac{\partial U}{\partial W} (A + v^k n_k I) \frac{\partial W}{\partial U}$
The eigenvalues of $F$ are $\Lambda_A + v_n I = \left[ \begin{matrix}
v_n - |n| c & 0 & 0 \\
0 & v_n & 0 \\
0 & 0 & v_n + |n| c
\end{matrix} \right]$
The right eigenvectors of $F$ are $R_F = \frac{\partial U}{\partial W} R_A$
$R_F =
\left[ \begin{matrix}
1 & 0 & 0 \\
v^x & h & 0 \\
v^y & 0 & h
\end{matrix} \right]
\left[ \begin{matrix}
-\sqrt{\frac{h}{g}} |n| &
0 &
\sqrt{\frac{h}{g}} |n| \\
\frac{n^x}{|n|^2} &
\frac{(n_2)_k}{|n|^2} &
\frac{n^x}{|n|^2} \\
\frac{n^y}{|n|^2} &
\frac{(n_2)_k}{|n|^2} &
\frac{n^y}{|n|^2}
\end{matrix} \right]$
$R_F = \left[ \begin{matrix}
-\sqrt{\frac{h}{g}} |n| &
0 &
\sqrt{\frac{h}{g}} |n| \\
n^x h - \sqrt{\frac{h}{g}} |n| v^x &
-h n_y &
n^x h + \sqrt{\frac{h}{g}} |n| v^x \\
n^y h - \sqrt{\frac{h}{g}} |n| v^y &
h n_x &
n^y h + \sqrt{\frac{h}{g}} |n| v^y
\end{matrix} \right]$
The left eigenvectors of $F$ are $L_F = L_A \frac{\partial W}{\partial U}$
$L_F = \left[ \begin{matrix}
-\frac{1}{2 |n|} \sqrt{\frac{g}{h}} &
\frac{n_x}{2 |n|^2} &
\frac{n_y}{2 |n|^2} \\
0 &
\frac{(n_2)^x}{|n|^2} &
\frac{(n_2)^y}{|n|^2} \\
\frac{1}{2 |n|} \sqrt{\frac{g}{h}} &
\frac{n_x}{2 |n|^2} &
\frac{n_y}{2 |n|^2}
\end{matrix} \right]
\left[ \begin{matrix}
1 & 0 & 0 \\
-\frac{1}{h} v^x & \frac{1}{h} & 0 \\
-\frac{1}{h} v^y & 0 & \frac{1}{h}
\end{matrix} \right]
$
$L_F = \left[ \begin{matrix}
-\frac{1}{2 |n|} \sqrt{\frac{g}{h}} - \frac{v_n}{2 h |n|^2} &
\frac{n_x}{2 h |n|^2} &
\frac{n_y}{2 h |n|^2} \\
\frac{v^x n^y - v^y n^x}{h |n|^2} &
-\frac{n^y}{h |n|^2} &
\frac{n^x}{h |n|^2} \\
\frac{1}{2 |n|} \sqrt{\frac{g}{h}} - \frac{v_n}{2 h |n|^2} &
\frac{n_x}{2 h |n|^2} &
\frac{n_y}{2 h |n|^2}
\end{matrix} \right]$
...such that $F = R_F \Lambda_F L_F$