Periodic solutions for a class of nonlinear partial differential equations in higher dimension