4.5.2. Shape class 2

This shape class describes long crested waves propagating in constant water depth \(d\).

\[\phi(x, z, t)= \sum_{j=0}^n \mathcal{Re} \Bigl\{c_j(t)\, X_j(x) \Bigr\} Z_j(z)\]
\[\zeta(x, t)= \sum_{j=0}^n \mathcal{Re} \Bigl\{h_j(t)\, X_j(x) \Bigr\}\]
\[X_j(x) = e^{-i k_j x}, \quad Z_j(z) = \frac{\cosh k_j(z+d)}{\cosh k_j d}, \quad k_j = j\cdot\Delta k, \quad i=\sqrt{-1}\]

The set of real constants \(k_j\) resemble wave numbers. It follows that the kinematics is periodic in space

\[\phi(x + \lambda_{\max}, z, t) = \phi(x, z, t), \qquad \zeta(x + \lambda_{\max}, t) = \zeta(x, t)\]
\[\lambda_{\max} = \frac{2\pi}{\Delta k}, \qquad \lambda_{\min} = \frac{\lambda_{\max}}{n}\]

where \(\lambda_{\min}\) and \(\lambda_{\max}\) are the shortest and longest wave lengths resolved respectively.

The actual set of shape functions is uniquely defined by the three input parameters \(\Delta k\) and \(n\) and \(d\).

Note

The fields related to \(j=0\) are uniform in space (DC bias). Non-zero values of \(h_0(t)\) violates mass conservation. The amplitude \(c_0(t)\) adds a uniform time varying ambient pressure field not influencing the flow field. Consequently, these components will by default be suppressed in the kinematic calculations. However, there is an option in the API for including all DC values provided by the wave generator.

The fields related to \(j=n\) are expected to correspond to the Nyquist frequency of the physical resolution applied in the wave generator. Hence, typical \(n=\lfloor n_{fft}/2 \rfloor\) where \(n_{fft}\) is the physical spatial resolution applied in the wave generator.

4.5.2.1. Kinematics

Given the definitions above we obtain the following explicit kinematics:

\[\phi(\bar{x},\bar{y},\bar{z},\bar{t})= \sum_{j=0}^n \mathcal{Re} \Bigl\{c_j(t)\, X_j(x)\Bigr\} Z_j(z)\]
\[\varphi(\bar{x},\bar{y},\bar{z},\bar{t})= \sum_{j=0}^n \mathcal{Im} \Bigl\{c_j(t)\, X_j(x)\Bigr\} \hat{Z}_j(z)\]
\[\frac{\partial\phi}{\partial \bar{t}}(\bar{x},\bar{y},\bar{z},\bar{t}) = \sum_{j=0}^n \mathcal{Re} \Bigl\{\frac{d c_j(t)}{dt} \, X_j(x)\Bigr\} Z_j(z)\]
\[\zeta(\bar{x},\bar{y},\bar{t})= \sum_{j=0}^n \mathcal{Re} \Bigl\{h_j(t)\, X_j(x)\Bigr\}\]
\[\frac{\partial\zeta}{\partial \bar{t}}(\bar{x},\bar{y},\bar{t}) = \sum_{j=0}^n \mathcal{Re} \Bigl\{\frac{d h_j(t)}{dt} \, X_j(x)\Bigr\}\]
\[\frac{\partial\zeta}{\partial \bar{x}}(\bar{x},\bar{y},\bar{t}) = \zeta_x\cos\beta, \qquad \frac{\partial\zeta}{\partial \bar{y}}(\bar{x},\bar{y},\bar{t}) = \zeta_x\sin\beta\]
\[\zeta_x = \sum_{j=0}^n k_j\mathcal{Im} \Bigl\{h_j(t)\, X_j(x)\Bigr\}\]
\[\bar{\nabla}\phi(\bar{x},\bar{y},\bar{z},\bar{t}) = [\phi_x\cos\beta,\phi_x\sin\beta,\phi_z]^T\]
\[\phi_x = \sum_{j=0}^n k_j\mathcal{Im} \Bigl\{c_j(t)\, X_j(x)\Bigr\} \, Z_j(z)\]
\[\phi_z = \sum_{j=0}^n \mathcal{Re} \Bigl\{c_j(t)\, X_j(x)\Bigr\} \, \frac{dZ_j(z)}{dz}\]
\[\frac{\partial\bar{\nabla}\phi}{\partial \bar{t}}(\bar{x},\bar{y},\bar{z},\bar{t}) = [\phi_{xt}\cos\beta,\phi_{xt}\sin\beta,\phi_{zt}]^T\]
\[\phi_{xt} = \sum_{j=0}^n k_j \mathcal{Im} \Bigl\{\frac{d c_j(t)}{dt} \, X_j(x)\Bigr\} Z_j(z)\]
\[\phi_{zt} = \sum_{j=0}^n \mathcal{Re} \Bigl\{\frac{d c_j(t)}{dt} \, X_j(x)\Bigr\} \frac{dZ_j(z)}{dz}\]
\[\frac{d\bar{\nabla}\phi}{d\bar{t}}(\bar{x},\bar{y},\bar{z},\bar{t}) = \frac{\partial\bar{\nabla}\phi}{\partial \bar{t}} + \bar{\nabla}\phi \cdot \bar{\nabla}\bar{\nabla}\phi\]
\[\begin{split}\bar{\nabla}\bar{\nabla}\phi (\bar{x},\bar{y},\bar{z},\bar{t}) = \begin{bmatrix} \phi_{\bar{x},\bar{x}} & \phi_{\bar{x},\bar{y}} & \phi_{\bar{x},\bar{z}} \\ \phi_{\bar{x},\bar{y}} & \phi_{\bar{y},\bar{y}} & \phi_{\bar{y},\bar{z}} \\ \phi_{\bar{x},\bar{z}} & \phi_{\bar{y},\bar{z}} & \phi_{\bar{z},\bar{z}} \end{bmatrix}\end{split}\]
\[\phi_{\bar{x},\bar{x}} = \phi_{xx}\cos^2\beta, \qquad \phi_{\bar{x},\bar{y}} = \phi_{xx}\sin\beta\cos\beta, \qquad \phi_{\bar{x},\bar{z}} = \phi_{xz}\cos\beta\]
\[\phi_{\bar{y},\bar{y}} = \phi_{xx}\sin^2\beta, \qquad \phi_{\bar{y},\bar{z}} = \phi_{xz}\sin\beta, \qquad \phi_{\bar{z},\bar{z}} = \phi_{zz} = -\phi_{xx}\]
\[\phi_{xx} = -\sum_{j=0}^n k_j^2 \mathcal{Re} \Bigl\{c_j(t) \, X_j(x)\Bigr\} Z_j(z)\]
\[\phi_{zz} = \sum_{j=0}^n k_j^2 \mathcal{Re} \Bigl\{c_j(t) \, X_j(x)\Bigr\} Z_j(z) = - \phi_{xx}\]
\[\phi_{xz} = \sum_{j=0}^n k_j \mathcal{Im} \Bigl\{c_j(t) \, X_j(x)\Bigr\} \frac{dZ_j(z)}{dz}\]
\[\frac{\partial^2\zeta}{\partial \bar{x}^2}(\bar{x},\bar{y},\bar{t}) = \zeta_{xx}\cos^2\beta \qquad \frac{\partial^2\zeta}{\partial \bar{y}^2}(\bar{x},\bar{y},\bar{t}) = \zeta_{xx}\sin^2\beta\]
\[\frac{\partial^2\zeta}{\partial\bar{x}\partial\bar{y}}(\bar{x},\bar{y},\bar{t}) = \zeta_{xx}\sin\beta\cos\beta\]
\[\zeta_{xx} = -\sum_{j=0}^n k_j^2 \mathcal{Re} \Bigl\{h_j(t) \, X_j(x)\Bigr\}\]
\[p = -\rho\frac{\partial\phi}{\partial \bar{t}} -\frac{1}{2}\rho\bar{\nabla}\phi\cdot\bar{\nabla}\phi -\rho g \bar{z}\]

where \(\bar{\nabla}\) denotes gradients with respect to \(\bar{x}\), \(\bar{y}\) and \(\bar{z}\). The particle acceleration is labeled \(\frac{d\bar{\nabla}\phi}{d\bar{t}}\).

The stream function \(\varphi\) is related to the velocity potential \(\phi\). Hence \(\partial \phi/\partial x = \partial \varphi/\partial z\) and \(\partial \phi/\partial z = -\partial \varphi/\partial x\). Note that for the stream function evaluation we apply the function

\[\hat{Z}_j(z) = \frac{\sinh k_j(z+d)}{\cosh k_j d}\]

4.5.2.2. Implementation notes

Evaluation of costly transcendental functions (\(\cos\), \(\sin\), \(\exp\), …) are almost eliminated by exploiting the following recursive relations

\[X_j(x) = X_1(x)\, X_{j-1}(x), \qquad Z_j(z) = U_jS_j + V_jT_j, \qquad \frac{dZ_j(z)}{dz} = k_j(U_jS_j - V_jT_j)\]
\[U_j = \frac{1+R_j}{2}, \qquad V_j = 1 - U_j, \qquad R_j \equiv \tanh k_jd = \frac{R_1 + R_{j-1}}{1 + R_1\,R_{j-1}}\]
\[S_j \equiv e^{k_j z} = S_1 S_{j-1}, \qquad T_j \equiv e^{-k_j z} = T_1 T_{j-1} = 1/S_j, \qquad \hat{Z}_j(z) = U_jS_j - V_jT_j\]

When \(1 - R_j < 100 \epsilon_m\), where \(\epsilon_m\) is the machine precision, we apply the deep water approximations \(Z_j=S_j\) and \(\frac{dZ_j(z)}{dz} = k_j S_j\). Consequently, only the first \(\hat{j}\) spectral components should be treated as shallow water components

\[\hat{j} = \operatorname{int}\large(\frac{\tanh^{-1}(1-100\epsilon_m)}{\Delta k\cdot d}\large)\]

This number can be precomputed prior to any kinematical calculations to avoid testing and numerical issues.

In case the wave generator applies a perturbation theory of order \(q\) we apply the following Taylor expansion above the calm free surface.

\[S_j(z) = 1 + \sum_{p=1}^{q-1}\frac{(k_j z)^p}{p!}, \qquad z > 0\]