Modeling the dynamics of a spar-type floating offshore wind turbine