Ships and marine structures, such as oil tanker, offshore platforms, etc., usually face extreme seaway environment in real situation. If under the action of strong waves large amplitude motions will occur, with the result that they may not work as usual or even lose stability. Thus, it is of great importance to access their dynamic responses under such bad conditions at the initial design stage, so as to ensure normal usage and safety. Herein, the original RANS (Reynolds-Averaged Navier- Stokes) solver based on OpenFOAM Toolbox has been extended to predict dynamic responses of ships and marine structures in waves. A new “inlet-velocity boundary condition” was implemented to generate waves. A damping term for wave absorption was added to the right-hand side of RANS equations in order to avoid wave reflection from the boundary where waves leave the computational domain. The related numerical methods are described in this paper. The purpose of this paper is to present a validation of the approach used. The prediction of the dynamic response of a ship in head waves was the focus. Five cases with different wave lengths and heights were considered. The predicted results, i.e. time histories of total resistance, heave and pitch, were compared with available experimental data and analysed. In addition, due to current experience it is very necessary that effort is devoted to determining appropriate grid and time step, so as to ensure the quality of waves generated.