Page 406 - Handbook Of Multiphase Flow Assurance
P. 406
Computer code (Makogon, 1994, 1997) 405
Erun = Erun + Ener
Eold = Ener
C
C If acceptance is a translation, increase translation acceptance counter
IF (Iflag .EQ. 0) Kacct = Kacct + 1
C If acceptance is a rotation, increase rotation acceptance counter
IF (Iflag .EQ. 1) Kaccr = Kaccr + 1
C If acceptance is a pivot, increase pivot acceptance counter
IF (Iflag .EQ. 2) Kaccp = Kaccp + 1
C
RETURN
END
C
C-------------------------------------------------------------------
C
SUBROUTINE ADJUST
IMPLICIT REAL*8(A-H,O-Z)
COMMON /RATIOS/ Ratiot, Ratior, Ratiop
COMMON /NCC / Kacct, Kaccr, Kaccp
COMMON /PROPTY/ Bmax, Gmax, Rdel
COMMON /NRUN / Ncycle,Ndead,Kprint,Kdprnt,Kcyc,Neq
COMMON /STEPS / Deltrn, Delrot, Delpiv, Acctrn, Accrot, Accpiv
C
C ... Adjust maximum translational step size
Ratiot = DFLOAT(Kacct)/DFLOAT(Kcyc)
IF (Ratiot .GT. Acctrn) deltrn=1.01D0*deltrn
IF (Ratiot .LT. Acctrn) deltrn=0.99D0*deltrn
IF (deltrn .GT. 3.0D0) deltrn=3.0D0
C ... Adjust maximum rotational step size
Ratior = DFLOAT(Kaccr)/DFLOAT(Kcyc)
IF (Ratior .GT. Accrot) delrot = 1.01D0*delrot
IF (Ratior .LT. Accrot) delrot = 0.99D0*delrot
IF (delrot .GT. 3.D0) delrot = 3.D0
C ... Adjust maximum pivot step size
Ratiop = DFLOAT(Kaccp)/DFLOAT(Kcyc)
IF (Ratiop .GT. Accpiv) delpiv = 1.01D0*delpiv
IF (Ratiop .LT. Accpiv) delpiv = 0.99D0*delpiv
IF (delpiv .GT. 3.D0) delpiv = 3.D0
C
RETURN
END
C
C-------------------------------------------------------------------
C

