## 1 Introduction
[PERSON] _et al._ (2018) investigated the effect of shallow water on the total resistance of the solar catamaran by performing CFD simulations in deep and shallow water. The authors conducted a detailed analysis of the flow around the catamaran. The results showed that the total resistance of the catamaran increases due to shallow water and the wave pattern is altered. [PERSON] et al. [PERSON] _et al._ (2018) investigated numerically the total resistance and wave characteristics of a ship for inland navigation in a restricted waterway. The results of numerical simulations were validated against experimental data while considering all constraints of the restricted waterways. The contemporary approaches for predicting a ship's total resistance include experimental testing and numerical methods. Experimental tests conducted in towing tanks are time-consuming and expensive, but when combined with numerical methods, they provide a comprehensive understanding of the ship's hydrodynamic characteristics. Numerical methods have proven to be more practical for ship design and optimization. CFD is a numerical method that offers a detailed insight into the flow around a ship's hull compared to experimental testing. Within CFD, there are several approaches to solving the mathematical model, the most common being the RANS equations, which allow for solutions of satisfactory accuracy within a reasonable time frame [PERSON] _et al._ (2018). [PERSON] et al. [PERSON] _et al._ (2018) demonstrated the importance of employing CFD to enhance extrapolation methods. The authors highlighted the advantages and limitations of extrapolation methods and compared results obtained using four turbulence models. [PERSON] et al. [PERSON] _et al._ (2018) investigated the squat of the KCS ship model by gauging the ship's sinkage and trim. They varied the width of the channel, thereby studying the blockage effect. Conducted studies have shown that the channel width has no significant impact on the squat of the ship. [PERSON] et al. [PERSON] _et al._ (2018) examined not only the influence of shallow water but also the channel width on ship resistance. The authors conducted numerical simulations using RANS equations and investigated several channels of different shapes and widths. The results showed that the narrower the channel, the greater the increase in total resistance, and that the total resistance depends on the channel shape. [PERSON] and [PERSON] [PERSON] and [PERSON] (2018) examined how shallow water affects the total resistance of the ship at different speeds, employing a RANS solver within the Fluent software package. The authors concluded that by using CFD, satisfactory predictions of the total resistance and wave patterns in shallow water can be achieved. In this paper, the numerical simulations with and without the free surface effects were carried out using two turbulence models to assess the effect of trim on the total resistance and its components in shallow and confined water. The flow around the hull in shallow and confined water is significantly altered in comparison to the flow in unrestricted water, and the adjustment of trim could lead to a significant reduction in the total resistance and thus improvement of the ship's energy efficiency. Numerical simulations are performed for an even keel and four trims at one Froude number. Numerical uncertainty for the total resistance, sinkage, and trim is assessed using different grid resolutions and time steps. The obtained numerical results are validated against the experimental data available in the literature. A detailed analysis of the wave patterns, distribution of hydrodynamic pressure and wall shear stress is presented. The remainder of the paper is structured as follows: the case study is introduced in Section 2. Section 3 provides the mathematical model, while Section 4 outlines the numerical setup of the CFD simulations. The depiction and analysis of the results are presented in Section 5, while in Section 6, the conclusions drawn from the conducted study are given.