Page 427 - Handbook Of Multiphase Flow Assurance
P. 427
426 10. Research methods in flow assurance
C shift the block up by 1/2 unit cell to put block center at 000
z1(i)=z1(i)+0.5D0
z2(i)=z2(i)+0.5D0
z3(i)=z3(i)+0.5D0
C rotate the [111] block around Z for +45 degrees
tempx=x1(i)
x1(i)= x1(i)*DCOS(Pi/4.D0)+y1(i)*DSIN(Pi/4.D0)
y1(i)=-tempx*DSIN(Pi/4.D0)+y1(i)*DCOS(Pi/4.D0)
tempx=x2(i)
x2(i)= x2(i)*DCOS(Pi/4.D0)+y2(i)*DSIN(Pi/4.D0)
y2(i)=-tempx*DSIN(Pi/4.D0)+y2(i)*DCOS(Pi/4.D0)
tempx=x3(i)
x3(i)= x3(i)*DCOS(Pi/4.D0)+y3(i)*DSIN(Pi/4.D0)
y3(i)=-tempx*DSIN(Pi/4.D0)+y3(i)*DCOS(Pi/4.D0)
C rotate the [111] block around Y for -54.74 degrees
D=-DACOS(1.D0/DSQRT(3.D0))
tempx=x1(i)
x1(i)= x1(i)*DCOS(D)+z1(i)*DSIN(D)
z1(i)=-tempx*DSIN(D)+z1(i)*DCOS(D)
tempx=x2(i)
x2(i)= x2(i)*DCOS(D)+z2(i)*DSIN(D)
z2(i)=-tempx*DSIN(D)+z2(i)*DCOS(D)
tempx=x3(i)
x3(i)= x3(i)*DCOS(D)+z3(i)*DSIN(D)
z3(i)=-tempx*DSIN(D)+z3(i)*DCOS(D)
C rotate the [111] block around Z for -30 degrees
tempx=x1(i)
x1(i)= x1(i)*DCOS(-Pi/6.D0)+y1(i)*DSIN(-Pi/6.D0)
y1(i)=-tempx*DSIN(-Pi/6.D0)+y1(i)*DCOS(-Pi/6.D0)
tempx=x2(i)
x2(i)= x2(i)*DCOS(-Pi/6.D0)+y2(i)*DSIN(-Pi/6.D0)
y2(i)=-tempx*DSIN(-Pi/6.D0)+y2(i)*DCOS(-Pi/6.D0)
tempx=x3(i)
x3(i)= x3(i)*DCOS(-Pi/6.D0)+y3(i)*DSIN(-Pi/6.D0)
y3(i)=-tempx*DSIN(-Pi/6.D0)+y3(i)*DCOS(-Pi/6.D0)
C shift the block down by sqrt(3)/2 unit cell to locate top at z=0
z1(i)=z1(i)-0.5D0*DSQRT(3.D0)
z2(i)=z2(i)-0.5D0*DSQRT(3.D0)
z3(i)=z3(i)-0.5D0*DSQRT(3.D0)
end do
C end of slicing of the basic [111] block
endif
C ------------[100]-----------------
if (ap.eq.1) then

