当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《电动力学》学生课堂报告_关于利用Mathmatica工具数值计算并图形展现电磁场的课堂报告

资源类别:文库,文档格式:PDF,文档页数:14,文件大小:1.36MB,团购合买
点击下载完整版文档(PDF)

DEMONSTRATION PLOT n1}=P1ot[ Besse1J[1,x],x,0,30}] 0.2 Out[1= n(2]:= Plot3D[isin[x], Cos [x]1,[x,0, 2 Pi), y, 0,2 Pi], Plotstyle -IRed, Blue]] n3}=P1ot3D[sqxt[1-x^2-y^2],{x,-1,1},{Y,-1,1},Mesh→8, ColorFunction - Hue, Meshshading -[[Yellow, Orange],[Pink, Red]1]

DEMONSTRATION PLOT In[1]:= Plot@BesselJ@1, xD, 8x, 0, 30<D Out[1]= 5 10 15 20 25 30 -0.2 0.2 0.4 0.6 In[2]:= Plot3D@8Sin@xD, Cos@xD<, 8x, 0, 2 Pi<, 8y, 0, 2 Pi<, PlotStyle ® 8Red, Blue<D Out[2]= 0 2 4 6 0 2 4 6 -1.0 -0.5 0.0 0.5 1.0 In[3]:= Plot3D@Sqrt@1 - x^2 - y^2D, 8x, -1, 1<, 8y, -1, 1<, Mesh ® 8, ColorFunction ® Hue, MeshShading ® 88Yellow, Orange<, 8Pink, Red<<D

2An-Introduction-to-Mathematica.nb L O Out[3F o 1.0 MANIPULATE In(4): Manipulate [Plot[sin[x(1+a x)],[x,0 a,0,2}] a 1.0 inis)=Manipulate[Blur[ [b,0,10

Out[3]= -1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0 0.0 0.5 1.0 MANIPULATE In[4]:= Manipulate@Plot@Sin@x H1 + a xLD, 8x, 0, 6<D, 8a, 0, 2<D Out[4]= a 1 2 3 4 5 6 -1.0 -0.5 0.5 1.0 In[5]:= ManipulateBBlurB , bF, 8b, 0, 10<F 2 An-Introduction-to-Mathematica.nb

mathematica.nb 3 Out 5= In(6): Manipulate [Expand[(1+x)n], in,0, 100, 11] 1+18x+153x2+816x3+3060x4+8568x5+18564x6+31824x7+43758x8+48620x9+ 43758x10+31824x11+18564x12+8568x13+3060x14+816x15+153x16+18x17+x18 CALCULA 100000 N[Pi,500000

Out[5]= b In[6]:= Manipulate@Expand@H1 + xL^nD, 8n, 0, 100, 1<D Out[6]= n 18 1 + 18 x + 153 x 2 + 816 x 3 + 3060 x 4 + 8568 x 5 + 18 564 x 6 + 31 824 x 7 + 43 758 x 8 + 48 620 x 9 + 43 758 x 10 + 31 824 x 11 + 18 564 x 12 + 8568 x 13 + 3060 x 14 + 816 x 15 + 153 x 16 + 18 x 17 + x 18 CALCULATE 100 000! N@Pi, 500 000D An-Introduction-to-Mathematica.nb 3

4An-Introduction-to-Mathematica.nb MY WORK 偶极子电势展示 r1={0,0,0};r2=[0,1,0};q1=-1;q2=1;rn=10 φ[x,y,z]= Norm[[x, y, z]-rl] Norm[[x, y, z)-r2 机[xy2。(x2-x1)·{x,y,z Norm[(x,y, z)-r1]3 【x,y_,z_]=中【x,Y,z]-中[x,Y,z Manipulate[Plot3D[φ中[x,Y,z],叽【x,Y,z],【x,y,z]}, Plotsty1e→(Bue,purp⊥e,Red}, axeslabe1→ Automatic],{z,0.1,xn}] Manipulate[PLot[{φ[x,Y,z],中【x,Y,z],【x,Y,z]},{x,-rn,rn PlotRange -All, Plotstyle -[Blue, Purple, Red]], ly, -rn, rn],[z,0, rn]] ou81=

MY WORK 偶极子电势展示 r1 = 80, 0, 0<; r2 = 80, 1, 0<; q1 = -1; q2 = 1; rn = 10; Φ@x_, y_, z_D = q1 Norm@8x, y, z< - r1D + q2 Norm@8x, y, z< - r2D ; Φ1@x_, y_, z_D = Hr2 - r1L.8x, y, z< Norm@8x, y, z< - r1D 3 ; Φ2@x_, y_, z_D = Φ1@x, y, zD - Φ@x, y, zD; Manipulate@Plot3D@8Φ@x, y, zD, Φ1@x, y, zD, Φ2@x, y, zD<, 8x, -rn, rn<, 8y, -rn, rn<, PlotRange ® All, PlotStyle ® 8Blue, Purple, Red<, AxesLabel ® AutomaticD, 8z, 0.1, rn<D Manipulate@Plot@8Φ@x, y, zD, Φ1@x, y, zD, Φ2@x, y, zD<, 8x, -rn, rn<, PlotRange ® All, PlotStyle ® 8Blue, Purple, Red<D, 8y, -rn, rn<, 8z, 0, rn<D Out[81]= z -10 -5 0 5 10 x -10 -5 0 5 10 1 -0.05 0.00 0.05 4 An-Introduction-to-Mathematica.nb

mathematica.nb 5 0.005 ou82] 0.010 偶极子电场公式推导 Needs[VectorAnalysis"] Grad [ol [x, y, z], Cartesian[x, y, z]]

Out[82]= y z -10 -5 5 10 -0.025 -0.020 -0.015 -0.010 -0.005 偶极子电场公式推导 Needs@"VectorAnalysis`"D; Grad@Φ1@x, y, zD, Cartesian@x, y, zDD An-Introduction-to-Mathematica.nb 5

6An-Introduction-to-Mathematica.nb 偶极子电场展示 n83= rn=10 Ex0[y_],Ey0[y_],Ez0[y_]} Abs [x] Abs [x] bs【x]2+bs-1+y2+2bs【z1)2(bs【x12+Abs[y2+bs[212)3/2 Abs[-1+y] Abs [y] (abx12+Abs[-1+y12+bs[2]2)212(bsx2+助by2+助b(212)22 Abs[z] Abs[z] 3 y Abs [x] (Ex1y],Ey1(y-1,Ez1y-])-{ (Abs[x]2+Abs [y1+ Abs[z]2) 3 y Abs [y] (absx12+Bbsy12+Mb【1)”2(absx]2+助bsy]2+助bsz12)2/2 3 y Abs[z] (Abs[]2+Abs [y]+ Abs[]2) VectorPlot3D [(Exo y], Eyo [y], Ezo[y]),[x, -rn, rn], [y, -rn, rn] r rn], VectorScale +[Large, Scaled [0. 3], None] Vector colorFunction Hue, AxesLabel Automatic] VectorPlot3D [Exl [y], Eyl [ y], Ezly]), ix,-rn, rn], y, -rn, rn] [, -rn, rn], VectorScale+[Large, Scaled [0.3], None] Vectorc。o1 frUnction→Hue, AxesLabe1→ Automatic] Out!86 utomatic

偶极子电场展示 In[83]:= rn = 10; 8Ex0@y_D, Ey0@y_D, Ez0@y_D; 8Ex1@y_D, Ey1@y_D, Ez1@y_D; VectorPlot3D@8Ex0@yD, Ey0@yD, Ez0@yD<, 8x, -rn, rn<, 8y, -rn, rn<, 8z, -rn, rn<, VectorScale ® 8Large, Scaled@0.3D, None<, VectorColorFunction ® Hue, AxesLabel ® AutomaticD VectorPlot3D@8Ex1@yD, Ey1@yD, Ez1@yD<, 8x, -rn, rn<, 8y, -rn, rn<, 8z, -rn, rn<, VectorScale ® 8Large, Scaled@0.3D, None<, VectorColorFunction ® Hue, AxesLabel ® AutomaticD Out[86]= -10 -5 0 5 10 -10 -5 0 5 10 -10 -5 0 5 10 Automatic 6 An-Introduction-to-Mathematica.nb

mathematica.nb|7 Out[87] rn=10 Manipulate [[VectorPlot[ [ExO [y], Eyo [y]], [x, -rn, rn],[z,-rn, rn] Vector Scale→{ Large, Automatic,None},vect。rco1 orFunction→Hue] VectorPlot[[Exl [ y], Eyl [y]1, [x,-rn, rn),(z, -rn, rn] VectorScale -[Large, Automatic, None), VectorColorFunction Hue]], y,0, 101]

Out[87]= -10 -5 0 5 10 -10 -5 0 5 10 -10 -5 0 5 10 Automatic In[67]:= rn = 10; Manipulate@8VectorPlot@8Ex0@yD, Ey0@yD<, 8x, -rn, rn<, 8z, -rn, rn<, VectorScale ® 8Large, Automatic, None<, VectorColorFunction ® HueD, VectorPlot@8Ex1@yD, Ey1@yD<, 8x, -rn, rn<, 8z, -rn, rn<, VectorScale ® 8Large, Automatic, None<, VectorColorFunction ® HueD<, 8y, 0, 10<D An-Introduction-to-Mathematica.nb 7

8An-Introduction-to-Mathematica.nb n75}=

In[75]:= y 10 : -10 -5 0 5 10 -10 -5 0 5 10 , -10 -5 0 5 10 -10 -5 0 5 10 > 8 An-Introduction-to-Mathematica.nb

mathematica.nb 9 y Out[75

Out[75]= y : -10 -5 0 5 10 -10 -5 0 5 10 , -10 -5 0 5 10 -10 -5 0 5 10 > An-Introduction-to-Mathematica.nb 9

10An-Introduction-to-Mathematica. nb 谐振腔场分布展示 rn=10 Bx[t_]:=Re[-2 I* sin[x]* Cos[z]*eI By[t]:=0 Bz[t-1:=Re[2 I* Cos[x]* sin[z]*e Ex8[t]:=0; Ey8[t_]:=Re[-28n【x]sin【2]e2] Ez8[t]:=0 Manipulate[ [VectorPlot[[Bx[t], If[x<8,0,1]],[x,-rn, rn], y, -rn, rn), VectorScale-+ [Large, Automatic, Automatic], VectorcolorFunction Hue, VectorPoints-101 VectorPlot[[If[x<8,0,l], Ey8[t]], [x, -rn, rn], [y, -rn, rn] VectorScale +[Large, Automatic, Automatic] Vectorc。1 afUnction→且ue, VectorPoints→10]},t,1,10}]

谐振腔场分布展示 In[88]:= rn = 10; Bx@t_D := ReA-2 I * Sin@xD * Cos@zD * ã I*tE; By@t_D := 0; Bz@t_D := ReA2 I * Cos@xD * Sin@zD * ã I*tE; Ex8@t_D := 0; Ey8@t_D := ReA-2 Sin@xD Sin@zD ã I*tE; Ez8@t_D := 0; z = 1; Manipulate@ 8VectorPlot@8Bx@tD, If@x < 8, 0, 1D<, 8x, -rn, rn<, 8y, -rn, rn<, VectorScale ® 8Large, Automatic, Automatic<, VectorColorFunction ® Hue, VectorPoints ® 10D, VectorPlot@8If@x < 8, 0, 1D, Ey8@tD<, 8x, -rn, rn<, 8y, -rn, rn<, VectorScale ® 8Large, Automatic, Automatic<, VectorColorFunction ® Hue, VectorPoints ® 10D<, 8t, 1, 10<D 10 An-Introduction-to-Mathematica.nb

点击下载完整版文档(PDF)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共14页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有