4.5.3. Shape class 3

This shape class describes long crested waves propagating in infinite, constant or varying water depth. Consequently, it may be interpreted as a generalization of Shape 1 and Shape 2. Because the storage and CPU requirements are similar to those specialized classes we may consider to only apply this class for all long crested waves independent of the actual sea floor formulation.

\[\phi(x, z, t)= \sum_{j=0}^n \mathcal{Re} \Bigl\{c_j(t)\, X_j(x) \Bigr\} Z_j(z) + \sum_{j=0}^{\hat{n}} \mathcal{Re}\Bigl\{\hat{c}_j(t)\, X_j(x) \Bigr\} \hat{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) = e^{k_j z}, \quad \hat{Z}_j(z) = e^{-k_j z}, \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\), \(n\) and \(\hat{n}\).

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)\) and \(\hat{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.3.1. The sea floor

The sea floor \(z_{sf}(x)\) is assumed single valued and is periodic with respect to the \(x\)-location

\[z_{sf}(x + \lambda_{\max}) = z_{sf}(x)\]

Hence, the seafloor steepness is finite but may be arbitrary large. In the current version of the API the sea floor is continous and piecewise linear. As illustrated in the figure below, the sea floor is defined by linear interpolation between \(n_{sf}\) offset points \((x_{sf},z_{sf})_i\) for \(i\in\{1,2,\ldots,n_{sf}\}\). The sequence \(x_{sf}(i)\) is monotonic increasing and covering the range \(x_{sf}(i)\in[0, \lambda_{\max}]\)

_images/SeaFloorLongCrested_600x250.png

4.5.3.1.1. Infinite water depth

The infinite depth formulation follows directly by specifying \(n_{sf}=0\) and \(\hat{n}=-1\). Consequently the formulation is equivalent to Shape 1 and there are no spectral amplitudes \(\hat{c}_j(t)\).

4.5.3.1.2. Constant water depth

Constant water depth \(d\) is defined by assigning \(n_{sf}=1\). Hence \(d\equiv -z_{sf}(1)\). The classical shallow water equations (ref Shape 2) are reformulated using exponential terms

\[C_j(t) \frac{\cosh k_j(z+d)}{\cosh k_j d} \equiv c_j(t) Z_j(z) + \hat{c}_j(t) \hat{Z}_j(z)\]
\[c_j(t) = \gamma_j C_j(t), \qquad \hat{c}_j(t) = \hat{\gamma}_j c_j(t), \qquad \gamma_j = \frac{1+\tanh k_j d}{2}, \qquad \hat{\gamma}_j = e^{-2k_j d}\]

Consequently, we only store \(c_j(t)\) in the SWD-file. At the beginning of each new time step we construct \(\hat{c}_j(t)\) using \(c_j(t)\) and the coefficient \(\hat{\gamma}_j\). Because this relation is valid for all time instances the same relations are valid for the temporal derivatives too

\[\frac{d c_j(t)}{dt} = \gamma_j \frac{d C_j(t)}{dt}, \qquad \frac{d \hat{c}_j(t)}{dt} = \hat{\gamma}_j \frac{d c_j(t)}{dt}\]

This formulation is potential faster and more numerical stable than direct evaluation of the hyperbolic functions.

Hint

In practice \(\hat{n} < n\) because the corresponding neglected high-frequency components do not contribute significantly to any boundary conditions. For the free surface conditions this follows from the property

\[|\hat{c}_j(t) \hat{Z}_j(z)| = |\hat{\gamma}_j c_j(t) e^{-k_j z}| = e^{-2k_j (d + z)} |c_j(t) Z_j(z)| \ll |c_j(t) Z_j(z)|\]
\[\qquad j > \hat{n}, \qquad z\in[-\zeta_{\max},\zeta_{\max}], \qquad d > \zeta_{\max}\]

where \(\zeta_{\max}\) is the maximum wave elevation. Near the sea floor the exponential coefficient \(e^{-2k_j (d + z)}\to 1^-\). Consequently, the contribution to the boundary conditions at the sea floor vanish too, because \(|c_j(t) Z_j(z)|\) vanish for large \(j\).

Due to finite precision arithmetic the following upper limit is recommended

\[\hat{n} \le \frac{\tanh^{-1}(1 - 100 \epsilon_m)}{\Delta k\cdot d}\]

where \(\epsilon_m\) is the machine precision (\(1+\epsilon_m=1\)).

4.5.3.1.3. Varying water depth

Varying water depth (bathymetry) is assumed if \(n_{sf}>1\). In this case also the coefficients \(\hat{c}_j(t)\) needs to be stored in the SWD file.

Hint

For varying water depth, the additional \(\hat{n}\) complex valued coefficients \(\hat{c}_j(t)\) at time \(t\) are expected to be determined in the wave generator by adding zero-flux boundary conditions at \(2\hat{n}\) distributed collocation points on the sea floor.

Due to finite precision arithmetic the following upper limit is recommended

\[\hat{n} \le \frac{\tanh^{-1}(1 - 100 \epsilon_m)}{-\Delta k\cdot \min\{z_{zf}\}}\]

where \(\epsilon_m\) is the machine precision (\(1+\epsilon_m=1\)).

4.5.3.2. 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) + \sum_{j=0}^{\hat{n}} \mathcal{Re}\Bigl\{\hat{c}_j(t)\, X_j(x) \Bigr\} \hat{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\} Z_j(z) - \sum_{j=0}^{\hat{n}} \mathcal{Im}\Bigl\{\hat{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) + \sum_{j=0}^{\hat{n}} \mathcal{Re}\Bigl\{\frac{d \hat{c}_j(t)}{dt}\, X_j(x)\Bigr\} \hat{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) + \sum_{j=0}^\hat{n} k_j\mathcal{Im} \Bigl\{\hat{c}_j(t)\, X_j(x)\Bigr\} \, \hat{Z}_j(z)\]
\[\phi_z = \sum_{j=0}^n k_j\mathcal{Re} \Bigl\{c_j(t)\, X_j(x)\Bigr\} \, Z_j(z) - \sum_{j=0}^\hat{n} k_j\mathcal{Re} \Bigl\{\hat{c}_j(t)\, X_j(x)\Bigr\} \, \hat{Z}_j(z)\]
\[\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) + \sum_{j=0}^\hat{n} k_j \mathcal{Im} \Bigl\{\frac{d \hat{c}_j(t)}{dt} \, X_j(x)\Bigr\} \hat{Z}_j(z)\]
\[\phi_{zt} = \sum_{j=0}^n k_j \mathcal{Re} \Bigl\{\frac{d c_j(t)}{dt} \, X_j(x)\Bigr\} Z_j(z) - \sum_{j=0}^\hat{n} k_j \mathcal{Re} \Bigl\{\frac{d \hat{c}_j(t)}{dt} \, X_j(x)\Bigr\} \hat{Z}_j(z)\]
\[\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) -\sum_{j=0}^\hat{n} k_j^2 \mathcal{Re} \Bigl\{\hat{c}_j(t) \, X_j(x)\Bigr\} \hat{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) + \sum_{j=0}^\hat{n} k_j^2 \mathcal{Re} \Bigl\{\hat{c}_j(t) \, X_j(x)\Bigr\} \hat{Z}_j(z) = - \phi_{xx}\]
\[\phi_{xz} = \sum_{j=0}^n k_j^2 \mathcal{Im} \Bigl\{c_j(t) \, X_j(x)\Bigr\} Z_j(z) - \sum_{j=0}^\hat{n} k_j^2 \mathcal{Im} \Bigl\{\hat{c}_j(t) \, X_j(x)\Bigr\} \hat{Z}_j(z)\]
\[\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\).

4.5.3.3. 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) = Z_1(z)\, Z_{j-1}(z), \qquad \hat{Z}_j(z) = \hat{Z}_1(z)\, \hat{Z}_{j-1}(z)\]

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

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