The problem of two-dimensional magnetic field during the calculation in electromechanical systems comprising a ferromagnetic body with nonlinear magnetic characteristics is described. New geometric patterns in the form of block finite and infinite elements of arbitrary shape are proposed to be used in the simulation of magnetic field in a piecewise homogeneous medium electromechanical systems, in which an error can be controlled to perform the linearization of the material characteristics of ferromagnets. Two scalar potentials are used to find the field. Potentials form a complex magnetic potential, which is defined on the boundaries of block elements. Cauchy's integral formula is used for the purpose. The system of algebraic equations for the nodal values of the potentials on the boundaries is solved using the software developed by minimizing the functional errors. The results of the simulation of the magnetic field of the induction motor with a complicated geometry of magnetic systems are shown. The proposed method allows simplifying and improving the accuracy of calculation of the magnetic field in the design of electromechanical systems containing moving ferromagnetic elements.