290 likes | 385 Views
Gauss's law Poisson's equation MATLAB integration. 0 a b r. coaxial cable. r < a. a r < b. b r. hand grenade. The Holy Hand Grenade of Antioch
E N D
Gauss's law Poisson's equation MATLAB integration
0 a b r coaxial cable r < a a r < b b r
The Holy Hand Grenade of Antioch Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, nor shalt thou count two, excepting that thou then proceed to three. Five is right out...
hand grenade • summer camp - dummy grenade • count 1--2--3--4--5 • practice • counting practice • practice • uses real grenade • count 1--2--3
explosion explosion in hand loses arm sues hand grenade manufacturer for loss of arm and future earnings as a golfer manufacturer hires lawyer and expert to save money
Discharge through outside the soldier Big internal spark! bad weather rain, thunder, lightning discharge charge on outside through man electric charge inside & outside Do not fight wars in the rain!
golfer’s lawyer panics • call EM “expert” • EM expert swears-”I believe in Gauss’s law and Maxwell’s equations!” • “Charge can NOT get inside a conductor!” • jury awards soldier $$$ and ¥¥¥
Maxwell’s equations are found to be TRUE in the court of law!
R dx dy Distributed charge on a surface s = Q/area
R dx dy Distributed charge on a surface
12 y V(z = 6) = ? Find V(z) 12 12 x 6 z
6 6 12 y V(z = 6) = ? Find V(z) 6 x z
MATLAB numerical integration • user function = inline ( ‘ f(x) ‘) • quad (user function, xmin, xmax) • Iowa = inline( ‘ 2*x ‘ ) • quad (Iowa, 0, 1) • ans = 1
More complicated example • Iowa = inline( ‘ x . ^2 ‘ ) • quad (Iowa, 0, 1) • ans = 0.3333
Higher dimensional integration • Iowa = inline ( ‘x.*y’ ) • dblquad (Iowa, xmin, xmax, ymin, ymax) • dblquad (Iowa, 0, 1, 0, 1) • ans = 0.2500 • triplequad (function, --, --, --, --, --, --)
Distributed charge on a surface z = 3 Iowa = inline ( ‘sqrt(1./(x.^2+y.^2+ 32))’ ) Voltage = K x dblquad (Iowa, -a, a, -b, b)
Z E a -a -a a x y finite size square sheet uniform charge density
clear; clf • for z = 1: 100 • f = inline('10*z./(sqrt(x.^2+y.^2+(z/10).^2).^3)'); • coefficient(z) =dblquad(f, -.5, .5, -.5, .5, [ ],'',z); • end • loglog(1: 100, coefficient,'-y‘,’linewidth’, 3) • hold on • plot([10/(10^(1/2)) 100], [1000 1],'--r','linewidth', 3) • xlabel ('z/a','fontsize', 18) • ylabel ('coefficient','fontsize', 18) • set(gca,'fontsize', 18) • grid on • legend ('numerical integration','slope = -2', 3) • whitebg('black')