#### 2.1. Theoretical Background

For the purpose of the analysis presented in this paper, the method for estimation of wind loads is based on two distinctive approaches that are combined afterwards. Namely, and as previously mentioned, the main idea is to prepare and train associate neural network with input data related to contours of frontal and lateral ship projections from one side and with non-dimensional wind load coefficients as target data from another. However, in order to complete this task, geometrical characteristics of frontal and lateral projections should be available and expressed in terms of different container configurations. Associated wind load coefficients should also be available for each of these configurations. These coefficients can be obtained experimentally in wind tunnels, which presents the first approach, as well as by means of CFD calculations that presents the second one.

In this work, both approaches have been used in order to show how CFD approach can be calibrated and tuned according to available experimental data and how afterwards obtained CFD results can be used for training of selected neural network. However, it is important to point out that both these approaches are very challenging and complex, particularly from the application point of view.

In order to overcome these potential issues, CFD is calibrated with experimental data and after sufficiently well verification, CFD results of wind load coefficients are used for training of simple but yet very powerful generalized regression neural network (GRNN) that has great capabilities in solving problems related to multivariate nonlinear regression [

16]. However, these wind load coefficients, independently on how they are obtained, present only one side of a coin, that is, the target data. On the other hand, input data consist of associated elliptic Fourier descriptors that are used for the mathematical description of outer contours of frontal and lateral projected areas of the ship. The preparation of these input data is based on the methodological approach that was introduced in [

12,

14]. The main idea of this approach lays in a fact that with appropriate mathematical description of frontal and lateral ship projections, sufficiently large amount of information related to geometrical characteristics of various container configurations can be captured. To prepare all the required data for training of selected neural network, there are four sequentially connected parts, as follows.

(1) Acquisition and Processing of Container Ship Images with Various Container Configurations

As described in Reference [

12], all available images are digitally edited and binarized. With image binarization, in which usually the background of the image is white and analyzed object is black, it is relatively easy to detect all boundary pixels that present an outer contour of the analyzed object. In this case, these outer object contours refer to outer frontal and lateral projections of an analyzed container ship with different container configurations of interest.

(2) Feature Extraction of Frontal and Lateral Projections for Various Container Configurations

Once the boundary pixels of outer contours are detected in part (1), these contours can be encoded using some appropriate encoding method. For the purpose of this work, encoding method based on the so-called Freeman chain was used [

17]. Obtained encoding is the basis for mathematical description of closed contours and variety of methods can be applied for this purpose [

18,

19,

20]. However, the method of elliptic Fourier descriptors, introduced by Kuhl and Giardina [

21], was used in this paper. Detailed description of this procedure is presented in [

12,

15].

(3) Data Preparation for the Training of Selected Neural Network

Input data for the training of the GRNN, that is, mathematical description of frontal and lateral ship projections, are prepared using Freeman chain encoding coupled with elliptic Fourier analysis. In terms of different number of harmonics used in this elliptic analysis, better approximation of analyzed closed contour can be obtained but some caution is required in order to avoid undesirable overfitting.

On the other hand, target data, that is, appropriate wind load coefficients, are prepared using both experimental data from wind tunnel tests [

11] and CFD calculations that are performed by the authors of this research. In comparison with the previous work [

12], training of selected GRNN in this research was conducted with results of CFD analyses only, whereas in previous studies training was based only on experimental data.

(4) Cross-Validation and Testing of Trained GRNN

In machine learning, cross-validation is usually performed in terms of k-fold or holdout validation procedures. Considering a small number of container configurations were available for conducting this analysis, k-fold validation approach was used in this research in terms of leave-one-out approach for which k = 1. On the other hand, testing of obtained results were performed in terms of mean values and associated standard deviations of absolute differences of GRNN responses and wind load coefficients obtained by CFD simulations.

#### 2.2. Notation and Reference Frames

In order to define wind loads on an analyzed container ship, two commonly used reference frames are body reference frame {

b} and geographical North-East-Down (NED) reference frame {

n} [

22]. As it can be seen in

Figure 1,

x_{n} and

y_{n} are axes in North and East of {

n}, respectively and

x_{b} and

y_{b} are axes in surge and sway of {

b}, respectively.

Two most important quantities are the wind speed

V_{w} and wind direction

γ_{w} expressed in {

b}. These are usually measured by the wind sensor or anemometer and due to their significant high frequency nature, they should be filtered before any calculation of interest. It should be pointed out that angle

γ_{w} is defined with respect to

x_{b} axis in a counterclockwise direction, while alternative wind angle of attack

α_{w} is defined in {

b} with respect to

x_{b} but in clockwise direction:

If relationship between the meteorological wind angle

β_{w} and the wind angle of attack

γ_{w} is required, then the heading of the ship

ψ, defined in {

n} with respect to

x_{n} axis in a clockwise direction and measured by the means of gyrocompass, should also be introduced. In this case (

Figure 1), all angles of interest are related with the following term:

#### 2.3. Wind Loads on a Ship at Zero Forward Speed

In a simple case of container ship with zero forward speed, the wind loads in surge, sway and yaw axis can be expressed in terms of the non-dimensional wind load coefficients

C_{X}(

γ_{w}),

C_{Y}(

γ_{w}) and

C_{N} (

γ_{w}) as follows:

where

X_{wind},

Y_{wind} and

M_{wind} are wind forces and moment in the horizontal plane,

ρ_{a} is the air density,

A_{L} and

A_{F} are the ship’s frontal and lateral projected areas above the water line, respectively and

L_{oa} is ship’s length over all.

In a case when the ship is moving at some forward speed U different from zero, then terms in Equation (3) should be redefined by introducing relative wind speed and relative wind angle of attack that takes into account ship speed and heading. This is particularly important for any application in open sea-like conditions. However, considering that in this work all the analyses rely on the experimentally obtained results from wind tunnel tests with zero forward speed, there is no need for additional redefinition of the term in Equation (3).

From Equation (3), the non-dimensional wind load coefficients can be easily expressed in terms of wind forces and moment in horizontal plane as follows:

As previously mentioned, these coefficients can be obtained experimentally from wind tunnel tests, using CFD numerical analyses or both of these approaches. Independently of selected approach, wind load coefficients are target data for training of the GRNN and thus the quality of these data are essential for obtaining sufficiently well GRNN responses.

In the forthcoming section, an enhanced methodology approach of wind loads estimation is introduced. The input data are based on the elliptic Fourier descriptors of closed contours of ship frontal and lateral projections for all analyzed container configurations, similarly, like in previous work [

14]. The main difference in comparison with previous proposals is related to the target data, that is, to how they were obtained. In this enhanced approach, the target data consist of wind load coefficients that are determined with CFD calculations for each analyzed container configuration, while in previous work the target data were solely results of the wind tunnel tests.

#### 2.4. Methodological Framework for Wind Loads Estimation Based on CFD, EFDs and GRNN

Valčić and Prpić-Oršić [

12] proposed a novel methodological framework for the estimation of wind loads on different types of ships. As indicated above, this framework is based on Freeman chain encoding, elliptic Fourier analysis and neural networks. In comparison with the originally proposed method [

12], the one used in this paper is slightly enhanced and can be divided into three phases (

Figure 2):

- (i)
Estimation of wind load coefficients by CFD simulations;

- (ii)
Deployment of the model based on CFD results, EFDs and GRNN;

- (iii)
Cross-validation of GRNN responses, GRNN testing and further application of developed neural network model.

In the first phase, CFD analysis and simulations are used in order to estimate wind load coefficients for various container configurations on deck. Available experimental results are used for calibrating CFD model and for additional verification.

Afterwards, during the second phase, associated database for training, cross-validation and testing of neural networks should be prepared and built. As indicated above, training input data should be prepared so the Freeman chain encoding can be performed smoothly without considering too much image details. In this way, undesirable overfitting during NN training can be also easily avoided.

Freeman chain encoding for some simple container vessel is visually presented in

Figure 3. As it can be seen, after the binarization of ship frontal and/or lateral projection image, the chain encoding can be performed from any arbitrary starting point, which is indicated with the yellow square in this case. On the other hand, all grey squares present pixels of the image. Encoding can be done either in clockwise or counterclockwise direction, as described in Reference [

14].

When the chain codes are obtained for all frontal and lateral projection images, they can be further used for calculation of associated elliptic Fourier descriptors, as described in detail in [

12,

14]. However, it should be noted that frontal and lateral projections are analyzed independently, which means that each projection, that is, outer closed contour for each projection, should be described with associated ordered quadruples of elliptic Fourier descriptors that can be written as (

a_{n},

b_{n},

c_{n},

d_{n}), where

n = 1, 2, …,

N and

N indicates the number of harmonics in the Fourier expansion. As mentioned above, the Fourier expansion is based on the approach introduced by Kuhl and Giardina [

21].

The larger

N yields better fitting of closed contour but also invokes possible overfitting issues. In this context,

Figure 4 shows the ship contour (blue line) in comparison with the contours that are based on different number (

N = 1, 10, 100 and 500) of harmonics (red line) in Fourier expansions. It can be noticed that contour of interest, even if it is relatively complex in geometrical sense, can be sufficiently well fitted with approximately 100 harmonics.

Developed GRNN model presents a multi-variate non-linear mapping of the form:

that is, the mapping of frontal and lateral contours described by EFDs to wind load coefficients determined by CFD simulations.

Once the wind load coefficients are estimated based on Equation (5), wind forces and moment in the horizontal plane can be easily calculated based on Equation (3). This can be also seen in the last application phase (

Figure 2).