Evaluating the Discrete Fourier Transform in Maxwell 2D


    • vmassana


      I have made the design of an electromagnetic quadrupole in Maxwell 2D. The profile of the poles is composed of segments whose coordinates (xn, yn) are expressed as variables. So far no problem. As I have to leave a minimum vetical gap, the profile cannot be completely hyperbolic.

      The objective is to maximize the coefficient b2 (quadrupole component) of the Fourier transform by taking the components Bx and By of the magnetic induction field along a circle of radius R. This circle is also defined outside the model to work with it in the post-processor.

      My question is, how should I express the cost function to maximize the b2 coefficient?

      Thank you very much in advance.


    • GLUO
      Ansys Employee
      Hello @vmassana Could you share more information about your question? Like a screenshot of the model would be helpful.

      Thanks GLUO
    • Valentí Massana

      Hi Genyi,

      Thank you for your interest. As of today I have the result of this question and let me expose here the solution that I have found (surely there is more than one).
      The interest of the problem was to do the DFT (Discrete Fourier Transform) from the Cartesian components of the magnetic induction field, Bx and By, on a circle of radius R (drawn outside the model). Let's say we take 16 points on that circle (the number of points must always be of the type 2^n).
      Also, mention that in a "pure" quadrupole only the Fourier component b2 should survive, and that the allowed components are b6, b10, b14, etc... The others are "forbidden" by symmetry.
      The point is that to construct a cost function to minimize, for example, the harmonic b6 from the Cartesian components Bx and By, we have to keep in mind that in the analysis of the harmonics of the field, the angular dependence of the harmonic j goes as Exp[i (j-1) k*phi/N], where k=0,1,2....N-1. 
      Thus in our case:
      where By(p1), By(p2), ... refers to the value of By at the point p1, p2, around the circle of radius R. Say that 3 of the 16 terms are directly zero.
      In the case of wanting to minimize b10: summation of [Cos[(k - 1)*18π/16], k=0,1,2....N-1.
      Solution: My idea was to first define in "Field overlays->Calculator" the values By(pn) and then construct the cost function as a sum of j terms, as I have previously defined the harmonic b6. And minimize this function.
      This way of solving the problem worked for me, I don't know if it is possible to use in Ansys other simpler solving methods.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.