Page 400 - Handbook Of Multiphase Flow Assurance
P. 400

Computer code (Makogon, 1994, 1997)              399

                  IF (Yij .LT.-ymaxh) then
                  ywya(1) = ywya(1) + ymax
                  ywya(2) = ywya(2) + ymax
                  xwxa(1) = xwxa(1) + xmaxh
                  xwxa(2) = xwxa(2) + xmaxh
                  Xij = Xij + xmaxh
                  ENDIF
            C
                  IF (xij .GT. xmaxh) THEN
                   xwxa(1) = xwxa(1) - xmax
                   xwxa(2) = xwxa(2) - xmax
                  ENDIF
            C
                  IF (xij .LT.-xmaxh) THEN
                   xwxa(1) = xwxa(1) + xmax
                   xwxa(2) = xwxa(2) + xmax
                  ENDIF
            C
                  endif
            C
                  Rah1sq = xwxa(1)**2 + ywya(1)**2 + zwza(1)**2
                  Rah2sq = xwxa(2)**2 + ywya(2)**2 + zwza(2)**2
                  K = 1
                  IF (Rah2sq .LT. Rah1sq) K=2
            C
            C ... reverse vector for subsequent dot product
                  Xah = -xwxa(K)
                  Yah = -ywya(K)
                  Zah = -zwza(K)
            C
                  RETURN
                  END
            C
            C-------------------------------------------------------------------
            C
                  SUBROUTINE GRAPHDATA
            C This subroutine writes a coordinate file from which a bitmap can be generated
            C by the POS2BMP program.
                  IMPLICIT REAL*8(A-H,O-Z)
                  CHARACTER*12 fname
                  character*4 form
                  integer a,ap,ndig

                  COMMON /bonds / ibonddata(1000,4),nbonds(1000)
                  COMMON /types / iatomtype(1000,2),nbondfound,natom,ngroups,ncall
   395   396   397   398   399   400   401   402   403   404   405