0% found this document useful (0 votes)
66 views5 pages

Equi Potentials Plot

The document describes a numerical method for plotting equipotentials in a semicircular region. The method traces equipotential lines starting from an initial point by taking small steps in the direction perpendicular to the electric field at each point, calculated using a Fourier series representation of the potential. Sample output is provided showing the (x,y) coordinates and calculated potential along several equipotential lines traced out from the initial point.

Uploaded by

chuneshphysics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views5 pages

Equi Potentials Plot

The document describes a numerical method for plotting equipotentials in a semicircular region. The method traces equipotential lines starting from an initial point by taking small steps in the direction perpendicular to the electric field at each point, calculated using a Fourier series representation of the potential. Sample output is provided showing the (x,y) coordinates and calculated potential along several equipotential lines traced out from the initial point.

Uploaded by

chuneshphysics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Equipotentials Plot in a Semicircular Region

23 sept 2006

by Reinaldo Baretti Machn


www.geocities.com/serienumerica
e-mail: [email protected]

Reference: Potential in a semicircle http://www.geocities.com/serienumerica/POTENTIALINASEMICIRCLE.doc

c equipotentials in semi circle of radius rc


pi=2.*asin(1.)
c
initial point xp ,yp rc,pi,v0,
data rc,v0,xp,yp /1.,100.,0.,0.9/
c calculates electric field , the and takes the direction normal to
c electric field i.e. the equipotential through that particular point
x0=xp
y0=yp
c a choice of deltas has to be made

deltas=1./50.
epsi=deltas/20.
niter=int(1.2/deltas)
r=sqrt(xp**2+yp**2)
theta=atan(yp/xp)
call pot(r,theta,rc,pi,v0,vout)
dxv=0.
dyv=0.
do 70 it=1,niter
x1=x0+dxv
x2=x0 +dxv + epsi
y1=y0+dyv
y2=y0+ dyv + epsi
r=sqrt(x1**2+y1**2)
theta=atan(y1/x1)
call pot(r,theta,rc,pi,v0,vout)
print 100,x1,y1,vout
print 100,-x1,y1,vout
call field(pi,rc,v0,x1,x2,y1,y1,epsi,ex)
call field(pi,rc,v0,x1,x1,y1,y2,epsi,ey)
eres=sqrt(ex**2+ey**2)
dxv= -deltas*ey/eres
dyv= deltas*ex/eres
x0=x1
y0=y1
c
print*,'ex,ey=',ex ,ey
70 continue
100 format(1x,'x,y,V=',3(4x,e11.4) )
stop
end

subroutine field(pi,rc,v0,x11,x22,y11,y22,epsi,eout)
r1=sqrt(x11**2+y11**2)
r2=sqrt(x22**2+y22**2)
theta1=atan(y11/x11)
theta2=atan(y22/x22)
call pot(r1,theta1,rc,pi,v0,v1)
call pot(r2,theta2,rc,pi,v0,v2)
print*,'v1,v2=',v1,v2
eout=-(v2-v1)/epsi
return
end

subroutine pot(r,theta,rc,pi,v0,vout)

Vseries(r,theta,n)= (2.*V0/float(n))*(2./pi)*(1./Rc**n)*r**n*
$ sin(float(n)*theta)
sum=0.
c sum over odd terms
do 10 n=1,31,2
sum=sum + Vseries(r,theta,n)
10 continue
vout=sum
c
print*,'vout=',vout
return
end

EXAMPLE of output
Traces the equipotential starting at x=0., y=0.9
V= 93.2 volts
x,y,V= 0.0000E+00 0.9000E+00 0.9324E+02
x,y,V= 0.0000E+00 0.9000E+00 0.9324E+02
x,y,V= 0.2000E-01 0.9000E+00 0.9327E+02
x,y,V= -0.2000E-01 0.9000E+00 0.9327E+02
x,y,V= 0.3998E-01 0.8991E+00 0.9329E+02
x,y,V= -0.3998E-01 0.8991E+00 0.9329E+02
x,y,V= 0.5993E-01 0.8976E+00 0.9330E+02
x,y,V= -0.5993E-01 0.8976E+00 0.9330E+02
x,y,V= 0.7985E-01 0.8959E+00 0.9330E+02
x,y,V= -0.7985E-01 0.8959E+00 0.9330E+02
x,y,V= 0.9977E-01 0.8941E+00 0.9330E+02
x,y,V= -0.9977E-01 0.8941E+00 0.9330E+02
x,y,V= 0.1197E+00 0.8924E+00 0.9330E+02
x,y,V= -0.1197E+00 0.8924E+00 0.9330E+02
x,y,V= 0.1396E+00 0.8906E+00 0.9331E+02
x,y,V= -0.1396E+00 0.8906E+00 0.9331E+02
x,y,V= 0.1595E+00 0.8885E+00 0.9333E+02
x,y,V= -0.1595E+00 0.8885E+00 0.9333E+02
x,y,V= 0.1793E+00 0.8857E+00 0.9336E+02
x,y,V= -0.1793E+00 0.8857E+00 0.9336E+02
x,y,V= 0.1990E+00 0.8821E+00 0.9339E+02
x,y,V= -0.1990E+00 0.8821E+00 0.9339E+02
x,y,V= 0.2184E+00 0.8775E+00 0.9341E+02
x,y,V= -0.2184E+00 0.8775E+00 0.9341E+02
x,y,V= 0.2378E+00 0.8723E+00 0.9342E+02
x,y,V= -0.2378E+00 0.8723E+00 0.9342E+02
x,y,V= 0.2570E+00 0.8670E+00 0.9342E+02
x,y,V= -0.2570E+00 0.8670E+00 0.9342E+02
x,y,V= 0.2763E+00 0.8618E+00 0.9341E+02

x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=

-0.2763E+00
0.2957E+00
-0.2957E+00
0.3150E+00
-0.3150E+00
0.3343E+00
-0.3343E+00
0.3533E+00
-0.3533E+00
0.3719E+00
-0.3719E+00
0.3902E+00
-0.3902E+00
0.4081E+00
-0.4081E+00
0.4261E+00
-0.4261E+00
0.4441E+00
-0.4441E+00
0.4623E+00
-0.4623E+00
0.4806E+00
-0.4806E+00
0.4987E+00
-0.4987E+00
0.5164E+00
-0.5164E+00
0.5334E+00
-0.5334E+00
0.5496E+00
-0.5496E+00
0.5654E+00
-0.5654E+00
0.5813E+00
-0.5813E+00
0.5974E+00
-0.5974E+00
0.6139E+00
-0.6139E+00
0.6307E+00
-0.6307E+00
0.6474E+00
-0.6474E+00
0.6635E+00
-0.6635E+00
0.6784E+00

0.8618E+00
0.8566E+00
0.8566E+00
0.8515E+00
0.8515E+00
0.8461E+00
0.8461E+00
0.8399E+00
0.8399E+00
0.8327E+00
0.8327E+00
0.8245E+00
0.8245E+00
0.8157E+00
0.8157E+00
0.8069E+00
0.8069E+00
0.7982E+00
0.7982E+00
0.7899E+00
0.7899E+00
0.7817E+00
0.7817E+00
0.7732E+00
0.7732E+00
0.7639E+00
0.7639E+00
0.7534E+00
0.7534E+00
0.7417E+00
0.7417E+00
0.7295E+00
0.7295E+00
0.7173E+00
0.7173E+00
0.7055E+00
0.7055E+00
0.6942E+00
0.6942E+00
0.6833E+00
0.6833E+00
0.6723E+00
0.6723E+00
0.6605E+00
0.6605E+00
0.6471E+00

0.9341E+02
0.9341E+02
0.9341E+02
0.9342E+02
0.9342E+02
0.9344E+02
0.9344E+02
0.9348E+02
0.9348E+02
0.9352E+02
0.9352E+02
0.9354E+02
0.9354E+02
0.9355E+02
0.9355E+02
0.9354E+02
0.9354E+02
0.9352E+02
0.9352E+02
0.9352E+02
0.9352E+02
0.9353E+02
0.9353E+02
0.9356E+02
0.9356E+02
0.9361E+02
0.9361E+02
0.9366E+02
0.9366E+02
0.9369E+02
0.9369E+02
0.9369E+02
0.9369E+02
0.9367E+02
0.9367E+02
0.9364E+02
0.9364E+02
0.9362E+02
0.9362E+02
0.9362E+02
0.9362E+02
0.9365E+02
0.9365E+02
0.9373E+02
0.9373E+02
0.9383E+02

x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=
x,y,V=

-0.6784E+00
0.6918E+00
-0.6918E+00
0.7044E+00
-0.7044E+00
0.7172E+00
-0.7172E+00
0.7306E+00
-0.7306E+00
0.7449E+00
-0.7449E+00
0.7599E+00
-0.7599E+00
0.7752E+00
-0.7752E+00
0.7901E+00
-0.7901E+00
0.8031E+00
-0.8031E+00
0.8126E+00
-0.8126E+00
0.8204E+00
-0.8204E+00
0.8287E+00
-0.8287E+00
0.8383E+00
-0.8383E+00
0.8495E+00
-0.8495E+00
0.8621E+00
-0.8621E+00
0.8760E+00
-0.8760E+00
0.8906E+00
-0.8906E+00
0.9044E+00
-0.9044E+00
0.9116E+00
-0.9116E+00
0.9108E+00
-0.9108E+00
0.9118E+00
-0.9118E+00
0.9155E+00
-0.9155E+00

0.6471E+00
0.6322E+00
0.6322E+00
0.6167E+00
0.6167E+00
0.6013E+00
0.6013E+00
0.5865E+00
0.5865E+00
0.5725E+00
0.5725E+00
0.5592E+00
0.5592E+00
0.5464E+00
0.5464E+00
0.5330E+00
0.5330E+00
0.5178E+00
0.5178E+00
0.5002E+00
0.5002E+00
0.4818E+00
0.4818E+00
0.4636E+00
0.4636E+00
0.4461E+00
0.4461E+00
0.4295E+00
0.4295E+00
0.4140E+00
0.4140E+00
0.3996E+00
0.3996E+00
0.3859E+00
0.3859E+00
0.3715E+00
0.3715E+00
0.3528E+00
0.3528E+00
0.3328E+00
0.3328E+00
0.3128E+00
0.3128E+00
0.2932E+00
0.2932E+00

0.9383E+02
0.9388E+02
0.9388E+02
0.9386E+02
0.9386E+02
0.9381E+02
0.9381E+02
0.9374E+02
0.9374E+02
0.9368E+02
0.9368E+02
0.9365E+02
0.9365E+02
0.9367E+02
0.9367E+02
0.9379E+02
0.9379E+02
0.9399E+02
0.9399E+02
0.9411E+02
0.9411E+02
0.9408E+02
0.9408E+02
0.9396E+02
0.9396E+02
0.9380E+02
0.9380E+02
0.9364E+02
0.9364E+02
0.9350E+02
0.9350E+02
0.9342E+02
0.9342E+02
0.9347E+02
0.9347E+02
0.9379E+02
0.9379E+02
0.9433E+02
0.9433E+02
0.9419E+02
0.9419E+02
0.9389E+02
0.9389E+02
0.9352E+02
0.9352E+02

You might also like