Page 346 - Handbook Of Multiphase Flow Assurance
P. 346
Computer code (Makogon, 1994, 1997) 345
read(1,6)t4,t5,t6,x(n1),y(n1),z(n1)
read(1,6)t1,t2,t3,t4,t5,t6
end do !end of read cycle on mol−s
read(1,6)xmin,ymin,zmin,t1,t2,t3
read(1,6)t1,t2,t3,t4,t5,t6
read(1,6)t1,t2,t3,t4,t5,t6
read(1,6)t1,t2,t3,xmax,ymax,zmax
endif
c
c
if(i.GE.le) then !If acquisition time came
c Data analysis for timestep i starts here !Start of data analysis
xbox=xmax−xmin !Find box sides sizes
ybox=ymax−ymin
zbox=zmax−zmin
do 100 j=1,1000 !Nullify shells array
x(j)=x(j)/xbox !and normalize box size to 1
y(j)=y(j)/ybox
z(j)=z(j)/zbox
100 continue
do 200 ii=1,k−1 !outer loop over spheres II
do 200 j=ii+1,k
rx=x(ii)−x(j)
ry=y(ii)−y(j)
rz=z(ii)−z(j)
c Apply minimum image criteria (periodic conditions)
if (RX.GT.0.5D0) RX=RX−1.D0
if (RY.GT.0.5D0) RY=RY−1.D0
if (RZ.GT.0.5D0) RZ=RZ−1.D0
if (RX.LT.−0.5D0) RX=RX+1.D0
if (RY.LT.−0.5D0) RY=RY+1.D0
if (RZ.LT.−0.5D0) RZ=RZ+1.D0
RIJ=DSQRT(RX*RX+RY*RY+RZ*RZ)
c
IF (RIJ.LE.0.5D0) then
ishell=int(rij/rdel)+1
rdf(ishell)=rdf(ishell)+1.D0
endif
200 continue
endif !End of data analysis
end do !End of cycle on i (time)
c Here goes the normalization of counter for radial distribution function