Numerical simulations of the pendulum dynamics in a fluid