c
      program dimple
      real mu
c
      mu=0.3
      slip =1.0
      R1=1.0
      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
 10   write(*,*)'Enter Zs'
      read(*,*)Zs
c
      m=100
      dR=R1/m
      write(*,*)'m,dR',m,dR
c
c      rd=0
c      rr=sqrt(rd*rd+Zs*Zs)
c      rr2=rd*rd/(rr*rr)
c      u1=(2.0*C4+3.0*rr2)*rd/(rr*rr)
c      sum1=u1
c      write(*,*)'rd,u1',rd,-pi*c3*Zs*u1
      u1=0.0
      sum1=0.0
      do j=1,m
        rd=dR*j
        rr=sqrt(rd*rd+Zs*Zs)
        rr2=rd*rd/(rr*rr)
        u2=(2.0*C4+3.0*rr2)*rd/(rr*rr)
        sum1=sum1+0.5*(u1+u2)
        u1=u2
c      write(*,*)'rd,u1,sum',rd,-pi*c3*Zs*u1,-pi*c3*Zs*sum1*dR
      end do
      sum1=-pi*c3*Zs*sum1*dR
c
      m=100
      dR=(R2-R1)/m
      write(*,*)'m,dR',m,dR

      rd=R1
      rr=sqrt(rd*rd+Zs*Zs)
      rr2=rd*rd/(rr*rr)
      u1=(2.0*C4+3.0*rr2)*rd/(rr*rr)
      sum2=0.0
c      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)
        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
