7 SUBROUTINE PZOISO(POTSP
,POTPZ
)
10 REAL, INTENT( OUT
) :: POTSP
,POTPZ
16 COMMON /QAGON
/RHO
,ZETA
,ETA
19 CALL PREST(PZ_1
=DPZ_1
,PZ_S
=DPZ_S
)
21 POTSP
=CPZ
*CSP
*RC
*DPZ_1
22 POTPZ
=CPZ
*RC
*((CPZ_Q1
+CPZ_Q2
/2.E0
)*DPZ_1
+CPZ_Q2
*DPZ_S
)
28 SUBROUTINE PZOANISO(POTSP
,POTPZ
)
31 REAL, INTENT( OUT
) :: POTSP
,POTPZ
33 REAL :: DPZ_1
,DPZ_ETA1
,DPZ_ETA2
37 COMMON /QAGON
/RHO
,ZETA
,ETA
40 CALL PREST(PZ_1
=DPZ_1
,PZ_ETA1
=DPZ_ETA1
,PZ_ETA2
=DPZ_ETA2
)
42 POTSP
=CPZ
*CSP
*RC
*DPZ_1
43 POTPZ
=CPZ
*RC
*( CI1
*DPZ_1
+&
44 CI2
*( CNP31_1
*DPZ_ETA2
- CNP31_2
*DPZ_ETA1
)/ETA_DIF
+&
45 CI3
/((1.E0
-ETA1
)*(1.E0
-ETA2
)) *&
46 ( (CNE_2
-CNE_1
)*DPZ_1
+&
47 (CNE2_1
*DPZ_ETA2
- CNE2_2
*DPZ_ETA1
)/ETA_DIF
) )
50 END SUBROUTINE PZOANISO
52 SUBROUTINE PREST(PZ_1
,PZ_S
,PZ_ETA1
,PZ_ETA2
)
54 Use Input_Data
, ONLY
: RD
,RC
,ZC
,ETA1
,ETA2
58 !! 'dummy' and local variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
61 REAL,OPTIONAL
:: PZ_S
,PZ_ETA1
,PZ_ETA2
63 DOUBLE PRECISION DPZ_1
,DPZ_S
,DPZ_ETA1
,DPZ_ETA2
64 !! GAG Variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
66 INTEGER, PARAMETER :: LIMITE
=100
67 DOUBLE PRECISION AL
,AU
,ABSERR
,EPSABS
,EPSREL
,WORK(4*LIMITE
),RO
,ZE
68 INTEGER IER
,IWORK(LIMITE
),KEY,LAST
,LENW
,LIMIT
,NEVAL
70 DOUBLE PRECISION, EXTERNAL :: I_FI00
,I_FDA00
74 COMMON /QAGON
/RHO
,ZETA
,ETA
76 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
90 ! WRITE(6,*)RHO*RC,ZETA*ZC
93 ! RHOP=DBLE(IER-1)*RD/DBLE(999)
94 ! WRITE(55,'(10(E15.8,1X))')RHOP*RC,I_FDA00(RHOP)
99 CALL DQAG(I_FI00
,AL
,AU
,EPSABS
,EPSREL
,KEY,DPZ_1
,ABSERR
,NEVAL
, &
100 IER
,LIMIT
,LENW
,LAST
,IWORK
,WORK
)
102 CALL DQAG_CHECK("FI00","PZ_1",DPZ_1
,ABSERR
,RO
*RC
,ZE
*ZC
,NEVAL
,IER
,LAST
)
105 IF(PRESENT(PZ_S
)) THEN
107 CALL DQAG(I_FDA00
,AL
,AU
,EPSABS
,EPSREL
,KEY,DPZ_S
,ABSERR
,NEVAL
, &
108 IER
,LIMIT
,LENW
,LAST
,IWORK
,WORK
)
110 CALL DQAG_CHECK("FDA00","PZ_S",DPZ_S
,ABSERR
,RO
*RC
,ZE
*ZC
,NEVAL
,IER
,LAST
)
114 IF(PRESENT(PZ_ETA1
).AND
.PRESENT(PZ_ETA2
)) THEN
116 CALL DQAG(I_FI00
,AL
,AU
,EPSABS
,EPSREL
,KEY,DPZ_ETA1
,ABSERR
,NEVAL
, &
117 IER
,LIMIT
,LENW
,LAST
,IWORK
,WORK
)
119 CALL DQAG_CHECK("FI00","PZ_ETA1",DPZ_ETA1
,ABSERR
,RO
*RC
,ZE
*ZC
,NEVAL
,IER
,LAST
)
122 CALL DQAG(I_FI00
,AL
,AU
,EPSABS
,EPSREL
,KEY,DPZ_ETA2
,ABSERR
,NEVAL
, &
123 IER
,LIMIT
,LENW
,LAST
,IWORK
,WORK
)
125 CALL DQAG_CHECK("FI00","PZ_ETA2",DPZ_ETA2
,ABSERR
,RO
*RC
,ZE
*ZC
,NEVAL
,IER
,LAST
)
126 PZ_ETA1
=REAL(DPZ_ETA1
); PZ_ETA2
=REAL(DPZ_ETA2
)
132 SUBROUTINE DQAG_CHECK(FUNC
,RESNAME
,RES
,ABSERR
,RO
,ZE
,NEVAL
,IER
,LAST
)
134 CHARACTER(LEN
=*) :: FUNC
,RESNAME
135 DOUBLE PRECISION :: RES
,ABSERR
,RO
,ZE
136 INTEGER :: NEVAL
,IER
,LAST
137 WRITE(6,*)"ERROR AT: RHO: ",RO
," ZETA: ",ZE
138 WRITE(6,*)"QAG ",TRIM(FUNC
)," ",TRIM(RESNAME
)," RESULT=",RES
139 WRITE(6,*)"QAG ABSERR=",ABSERR
140 WRITE(6,*)"QAG NEVAL=",NEVAL
141 WRITE(6,*)"QAG IER=",IER
142 WRITE(6,*)"QAG LAST=",LAST
145 END SUBROUTINE DQAG_CHECK
147 FUNCTION FI00(RHO
,ZETA
,RHOP
,ZM
,ETA
) RESULT(I00
)
148 Use Input_Data
, ONLY
: RC
,ZC
152 DOUBLE PRECISION, INTENT(IN
) :: RHO
,ZETA
,RHOP
,ZM
,ETA
153 DOUBLE PRECISION :: I00
155 DOUBLE PRECISION :: PI
,DPI
156 DOUBLE PRECISION :: DELTAM
,DELTA0
,&
157 KM
,K0
,CKM
,CK0
,KKM
,KK0
160 PI
= DATAN(1.D0
)*4.D0
163 DELTAM
= SQRT(ETA
)*DABS(ZETA
-ZM
)*ZC
/RC
164 DELTA0
= SQRT(ETA
)*DABS(ZETA
)*ZC
/RC
167 I00
=(1.D0
/DSQRT(DELTAM
**2+RHOP
**2)) - &
168 (1.D0
/DSQRT(DELTA0
**2+RHOP
**2))
173 KM
= 2.D0
*DSQRT( RHO
*RHOP
/((RHO
+RHOP
)**2+DELTAM
**2) )
174 K0
= 2.D0
*DSQRT( RHO
*RHOP
/((RHO
+RHOP
)**2+DELTA0
**2) )
182 !!!!! I00 expressed in terms of RHO,RHOP,DELTA !!!!!!!!!!!!!!!!!!!
184 I00
= 2.D0
/PI
*(1.D0
/DSQRT(DELTAM
**2+(RHO
+RHOP
)**2)*KKM
- &
185 1.D0
/DSQRT(DELTA0
**2+(RHO
+RHOP
)**2)*KK0
)
195 FUNCTION FDA00(RHO
,ZETA
,RHOP
,ZM
,ETA
) RESULT(DA00
)
196 Use Input_Data
, ONLY
: RC
,ZC
200 DOUBLE PRECISION, INTENT(IN
) :: RHO
,ZETA
,RHOP
,ZM
,ETA
201 DOUBLE PRECISION :: DA00
203 DOUBLE PRECISION :: PI
,DPI
204 DOUBLE PRECISION :: SRRHOP
,RRHOP15
,DELTAM
,DELTA0
,&
205 KM
,K0
,CKM
,CK0
,KKM
,KK0
,EKM
,EK0
207 PI
= DATAN(1.D0
)*4.D0
210 SRRHOP
=SQRT(RHO
*RHOP
)
211 RRHOP15
=SQRT(RHO
*RHOP
)**3
213 DELTAM
= DSQRT(ETA
)*DABS(ZETA
-ZM
)*ZC
/RC
214 DELTA0
= DSQRT(ETA
)*DABS(ZETA
)*ZC
/RC
216 KM
= 2.D0
*DSQRT( RHO
*RHOP
/((RHO
+RHOP
)**2+DELTAM
**2) )
217 K0
= 2.D0
*DSQRT( RHO
*RHOP
/((RHO
+RHOP
)**2+DELTA0
**2) )
222 CALL ELIPT0(KM
,KKM
,EKM
)
223 CALL ELIPT0(K0
,KK0
,EK0
)
225 IF (RHO
.EQ
. 0.D0
) THEN
226 DA00
= ( DELTAM
**2/SQRT(RHOP
**2+DELTAM
**2)**3) &
227 -(DELTA0
**2/SQRT(RHOP
**2+DELTA0
**2)**3 )
232 DA00
= DELTAM
**2*KM
**3/(2.D0
*DPI
*CKM
*RRHOP15
)*EKM
&
233 -DELTA0
**2*K0
**3/(2.D0
*DPI
*CK0
*RRHOP15
)*EK0