## 3 Ship Motion Data  
In this study, the motion of ships in irregular waves is simulated by the CFD method. The time-history data of the ship motion and wave elevation at different positions on the ship's side are obtained for the study of the short-term prediction of ship motion. The test ship is DTMB5415 with scale ratio of \(1/51\). The ship parameters are listed in Table 2. The simulated working condition is the roll and heave motion of the ship with zero speed in the beam wave sea state of level five. The sea wave spectrum adopts the Pierson-Moskowitz spectrum. The significant wave height at the model scale is 0.078 m. The average wave period is 0.98 s.  
The CFD solver is STAR-CCM+. The computation model is based on solving the Reynolds time-averaged Navier-Stokes (RANS) equation combined with the shear stress transport (SST) \(k\)-\(\omega\) formulation. The interface of water and air is captured using the volume of the fluid method with a second-order high resolution interface capturing (HRIC) scheme. The mesh updates caused by the ship motion are processed using the dynamic  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Full Scale** & **Model Scale (1/51)** \\ \hline Water line (m) & 142.18 & 2.79 \\ Breadth (m) & 19.06 & 0.37 \\ Draft (m) & 6.15 & 0.12 \\ Displacement (m\({}^{3}\)) & 8424 & 0.0635 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Ship information.  
Figure 2: LSTM input and output data mapping diagram.  
overlapping mesh technology. An irregular wave is generated through the velocity entry boundary condition. A damping source method is used to eliminate the reflection of waves from the open boundary. The time stepping method is a second-order implicit scheme. The algorithm of the semi-implicit method for pressure-linked equations (SIMPLE) is used to couple the pressure and velocity fields. The computational grid is generated by the trimmer mesher. The boundary layer of the hull surface is divided by a prism layer grid. The thickness of the first layer of the grid adjacent to the hull surface is 2 mm, to ensure that the Y+ value on the ship's wetted surface is within 100. In order to ensure the accuracy of the wave surface generation and propagation, the grid in the vicinity of the wave surface is refined along the wave height and wavelength directions. The numbers of grid per average wave height and per average wavelength is 6 and 40, respectively. In addition, the local refinement of the grid is performed around the border area between the background grid and the overlapping grid. The computational time step is 0.001 s, approximately 1/1000 of the average wave period.  
There are four groups of monitoring data in the CFD simulation. One group is the ship roll motion data. Three groups are the wave elevation data at the position 1 m, 3 m, and 5 m away from the ship side in the direction of the incoming wave. Figure 3 shows the ship rolling time-history. Figure 4 shows the wave elevation time-history at the position of 3 m away from the ship's side. The number of simulation data in each group is 5000. The sampling interval is 0.04 s. The total duration is 200 s. The first 4000 data are selected for model training data. The data for model validation start from the 4500 th component.  
Figure 4: Time series of wave elevation obtained by CFD simulation (wave probe 3 m from ship).  
Figure 3: Time series of roll motion obtained by CFD simulation.