This study presents the implementation of a tailored ghost cell method in Hydro3D, an open-source large eddy simulation (LES) code for computational fluid dynamics based on the finite difference method. The former model for studying the interaction between an immersed object and the fluid flow is the immersed boundary method (IBM) which has been validated for a wide range of Reynolds number flows. However, it is challenging to ensure no-slip and zero gradient boundary conditions on the surface of an immersed body. In order to deal with this, a new sharp-interface ghost-cell method (GCM) is developed for Hydro3D. The code also employs a level-set method to capture the motion of the air-water interface and solves the spatially filtered Navier-Stokes equations in a Cartesian staggered grid with the fractional step method. Both the new GCM and IBM are compared in a single numerical framework. They are applied to simulate benchmark cases in order to validate the numerical results, which mainly comprise single-phase flow over infinite circular and square cylinders for low- and high-Reynolds number flows along with two-phase dam-break flows with a vertical cylinder, in which a good agreement is obtained with other numerical studies and laboratory experiments.