Title 'A PERMANENT-MAGNET PROBLEM'
Variables
A
Definitions
mu = 1
S = 0
Px = 0
Py = 0
P = vector(Px,Py)
H = (curl(A)-P)/mu
y0 = 8
Materials
'Magnet' : Py = 10
'Other' : mu = 5000
Initial values
A = 0
Equations
A : curl(H) + S = 0
Boundaries
Region 1
start(-40,0)
natural(A) = 0 line to (80,0)
value(A) = 0 line to (80,80) to (-40,80) to close
Region 2
use material 'Other'
start(0,0)
line to (15,0) to (15,20) to (30,20) to (30,y0) to (40,y0) to (40,40)
to (0,40) to close
Region 3
use material 'Magnet'
start (0,0) line to (15,0) to (15,10) to (0,10) to close
Monitors
contour(A)
Plots
grid(x,y)
vector(dy(A),-dx(A)) as 'FLUX DENSITY B'
vector((dy(A)-Px)/mu, (-dx(A)-Py)/mu) as 'MAGNETIC FIELD H'
contour(A) as 'Az MAGNETIC POTENTIAL'
surface(A) as 'Az MAGNETIC POTENTIAL'
End