source: PSPA/parmelaPSPA/trunk/fldring.f @ 476

Last change on this file since 476 was 12, checked in by lemeur, 12 years ago

parmela pspa initial

File size: 758 bytes
Line 
1      subroutine fldring (r1,z1,r,z,er,ez)
2c---compute radial and longitudinal components of
3c---electric field at r1,z1 due to ring of charge
4c---at z having radius r.
5c-----------------------------------------------------------------------
6c
7      include 'constcom.h'
8      include 'ucom.h'
9c
10c-----------------------------------------------------------------------
11c*
12      pisq=pi**2
13      d=z1-z
14      c=(r1-r)**2
15      b=(r1+r)**2
16      a=4.0*r*r1/(b+d**2)
17      call eint (a,ee,ek)
18      er=0.0
19      a=sqrt(b+d**2)
20      if (r1.eq.0.) go to 10
21      er=(ek-(r**2-r1**2+d**2)*ee/(c+d**2))/(4.*pisq*r1*a)
22   10 continue
23      ez=d*ee/(a*(c+d**2)*2.*pisq)
24      return
25      end
26c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
Note: See TracBrowser for help on using the repository browser.