Wave Potential 1. Regular Waves Regular waves are modelled by two alternative methods Airy linear wave theory Stokes’ 5th order wave theory Stokes’ theory is outlined by Skjelbreia and Hendrickson (1960). Both theories describe regular, long crested waves propagating in an arbitrary direction. The main difference between the theories is that the boundary condition pressure (\(\mathrm {p=0.0}\) ) is valid at mean water level for the linear theory, but is approximately correct at the wave surface for Stokes’ theory. This implies that the linear wave theory is strictly valid for infinitesimal wave amplitudes only, while Stokes’ theory describes a wave of finite height. Wave-induced velocities and acceleration in a wave crest can therefore consistently be described by Stokes’ theory only. The wave profile defined by the two theories for waves of identical lengths and heights are shown in Figure 1. The wave potential \(\mathrm {\displaystyle \phi _{0}}\) for a regular wave according to Airy’s theory can be expressed as follows: \[\phi _0=\frac{\zeta_{a}g}{\omega }C_1\cos(-\omega t+kX\cos{\beta }+kY\sin{\beta }+\psi_{\zeta})\] where \(\mathrm {\zeta_{a}}\) : wave amplitude \(\mathrm {g\;\,}\) : acceleration of gravity \(\mathrm {k\;\,}\) : wave number \(\mathrm {\beta \;\,}\) : direction of wave propagation. (\(\mathrm {\beta =0}\) corresponds to wave propagation along the positive X-axis) \(\mathrm {\psi_{\zeta}}\) : a phase angle lag Figure 1. Comparison of wave profiles \(\mathrm {C_\text{1}}\) is given by: \[C_{1}=\frac{\textrm{cosh}(k(Z+D))}{\textrm{cosh}(kD)}\] where \(\mathrm {D}\) is the water depth. In deep water \(\mathrm {C_{1}}\) can be approximated by \[C_{1}=\textrm{e}^{kZ}\] We then obtain the following relations for the particle velocities and acceleration in the undisturbed wave field: \[\begin{aligned}v_{x}&=-\zeta_{a}\omega \cos(\beta )C_{2}\sin(\psi)\\v_{y}&=-\zeta_{a}\omega \sin(\beta )C_{2}\sin(\psi)\\v_{z}&=-\zeta_{a}\omega C_{3}\cos(\psi)\qquad\\a_{x}&=\zeta_{a}\omega ^2\cos(\beta )C_{2}\cos(\psi)\\a_{y}&=\zeta_{a}\omega ^2\sin(\beta )C_{2}\cos(\psi)\\a_{z}&=-\zeta_{a}\omega ^2C_{3}\sin(\psi)\end{aligned}\] where \[\psi=-\omega t+kX\cos(\beta )+kY\sin(\beta )+\psi_{\zeta}\] Using the deep water approximation we have: \[C_{1}=C_{2}=C_{3}=\textrm{e}^{kZ}\] Taking into account finite water depth we have: \[\begin{aligned}C_{1}&=\frac{\textrm{cosh}(k(Z+D))}{\textrm{cosh}(kD)}\\C_{2}&=\frac{\textrm{cosh}(k(Z+D))}{\textrm{sinh}(kD)}\\C_{3}&=\frac{\textrm{sinh}(k(Z+D))}{\textrm{sinh}(kD)}\\\end{aligned}\] The surface elevation is given by: \[\zeta=-\zeta_{a}\sin\psi=\zeta_{a}\sin(\omega t-kX\cos(\beta )-kY\sin(\beta )+\phi )\] where \(\mathrm {\phi =-\psi}\) . The forward phase shift, \(\mathrm {\phi }\) , is denoted phase angle in the program. Similarly the linearized dynamic pressure is given by: \[p_{d}=\rho g\zeta_{a}C_{1}\sin(\psi)\] The wave potential described here is, as previously stated, valid to mean water level only. Prediction of velocities and acceleration in the wave crest is, however, important. The present program has four different methods for handling this problem for linear waves. These are illustrated in Figure 2. Figure 2. Methods for use of wave potential close to surface. Method 1 is the consistent use of linear wave theory assuming that the water level always remains at mean water level, referring to the figure Figure 2. This method is included in order to have a reference point, particularly for comparing results with frequency domain solutions. Method 2 is based on the assumption that the potential is correct at some distance from the surface, and that calculated surface values are correct at the instantaneous surface. Consequently, the potential profile is deformed by stretching and compression according to the following formula (Wheeler 1970): \[Z'=D\frac{Z-\zeta}{D+\zeta}\] where \(\mathrm {Z'\quad }\) - modified Z-coordinate to be introduced in place of Z in Equation (1) and Equation (9) \(\mathrm {\zeta^\textrm{}\quad \,\,}\) actual surface elevation \(\mathrm {D^\textrm{}\quad }\) - water depth Method 3 is a parallel move of potential, assuming that the potential itself is correctly described by linear theory, but valid from the instantaneous sea surface. Note that this strategy does not include a re-definition of the potential from variation of effective water depth. Method 4 allows the user to apply the wave kinematics up to the instantaneous free surface without stretching: for Z levels above mean water level, results from Z = 0 are used. Using regular wave models, wave-induced velocities and acceleration are calculated at every node at every time step during the time integration. No storage of such data is carried out. During this process, updating of node position can easily be considered simply by calculating the wave potential at the instantaneous structural position determined by the static position plus dynamic displacement. The program offers this possibility in addition to the traditional method using the static node positions as reference for calculation of wave kinematics. These alternatives are illustrated in Figure 3. If a major part of the structural motion is due to linear, wave-induced support vessel motion, it is recommended to use wave kinematics at the static position. Otherwise, the forced terminal point motions and the wave kinematics will be inconsistent. Figure 3. Static and dynamic node positions. 2. Irregular Waves The present section describes the modelling of an undisturbed Airy wave field which is normally used as the basis for wave loading on slender structures. For modelling of disturbed wave kinematics near the support vessel, see section [Wave_Kinematics_Including_Diffraction_Effects]. An irregular sea state is described as a sum of two wave spectra: a wind sea contribution and a swell contribution: \[S_{\zeta,\textrm{TOT}}(\beta ,\omega )=S_{\zeta,{1}}(\omega )\phi _{1}(\beta -\beta _{1})+S_{\zeta,{2}}(\omega )\phi _{2}(\beta -\beta _{2})\] in which \(\mathrm {S_{\zeta,{1}}}\) and \(\mathrm {S_{\zeta,{2}}}\) describe the frequency distribution of wind sea and swell, respectively. Several standard wave spectra are included, such as Pierson-Moscowitz, JONSWAP, etc., as well as a general numeric description which can be used for description of measured data or regular waves (see Input to INPMOD in the User Manual). \(\mathrm {\phi _{1}}\) and \(\mathrm {\phi _{2}}\) describe the directionality of the waves. Unidirectional waves and cosine spreading functions are included. \(\mathrm {\beta }\) is the direction of wave propagation. Figure 4. Definition of wave directions. The spectrum directionality parameters satisfy the relations: \[\begin{array}{l}\displaystyle \int_{-\frac{\pi }{2}}^\frac{\pi }{2}\!\phi _\textrm{j}(\beta )\textrm{d}\beta =1.0\\\\\displaystyle \phi _\textrm{j}(\beta )=0,\,\frac{\pi }{2}<\beta <\frac{3\pi }{2}\end{array}\] \[\int_{0}^{\infty}\!{S_{\zeta,1}}(\omega )\textrm{d}{\omega }+\int_{0}^{\infty}\!{S_{\zeta,2}}(\omega )\textrm{d}{\omega }=\sigma _{\zeta}^2\] In which \(\mathrm {\sigma _{\zeta}^2}\) is the variance of the surface elevation. In order to generate time series of surface elevation, water particle velocities and acceleration, the short-crested irregular sea is discretized into a set of harmonic components. Thus, in complex notation the surface elevation is expressed by: \[\begin{array}{l}\displaystyle Z_\zeta=\sum_{\textrm{j}=1}^{N_\beta }\,\sum_{\textrm{k}=1}^{N_\infty}\,Z_\textrm{jk}=\sum_{\textrm{j}=1}^{N_\beta }\,\sum_{\textrm{k}=1}^{N_\infty}\,A_\textrm{jk}^{e^{i(\omega _\textrm{k}t+\phi _\textrm{jk}^p+\phi _\textrm{jk})}}\\\\\displaystyle A_\textrm{jk}=|Z_\textrm{jk}|=\sqrt{2S_\zeta(\beta _\textrm{j},\omega _\textrm{k})\Delta \beta \Delta \omega }\\\\\arg(Z_\textrm{jk})=\omega _\textrm{k}t+\phi _\textrm{jk}^p+\phi _\textrm{jk}\end{array}\] The random phase angles,\(\mathrm {\phi _\textrm{jk}}\) , are sampled from a uniform distribution over \(\mathrm {[-\pi ,\pi ]}\) . The position-dependent phase angle is: \[\phi _\textrm{jk}^p=-k_\textrm{k}X\cos(\beta _\textrm{j})-k_\textrm{k}Y\sin(\beta _\textrm{j})\] The surface elevation can be expressed as: \[\begin{array}{l}\displaystyle \zeta(t)=\textrm{Im}(Z_\zeta)=\textrm{Re}(Z_\zeta\cdot \textrm{e}^{-i\pi /2})\\\displaystyle =\sum_{\textrm{j}=1}^{N_\beta }\,\sum_{\textrm{k}=1}^{N_\infty}\,A_\textrm{jk}\sin(\omega _\textrm{k}t+\phi _\textrm{jk}^p+\phi _\textrm{jk})\end{array}\] The velocity and acceleration components are derived from the surface elevation components. \[\begin{array}{l}\dot {Z}_\textrm{jk}=iw_\textrm{k}Z_\textrm{jk}\\\\\ddot {Z}_\textrm{jk}=-w^2_\textrm{k}Z_\textrm{jk}\end{array}\] Adding the harmonic components to obtain time series is performed by a Fourier Transformation algorithm. This approach implies a set of relations between time increment,\(\mathrm {\Delta t}\) , frequency increment, \(\mathrm {\Delta \omega }\) , number of time steps, \(\mathrm {N_t}\) and number of components, \(\mathrm {N_\omega }\). \[\Delta \omega =2\pi /(N_{t}\Delta t)\] \[N_\omega =(N_t/2)+1\] Thus the duration of the time series is limited to: \[T=N_t\Delta t\cong2N_\omega \Delta t\] The number of non-zero components,\(\mathrm {n_\omega }\) , is, however, usually much less than \(\mathrm {N_\omega }\) due to the limited range of wave spectra which is of interest. Typically only wave periods larger than \(\mathrm {t_\textrm{lim}\cong2-3}\)s. are of interest. With a sampling interval, \(\mathrm {\Delta t=0.5}\)s, the number of non-zero components is: \[n_\omega =N_\omega \Delta t/t_\textrm{lim}\cong0.25N_\omega\] The frequency increment and the number of components are chosen so that the time increment and the number of time steps coincide with the wave frequency vessel motion simulation parameters, \(\mathrm {\Delta t_{t\textrm{HF}}}\) and \(\mathrm {N_{t\textrm{HF}}}\) , see section HF Vessel Motion Model. In order to increase the duration of the simulation period, several sequences, each of duration \(\mathrm {T}\) , can be generated. For each new sequence a new set of random phase angles,\(\mathrm {\psi_{\zeta\,\textrm{jk}}}\) , is sampled. Velocities, acceleration and surface elevation are calculated for predefined positions using an FFT algorithm. Two different strategies are possible if changed node positions should be considered in a dynamic analysis involving irregular seas. Calculation of velocities and acceleration by FFT in a four dimensional grid and interpolation during dynamic analysis to obtain values at wanted positions and time steps. Calculation of velocities and acceleration by using Fourier series and direct calculation of all harmonic components with traditional sine and cosine functions for every wave component at wanted positions and time increments. The first strategy has been implemented. In the present program, velocities and acceleration are calculated for pre-defined points that coincide with nodes in the finite element model at static equilibrium position, but not necessarily covering all nodes. This is feasible since potential profiles are smooth, which makes interpolation of intermediate values an attractive alternative to calculation and storage for every node. In addition, this interpolation is necessary in any case if stretching of the potential profiles is performed in order to describe water particle motions close to the sea surface. Three options are available with respect to wave particle motion modelling, and, hence, wave force modelling. Calculate forces to still water level, applied on the part of the riser that is submerged in static equilibrium position. Calculate forces to still water level, update line submergence according to vertical motion, see method 1 in figure Figure 2. Calculate forces to actual, instantaneous water level by stretching/shrinking the z-coordinate, see method 2 in figure Figure 2 (Wheeler’s method). Calculate forces to actual, instantaneous water level by shifting the z-axis upwards or downwards, following the actual wave surface, see method 3 in figure Figure 2. Since the wave-induced loads are most important for the upper part, and even there may be of minor importance for slender lines, such as anchor lines, options for calculating wave kinematics only down to a specified z-coordinate, and even omitting the wave kinematics are included. 3. Wave Kinematics Including Diffraction Effects Diffraction effects are described in terms of wave kinematics transfer functions relating wave particle velocities in x, y and z-directions to the undisturbed surface elevation. The transfer functions for calculation of distributed wave velocities and accelerations \(\mathrm {u_\textrm{j}^d}\) and \(\mathrm {\dot {u}_\textrm{j}^d}\) , respectively, are defined as: \[H_{u_\textrm{j}^d}(\beta ,\omega )=\frac{u_\textrm{j}^d(\beta ,\omega )}{\zeta_a(\beta ,\omega )}\] \[H_{\dot {u}_\textrm{j}^d}(\beta ,\omega )=\frac{\dot {u}_\textrm{j}^d(\beta ,\omega )}{\zeta_a(\beta ,\omega )}\] where \(\mathrm {\textrm{j}=1,2,3}\) signifies \(\mathrm {x}\) ,\(\mathrm {y}\) and \(\mathrm {z}\) directions, respectively. Consistent vessel motion transfer functions and wave kinematics transfer functions for given locations in the vessel coordinate system are available from sink/source computer programs. The sink/source computations are normally carried out in the following major operations: Solution of global system of equations to determine unknown source intensities for all frequencies and wave directions considered. Computations of vessel motion transfer functions based on results from 1). Calculation of wave kinematics transfer functions based on results from 1). In slender structure applications it will normally be sufficient to consider wave kinematics transfer functions for a few locations along the structure near the vessel (3-5 locations will tentatively be sufficient). For a limited number of wave kinematics transfer functions, the computation time for step 3) is small when compared to the computational efforts required in step 1). In order to take advantage of the possibility of splitting the transfer function computations as described above, the following strategy is applied: Vessel motion transfer functions are given as input to INPMOD (i.e. results from step 1) and 2) in transfer function calculations). The static configuration is computed by running STAMOD. Wave kinematics transfer functions for specified locations along the static configuration can then be efficiently computed (i.e. step 3 in transfer function calculation) prior to dynamic analysis. Wave kinematics transfer functions are given directly as input to DYNMOD on a separate input file. The locations of transfer functions are specified by z-coordinates in vessel coordinate system. Transfer functions at intermediate nodes in the diffraction area are found by interpolation along the structure, see figure Figure 5. Wave kinematics time series are generated based on velocity and acceleration spectra computed from interpolated transfer functions in the diffraction area using the FFT technique. Undisturbed wave kinematics are applied outside the diffraction area. Consistent phase angles are applied in the FFT procedure to obtain consistent vessel motions and undisturbed/disturbed wave kinematics. By this strategy, only step 3) in the calculation of transfer functions must be carried out for each new static configuration which will give a computationally efficient procedure. Figure 5. Transfer functions given at specified locations along static riser configuration The described approach can be extended to a complete 3D description by generation of wave kinematics transfer functions in a grid covering the dynamic motion range of the structure as indicated in figure Figure 6. It should, however, be noted that significantly more input is required and that a more complex data structure and interpolation procedure is necessary (not implemented in present version). Figure 6. Grid of transfer functions (not implemented in the present version) 4. Second Order Stokes’ Irregular Waves 4.1. Stokes’ theory In this section, Stokes’ theory is presented. Following the governing set of differential equations, it is shown how a Taylor expansion of the velocity potential around the mean surface level leads to a series expansion in terms of wave steepness. Analytical solutions of the velocity potential and wave elevation are given up to and including second order. This is followed by discussions of issues of importance to the application of Stokes’ theory for irregular waves with a target spectrum. 4.1.1. The wave potential Stokes’ theory of ocean waves assumes irrotational flow of an incompressible fluid, described by a scalar velocity potential \(\mathrm {\Phi(\vec{x},t)}\) which satisfies \[\nabla^2\Phi=0,\] with a velocity field \(\mathrm {\vec{u}}\) given by \[\vec{u}=\nabla\Phi.\] 4.1.2. Boundary conditions Assuming an impermeable sea-floor of constant mean depth \(\mathrm {h}\), we have \(\mathrm {u_z(z=-h)=0}\), which we write in terms of the wave potential as \[\partial _z\Phi=0\hspace{5mm}\mathrm {at}\hspace{2mm}z=-h.\] The free surface of the wave is given by \(\mathrm {z=\eta (x,y,t)}\). For sea states with long-crested waves the \(\mathrm {y}\) coordinate is irrelevant, while for short-crested waves it is sometimes useful to transform between a cartesian and a polar coordinate system, such that \(\mathrm {z=\eta (r,\theta ,t)}\). Now, \(\mathrm {r}\) plays the role which \(\mathrm {x}\) plays in long-crested waves, and \(\mathrm {\eta }\) results from the superposition of several \(\eta _{\mathrm i}(r,t)\equiv\eta (r,\theta _{\mathrm i},t)\). Two boundary conditions are imposed at the wave surface. The kinematic boundary condition \[\partial _t\eta +\partial _x\Phi\partial _x\eta +\partial _y\Phi\partial _y\eta -\partial _z\Phi=0\hspace{5mm}\mathrm {at}\hspace{2mm}z=\eta ,\] which states that a particle at the surface moves together with the surface, and the dynamic boundary condition \[\partial _t\Phi+\frac{1}{2}|\vec{u}|^2+g\eta =0\hspace{5mm}\mathrm {at}\hspace{2mm}z=\eta .\] which follows from assuming constant pressure along the surface. Here, \(\mathrm {g}\) is the acceleration of gravity. Together with Equation (24), which applies within the bulk of the ocean, Equation (26), specify the set of differential equations from which \(\mathrm {\Phi}\) is obtained. 4.1.3. Series expansion of the surface elevation In order to obtain analytic results for \(\mathrm {\Phi}\), a perturbative approach is taken. The velocity potential at the wave surface is extrapolated onto the mean surface level \(\mathrm {z=0}\) using a Taylor expansion, with terms of higher order in the expansion expected to contribute at higher order in the ordering parameter \(\mathrm {\epsilon}\). The expansion is, to order \(\mathrm {\mathcal{O}(\epsilon^2)}\), \[\Phi\rvert_{z>0}=\Phi\rvert_{z=0}+z\{\partial _z\Phi\}_{z=0}+\frac{1}{2}z^2\{\partial _z^2\Phi\}_{z=0}+\dot s.\] Likewise, the surface elevation is written as a series expansion, \[\eta =\eta ^{(1)}+\eta ^{(2)}+\dot s,\] where it is usually assumed that \(\mathrm {\eta ^{(1)}}\) is a linear wave. This is a construction which allows us to study the non-linear effects which appear at second order and beyond. The surface elevation is a function of \(\mathrm {x}\), \(\mathrm {y}\) and \(\mathrm {t}\), or equivalently and for many purposes more conveniently, a function of \(\mathrm {r}\), \(\mathrm {\theta }\) and \(\mathrm {t}\). Staying with the former set of coordinates, the surface elevation in Fourier space is a function of wavenumber \(\mathrm {\vec{k}=(k_x,k_y)}\) and angular frequency \(\mathrm {\omega }\). They are related through the dispersion relation for surface waves at finite water-depth, \[\omega ^2=g|\vec{k}|\tanh|\vec{k}|h,\] which is complete to second order. At third order, the dispersion relation includes an additional term. The first order contribution \(\mathrm {\eta ^{(1)}}\) is provided to WaveKin by its Fourier components \(a_{\mathrm i}\), \[\eta ^{(1)}=\sum_{{\mathrm i}=-N}^{N}\sum_{{\mathrm k}=1}^{M}\frac{1}{2}a_{\mathrm {ik}}e^{i\psi_{\mathrm {ik}}},\] where the sums run over the number of positive frequencies \(\mathrm {N}\) and the number of directions \(\mathrm {M}\) in the discretized directional spectrum, \(\psi_{\mathrm {ik}}=\omega _{\mathrm i}t-\vec{k_{\mathrm {ik}}}\cdot \vec{x}-\varepsilon _{\mathrm {ik}}\) is the phase function, with angular frequency $_{i}={i}$. The phase is \(\varepsilon _{\mathrm {ik}}\) and the wavenumber \(\vec{k_{\mathrm {ik}}}\) is obtained from \(\omega _{\mathrm i}\) through use of the dispersion relation and wave direction \(\theta _{\mathrm {ik}}\). The two subscripts denote a discretization of the Fourier components of a directional spectrum. In the following, the second subscript \(\mathrm {k}\) is dropped in favor of a compact notation. It should be implicitly understood that for directional spectra, all sums over Fourier components also imply a sum over directions. For a simulated wave from a given spectrum, the random phase will typically be drawn from a uniform probability distribution. For a directional spectrum this involves \(\mathrm {MN}\) independent and identically distributed random numbers. See Section 4.2 for a further discussion on this. The sum of Equation (1) can be re-written to run over positive frequencies only. Because \(\mathrm {\eta (x,y,t)}\) is real-valued, \(a_{-\mathrm i}=\bar{a}_{\mathrm i}\). This gives \[\eta ^{(1)}=\sum_{{\mathrm i}=1}^{N}a_{\mathrm {i}}\cos\psi_{\mathrm {i}},\] where the sum over directions is now implicit. Velocities and accelerations are also real-valued; WaveKin therefore works with one-sided spectra only. Time-series may have a non-zero mean value, therefore the one-sided spectra include the zero-frequency components. The zero-frequency component for surface elevation \(\mathrm {a_0}\) is also included in the one-sided spectrum, though its value should be zero or near zero. See Section 4.1.6 for how symmetries allow summations of first and second order terms to run over positive frequencies only and Section 4.1.7 for a further discussion on the zero-frequency components. The expansion is in terms of an ordering parameter \(\mathrm {\epsilon}\). It can be seen that higher orders in the expansions of the boundary conditions at the wave surface results in terms with higher powers of spatial derivatives, surface elevation, and the velocity potential. In Fourier space, spatial derivatives result in additional factors of \(\mathrm {k}\), and we have constructed the first order surface elevation to be a sum of harmonics with amplitude \(\mathrm {|a|}\). The combination of factors of \(\mathrm {k}\) and \(\mathrm {a}\) provides a physical meaning to the ordering parameter. The wave steepness is proportional to \(\mathrm {ak}\), for a harmonic wave elevation \(\mathrm {\eta _k=a\sin kx}\). In order for the series expansion to converge, the linear wave should have a spectral content which satisfies \(|a_{\mathrm i}|k_{\mathrm i}<\epsilon\) for all \(\mathrm {i}\). In addition to the Taylor series expansion of the wave surface boundary conditions and the expansion of \(\mathrm {\eta }\), the velocity potential is written as a series expansion \[\Phi=\Phi^{(1)}+\Phi^{(2)}+\dot s.\] A solution is obtained for each term of the expansion by ordering the terms in the wave surface boundary conditions, setting \(\mathrm {z=\eta }\) in Equation (1). Terms at equal order in \(\mathrm {\epsilon}\) are solved for independently. 4.1.4. First order solution Solving for the first order velocity potential gives \[\Phi^{(1)}(\vec{x},t)=\sum_{{\mathrm i}=-N}^{N}\frac{iga_{\mathrm i}}{2\omega _{\mathrm i}}\frac{\cosh|\vec{k_{\mathrm i}}|(z+h)}{\cosh|\vec{k_{\mathrm i}}|h}e^{i\psi_{\mathrm i}},\] \[\Phi^{(1)}(\vec{x},t)=-\sum_{{\mathrm i}=1}^{N}\frac{ga_{\mathrm i}}{\omega _{\mathrm i}}\frac{\cosh|\vec{k_{\mathrm i}}|(z+h)}{\cosh|\vec{k_{\mathrm i}}|h}\sin\psi_{\mathrm i}.\] 4.1.5. Second order solution Following Marthinsen and Winterstein (1992) for long-crested waves and Marthinsen and Winterstein (1992) for short-crested waves, the velocity potential and second order contribution to surface elevation is given to second order by a set of rather complex expressions, organized in terms of sum-frequency and difference-frequency contributions. The expressions are analytic, and therefore support differentiation, allowing the analytic calculation of velocities and accelerations. Solving for the second order surface elevation gives \[\eta ^{(2)}=\sum_{{\mathrm {i,j}}=-N}^{N}\frac{a_{\mathrm i}a_{\mathrm j}}{2}E_{\mathrm {i,j}}e^{i(\psi_{\mathrm i}+\psi_{\mathrm j})}.\] Solving for the second order velocity potential gives \[\Phi^{(2)}(\vec{x},t)=\sum_{{\mathrm {i,j}}=-N}^{N}\frac{ia_{\mathrm i}a_{\mathrm j}}{2}P_{\mathrm {i,j}}\frac{\cosh|\vec{k_{\mathrm i}}+\vec{k_{\mathrm j}}|(z+h)}{\cosh|\vec{k_{\mathrm i}}+\vec{k_{\mathrm j}}|h}e^{i(\psi_{\mathrm i}+\psi_{\mathrm j})}+\Theta^{(2)}(t),\] where the latter term is independent of spatial coordinates and therefore irrelevant for kinematics. The second order kernels \(E_{\mathrm {i,j}}\) and \(P_{\mathrm {i,j}}\) are given by \[E_{\mathrm {i,j}}=\frac{\omega _{\mathrm i}+\omega _{\mathrm j}}{g}P_{\mathrm {i,j}}-\frac{g}{4}\frac{\vec{k_{\mathrm i}}\cdot \vec{k_{\mathrm j}}}{\omega _{\mathrm i}\omega _{\mathrm j}}-\frac{1}{4g}(\omega _{\mathrm i}^2+\omega _{\mathrm j}^2+\omega _{\mathrm i}\omega _{\mathrm j}),\] and \[P_{\mathrm {i,j}}=\frac{\frac{g^2}{2}\frac{\vec{k_{\mathrm i}}\cdot \vec{k_{\mathrm j}}}{\omega _{\mathrm i}\omega _{\mathrm j}}-\frac{1}{4}(\omega _{\mathrm i}^2+\omega _{\mathrm j}^2+\omega _{\mathrm i}\omega _{\mathrm j})+\frac{g^2}{4}\frac{\omega _{\mathrm j}k_{\mathrm i}^2+\omega _{\mathrm i}k_{\mathrm j}^2}{\omega _{\mathrm i}\omega _{\mathrm j}(\omega _{\mathrm i}+\omega _{\mathrm j})}}{\omega _{\mathrm i}+\omega _{\mathrm j}-g\frac{|\vec{k_{\mathrm i}}+\vec{k_{\mathrm j}}|}{\omega _{\mathrm i}+\omega _{\mathrm j}}\tanh|\vec{k_{\mathrm i}}+\vec{k_{\mathrm j}}|h}.\] The solutions for both \(\mathrm {\eta ^{(2)}}\) and \(\mathrm {\Phi^{(2)}}\) depend on products, sums and differences of Fourier components. Because the two-sided spectrum can be expressed as a one-sided spectrum, the second order contributions are naturally separated into sum-frequency and difference-frequency contributions. Because the sum and difference-frequency components only depend on the sum and difference of frequencies (wavenumbers) and the Fourier components satisfy \(a_{-\mathrm i}=\bar{a}_{\mathrm i}\), the calculations of second order contributions to surface elevation, velocities and accelerations can be considerably simplified. 4.1.6. The sum-frequency and difference-frequency transfer functions The kernels from Equation (39) and Equation (40) can be written in terms of sums and differences of frequencies and corresponding wavenumbers, \[E_{\mathrm {ij}}^{\pm}=\frac{\omega _{\mathrm i}\pm\omega _{\mathrm j}}{g}P_{\mathrm {ij}}^{\pm}-\frac{g}{4}\frac{\vec{k_{\mathrm i}}\cdot \vec{k_{\mathrm j}}}{\omega _{\mathrm i}\omega _{\mathrm j}}-\frac{1}{4g}(\omega _{\mathrm i}^2+\omega _{\mathrm j}^2\pm\omega _{\mathrm i}\omega _{\mathrm j}),\] and \[P_{\mathrm {ij}}^{\pm}=\frac{\frac{g^2}{2}\frac{\vec{k_{\mathrm i}}\cdot \vec{k_{\mathrm j}}}{\omega _{\mathrm i}\omega _{\mathrm j}}-\frac{1}{4}(\omega _{\mathrm i}^2+\omega _{\mathrm j}^2\pm\omega _{\mathrm i}\omega _{\mathrm j})+\frac{g^2}{4}\frac{\omega _{\mathrm j}k_{\mathrm i}^2\pm\omega _{\mathrm i}k_{\mathrm j}^2}{\omega _{\mathrm i}\omega _{\mathrm j}(\omega _{\mathrm i}\pm\omega _{\mathrm j})}}{\omega _{\mathrm i}\pm\omega _{\mathrm j}-g\frac{|\vec{k_{\mathrm i}}\pm\vec{k_{\mathrm j}}|}{\omega _{\mathrm i}\pm\omega _{\mathrm j}}\tanh|\vec{k_{\mathrm i}}\pm\vec{k_{\mathrm j}}|h},\] where \(\mathrm {i,j}>0\). The symmetry properties of the second order kernels are \[E_{ij}^+=E_{i,j}=E_{j,i},\] \[E_{ij}^-=E_{i,-j}=-E_{j,-i},\] \[P_{ij}^+=P_{i,j}=P_{j,i},\] \[P_{ij}^-=P_{i,-j}=-P_{j,-i},\] where \(\mathrm {i,j}>0\). For the second order wave elevation of Equation (1) we now have \(\mathrm {\eta ^{(2)}=\eta ^{}\eta ^{-}}\) with \[\eta ^{\pm}=\sum_{{\mathrm {i,j}}=1}^{N}a_{\mathrm i}a_{\mathrm j}E_{\mathrm {i,j}}^{\pm}\cos(\psi_{\mathrm i}\pm\psi_{\mathrm j}).\] The second order velocity potential of Equation (38) can now be written as \(\mathrm {\Phi^{(2)}=\Phi^{}\Phi^{-}}\) with \[\Phi^{\pm}(\vec{x},t)=-\sum_{{\mathrm {i,j}}=1}^{N}a_{\mathrm i}a_{\mathrm j}P_{\mathrm {i,j}}^{\pm}\frac{\cosh|\vec{k_{\mathrm i}}\pm\vec{k_{\mathrm j}}|(z+h)}{\cosh|\vec{k_{\mathrm i}}\pm\vec{k_{\mathrm j}}|h}\sin(\psi_{\mathrm i}\pm\psi_{\mathrm j}),\] where space-independent terms have been omitted. 4.1.7. The diagonal of the difference-frequency kernels The difference-frequency kernels \(E_{\mathrm {ij}}^-\) and \(P_{\mathrm {ij}}^-\) are singular for \(\mathrm {i}=\mathrm {j}\). If one chooses to take the analytic limit, one gets a non-zero contribution to the zero-frequency contribution of the difference-frequency transfer functions. For \(E_{\mathrm {ii}}^-\) this gives \[E_{\mathrm {ii}}^-\equiv\lim_{\omega _{\mathrm {j}}\to-\omega _{\mathrm {i}}}E_{\mathrm {i,j}}=\frac{1}{2}\frac{\frac{gk_{\mathrm {i}}^2}{2\omega _{\mathrm {i}}^2}-\frac{\omega _{\mathrm {i}}^2}{2g}+\frac{gk_{\mathrm {i}}}{\omega c_{g\mathrm {i}}}}{1-\frac{gh}{c_{g\mathrm {i}}^2}}-\frac{k_{\mathrm {i}}}{2\sinh2k_{\mathrm {i}}h},\] where \[c_g=\frac{\mathrm {d}\omega }{\mathrm {d}k},\] is the group velocity. Equation (49) follows Marthinsen and Winterstein (1992). With non-zero contributions from the difference-frequency kernels when \(\mathrm {i}=\mathrm {j}\), the resulting transfer functions give finite contributions to the zero-frequency component of the second order elevation and velocity potential. This corresponds to finite mean-values for \(\mathrm {\eta }\), \(\mathrm {u_x}\) and \(\mathrm {u_y}\). This can optionally be avoided by setting all zero-frequency components to zero, (equivalently, setting the diagonal entries of the difference-frequency kernels to zero) however this procedure lacks physical or theoretical justification. In particular, the so-called mean sea state set-down leads to an inconsistency with the boundary condition applied at the sea floor, i.e. at \(\mathrm {z=-h}\), as the sea floor depth \(\mathrm {h}\) should properly be measured from the mean sea level, \(\mathrm {<\eta >}\), not from the first order contribution to the same, \(\mathrm {<\eta ^{(1)}>}\). The inconsistency might be small for most practical uses, but deserves mentioning. This is discussed occasionally in the literature, e.g., Marthinsen and Winterstein (1992) and The default behaviour of WaveKin in RIFLEX is to set the diagonal terms equal to zero. 4.1.8. High frequency contributions from the sum-frequency transfer functions Depending on how the target spectrum is filtered to obtain the first order wave elevation defined by \(\{a_{\mathrm {i}}\}\), the sum-frequency transfer functions may result in significant high frequency contributions to the second order wave elevation and kinematics. The acceleration terms are particularly sensitive to the high frequency part of the spectrum. Care must be taken when defining the first order wave elevation to avoid un-physical high frequency terms arising at second order. Otherwise, un-physically large accelerations could result. The issue of large accelerations, i.e., rapidly varying velocities, is most acute near the mean sea surface and above (\(\mathrm {z\ge0}\)). 4.2. Spectrum The input to WaveKin is the first order wave elevation. From this, the second order contribution to wave elevation is calculated and added to the first order part. Also, kinematics are calculated complete to second order. The input wave elevation may be provided as a directional spectrum, in which case the 2D array (frequency and direction) of Fourier components must be accompanied by an array of directions. The generation of the first order wave elevation is done outside of WaveKin. The Fourier components may be taken deterministically from the power spectrum. For a time series of finite length there will be some variability of the power spectrum with respect to the target spectrum, and thus individual Fourier components should be \(\mathrm {\chi^2}\) distributed. However, it should be noted that when \(\mathrm {\eta }\) is given as a sum of directional components this in itself results in a natural source of variability for the Fourier components at any given frequency. 4.2.1. The linear wave and the filtering procedure By target spectrum is meant the empirically established power spectrum \(\mathrm {S(\omega )}\) for long-crested waves or the directional spectrum \(\mathrm {S(\omega ,\theta )}\) for directional sea states. In order to generate an irregular sea state, phases are typically drawn from a uniform distribution, with the amplitude of Fourier components fixed by a filtered power spectrum. The resulting wave elevation is then referred to as a linear wave and identified as the first order contribution in the perturbative expansion of \(\mathrm {\eta }\). Various heuristics are presented in the literature for how the filtering should be done, see e.g. Marthinsen and Winterstein (1992) and Marthinsen and Winterstein (1992), but no solid theoretical foundation underlies these methods. For many purposes, results may be insensitive to the details of the filtering, however results from WaveKin indicate that filtering has a significant effect on wave kinematics near the sea surface at water depths of \(20-40{\mathrm {~m}}\) and significant wave heights in the range of \(5-6{\mathrm {~m}}\). Equating the linear wave with the first order wave elevation is a matter of convenience, but could under-estimate the non-linear nature of Stokes’ waves. The assumption of un-correlated phases is justified by very weak wave-wave interactions, which in turn applies to low wave steepness. While the first order wave elevation will always have a more narrow banded spectrum than the full wave, it will nevertheless contain steep waves. 4.2.2. Separability of the directional spectrum A directional spreading function \(\mathrm {D(\theta ,\omega )}\) is defined by \[S(\omega ,\theta )=S(\omega )\cdot D(\theta ,\omega ),\] together with the normalization condition \[\int^{2\pi }_0D(\theta ,\omega ){\mathrm d}\theta =1.\] The power spectrum \(\mathrm {S(\omega )}\) for directional sea states is obtained by integrating over the directional coordinate \[S(\omega )=\int^{2\pi }_0S(\omega ,\theta ){\mathrm d}\theta .\] The simplest approach to describing a directional sea state is to assume a separable directional spectrum, \[S(\omega ,\theta )=S(\omega )\cdot D(\theta ),\] where the power spectrum \(\mathrm {S(\omega )}\) (e.g., a JONSWAP spectrum) and the directional spreading function \(\mathrm {D(\theta )}\) are given separately and together define the sea state. A common choice for \(\mathrm {D}\) is a frequency-independent cosine-2s distribution \[D_s(\theta )=C_s\cos^{2s}(\theta -\theta _0),\] for \(\mathrm {|\theta -\theta _0|\leq\frac{\pi }{2}}\) and zero otherwise. \(\mathrm {C_s}\) is a normalization factor. The width of the distribution is parametrized by \(\mathrm {s}\) and the mean direction is given by \(\mathrm {\theta _0}\). 4.3. Kinematics Velocities and accelerations are obtained from applying partial derivatives to the wave potential, which is known analytically up to and including second order. The velocity and acceleration to second order are given by \[\vec{u}^{(1+2)}=\vec{u}^{(1)}+\vec{u}^{(2)}=\nabla(\Phi^{(1)}+\Phi^{(2)}),\] \[\vec{a}^{(1+2)}=\frac{\mathrm d}{\mathrm dt}(\vec{u}^{(1)}+\vec{u}^{(2)}).\] WaveKin by default performs differentiation by applying partial derivatives in Fourier space. This is efficient and accurate, and has been validated against differentiating along temporal and spatial coordinates. An option exists to perform differentiation numerically along the temporal coordinate, which is turned off by default. 4.3.1. Convection terms Frequently, convective terms are neglected in the calculation of wave kinematics. In the current implementation of WaveKin the inclusion of these terms is optional. If they are omitted, only the contribution from partial time-derivatives are included \[\vec{a}^{(1+2)}=\frac{\mathrm d}{\mathrm dt}(\vec{u}^{(1)}+\vec{u}^{(2)})\approx \frac{\partial }{\partial t}(\vec{u}^{(1)}+\vec{u}^{(2)}).\] Convection terms can optionally be included in the accelerations returned by WaveKin. These are calculated by taking spatial derivatives of the velocity field (in the frequency domain) and multiplying with the velocity field (in the time domain). Convection terms contribute to the accelerations of momentum-carrying fluid particles, and thus contribute to the inertia term of Morison’s load model. They emerge when we take the total derivative of velocity with respect to time, \[\vec{a}=\dot {\vec{u}}=\frac{\mathrm d}{\mathrm dt}\vec{u}=\frac{\partial }{\partial t}\vec{u}+\vec{v}\cdot \nabla\vec{u},\] where \(\mathrm {\vec{v}}\) is the velocity vector and \(\mathrm {\vec{u}=\vec{u}(\vec{x},t)}\) is the velocity field. The inclusion of convection terms is turned off by default in WaveKin. This follows an assumption that they are small and can be neglected for practical purposes. This assumption should be questioned for severe sea states. The last term in Equation (59) constitutes the convection terms. It should be seen that its magnitude depends on the gradient of the velocity field, meaning that rapidly varying velocities, as found near the sea surface in severe sea states, may lead to significant contributions from convection terms. 4.3.2. Kinematics near to and above the mean surface level The velocity potential \(\mathrm {\Phi(x,y,z,t)}\) is extrapolated above \(\mathrm {z=0}\) according to the Taylor expansion of Equation (1). Kinematics are obtained from the extrapolated potential by spatial and temporal differentiation in the same manner as for the velocity potential at and below \(\mathrm {z=0}\). However, it should be noted that the second order contribution at \(\mathrm {z>0}\) only involves the first order velocity potential \(\mathrm {\Phi^{(1)}}\). There are no quadratic transfer functions involved above mean surface level until third order contributions. High frequencies resulting from providing an improperly filtered spectrum as the input first order wave may cause unphysical accelerations near to and above the mean surface level. To compensate for this, an option is provided to filter out large frequencies prior to extrapolating the kinematics above the mean surface level. Together with, or instead of this option, there is an option to set a threshold surface level \(z_{\mathrm {lim}}<0\), above which kinematics are extrapolated from the potential at \(z=z_{\mathrm {lim}}\). As the large frequencies are rapidly dampened even at very small values of \(\mathrm {z<0}\), setting \(z_{\mathrm {lim}}\) to only a few centimeters below \(\mathrm {z=0}\) may be sufficient to avoid the excessive spikes in acceleration. The default behaviour of WaveKin in RIFLEX is to use the entire provided spectrum when extrapolating kinematics above the mean surface level, and to extrapolate from \(\mathrm {z=0}\). 4.3.3. Kinematics above the sea surface In order to extrapolate kinematics between two nodes, one of which is dry, it can be impractical to set kinematics to zero above the sea surface \(\mathrm {z>\eta }\) (sometimes referred to as a dry node). Instead, the option exists to set kinematics at \(\mathrm {z>\eta }\) equal to the the kinematics at the surface: \(\mathrm {z=\eta }\). This is the default behaviour of WaveKin in RIFLEX. 4.3.4. Kinematics on the surface and below the mean surface level For kinematics on the surface and at or above the mean surface level, \(\mathrm {z=\eta \ge0}\), the kinematics are obtained at second order by extrapolation of the first order kinematics at \(\mathrm {z=0}\). For kinematics on the surface and below the mean surface level, \(\mathrm {z=\eta <0}\), there is a choice between using the second order potential, which exists at all \(\mathrm {z\le0}\) or using the first order potential at \(\mathrm {z=\eta <0}\) together with the first order potential extrapolated from \(\mathrm {z=0}\). The latter method provides a consistent calculation of kinematics on the surface regardless of whether it is above or below \(\mathrm {z=0}\). However, it causes a discontinuity in the kinematics on and directly beneath the surface. The magnitude of the discrepancy between the two methods should be of third order, if the series expansion behaves consistently. Thus, a comparison of the two methods is a test of the series expansion. Hydrostatic Pressure Effects Current Description