Page 345 - Handbook Of Multiphase Flow Assurance
P. 345
344 10. Research methods in flow assurance
open(unit=1,file="rdf.crd",status="old")
open(unit=2,file="rdf.dat",status="unknown")
write(*,'($,"Enter number of molecules in the system: ")')
read(*,*) k
write(*,'($,"Enter density of the system (g/cc): ")')
read(*,*) density
write(*,'($,"Enter number of timesteps in the run: ")')
read(*,*) l
write(*,'($,"Enter number of eqilibration timesteps: ")')
read(*,*) le
3 format(3F12.6)
6 format(6F12.6)
side=(dfloat(k)/density)**(1.D0/3.D0)
sigma=1.D0/side
rdel=0.04D0 !shell thickness
rdel=rdel*sigma
do j=1,1000
rdf(j)=0
end do
do i=0,l !start of cycle on time
read(1,*)t
write(*,*)i,t
read(1,3)x(1),y(1),z(1)
read(1,6)t1,t2,t3,t4,t5,t6
if((k/2.−k/2).EQ.0.)then
m=int(k/2−1)
do j=1,m !start of read cycle
n=j*2 !on molecules
n1=n+1
read(1,6)x(n),y(n),z(n),t1,t2,t3
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)x(k),y(k),z(k),t1,t2,t3
read(1,6)t1,t2,t3,xmin,ymin,zmin
read(1,6)t1,t2,t3,t4,t5,t6
read(1,6)t1,t2,t3,t4,t5,t6
read(1,6)t1,t2,t3,t4,t5,t6
read(1,6)xmax,ymax,zmax
else
m=int(k/2)
do j=1,m !start of read cycle
n=j*2 !on molecules
n1=n+1
read(1,6)x(n),y(n),z(n),t1,t2,t3