We will present a combined numerical approach to capture most of these remaining effects. In a first step, a nonlinear Rankine source method will predict squat and trim for a ship in a channel. In a second step, a RANSE solver will use a grid for a ship fixed at the predicted squat and trim. The lateral extent of the grid will be considerably smaller than the actual channel. The velocities at the lateral boundary of the RANSE computational domain will be determined by the Rankine source code. However, the free-surface elevation will still be neglected assuming a flat undisturbed surface instead.

The flow is assumed to be symmetrical with respect to the hull center plane coinciding with the center plane of the channel. The problem is solved in two steps. In the first step, the inviscid free-surface flow in the channel is computed by a Rankine singularity method (RSM). Linear source panels are distributed above a finite section of the free surface. The panels are numerically evaluated by approximating them by a four-point source cluster, [24]. On the hull and the channel side wall, higher-order panels (parabolic in shape, linear in strength) are distributed. Mirror images of the sources at the channel bottom enforce that no water flows through the channel bottom. The nonlinear free-surface boundary condition is met in an iterative scheme that linearizes differences from arbitrary approximations of the potential and the wave elevation, Fig.1, [12]. The radiation and open-boundary conditions are enforced by shifting sources versus collocation points on the free surface. [25] gives more details on the method.

We describe now the automatic grid generation for the free-surface grid. The base 'wave length' is taken as The upstream end of the grid is 1.5 · max(0.4*L*_{pp}*,*λ) before FP for shallow water. (For infinite water, the factor is 1.0 instead of 1.5). The downstream end of the grid is max(0.6*L*_{pp}*,*λ) behind AP. The outer boundary in transverse direction *B*_{G} is 0.35 of the grid length for unlimited flow, but taken at the channel wall (0.8*L* in our case) for a ship in a channel. The intended number of panels per wave length is 10. The intended number of panels in transverse direction is (*B*_{G}–Δ*x*)/(1.5Δ*x*)+1, where Δ*x* is the grid spacing in longitudinal direction. However, if the intended number of free-surface panels plus the number of hull panels exceeds 2500, the grid spacing in *x-* and *y*-direction is increased by the same factor until this condition is met. The innermost row of panels uses square panels, the rest of the panels is rectangular with a side ratio (Δ*y*/Δ*x*) of approximately 1.5. The panels follow a 'grid waterline'. This is the upper rim of the discretized ship (1.5m above CWL in our case) which is modified towards the ends to enforce entrance angles of less than 31°. The channel wall grid follows the free-surface grid in longitudinal direction. In vertical direction the number of panels is the next integer to (*h*–Δ*x*)/(2Δ*x*)+1, but at least two. The uppermost row uses square panels. The free-surface panels are desingularized by a distance of Δ*x*.

In a second step, the viscous flow around the ship is solved. The ship is assumed fixed at the squat calculated in the first step. The deformation of the water surface is neglected and the water surface substituted by a flat symmetry plane. The computational domain does not extend in lateral direction to the channel walls. Instead, the inviscid velocities of the first step are taken as boundary condition on the lateral boundary. The RANSE solver is based on Kodama's method, [26]. It solves the continuity equation including a pseudo-compressibility term and the three momentum equations for incompressible turbu-