The coupled dynamics of wave elevation and motions around bodies floating in proximity may be sensitive to radiation and diffraction effects. In this paper, the influence of radiation on wave elevation is examined for two sidebyside boxes subject to forced sway, heave, and roll oscillations in a twodimensional numerical wave tank. The effects of diffraction on wave elevation and the joint influence of radiation and diffraction are investigated in regular waves assuming free heave motions. Heaving of one or two boxes and singlebox sway or roll excites a piston mode of water motions in the proximity gap. Synchronous sway or roll induces sloshing. The close relationship between gap resonance and rapid water exchange in and out of the gap is confirmed. Vortices within the gap drive water exchange and influence the gap wave elevation. Their impact is determined by both spatial and temporal distributions.
I. INTRODUCTION
The motion of water in a semirestricted space, such as a narrow gap, may lead to large amplitude oscillations at certain frequencies of the exciting incident wave. The phenomenon is normally named gap resonance. The semirestricted space is characterized by vertical walls that impede fluid flow and openings and allow radiated waves to escape. Examples of application to maritime operations include the berthing of an oil tanker alongside an FPSO (floating production storage and offloading) unit, replenishment at sea operations, and channels within large ice floes. The problem has drawn significant research attention because of its potential to induce large amplitude motions in the proximity of two floating bodies as well as variations in hydrodynamic pressures.
A pioneering study on the subject is presented by Molin^{1} who proposed quasianalytical approximations to calculate the natural frequencies associated with gap resonances for the case of a moonpool. This work revealed that the frequency associated with a longitudinal sloshing mode increases as the width and draft of the moonpool decrease. In a seminal study, Faltinsen et al.^{2} demonstrated that nonlinear resonant motions can be approximated by linearized surfacewave analysis. Generally, research studies using linear potential flow theory suggest that a gap resonance exhibits pistonlike sloshing modes, akin to standing waves within the gap, while wave amplitudes are overestimated.^{3,4} Notwithstanding this, revisiting the fundamentals of the problem reveals that the response amplitude of a massspring system may be sensitive to the damping at the resonant region.^{5} Hence, the linear potential flow theory, which considers only radiation damping, may not always provide accurate predictions. There are two additional physicsbased mechanisms that contribute to the damping of water motions in the resonance gap, namely, (a) the nonlinear free surface condition expressing the way wave energy transfers between different modes^{6} and (b) the viscosity of water, which constrains water in the boundary layer along the wall and causes flow separation at the corners of the gap. To address these issues, researchers proposed the introduction of artificial damping.^{7–11} However, since the choice of damping factor is empirical, it should be validated by experiments.^{12–17} An alternative is the vortex tracking method that may be used to account for the influence of flow separation effects.^{5} Zhao et al.^{18} introduced an approach to scale viscous damping across different gap widths by utilizing measured viscous damping at each specific gap width. Their method effectively reduces the experimental studies workload.
In theory, viscous models can provide more accurate evaluations as compared to the potential flow analysis and hence, computational fluid dynamics (CFD) have been employed to better idealize the dynamics of twodimensional gap resonances.^{19–24} In their majority, CFD methods focus on understanding the hydrodynamic characteristics of gap resonances between fixed bodies^{25,26} and therefore, investigations specifically examining the influence of motions are limited. For example, Li and Teng^{27} studied the coupling effects of fluid resonance and roll motion of two rectangular barges in waves. Gao et al.^{28} investigated the influence of the motion of the upstream box on the hydrodynamic behavior of fluid resonance in a proximity gap. Ding et al.^{29} studied the coupling between the pistonmode fluid response and heave motions of two barges. These research studies demonstrated that multibody interactions induce radiation effects on the surrounding fluid, and hydrodynamic phenomena may become more complex due to simultaneous influences with diffraction. The latter is also confirmed by McIver^{30} who demonstrated that the coupled radiation and diffraction problem exhibits different behavior from the pure radiation or diffraction problem, with the extent of discrepancy dependent on the constraints imposed by motions.
Lu et al.^{31} demonstrated the significant influence of mooring stiffness on gap resonance, thus indicating a potential role of radiation in shaping the proximity gap. However, it remains unclear how motions may affect gap resonances and whether each motion mode exerts a unique impact. To date, the application of viscous fluid models to systematically investigate the radiation and diffraction effects of floating bodies on the surrounding wave elevation has not been systematically explored. This paper aims to enhance existing knowledge by comprehensively studying gap wave elevation under the coupled influence of radiation and diffraction. It is envisaged that findings may shed light on the impact of motions on wave elevation.
The simulations presented are based on results from a twodimensional (2D) numerical wave tank (NWT) idealizing fluid dynamic interactions according to Reynolds averaged Navier–Stokes (RANS) equations. In many gap resonance scenarios, the dominant flow components are aligned within the sectional plane of the gap. This makes it possible to capture the essential features of the resonant phenomena and to understand the fundamental mechanics using 2D modeling. The objective is to investigate the response of wave elevation in the gap, as well as at the upwind and downwind sides, under diverse modes of forced box motions in calm waters, as well as fixed and freeheaving boxes in regular waves. The numerical setup involves placing two identical square boxes floating sidebyside. The research method attempts to understand fluid physics of relevance to radiation, diffraction, and their combined influences as follows:

One or both boxes are subject to forced oscillations with specific frequencies and amplitudes in calm water. The aim is to examine the physics of pure radiation on wave elevation.

Both boxes remain fixed while being exposed to a series of regular waves. The aim is to study the influence of pure diffraction effects on wave elevation.

Both boxes are subject to regular waves and free heave motions. The aim is to understand how motions influence fluid behavior in the proximity gap in waves.
By comparative analysis, the study unveils a significant correlation between the intensity of gap resonance and the exchange of water in and out the gap. In calm waters, if motions fail to induce rapid water exchange, gap elevation will be mild. The presence of substantial vortex formations near the gap's inlet may impact the strength of gap resonance by hindering the water exchange process. These vortices, distinguished by their notably larger dimensions and extended durations, exhibit distinct characteristics from those attached to the corners, which have been previously investigated by researchers.^{24,31}
The remaining sections of the paper are structured as follows. Section II provides a brief description of the mathematical formulas used in the numerical model, following the instructions outlined in Sec. I. The setup of the numerical wave tank is detailed in Sec. III. Section IV presents the numerical results obtained from the simulations and includes relevant discussions. Section V draws conclusions.
II. MATHEMATICAL FORMULATION
To accurately capture the water flow characteristics, especially the vortices induced by water viscosity, a Reynolds averaged Navier–Stokes (RANS) model embedded in STARCCM+ is utilized. The key steps of the 2D NWT simulation are outlined in Fig. 1. The following sections highlight the physics of key fluid modeling principles.
A. Governing equations
B. Free surface capture
C. Wave generation and absorption
D. Body motions and mesh morphing
The mesh next to the body surface should move with the body motion to rebuild the fluid domain. Herein, the morphing technique is adopted to treat the smallamplitude motion. The method uses a set of mesh vertices on the moving boundary as control points. The displacements of control points are used to calculate the displacements of all mesh vertices. Thus, the displacement of the moving boundary is transmitted to the mesh vertices in the vicinity of the body.
E. Numerical implementations
III. NUMERICAL MODEL SETUP
A. 2D numerical wave tank and boundary conditions
The gap resonance and wave elevation are investigated by subjecting two sidebyside boxes in a 2D NWT with a length of at least twenty times wavelength (see Fig. 2). The water depth h is maintained constant and equal to the longest wavelength $ \lambda max$ used in this investigation. Accordingly, $kh\u22652\pi $ for all cases, where $k$ is the wavenumber. The water depth effect can be disregarded since it satisfies the deepwater condition, $kh\u2265\pi $.^{38} To generate waves, a masssourcebased wave generator, following the theory of Peric and AbdelMaksoud,^{32} is positioned in front of the left damping zone. The latter ensures sufficient distance from the boxes located at the center of the NWT. To minimize wave reflections from the left and right sides of the NWT, damping zones are placed adjacent to these sides. According to Peric and AbdelMaksoud,^{33} each damping zone has a length equal to 2.5 times the wavelength. Hence, the NWT is established based on the Cartesian coordinate system, with the origin set at the midpoint of the NWT stillwater line (SWL). The horizontal x axis points rightward, and the vertical y axis points upward. The boundary conditions of the NWT are featured as: (1) the bottom, left side, and right side have a noslip wall condition (resembles the bottom and end walls of the wave flume) and (2) the top is set as a pressure outlet (resembles the open atmosphere surface). The boundary condition for the surface of the boxes is also a noslip wall condition.
B. Dimensions and scheme of boxes
The numerical setup consists of two square boxes with identical dimensions symmetrically positioned on both sides of the origin (see Fig. 2). The beam of box B is 0.4 m. The draught of each box and the gap width are equal to B/2. To measure the wave elevation, five wave gauges, labeled as G1–G5, are installed. G1 and G5 are positioned at B/10 from the vertical wall of the boxes to measure the upwind and downwind wave elevation, respectively. G2–G4 are evenly distributed within the gap to measure the wave elevation within the gap itself.
This paper explores the influence of fluid flow physics and rigid body dynamics on sidebyside boxes. The analysis presented explores: (1) radiation effects (boxes subjected to forced sway, heave, or roll motions in calm water); (2) diffraction effects (boxes fixed in regular waves), and (3) combined radiation and diffraction effects (boxes free to heave in regular waves). Special focus is attributed on wave elevation and gap resonance.
To study the radiation effects on the wave elevation and gap resonance, two different setups are considered in calm water, as follows:

Oscillatingfixed: In this setup, box 1 is subjected to forced oscillations, while box 2 remains fixed at SWL.

Oscillatingoscillating: In this setup, both boxes 1 and 2 are subjected to forced oscillations with the same frequencies, amplitude, and phase.
.  $ \omega *$ .  

Radiation  0.5  0.6  0.7  0.8  1.0 
Diffraction  0.5  0.6  0.7  0.8  1.0 
Joint  0.5  0.6  0.7  0.8  1.0 
.  $ \omega *$ .  

Radiation  0.5  0.6  0.7  0.8  1.0 
Diffraction  0.5  0.6  0.7  0.8  1.0 
Joint  0.5  0.6  0.7  0.8  1.0 
To study the diffraction effect on the wave elevation and gap resonance, boxes 1 and 2 are assumed to be fixed in regular waves with an amplitude of $ \eta 0=0.01$ m (i.e., the same amplitude as the forced oscillation amplitude used in the radiation study). The frequency series used to idealize the influence of diffraction are also identical to those used in the radiation study. To explore the combined effects of radiation and diffraction, boxes 1 and 2 are subject to regular waves while having the freedom to move in heave. Thus, the boxes can be moved in heave by incoming waves. To ensure stable and accurate simulations, it is imperative to adhere to the Courant–Friedrichs–Lewy condition, as detailed in Sec. II E. The time step varies from 5 × 10^{−4} to 2 × 10^{−4} s for $ C r\u22640.1$. Table II provides a comprehensive overview of the time steps and their corresponding Courant numbers associated with different wave frequencies.
$ \omega *$ .  0.5 .  0.6 .  0.7 .  0.8 .  1.0 . 

Time step (s)  5 × 10^{−4}  5 × 10^{−4}  4 × 10^{−4}  3 × 10^{−4}  2 × 10^{−4} 
Courant number  0.07  0.09  0.1  0.1  0.1 
$ \omega *$ .  0.5 .  0.6 .  0.7 .  0.8 .  1.0 . 

Time step (s)  5 × 10^{−4}  5 × 10^{−4}  4 × 10^{−4}  3 × 10^{−4}  2 × 10^{−4} 
Courant number  0.07  0.09  0.1  0.1  0.1 
C. Mesh and mesh convergence test
The fluid domain in the 2D NWT is discretized by a structured grid, and the mesh is refined within the region adjacent to the boxes. The dimension of the refined mesh zone is approximately $10B$ in width and $7B$ in height with the cell size approximate 2% of the box's beam. The mesh is refined in the vicinity of free surface, where the cell height is 10% of the wave amplitude and the horizontal size of cell is refined to ascertain minimally 200 cells in a wavelength. Thus, the mesh is sufficiently refined to capture the wave elevation at the free surface with a high level of accuracy. The boundary layer is 0.03 m thick with 12 prism layers to obtain sufficiently small distance between the first node of cell and the wall, resulting in $ y +<2$ (in average). Then, $ u +$ can be properly calculated with the wall function to avoid the buffer layer. Figure 3 shows the mesh configuration in the vicinity of boxes with the refinement in way of the proximity of the two floating bodies.
A mesh convergence test accounting for four mesh sizes (meshes 1–4) is carried out to study the influence of mesh refinement on two boxes undergoing synchronized heave oscillations at a frequency of $ \omega *=0.7$ (see Table III). To precisely capture the free surface, there should be enough cells in way of the free surface, leading to the mesh refinement in the vicinity of the free surface. The amplitude of wave elevation at the midpoint of the gap was obtained by a fast Fourier transform (FFT) and compared among the four meshes. Figure 4 shows that the difference between meshes 1 and 4 is approximately 8.1%, the difference between meshes 2 and 4 is approximately 2.3%, and the difference between meshes 3 and 4 is approximately 0.2%. Figure 5 illustrates the time history curve of nondimensional wave elevation measured on G3. This comparison indicates that the calculations can be considered independent of the mesh refinement when using mesh 2. The convergence test confirms that the selected mesh provides sufficiently accurate results.
Cases .  Mesh 1 .  Mesh 2 .  Mesh 3 .  Mesh 4 . 

Total cell no.  109 392  211 049  408 432  826 016 
Cell no. per wavelength  128  214  214  320 
Cell no. per wave height  10  20  20  30 
Cell no. per box breadth  26  50  100  150 
Cell no. per gap breadth  13  25  50  75 
Cases .  Mesh 1 .  Mesh 2 .  Mesh 3 .  Mesh 4 . 

Total cell no.  109 392  211 049  408 432  826 016 
Cell no. per wavelength  128  214  214  320 
Cell no. per wave height  10  20  20  30 
Cell no. per box breadth  26  50  100  150 
Cell no. per gap breadth  13  25  50  75 
IV. RESULTS AND DISCUSSION
The research method involves four parts: (1) the CFD simulation is validated against experimental data; (2) the impact of motions, referred to as the radiation effects, is examined on the free surface elevation in way of the gap and at both sides of the box–box configuration in calm waters. The results are presented for three motions, namely, sway, heave, and roll; (3) the diffraction effects of the fixed box–box system are studied in relation to the wave elevation in the gap and at both sides. This may be used to analyze the coupling of radiation and diffraction; (4) special emphasis is attributed on how motions may influence fluid behaviors in was of the resonance gap in waves. As a part of this study, the results are compared against pure diffraction.
A. Model validation
The CFD model used in this study is validated against experimental measurements conducted by Faltinsen et al.^{2} and compared with the results from the linear potential flow theory. The experimental setup involved two identical boxes positioned in parallel and separated by gaps measuring 50% and 100% of the box width. The study assumed that the system was prone to forced heaving at different frequencies corresponding to small amplitudes. The gap wave elevation was measured by using five probes (G1–G5), with one probe situated at the midpoint of the gap. Faltinsen's experimental investigation focused on the piston mode resonance in the gap between two boxes undergoing forced heave oscillations, and it is accordingly mirrored in the setup employed by the present CFD model. Validation is carried out by comparing the wave elevation at the midpoint of the free surface in the gap (see Fig. 6). The amplitude of wave elevation $ \eta g$ is nondimensionalized by the amplitude of forced heave oscillation $ \eta 3$. Comparison between experiments and linear potential flow theory reveals that the prediction of the wave elevation in the gap is good, except for the resonant region where it significantly overestimates the amplitude. On the other hand, the CFD model compares well to experimental data within the resonant region. The maximum deviation between CFD predictions and experimental measurements is −11.3% and is observed at the peak of the response. It may be attributed to strong resonance effects, thus making it challenging to achieve precise agreement.^{29,31} The average deviation stands at −1.2%, indicating a satisfactory overall agreement between CFD results and experimental data. It also exhibits good agreement with the linear theory beyond the range of experimental measurements. Kristiansen and Faltinsen^{5} pointed out that significant flow separation occurs at the corner of the box during gap resonance. This phenomenon, not accounted for by the linear potential flow theory, results in energy dissipation and a reduction in wave elevation within the gap. Therefore, the linear theory tends to overpredict the intensity of gap resonance as compared to CFD simulations, which align more closely with experimental observations. The consistency in phase shift among the three sources demonstrates the quality of the validation process [see Fig. 6(b)]. Based on this comparison, it can be concluded that the present model is capable of accurately predicting the wave elevation.
B. Radiation effects
Figure 7 displays the nondimensionalized harmonic amplitudes of swayinduced wave elevation measured by gauges G1–G5. The harmonic amplitudes are obtained by transforming the time history curves of the measured wave elevation using the FFT. For each harmonic analysis, a minimum of fifteen steady state cycles are used to evaluate the harmonic amplitudes. Columns (a) and (b) in Fig. 7 represent the harmonic amplitudes from the oscillating–oscillating model and oscillatingfixed model, respectively. These spectra provide information about the frequency and amplitude of the zero, first, second, and higherorder harmonics of the wave elevation. It is observed that the wave elevations at all five gauges are primarily dominated by their first harmonics for those imposed oscillations are linear and of small amplitude. However, the zero harmonics, representing the mean water surface, are nonnegligible for certain cases, e.g., in way of 0.8 at $ \omega *=0.7$ in the oscillatingfixed model. Hence, they account for more than 10% of the total wave elevation. As shown in Fig. 7(b), the large amplitude of wave elevation suggests that the frequency is within the range of gap resonance. Hence, the large zero harmonics could be attributed to the gap resonance. It is noted that Figs. 7(b1)–7(b5) also exhibit notable second harmonics when the gap resonance happens, while the second harmonics are much smaller without the gap resonance.
Figure 8 demonstrates that the largeamplitude gap resonance only occurs in the oscillatingfixed model, while no gap resonance is observed when the twin boxes oscillate in sway with the same frequency and phase (oscillating–oscillating model). In the oscillating–oscillating model, the volume of the gap remains constant during sway. However, in the oscillatingfixed model, the volume of the gap continuously changes due to the sway of box 1. This leads to the exchange of water in and out of the gap. Therefore, resonance occurs when the frequency at which water is exchanged is close to the natural frequency of the water volume between the two floating bodies. The mechanism could be more clearly revealed while going deep into the velocity field of water flowing in and out of the gap (see Fig. 9). In the oscillating–oscillating model, a small volume of water is exchanged at two corners due to flow separation [see Fig. 9(a)]. The water exchanges at these corners have opposite directions, resulting in approximately zero net exchange in and out of the gap, so they do not influence the water volume in way of upper gap. On the other hand, a strong water exchange is observed at the bottom of the gap in the oscillatingfixed model, which induces the oscillation of whole water volume in the gap [see Fig. 9(b)]. The small exchange in the oscillating–oscillating model also leads to milder wave elevation within the gap as compared to outside the gap (see probes G1 and G5), while the strong exchange in the oscillatingfixed model leads to more violent wave elevation within the gap (see probes G2–G4). As shown in Fig. 8(a), the wave elevation in the gap is much smaller than that at the upwind and downwind gauges. Additionally, the wave elevations at G2 and G4 are close and noticeably higher than G3. This implies sloshing mode hydromechanics. Conversely, in Fig. 8(b), the wave elevations at G2, G3, and G4 are quite similar, indicating a piston mode of water motion within the gap.
Figure 10 displays the nondimensionalized harmonic amplitudes of wave elevation measured by gauges G1–G5, which are induced by heave motions. Columns (a) and (b) in Fig. 10 represent the harmonic amplitudes from the oscillating–oscillating model and oscillatingfixed model, respectively. Like the case of sway motion, the wave elevation induced by heave motion is predominantly dominated by the first harmonic. However, the presence of gap resonance can enhance the zeroth harmonic of wave elevation in the gap. For example, as demonstrated in Fig. 10(a3), the zeroth harmonic of gap wave elevation is approximately 0.5, which is comparable to the amplitude of the first harmonic in Fig. 10(a1). There are small peaks at $ f / f 3=2$ in Figs. 10(a3), 10(a4), 10(b3), and 10(b4), which indicate that the gap resonance can also intensify the second harmonic. The spectra of wave elevation at gauges G2–G4 overlap with each other in both the oscillating–oscillating and oscillatingfixed models. This suggests that the wave elevation synchronously fluctuates at these three points, indicating a piston mode of oscillation within the gap under the influence of heave motion.
Figure 11 illustrates the total wave elevation amplitude in nondimensionalized (by heave amplitude) format at G1–G5. The large peaks in the wave elevation curves, within the gap for both the oscillating–oscillating and oscillatingfixed models, indicate the occurrence of gap resonance in both cases. Figure 12 demonstrates that the water exchange occurs both in the oscillating–oscillating and oscillatingfixed setups under heave. Whereas this complies with the observation of gap resonance, it is different from the forced sway oscillation case, where gap resonance is only observed when one box oscillates. The peak height in the oscillating–oscillating model is higher as compared to the oscillatingfixed model. This can be attributed to the fact that twin box oscillations convey more kinetic energy and hence more energy into the water. The coupling of the two boxes' heave radiation can induce a more severe gap resonance. From a standpoint of multiple scattering, the waves generated by one box undergo scattering by the other box, resulting in a constructive contribution to the gap waves. Furthermore, in the oscillating–oscillating model, each box effectively assumes a mirroring role, thus causing the amplitudes in Fig. 11(a) to be approximately twice as large to those presented in Fig. 11(b). The observations of relevance to heave and sway motions confirm the strong relationship between the gap resonance and water exchange in and out of the resonance gap. Figure 11(a) shows that the amplitude of wave elevation in the gap is higher than that at the upwind and downwind sides, even when the frequency is outside the resonance region. In contrast, if the oscillation frequency is outside the resonance region in the oscillatingfixed model, the wave elevations have similar amplitudes at both sides of the oscillating box (e.g., G4 and G5) [see Fig. 11(b)]. Hence, coupling of heave radiation from the two boxes increases the wave elevation within the gap.
The behavior of wave elevation induced by roll is like that induced by sway motion of the boxes. The gap resonance only occurs in the oscillatingfixed model, where the wave elevation is more pronounced and exhibits resonance. Conversely, in the oscillating–oscillating model, the wave elevation is milder, and no resonance is observed. Figure 13 displays the nondimensionalized harmonic amplitudes of roll induced wave elevation measured by gauges G1–G5. Figure 14 shows the water swap behavior induced by roll motion. In the oscillating–oscillating model, the water swap is weaker and occurs primarily at two corners of the gap due to flow separation. The flow directions at these corners are opposite for water entering and leaving the gap. In contrast, the oscillatingfixed model exhibits a stronger water swap at the bottom of the gap. The observation furtherly confirms the relationship between the gap resonance and water exchange in and out of the gap.
The total wave elevation in a nondimensional format by the product of roll amplitude and box breadth at five gauges is shown in Fig. 15. Observations align with those in the sway motion case, i.e., the gap wave elevation is smaller than that on the upwind and downwind sides in the oscillating–oscillating model, while the opposite is observed in the oscillatingfixed model. The wave elevation in the oscillating–oscillating model is dominated by the first harmonic, like the sway motion case. However, the influence of roll motion on the wave elevation is weaker, resulting in smaller amplitudes compared to sway motion. The water in the gap oscillates with a sloshing mode in the oscillating–oscillating model, while a piston mode of gap water oscillation is observed in the oscillatingfixed model. This complies with the fluid flow in the vicinity of free surface, as shown in Fig. 14, where the water flows horizontally in the oscillating–oscillating model but vertically in the oscillatingfixed model.
C. Diffraction effects
Figure 16 displays the harmonic amplitudes of wave elevation at gauges G1–G5, normalized by the incoming wave amplitude. These amplitudes are then utilized to derive the total wave elevation amplitudes, along with their first and second harmonic components (see Fig. 17). The first order harmonics predominantly contribute to the wave elevation. This is reasonable, given the linearity of the incoming waves. The second order harmonics generally constitute less than 10% of the total wave elevation, except for cases where the second harmonic component of wave elevation on the upwind side exhibits a higher contribution because of the interaction between incoming and reflected waves (e.g., between 10% and 20% for $ \omega *=0.6,\u20090.7,\u2009and\u20090.8$). Whereas the second harmonic of wave elevation in the downwind side of the gap is weak [see Fig. 17(c)], at $ \omega *=0.7$, it becomes significantly amplified, possibly due to the presence of pronounced gap resonance with a large amplitude (see Fig. 16). Figure 17(a) demonstrates that the wave elevation measurements in the gap align closely with one another. The consistency implies a piston mode oscillation of the free surface in the gap. The pronounced peak in the curve highlights the occurrence of gap resonance at $ \omega *=0.7$, where the amplitude of wave elevation could reach four times amplitude of incoming waves. In contrast, the wave elevation is notably lower at the other frequencies, particularly at $ \omega *=1.0$, suggesting limited diffraction of the shortwavelength waves through the upwind part of the box.
D. Combined radiation and diffraction effects
Figure 18 depicts the nondimensionalized harmonic amplitudes of wave elevation measured at G1–G5 around freeheaving boxes in regular waves. It reveals that the dominant component in the wave elevation at all locations is the first harmonic. Additionally, small peaks representing weak second harmonic components are observed at $ f / f 0=2$ in Figs. 18(b)–18(d), with heights below 0.1. The second harmonic components are induced by the interaction between the incoming and reflected waves. The wave elevation measurements are primarily influenced by the linear characteristics of the incoming waves. Since the incoming waves are linear, it is expected that the wave elevation response would primarily exhibit linear behavior. The heave motion of the boxes also contributes to the measured wave elevation. Figures 19(a)–19(e) present the spectra of the heave motion for the sidebyside boxes. This demonstrates that the heave motions of both boxes are predominantly linear across all frequencies. Therefore, the linear response of the waves around the boxes aligns with expectations. Figure 19(f) compares the heave response amplitude operators (RAOs) of the upwind and downwind boxes induced by the incoming waves obtained from the CFD method and linear potential flow theory. Good overall agreement is observed between the two methods.
Figure 20 presents the nondimensional amplitude of wave elevation measured at G1–G5 around freeheaving boxes. It reveals that the amplitude of upwind waves increases with increasing wave frequencies, while the amplitude of downwind waves decreases with increasing wave frequencies. The observation matches the diffraction theory that the diffracting capability decays along with the increasing frequency. Regarding the wave elevation in the gap, the overlapping curves of wave elevation measured at G2–G4 (see spectra in Fig. 18 and amplitudes in Fig. 20) suggest that the water in the gap oscillates in a piston mode, similar to the fixed–fixed model and forced heaving model. Thus, the coupling of radiation and diffraction does not alter the oscillation mode of water in the gap.
Figure 21 presents a comparison of the wave amplitude between the fixed–fixed and freeheaving model. In general, the heave motion moderates the wave elevation on the upwind side while intensifying the wave elevation in the gap and on the downwind side. This could be attributed to radiation effects, which decrease the wave reflection on the upwind box while increasing the transmission of incoming waves. An interesting observation is that the large amplitude wave elevation in the gap is not observed in the freeheaving model. Conversely, the amplitude at $ \omega *=0.7$, where the gap resonance occurs in the fixed–fixed and forced heaving models, is smaller than that at neighboring frequencies. The relatively mild water oscillations can be attributed to the coupling of diffraction and radiation effects of the boxes.
Figure 22 presents the velocity field in the gap. It indicates that the coupling of incoming waves and the motions of the upwind box generate a largescale vortex in the gap, with a maximum diameter of approximately 60% of the gap width. This largescale vortex hinders the flow in and out of the gap, leading to a mild oscillation of water. Figure 23 illustrates the vorticity contour in the gap during a wave period, showing that the largescale vortex continuously exists with fluctuating strength and dimension. The relative acceleration between the upwind box and surrounding water periodically generates strong vortices at the left corner of the gap, which shed from the box wall and merge into the largescale vortex, maintaining its presence. In contrast, Fig. 24 illustrates the velocity field in the gap of the fixed–fixed model at $ \omega *=0.7$, where the gap resonance occurs. It demonstrates that large vortices only emerge when the flow changes direction and their duration is less than 0.08 period of incoming waves. Furthermore, the intensity of these vortices is much smaller, as shown in Fig. 25. Hence, the influence of flow separation on the water exchange is much weaker in the fixed–fixed model. The acceleration of the downwind box also generates strong vortices at the right corner of the gap, but these vortices slide along the vertical wall of the downwind box and only affect a small region of the gap adjacent to the downwind box. The continuous largescale vortex restricts the exchange of water in and out of the gap, resulting in a tamed wave elevation. This observation emphasizes that the influence of the vortex is not solely dependent on its spatial distribution but also on its temporal distribution.
V. CONCLUSIONS
The paper investigated the wave elevation around two sidebyside boxes by three different models, namely, (1) forced oscillating sidebyside boxes in calm water, (2) fixed sidebyside boxes in regular waves, and (3) free heaving sidebyside boxes in regular waves. Numerical simulations are conducted using a 2D NWT and a CFD RANS method. Five wave gauges are positioned at the upwind side, in the gap, and at the downwind side to measure the wave elevation. The aim is to examine the influence of radiation, diffraction, and their combined effects on the wave elevation around two sidebyside boxes. The following main conclusions can be drawn:

The occurrence of gap resonance may be attributed to the rapid exchange of water in and out of the gap, which is synchronized with its frequency. The intensity of gap resonance can be mitigated by reducing the speed of water exchange. Vortices generated by the relative acceleration between the box and water flow play a role in reducing wave elevation within the gap and by impeding the water exchange process. It is important to note that the influence of vortices is not only spatial but also temporal. If the duration of vortices is significantly shorter than the period of wave elevation within the gap, their impact on the wave elevation will be relatively weak.

The wave elevation in the gap exhibits different sensitivities to the motions of the boxes in various modes. According to the intensity of gap resonance induced by various modes of forced oscillations, the heave motion has the highest influence on the gap wave elevation, while the roll motion has the least impact. The gap resonance can be induced by the heave motion of a single box or the synchronous heave motion of both boxes. On the other hand, the gap resonance occurs only when one box oscillates in sway or rolls. When both boxes sway or roll synchronously, the wave elevation in the gap is mitigated, hence resulting in smaller wave amplitudes as compared to those on the upwind and downwind sides.

When the boxes undergo synchronous oscillations in sway or roll, the water within the gap exhibits a sloshing mode of motion. However, when only one box oscillates in sway or roll or when one or both boxes oscillate in heave, the water within the gap moves in a piston mode.

The heave motion of the boxes has contrasting effects on the wave elevation in regular waves. It decreases the amplitude of wave elevation at the upwind side, while increasing the amplitude at the downwind side. The heave motion generally leads to an increase in the amplitude of wave elevation in the gap. However, the influence of heave motion is significantly influenced by the spatial and temporal distribution of vortices within the gap, which can modify the overall impact on the gap wave elevation.
The results presented are based on a 2D modeling and simulation method. Thus, they are limited to the analysis of sway, heave, and roll motions. Such idealizations cannot fully replicate the complexities of flow physics in way of the gap's horizontal openings. It is therefore recommended that future research will focus on the exploration of the influence of surge, pitch, and yaw motions as well as the fluid flow features associated with gap resonance by threedimensional simulations. Given that the vortices induced by flow separation at the lower corners of the gap play a significant role in the occurrence of gap resonance, in the future it may be valuable to investigate the influence of different gap geometries, e.g., draft and width. The variations in gap draft and width are additional factors that may alter the relative positions of the corners within the gap and consequently affect the distribution of vortices and their impact. Considering the close connection between the gap resonance and the water exchange mechanisms within the gap, it may be worthwhile to investigate the restriction of water exchange and its impact on practical design applications.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Zongyu Jiang: Conceptualization (supporting); Data curation (lead); Formal Analysis (supporting); Methodology (lead); Software (lead): Writing – original draft (lead). Sasan Tavakoli: Data curation (supporting); Formal Analysis (supporting); Methodology (supporting); Supervision (supporting); Validation (supporting); Writing – review and editing (supporting). Pentti Kujala: Conceptualization (lead); Funding acquisition (supporting); Resources (supporting); Supervision (supporting). Spyros Hirdaris: Conceptualization (lead); Funding acquisition (lead); Methodology (supporting); Resources (lead); Supervision (lead); Writing – review and editing (supporting).
DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.