German tennis player Alexander Zverev entered the third round of the Barcelona Open after defeating Spain's Nicolas Almagro.