Page 383 - Handbook Of Multiphase Flow Assurance
P. 383
382 10. Research methods in flow assurance
delta = zn(Norgn) - Bmax + 3.D0
DO 470 I = 1, Natom
470 zn(I) = zn(I) - delta
ENDIF
C if chain goes deeper than 6 A into the surface, push it to 3 A above surface
C
IF (zn(Norgn) .LT. -6.D0) THEN
delta = -zn(Norgn) + 3.D0
DO 475 I = 1, Natom
475 zn(I) = zn(I) + delta
ENDIF
C apply periodic boundaries to vertical walls
C--------------[100]---------------
if (AP.eq.1.or.ap.eq.3) then
C we are dealing with [100] or [110] hydrate surface -rectangular box BC
C ... apply periodic boundaries to entire chain in x & y
C directions, based on position of origin of body frame
C
IF (xn(Norgn) .GT. xmax) THEN
DO 480 I = 1, natom
480 xn(I) = xn(I) - xmax
ENDIF
C
IF (xn(Norgn) .LT. 0.D0) THEN
DO 485 I = 1, natom
485 xn(I) = xn(I) + xmax
ENDIF
C
IF (yn(Norgn) .GT. ymax) THEN
DO 490 I = 1, natom
490 yn(I) = yn(I) - ymax
ENDIF
C
IF (yn(Norgn) .LT. 0.D0) THEN
DO 495 I = 1, natom
495 yn(I) = yn(I) + ymax
ENDIF
endif
C --------------[111]--------------
if(ap.eq.2) then
C we are using the [111] hydrate surface - apply rhombic BC
C
RT2 = side
RRT2 = 1.0D0 / RT2
RT3 = 1.732050807568877D0

