Periodic boundary conditions are a set of boundary conditions that are often used to simulate large periodic structures by analysing an elementary cell. To enforce these boundary conditions over the side surfaces, the classical method requires identical meshes on opposite faces. This condition is not always easy to satisfy for arbitrary meshes. In this study, the authors introduce a new method to impose the periodic boundary conditions on an arbitrary mesh in the finite-element method using the second-order Whitney elements. This method is applied for computing the magnetic induction and it is based on two steps. The first one consists in expressing the magnetic induction flux through a facet (triangle) on a face as a function of the flux of the associated facets on the opposite face. In the second step, the periodic relations are introduced in the finite-element system. To show the effectiveness of the proposed method, the numerical results are presented and compared with those of the classical method.