﻿ Sample Problems > Applications > Magnetism > magnet_coil

# magnet_coil

Navigation:  Sample Problems > Applications > Magnetism >

# magnet_coil

{ 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

{ Cylindrical coordinates, with cylinder axis along Cartesian X direction }

xcylinder(Z,R)

variables

Aphi       { 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*Aphi)/r

initial values

Aphi = 2           { unimportant unless mu varies with H }

equations

{ FlexPDE expands CURL in proper coordinates }

Aphi : curl(rmu*curl(Aphi)) = J

boundaries

region 1

start(-10,0)

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

line to (10,0)

natural(Aphi) = 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(Aphi) as 'Potential'

plots

grid(z,r)

contour(Bz) as 'FLUX DENSITY B'

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

elevation(Aphi,dr(Aphi),Aphi/r,dr(Aphi)+Aphi/r,Aphi+r*dr(Aphi))

from (0,0) to (0,1) as 'Bz'

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

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

contour(Aphi) as 'MAGNETIC POTENTIAL'

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

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

end