BHalbach:

--------------------------------------------------------------------------
   Computes the B field of a Halbach array.
   d.lA is the length of one cycle of the Halbach array.
   d.nM is the number of magnets per pole.
--------------------------------------------------------------------------
   Form:
   [bX, bZ] = BHalbach( d, x, z )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d             (1,1)   
                          .t (1,1) Distance between magnets in double sided
                                   rotor. If zero assumed single sided
                          .bR (1,1) Magnet remanence (T)
                          .hM (1,1) Magnet thickness (m)
                          .lA (1,1) Pole period (m)
                          .nM (1,1) Number of pieces per pole
   x             (1,n)    x coordinates
   z             (1,m)    z coordinates

   -------
   Outputs
   -------
   bX            (m,n)    X field (T)
   bZ            (m,n)    Z field (T)

--------------------------------------------------------------------------
   Reference: Gieras, J. F., Wang, R. and M. J. Kamper, "Axial Flux
              Permanent Magnet Brushless Machines," Kluwer Academic
              Publishers, pp. 110-111.
--------------------------------------------------------------------------

Children:

Common: Graphics/Mesh2