Upload
leah-klein-borden
View
61
Download
0
Embed Size (px)
Citation preview
1
MagneticFieldReportLeahKleinBordenGraduatestudentmentor:InduVenugopalPI:Prof.AndreasLinningerLinningerResearchGroupSubmissiondate:5/10/16
2
INTRODUCTION
Generationofamagneticvectorpotentialfield(A)andmagneticfluxdensity(B)fromasinglepointsourceofcurrentdensityinvacuum
OutlineTheaimofthisreportistowriteaMATLABprogramtounderstand,programandvisualizethegenerationofamagneticfieldfromasinglepointsourceofcurrentdensityinvacuuminathreedimensional space. Several such current density sources (from unpaired electron spins offerromagneticatoms)whenreinforcedcangeneratethemagneticfieldofapermanentmagnetRelevantBackgroundandMethodologyMaxwell’sequationsTheclassicalproblemofmagnetostaticfieldtheorystartswiththeMaxwell'sequations:
∇×H = J(1a)B = µH(1b)∇ ⋅ B = 0(1c)
whereHisthemagneticfieldstrengthBisthemagneticfluxdensityJisthecurrentdensitythatgeneratesthemagneticfieldµ is the magnetic permeability which is a function of the magnetizing material underconsiderationThusthegradientoperator∇isdefinedas
∇=ddx ,
ddy ,
ddz
Relationshipofthemagneticfluxdensity(B)tothemagneticvectorpotential(A)Intheclassicalvectorpotentialapproach,thesystemofthethreeequations(1a-c)canbefurthersimplifiedbytheintroductionofanauxiliaryvariablevectorA(representingthemagneticvectorpotential)whichisrelatedtoB(magneticfluxdensity)bytheequation:
∇×A = B
3
Thisequationindicatesthatthecurlofthemagneticvectorpotentialfieldgivesusthemagneticfluxdensityfield(B).ThecurlofthevectorA isthevectorBthatpointsalongtheaxisoftherotationofvectorAandwhoselengthcorrespondstothespeedoftherotationofA.SupposetheAfieldhasthreecomponentsinx,yandzdirectionsgivenbyAx,AyandAzrespectively,then
∇×A = B =dAzdy −
dAydz i +
dAxdz +
dAzdx j +
dAydx +
dAxdy k
Equation(1c)isnowautomaticallysatisfiedbytheidentity
∇. ∇×A = 0
Relationshipbetweenthesourcecurrent(J)andthemagneticvectorpotential(A)Now,oneliminatingBandHfromequations(la)and(1b)wehavethegoverningvectorpotentialequationintermsofonlythemagneticvectorpotential:
∇×78(∇×A) = J(1d)
Proofthat𝛁 ⋅ 𝐁 = 𝟎forany𝐁 = (𝛁×𝐀)LetB = (b1b2b3);∇ ⋅ B = FG7
FH+ FGI
FH+ FGJ
FH
b1b2b3 = (bI7z − bJ7ybJ7x −b77zb77y −bI7x)∇ ⋅ B = bI7z − bJ7y + bJ7x −b77z + b77y −bI7x =0
4
PARTA:Relationshipbetweensourcecurrent(J)inonedirection(z)andthemagneticfield(B)InthreedimensionsanynumericalformulationmustsolveforallthreecomponentsofB.Intwo-dimensionalplaneproblemsitis,however,assumedthatthexandycomponentsofthecurrentdensityvectorJcanbeassumedtobezero.Therefore,JX=JY=O.ThecurrentdensityvectorJcanbethoughtofasaninfinitelylongwireinthez-direction(JK).ThisimpliesthattheresultingmagneticfieldBmustbesymmetricalongthez-direction.
LetB = (b1b2b3)Therefore,FG7
FK= FGI
FK= FGJ
FK= 0(1g)
Also,J = ∇×B = (00JK)ThisimpliesthatFGJ
FH= FGJ
FL= 0(1h)
Equations1gand1himplythatb3=0B = b1b20 àBliesinaplanarx-yfield
∇×B = (00JK)Thiscanbereducedto b11x+b21y=0 (1i) b11y+b21x=Jz(1j)
IntroductionofscalarfieldΦ
LetΦbeascalarfieldwith∇Φ=(ΦXΦY)suchthat b1=ΦYandb2=-Φx
Hence,b1x=Φyxb1y=Φyyb2y=-Φxyb2x=-Φxx
Substitutinginequations1iand1j,wegetΦyx-Φxy=0(1k) Φyy+Φxx=Jz(1l)
Equation(1l)isasimplediffusionequationthatwehaveattemptedtosolveviaMATLAB
5
SimulationParametersandMethod
A 2D Cartesianmesh of 21 elements was used to generate the vacuum space in which thecomputationswereperformed.Aconstantcurrentdensitysource(JK)of10000A/m2
wasappliedatthecenterofthismeshinthe‘z’direction(noxandycomponents).Thisactedasasourceterm.ThisgeneratesthescalarfieldΦ,asdeterminedinequation1j.
Initializationconditions-Internalvacuumarea:TheinitialvalueoftheΦfieldinalltheelementswassetto0.Theinitialcurrentdensitytermwasappliedatasingleelementatthecenterofthemesh.Thisactedasasourceterm.-Boundaryconditions:TheboundariesvalueoftheΦfieldwassetto0.ThisrepresentedtheΦfieldvalueatinfinity(whichisassumedtobezero).Assumptions1.TheboundariesregionofthemeshrepresentsaninfinitedistanceatwhichΦ fieldvalueisequaltozero.2.Themagneticpermeabilityofvacuum(µ0)is1.25x10-6N·A−2.3.Eachelementhasauniformdimensionof1mmx1mm.
6
Results
ThecodegivenintheappendixsectiongeneratesthescalarfieldΦ.Φ-field
Ascanbeseenfromfigure2,themagnitudeoftheΦfieldvalueisthehighestatthecenterofthemeshclosesttothecurrentdensitysourceandgraduallydecreasesandreachesaverysmallvalueattheelementsclosesttotheboundaries.
Figure2:ThemagnitudeoftheΦfield(highestatcenteranddecreasestowardstheborder)TheΦfieldproducedasaresultofthecurrentdensityvectorinthezdirectionisnotadiracdeltafunction.Onreducingthemeshsizebyhalf,1/10thand1/100thtimes,theΦfielddoesnottendtobecomeadiracfunction,asshownintheimagesbelow–
ThisisbecausetheΦfieldisaobtainedfromadiffusionequationfromthecurrentsourceatthecenterofthemesh.
Figure3:PlotshowingthemagnitudeoftheΦfieldwithmeshsizesof0.5mm,0.1mmand0.01mm(lefttoright)respectively
7
Gradientofscalarfield(𝛁Φ)
Figure4:Vectorplotofthe𝛁Φfieldandcontourplotofthemagnitudeofthe𝛁Φfield
Magneticfluxdensityfield(𝐁field)
Figure5:Vectorplotofthe𝐁fieldandcontourplotofthemagnitudeofthe𝐁field
8
Obtainingthe𝐀fieldWeknowthat∇×A = 𝐵Therefore,
(dAz/dy)–(dAy/dz)=Bx=dΦ/dy(dAx/dz)–(dAz/dx)=By=-dΦ/dx
Weknowthatour𝐵fieldliesinthex-yplane.Therefore,bydefinition,theAfieldneedstolieinthezplane.
Thisimpliesthattheterms(dAy/dz)and(dAx/dz)arezero.Therefore,weobtaintheresult-
A=(00Az)=(00Φ)
Therefore,plotofAfieldwouldbethesameasplotofgradientoftheΦfield.
Magneticvectorpotentialfield(𝐀field)
Figure6:Vectorplotofthe𝐀fieldandcontourplotofthemagnitudeofthe𝐀field
ANN⃑ . 𝐵N⃗ = 0 AxBx+AyBy+AzBz=0WeknowthatBz=0andBx&By≠0
AxBx+AyBy=0OnesolutionforthisisAx=Ay=0,whichcorroboratesourunderstandingoftheANN⃑ field
9
MATLABCODEFORGENERATINGTHEAandBfields
%GeneratingPhifieldclearcloseallclcmSize=22;MPI=zeros(mSize,mSize);%(magneticpole1fornorthand0forsouth)MPO=zeros(mSize,mSize);dx=1;%Valueofdxwaschangedto(.5mm,.1mm,.01mm)toverifythiswasnotadiracfunctiondy=1;%Valueofdywaschangedto(.5mm,.1mm,.01mm)toverifythiswasnotadiracfunction%(eistheCoulomb'sconstant(ke)whichisaproportionalityconstinequationsrelatingelectricvariablesandisexactlyequaltoke=8.9875517873681764×10^9N·m2/C2(i.e.m/F).%thr-referstothreshold)e=9e10;thr=1000;%thresh-holdwhile(e>thr)fori=2:mSize-1forj=2:mSize-1if(i==11&&j==11);MPO(i,j)=1e4;else[a1,a2,a3,a4,a5,a6]=computecoefficients(i,j);MPO(i,j)=((a4*(dx/dy)*MPI(i,j-1))+(a2*(dx/dy)*MPI(i,j+1))+(a1*(dy/dx)*MPI(i-1,j))+(a3*(dy/dx)*MPI(i+1,j)))/a5;endendende=max(max((MPI-MPO).^2));MPI=MPO;end%PlottingPhifieldW=MPO;U=zeros(mSize,mSize);
10
V=zeros(mSize,mSize);[X,Y]=meshgrid(0:21,0:21);Z=zeros(mSize,mSize);%2Dquiver(X,Y,W,Z);holdonsurf(X,W);%cangraphonlyagradientfield(quiver)orasurface(surf)atatime.Muteeithercommandbasedondesiredresult.holdon%3D,cangrapheithera2Dora3Datatime.Muteeitherthe2Dorthe3Ddependingonpreference.quiver3(X,Y,U,V,W,Z);holdonsurf(X,Y,W);%cangraphonlyagradientfield(quiver)orasurface(surf)atatime.Muteeithercommandbasedondesiredresult.holdon%PlottingthegradientofPhifield[FX,FY]=gradient(W);figure()quiver(FX,FY)contour(FX,FY)%cangraphonlyagradientfield(quiver)orcontouratatime.Muteeithercommandbasedondesiredresult.%PlottingMagneticfluxdensityfiled(BField)[FX,FY]=gradient(W);figure()quiver(FY,-FX)%contour(FY,-FX)%cangraphonlyagradientfield(quiver)orcontouratatime.Muteeithercommandbasedondesiredresult.%Functionusedforcomputingcoefficientsfunction[a1,a2,a3,a4,a5,a6]=computecoefficients(i,j)
11
a1=1;%Na2=1;%Ea3=1;%Sa4=1;%Wifi==2;a1=a1*2;endifi==20;a3=a3*2;endifj==2;a4=a4*2;endifj==20;a2=a2*2;enda5=a1+a2+a3+a4;a6=0;%if(i==50&&j==50);a6=1000;end
12
Tabledescribingthecomparisonbetweenelectrostaticsandmagnetostatics
Equation MAGNETOSTATICS ELECTROSTATICSPotential MagneticScalar
potentialφmMagneticVectorpotentialA
ElectricScalarpotentialφorV
Poisson’sEquation ∇Iϕ = −RST,whereρVisthefree
chargedensity∇IA = −µoȷ
H = −∇ϕ(outsidemagnet) E = −∇ϕ ∇ 7
8∇Az = Jz(insidemagnet)
(atallpoints) Theorem(differentialform) Ampere’slaw: B. dl = ∇×
B. ds = µoIGauss theorem: ϕ=E. dA = ]^
T_
Theorem(integralform) ∇×A = B,∇. B = 0,∇. A = 0
∇×E = 0,∇. E = R
T_
Gauge Transformation gauge for thescalarpotential
transformation ,leavestheelectricfieldinvariant
transformation ,leavesthemagneticfieldinvariant
PotentialEnergy U = −pE U = −µBForceLaw BiotandSavart’sLawB = 8_
bc⨜eFf×g
ghCoulomb’sLawE = 7
bcT_j⃒⃒gh
Mainthreevectors B,M,H E,D,PTheirrelationship B = µ(H + M) D = εoE + PAnalogyinvectors Bassociatedwithall
currents,Hassociatedwithtruecurrents,Massociatedwithmagnetizingcurrents
Eassociatedwithallcharges,Dassociatedwithfreecharges,Passociatedwithinducedcharges
Boundaryconditionsattheinterfacebetween2media
ThetangentialcomponentofE&thenormalcomponentofDarecontinuousacrosstheboundary.
TangentialcomponentofH&thenormalcomponentofBarecontinuousacrosstheboundary