We propose a comprehensive numerical procedure to calculate the hydrodynamic coefficients of a moving body with NACA0012 hydrofoil by means of Computational fluid dynamics (CFD). To accomplish maneuverability study and dynamic analysis of an Autonomous underwater vehicle (AUV), these hydrodynamic coefficients were obtained by finding the body hydrodynamic responses to some specified time variant motions. Here, on the basis of linearized equations of motion in which the hydrodynamic coefficients appear explicitly, three distinct oscillating maneuvers are proposed. To obtain the hydrodynamic responses of the moving body, a CFD method based on Reynolds averaged Navier-Stokes (RANS) equations was used with dynamic mesh technique to simulate the specified maneuvers. To verify the numerical scheme, the computational results were then validated by comparison with experimental data. Hydrodynamic coefficients were calculated from resulting hydrodynamic loads. Finally, the effects of oscillating motions frequency and amplitude variations on the hydrodynamic coefficients were investigated.