Page 413 - Handbook Of Multiphase Flow Assurance
P. 413

412                          10.  Research methods in flow assurance

                      END
                 C
                 C-------------------------------------------------------------------
                 C
                      SUBROUTINE INIORI(xo,yo,zo,phi,theta,xi)
                      IMPLICIT REAL*8(A-H,O-Z)
                      COMMON /atoms / atomdata(1000,4),atomdata2(1000,4)
                      COMMON /NATOMS/ Norgn, Nwatrs, M1, M2, M3, M4
                      COMMON /types / iatomtype(1000,2),nbondfound,natom,ngroups,ncall
                      COMMON /NWPOS / xn(1000), yn(1000), zn(1000)
                      COMMON /STEPS / Deltrn, Delrot, Delpiv, Acctrn, Accrot, Accpiv
                      COMMON /SPACE / xms(1000), yms(1000), zms(1000)
                      COMMON /POTPAM/ Casqof,Co,Rsqon,Rsqoff,Rcut,Pi,Tk,Temp
                      COMMON /EANEW / Cphin,Sphin,Cthen,Sthen,Cxin,Sxin

                 C ... convert angles to radians
                      Rphi = phi*PI/180.D0
                      Rthe = theta*PI/180.D0
                      Rxi = xi*PI/180.D0
                 C ... trig functions of initial Euler angles
                      Cphi = DCOS(Rphi)
                      Sphi = DSIN(Rphi)
                      Cthe = DCOS(Rthe)
                      Sthe = DSIN(Rthe)
                      Cxi  = DCOS(Rxi)
                      Sxi  = DSIN(Rxi)
                 C ... store as new angles for XFORMB
                      Cphin = Cphi
                      Sphin = Sphi
                      Cthen = Cthe
                      Sthen = Sthe
                      Cxin  = Cxi
                      Sxin  = Sxi
                 C
                 C ... xform new orientation to space-fixed frame
                 C
                      DO 100 I = 1, natom
                      CALL XFORMB(atomdata(I,1),atomdata(I,2),atomdata(I,3),xx,yy,zz)
                      xms(I) = xo + xx
                      yms(I) = yo + yy
                      zms(I) = zo + zz
                      xn(I)  = xms(I)
                      yn(I)  = yms(I)
                      zn(I)  = zms(I)
   408   409   410   411   412   413   414   415   416   417   418