Magnet_Coil

Top  Previous  Next

 

magnet_coil09

{  MAGNET_COIL.PDE 

   **************************************

    AXI-SYMMETRIC MAGNETIC FIELDS

 

This example considers the problem of determining the magnetic vector

potential A around a coil.

 

According to Maxwell's equations,

 

       curl H = J

 

       div B = 0

 

       B = mu*H

 

where B is the manetic flux density

       H is the magnetic field strength

       J is the electric current density

and  mu is the magnetic permeability of the material.

 

The magnetic vector potential A is related to B by

 

       B = curl A

 

therefore

 

       curl( (1/mu)*curl A ) = J

 

This equation is usually supplmented with the Coulomb Gauge condition

 

       div A = 0.

 

In the axisymmetric case, the current is assumed to flow only in the

azimuthal direction, and only the azimuthal component of the vector

potential is present.  Henceforth, we will simply refer to this component as A.

 

The Coulomb Gauge is identically satisfied, and the PDE to be solved in this

model takes the form

 

       curl((1/mu)*curl (A)) = J(x,y)     in the domain

                          A  = g(x,y)     on the boundary.

 

The magnetic induction B takes the simple form

 

       B = (-dz(A), 0, dr(A)+A/r)

 

and the magnetic field is given by

 

       H = (-dz(A)/mu, 0, (dr(A)+A/r)/mu)

 

Expanding the equation in cylindrical geometry results in the final equation,

 

       dz(dz(A)/mu) + dr((dr(A)+A/r)/mu) = -J

 

The interpretation of the natural boundary condition becomes

 

       Natural(A) = n X H

 

where n is the outward surface-normal unit vector.

 

Across boundaries between regions of different material properties, the

continuity of (n X H) assumed by the Galerkin solver implies that the

tangential component of H is continuous, as required by the physics.

 

 

In this simple test problem, we consider a circular coil whose axis of

rotation lies along the X-axis. We bound the coil by a distant spherical

surface at which we specify a boundary condition (n X H) = 0.

At the axis, we use a Dirichlet boundary condition A=0.

 

The source J is zero everywhere except in the coil, where it is defined

arbitrarily as "10".  The user should verify that the prescribed values

of J are dimensionally consistent with the units of his own problem.

 

******************************************************

}

 

title 'AXI-SYMMETRIC MAGNETIC FIELD'

 

coordinates

   xcylinder(Z,R)          { -- Cylindrical coordinates, with cylinder

                                       axis along Cartesian X direction }

 

Variables

   A                           { -- the azimuthal component of the

                                       vector potential }

 

Definitions

   mu = 1                      { -- the permeability }

   rmu = 1/mu

   J = 0                       { -- the source defaults to zero }

   current = 10                { -- the source value in the coil }

   Bz = dr(r*A)/r

 

Initial values

   A = 2                       { -- unimportant unless mu varies with H }

 

Equations

    curl(rmu*curl(A)) = J      { -- FlexPDE expands CURL in proper coordinates }

 

Boundaries

   Region 1

     start(-10,0)

     value(A) = 0                      { -- specify A=0 along axis }

       line to (10,0)

     natural(A) = 0                    { -- H<dot>n = 0 on distant sphere }

            arc(center=0,0) angle 180 to close

 

   Region 2

     J = current                       { -- override source value in the coil }

     start (-0.25,1)

       line to (0.25,1) to (0.25,1.5) to (-0.25,1.5) to close

 

Monitors

   contour(Bz) zoom(-2,0,4,4) as 'FLUX DENSITY B'

   contour(A) as 'Potential'

 

Plots

   grid(z,r)

   contour(Bz)  as 'FLUX DENSITY B'

   contour(Bz) zoom(-2,0,4,4)  as 'FLUX DENSITY B'

   elevation(A,dr(A),A/r,dr(A)+A/r,A+r*dr(A)) from (0,0) to (0,1) as 'Bz'

   vector(dr(A)+A/r,-dz(A)) as 'FLUX DENSITY B'

   vector(dr(A)+A/r,-dz(A)) zoom(-2,0,4,4) as 'FLUX DENSITY B'

   contour(A)  as 'MAGNETIC POTENTIAL'

   contour(A) zoom(-2,0,4,4)  as 'MAGNETIC POTENTIAL'

   surface(A)  as 'MAGNETIC POTENTIAL'  viewpoint (-1,1,30)

 

End