A numerical model based on two-dimensional shallow water equations is presented. The depth-averaged velocity components with free-surface elevation have been used as independent variables in the model. The finite element technique is applied to discretize the spatial derivatives. Triangular elements with quadratic and linear interpolating functions are employed for two horizontal velocity components and the free-surface elevation, respectively. The standard Galerkin method is applied for discretization of the governing equations. Time discretization is performed using an implicit scheme. The resulting linear system of equations is solved by the GMRES method. The model is validated using three test cases and the results are compared with an analytical solution, the result of numerical work and experimental data, respectively. Favorable agreement was achieved in all three cases. Subsequently, the developed model is applied to simulate free-surface elevation through a channel contraction. The effects of width of the narrow section as well as the profile of the cross section of the channel on the wave forces exerted on a circular cylinder were studied. This was done in a channel with a quartic narrow section. Plots of time histories of the drag coefficient on the cylinder were produced, demonstrating the effects of the mentioned parameters.