In this paper, we propose a second order penalized direct forcing method to deal with fluidstructure interaction problems involving complex static or time-varying geometries. As this work constitutes a first step toward more complicated problems, our developments are restricted to Dirichlet boundary condition in purely hydraulic context. The proposed method belongs to the class of immersed boundary techniques and consists in immersing the physical domain in a Cartesian fictitious one of simpler geometry on fixed grids. A penalized forcing term is added to the momentum equation to take the boundary conditions around/inside the obstacles into account. This approach avoids the tedious task of re-meshing and allows us to use fast and accurate numerical schemes. In contrary, as the immersed boundary is described by a set of Lagrangian points that does not generally coincide with those of the Eulerian grid, numerical procedures are required to reconstruct the velocity field near the immersed boundary. Here, we develop a second order linear interpolation scheme and we compare it to a simpler model of order one. As far as the governing equations are concerned, we use a particular fractional-step method in which the penalized forcing term is distributed both in prediction and correction equations. The accuracy of the proposed method is assessed through 2-D numerical experiments involving static and rotating solids. We show in particular that the numerical rate of convergence of our method is quasi-quadratic.