c
      program dimple
      real mu
      dimension Zs(100)
c
      mu=0.3
      slip =1.0
      R1=0.001
      R2=10.0
      write(*,*)
      write(*,*)'mu & slip =',mu,slip
      write(*,*)'R1 & R2   =',R1,R2
      write(*,*)
c
      pi=3.141592654
      c3=-1.0/(8.0*pi*(1.0-mu))
      c4=1.0-2.0*mu
c
c 10   write(*,*)'Enter Zs'
c      read(*,*)Zs
c
      n=100
      dfai=0.5*pi/n
c
      fai=0.0
      si=sin(fai)
      co=cos(fai)
      rr=sqrt(R1*R1-2.0*R1*Zs*si+Zs*Zs)
      rr2=R1*R1/(rr*rr)
      u1=co*(Zs*si+R1)*(2.0*c4+3.0*rr2*co*co)*rr2/rr
      sum1=0.0
      do i=1,n
        fai=dfai*i
        si=sin(fai)
        co=cos(fai)
        rr=sqrt(R1*R1+2.0*R1*Zs*si+Zs*Zs)
        rr2=R1*R1/(rr*rr)
        u2=co*(Zs*si+R1)*(2.0*c4+3.0*rr2*co*co)*rr2/rr
        sum1=sum1+0.5*(u1+u2)
        u1=u2
c      write(*,*)'fai,u1',fai,-pi*c3*u1*dfai
      end do
      sum1=-pi*c3*sum1*dfai
c      write(*,*)'sum1',sum1
c
      m=100
      dR=(R2-R1)/m
c      write(*,*)'m,dR',m,dR
c
      rd=R1
      rr=sqrt(rd*rd+Zs*Zs)
      rr2=rd*rd/(rr*rr)
      u1=(2.0*C4+3.0*rr2)*rd/(rr*rr*rr)
      sum2=0.0
      write(*,*)'rd,u1',rd,-pi*c3*Zs*u1
      do j=1,m
        rd=R1+dR*j
        rr=sqrt(rd*rd+Zs*Zs)
        rr2=rd*rd/(rr*rr)
        u2=(2.0*C4+3.0*rr2)*rd/(rr*rr*rr)
        sum2=sum2+0.5*(u1+u2)
        u1=u2
c      write(*,*)'rd,u1,sum',rd,-pi*c3*Zs*u1,-pi*c3*Zs*sum2*dR
      end do
      sum2=-pi*c3*Zs*sum2*dR
c
      write(*,*)
      write(*,*)'sum1,sum2,sum =',sum1,sum2,sum1+sum2
c
      goto 10     
c
      stop
      end
