$DEBUG
C
C
C     LIST OF SUBROUTINES IN THIS FILE 
C
C     HC_VSGEQN : GAS VISCOSITY EQUATIONS(NO PRESSURE CORELATION) 
C     HC_VSGLUCAS_LP : A CORRESPONDING STATE METHOD PROPOSED 
C									BY LUCAS AT LOW PRESSURE
C	HC_VSGLUCAS_HP : A CORRESPONDING STATE METHOD PROPOSED 
C									BY LUCAS AT HIGH PRESSURE	
C	HC_VSGCHUGN_LP : A CORRESPONDING STATE METHOD PROPOSED 
C									BY CHUNG AT LOW PRESSURE
C	HC_VSGLUCAS_HP : A CORRESPONDING STATE METHOD PROPOSED 
C									BY CHUNG AT HIGH PRESSURE 
C
C*******************************************************************
C
C KDB THEMOPHYSICAL PROPERTIES CALCULATION FORTRAN ROUTINE LIBRARY 
C
C [NAME   ]  HC_VSGEQN 
C
C [TYPE   ]  FORTRAN SUBROUTINE                              
C
C [PURPOSE]  GAS VISCOSITY CALCULATION USING INTERNAL CORRELATION EQUATION 
C
C [USAGE  ]  CALL HC_VSGEQN(ICN,T,VSG,IST)
C
C [ARGUMENTS]                                                                  
C     ICN        : COMPONENT NUMBER (1-50) TO CALCULATE GAS VISCOSITY (INTEGER, INPUT) 
C     T          : TEMPERATURE IN KELVIN (REAL*8, INPUT) 
C
C     VSG        : GAS VISCOSITY IN cP (REAL*8, OUTPUT) 
C     IST        : STATUS OF CALCULATION (INTEGER, OUTPUT) 
C                = 0	    : NORMAL TERMINATION 
C                = 501   	: GAS VISCOSITY COEFFICIENT NOT AVAILABLE 
C                = 502    : OUT OF RANGE FOR THE APPLICATION  
C
C [COMMENTS]
C     
C [REQUIRED COMMON BLOCKS]
C     COMMON /HC_KVSG/ GAS VISCOSITY COEFFICIENTS 
C                                                                   
C [REQUIRED SUBROUTINES OR FUNCTIONS] 
C	NONE 
C
C [REFERENCE]
C     NONE  
C	
C [REVISION INFORMATION]
C     1.PROGRMAMMED BY J.W.KANG, KOREA UNIVERSITY, 1996
C     2.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2000                                                              
C     3.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2001  
C     4.REVISED BY Y.S.KIM, KOREA UNIVERSITY, 2001 
C*******************************************************************
      SUBROUTINE HC_VSGEQN(ICN,T,VSG,IST)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
	INTEGER IST,ICN  
      REAL*8  T,VSG
C --- COMMON BLOCK FOR GAS VISCOSITY COEFFICIENTS 
      COMMON/HC_KVSG/IEQ_VSG(50),VSG_A(50),VSG_B(50),VSG_C(50),
     1	VSG_D(50),VSG_E(50),VSG_F(50),VSG_G(50),VSG_T1(50),VSG_T2(50)
C --- INITIALIZATION 
      IST = 0
	VSG = 0.0
C --- CHECK IF EQUATION COEFF.S AVAILABLE 
	IF(IEQ_VSG(ICN).LE.0) IST = 501 
C --- CHECK IF THE RANGE OF APPLICATION 
	IF((T.LT.VSG_T1(ICN)).OR.(T.GT.VSG_T2(ICN)) ) IST = 502 
	IF(IST.NE.0) RETURN 
C --- LIQUID HEAT CAPAICITY CALCULATION 
      VSG = VSG_A(ICN)+VSG_B(ICN)*T+VSG_C(ICN)*T*T ! CENTI POISE
      RETURN
      END
C*******************************************************************
C
C KDB THEMOPHYSICAL PROPERTIES CALCULATION FORTRAN ROUTINE LIBRARY 
C
C [NAME   ]  HC_VSGLUCAS_LP
C
C [TYPE   ]  FORTRAN SUBROUTINE                              
C
C [PURPOSE]  GAS VISCOSITY ESTIMATION FOR LOW PRESSURE USING  
C            A CORRESPONDING STATE METHOD PROPOSED BY LUCAS
C
C [USAGE  ]  CALL HC_VSGLUCAS_LP(ICN,T,VSG,IST)
C
C [ARGUMENTS]                                                                  
C     ICN       : COMPONENT NUMBER (1-50) TO CALCULATE GAS VISCOSITY
C													(INTEGER, INPUT) 
C     T          : TEMPERATURE IN KELVIN (REAL*8, INPUT) 
C
C     VSG	       : GAS VISCOSITY IN MICRO POISE (REAL*8, OUTPUT) 
C     IST        : STATUS OF CALCULATION (INTEGER, OUTPUT) 
C                = 0	    : NORMAL TERMINATION 
C                = 511   	: CRITICAL TEMPERATURE DATA NOT AVAILABLE 
C                = 512    : CRITICAL PRESSURE DATA NOT AVAILABLE 
C                = 513    : CRITICAL COMPRESSIBILITY DATA NOT AVAILABLE 
C			   = 514	: DIPOLE MOMENT DATA NOT AVAILABLE
C
C [COMMENTS]
C     
C [REQUIRED COMMON BLOCKS]
C     COMMON /HC_PROP/ COMPONENT BASIC PROPERTIES 
C     COMMON /HC_NAME/ COMPONENT NAME AND FORMULA 
C                                                                   
C [REQUIRED SUBROUTINES OR FUNCTIONS] 
C	NONE 
C
C [REFERENCE]
C     1. LUCAS,K ,PHASE EQUILIBRIA AND FLUID PROPERTIES IN THE CHEMICAL INDUSTRY,
C			DECHEMA, FRANKFURT, 1980, P. 573 
C	
C [REVISION INFORMATION]
C     1.PROGRMAMMED BY J.W.KANG, KOREA UNIVERSITY, 1996
C     2.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2000                                                              
C     3.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2001  
C     4.REVISED BY Y.S.KIM, KOREA UNIVERSITY, 2001	 
C*******************************************************************
      SUBROUTINE HC_VSGLUCAS_LP(ICN,T,VSG,IST)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
	INTEGER IST,ICN  
      REAL*8  T,VSG,INV_VIS
      CHARACTER*50 CNAME
      CHARACTER*20 FORMULA 
      COMMON/HC_NAME/ICMP(50),CNAME(50),FORMULA(50),ICLASS(50) 
      COMMON/HC_PROP/WT(50),TB(50),TF(50),TC(50),PC(50),VC(50),ZC(50)
	1	,ACCF(50),WSRK(50),VEST(50),ZRA(50),SOLP(50),VOLP(50)
     2	,QI(50),RI(50),DM(50) 
	COMMON/LUCAS/ INV_VIS,FP0,FQ0 
C --- INITIALIZATION 
      IST = 0
	VSG = 0.0
C --- CHECK IF ALL THE AVAILABALE DATA EXISTS 
	IF(TC(ICN).LE.0.) IST = 511
	IF(PC(ICN).LE.0.) IST = 512
	IF(ZC(ICN).LE.0.) IST = 513
	IF(DM(ICN).LT.0.) IST = 514
	IF(IST.NE.0) RETURN 
C --- CALCULATE LOW PRESSURE VISCOSITY
	TR = T/TC(ICN)
	PC1 = PC(ICN)/100.D0
	DMR = 52.46D0*DM(ICN)*DM(ICN)*PC1/TC(ICN)/TC(ICN)
	IF ( DMR .GE. 0 .AND. DMR .LT. 0.022D0) THEN
		FP = 1.D0
	ELSE IF ( DMR .GE. 0.022D0 .AND. DMR .LT. 0.075D0 ) THEN
		FP = 1.D0+30.55D0*(0.292-ZC(ICN))**1.72D0
	ELSE 
		FP = DABS(0.96D0+0.1D0*(TR-0.7D0))
		FP = 1.D0+FP*30.55D0*(0.292-ZC(ICN))**1.72D0
	END IF
	INV_VIS = (TC(ICN)/WT(ICN)**3.D0/PC1**4.D0)**(1.D0/6.D0)
	INV_VIS = 0.176D0*INV_VIS
	TEMP = 0.D0
	TEMP = 0.807D0*TR**.618D0-.357*DEXP(-.449*TR)
	TEMP = TEMP + .340D0*DEXP(-4.058D0*TR)+0.018D0
	TEMP = FP * TEMP
	FQ = 1.D0
	IF ( ICMP(ICN) .EQ. 1925 ) THEN		! FOR HELIUM-4
		Q = 1.38D0
		FQ = 1.D0+.00385D0*(TR-12.D0)**(2.D0/WT(ICN))
	1			*(TR-12.D0)/DABS(TR-12.D0)
		FQ = FQ*1.22D0*Q**.15D0
	ELSE IF ( ICMP(ICN) .EQ. 1912 ) THEN	! FOR HYDROGEN
		Q =	0.76D0
		FQ = 1.D0+.00385D0*(TR-12.D0)**(2.D0/WT(ICN))
	1			*(TR-12.D0)/DABS(TR-12.D0)
		FQ = FQ*1.22D0*Q**.15D0
	ELSE IF ( ICMP(ICN) .EQ. 1898 ) THEN	! FOR DEUTERIUM    
		Q = 0.52D0
		FQ = 1.D0+.00385D0*(TR-12.D0)**(2.D0/WT(ICN))
	1			*(TR-12.D0)/DABS(TR-12.D0)
		FQ = FQ*1.22D0*Q**.15D0
	END IF
	FP0 = FP
	FQ0 = FQ
	TEMP = FQ * TEMP
	VSG = TEMP / INV_VIS
      RETURN
      END
C*******************************************************************
C
C KDB THEMOPHYSICAL PROPERTIES CALCULATION FORTRAN ROUTINE LIBRARY 
C
C [NAME   ]  HC_VSGLUCAS_HP
C
C [TYPE   ]  FORTRAN SUBROUTINE                              
C
C [PURPOSE]  GAS VISCOSITY ESTIMATION FOR HIGH PRESSURE USING  
C            A CORRESPONDING STATE METHOD PROPOSED BY LUCAS
C
C [USAGE  ]  CALL HC_VSGLUCAS_HP(ICN,T,P,VSG,IST)
C
C [ARGUMENTS]                                                                  
C     ICN       : COMPONENT NUMBER (1-50) TO CALCULATE GAS VISCOSITY (INTEGER, INPUT) 
C     T          : TEMPERATURE IN KELVIN (REAL*8, INPUT) 
C	P		   : PRESSURE IN KPA (REAL*8, INPUT)	 
C
C     VSG	       : GAS VISCOSITY IN MICRO POISE (REAL*8, OUTPUT) 
C     IST        : STATUS OF CALCULATION (INTEGER, OUTPUT) 
C                = 0	    : NORMAL TERMINATION 
C                = 521   	: CRITICAL TEMPERATURE DATA NOT AVAILABLE 
C                = 522    : CRITICAL PRESSURE DATA NOT AVAILABLE 
C                = 523    : CRITICAL COMPRESSIBILITY DATA NOT AVAILABLE 
C                = 524    : DIPOLE MOMENT DATA NOT AVAILABLE 
C			   = 525	: OUT OF RANGE FOR THE APPLICATION
C
C [COMMENTS]
C     
C [REQUIRED COMMON BLOCKS]
C     COMMON /HC_PROP/ COMPONENT BASIC PROPERTIES 
C     COMMON /HC_NAME/ COMPONENT NAME AND FORMULA 
C	COMMON /LUCAS/ INV_VIS,FP0,FQ0 
C                                                                   
C [REQUIRED SUBROUTINES OR FUNCTIONS] 
C	SUBROUTINE HC_PVPEQN(ICN,T,PVP,IST)
C     SUBROUTINE HC_VSGLUCAS_LP(ICN,T,VSG0,IST)
C
C [REFERENCE]
C     1. LUCAS,K ,PHASE EQUILIBRIA AND FLUID PROPERTIES IN THE CHEMICAL INDUSTRY,
C			DECHEMA, FRANKFURT, 1980, P. 573 
C	
C [REVISION INFORMATION]
C     1.PROGRMAMMED BY Y.S.KIM, KOREA UNIVERSITY, 2002
C*******************************************************************
      SUBROUTINE HC_VSGLUCAS_HP(ICN,T,P,VSG,IST)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
	INTEGER IST,ICN  
      REAL*8  T,P,VSG,INV_VIS
      CHARACTER*50 CNAME
      CHARACTER*20 FORMULA 
      COMMON/HC_NAME/ICMP(50),CNAME(50),FORMULA(50),ICLASS(50) 
      COMMON/HC_PROP/WT(50),TB(50),TF(50),TC(50),PC(50),VC(50),ZC(50)
	1	,ACCF(50),WSRK(50),VEST(50),ZRA(50),SOLP(50),VOLP(50)
     2	,QI(50),RI(50),DM(50) 
	COMMON/LUCAS/ INV_VIS,FP0,FQ0 

C --- INITIALIZATION 
      IST = 0
	VSG = 0.0
	TR = T/TC(ICN)
	PR = P/PC(ICN)
C --- CHECK IF ALL THE AVAILABALE DATA EXISTS 
	IF(TC(ICN).LE.0.) IST = 521
	IF(PC(ICN).LE.0.) IST = 522
	IF(ACCF(ICN).LE.0.) IST = 523 
	IF(DM(ICN).LT.0.) IST = 524
	IF(IST.NE.0) RETURN 
C --- CALCULATE LOW PRESSURE VISCOSITY
	CALL HC_VSGLUCAS_LP(ICN,T,VSG0,IST)
	Z1 = VSG0*INV_VIS
C --- CALCULATE PRESSURE EFFECT
	PVP0=0. 
	CALL HC_PVPEQN(ICN,T,PVP,IST)
	IST = 0
	PVP0 = PVP/PC(ICN)
	IF (TR.LE.1.D0 .AND. PR.LT.PVP0) THEN
		ALPHA=3.262D0+14.98D0*PR**5.508D0
		BETA =1.390D0+5.746D0*PR  
		Z2=0.6D0+0.76D0*PR**ALPHA+(6.99D0*PR**BETA-.6D0)*(1-TR)
	ELSEIF((TR.GT.1.D0 .AND. TR.LT.40.D0).AND.(PR.LE.1.D2)) THEN
		A1=1.245D-3
		A2=5.1726D0
		GAMMA=-.3286D0
		B1=1.6533D0
		B2=1.2723D0
		C1=.4489D0
		C2=3.0578D0
		DELTA=-37.7332D0
		D1=1.7368D0
		D2=2.231D0
		EPSIL=-7.6351D0
		F1=.9425D0
		F2=-.1853D0
		ZETA=.4489D0
		AA=A1/TR*DEXP(A2*TR**GAMMA)
		BB=AA*(B1*TR-B2)
		CC=C1/TR*DEXP(C2*TR**DELTA)
		DD=D1/TR*DEXP(D2*TR**EPSIL)
		EE=1.3088D0
		FF=F1*DEXP(F2*TR**ZETA)
		Z2=Z1*(AA*PR**EE/(BB*PR**FF+1.D0/(1.D0+CC*PR**DD))+1) 	
	ELSE
		IST = 525	! OUT OF RANGE FOR THE APPLICATION
		RETURN
	END IF
	YY=Z2/Z1 
	FP=(1.D0+(FP0-1.D0)*YY**(-3.D0))/FP0
	FQ=((1.D0/YY-.007D0*DLOG(YY)**4)*(FQ0-1.D0)+1.D0)/FQ0
	VSG=Z2*FP*FQ/INV_VIS
	RETURN
	END
C*******************************************************************
C
C KDB THEMOPHYSICAL PROPERTIES CALCULATION FORTRAN ROUTINE LIBRARY 
C
C [NAME   ]  HC_VSGCHUNG_LP
C
C [TYPE   ]  FORTRAN SUBROUTINE                              
C
C [PURPOSE]  GAS VISCOSITY ESTIMATION USING FOR LOW PRESSURE 
C            A CORRESPONDING STATE METHOD PROPOSED BY CHUNG et al.
C
C [USAGE  ]  CALL HC_VSGCHUNG_LP(IDN,T,VISC,IST)
C
C [ARGUMENTS]                                                                  
C     ICN	: COMPONENT NUMBER (1-50) TO CALCULATE GAS VISCOSITY (INTEGER, INPUT) 
C     T	: TEMPERATURE IN KELVIN (REAL*8, INPUT) 
C
C     VSG	: GAS VISCOSITY IN MICRO POISE (REAL*8, OUTPUT) 
C     IST	: STATUS OF CALCULATION (INTEGER, OUTPUT) 
C			= 0		: NORMAL TERMINATION 
C	        = 531	: CRITICAL TEMPERATURE DATA NOT AVAILABLE 
C             = 532	: CRITICAL PRESSURE DATA NOT AVAILABLE 
C             = 533	: CRITICAL VOLUME DATA NOT AVAILABLE 
C			= 534	: ACCETRIC FACTOR DATA NOT AVAILABLE
C			= 535	: DIPOLE MOMENT DATA NOT AVAILABLE
C
C [COMMENTS]
C     
C [REQUIRED COMMON BLOCKS]
C     COMMON /HC_PROP/ COMPONENT BASIC PROPERTIES 
C                                                                   
C [REQUIRED SUBROUTINES OR FUNCTIONS] 
C	SUBROUTINE CHUNGKP(ICN,T,KAP) 
C
C [REFERENCE]
C     1. CHUNG,T.H. et al, Ind.Eng.Chem.Res., 27, P. 671(1988)
C	
C [REVISION INFORMATION]
C     1.PROGRMAMMED BY J.W.KANG, KOREA UNIVERSITY, 1996
C     2.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2000                                                              
C     3.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2001  
C     4.REVISED BY Y.S.KIM, KOREA UNIVERSITY, 2002	 
C*******************************************************************

       SUBROUTINE HC_VSGCHUNG_LP(IDN,T,VISC,IST)
       IMPLICIT DOUBLE PRECISION (A-H,O-Z)
       REAL*8   VISC
       INTEGER  I,IDN
       COMMON/HC_PROP/WT(50),TB(50),TF(50),TC(50),PC(50),VC(50),ZC(50)
	1    ,ACCF(50),WSRK(50),VEST(50),ZRA(50),SOLP(50),VOLP(50)
     2    ,QI(50),RI(50),DM(50) 

       DATA A,B,C,D,E,F/1.16145D0,0.14874D0,0.52487D0,0.77320D0,
     1                  2.16178D0,2.43787D0/
C---------------------- INITIALIZE PARAMETERS ----------------------C
       IST = 0
       I   = IDN
       VK  = 0.D0
C --- CHECK IF ALL THE AVAILABALE DATA EXISTS 
	IF(TC(IDN).LE. 0.) IST = 531
	IF(PC(IDN).LE. 0.) IST = 532
	IF(VC(IDN).LE. 0.) IST = 533
	IF(ACCF(IDN).LE. 0.) IST = 534
	IF(DM(IDN).LT. 0.) IST = 535
	IF(IST.NE.0) RETURN 
C------------------- COMPUTE CHUNG'S PURE PARAMETERS ---------------C
	 CALL CHUNGKP(I,VK)
       TR=T/TC(I)
       EPK=TC(I)/1.2593D0
       SIG=0.809D0*(VC(I)*1.D3)**(1.D0/3.D0)
       TST=1.2593D0*TR
       DMR=131.3D0*DM(I)/(VC(I)*1.D3*TC(I))**0.5D0
       FCP=1.D0-0.2756D0*ACCF(I)+0.059035D0*DMR**4.D0+VK
       OMV=A*TST**(-B)+C*(EXP((-D)*TST))+E*(EXP((-F)*TST))
	 VISC=FCP*DSQRT(WT(I)*T)/((VC(I)*1.D3)**(2.D0/3.D0))/OMV*40.785D0
       RETURN
       END
C*******************************************************************
C
C KDB THEMOPHYSICAL PROPERTIES CALCULATION FORTRAN ROUTINE LIBRARY 
C
C [NAME   ]  HC_VSGCHUNG_HP
C
C [TYPE   ]  FORTRAN SUBROUTINE                              
C
C [PURPOSE]  GAS VISCOSITY ESTIMATION USING  
C            A CORRESPONDING STATE METHOD PROPOSED BY CHUNG et al.
C
C [USAGE  ]  CALL HC_VSGCHUNG_HP(IDN,T,P,METH,IVOL,VSG,IST)
C
C [ARGUMENTS]                                                                  
C     ICN	: COMPONENT NUMBER (1-50) TO CALCULATE GAS VISCOSITY (INTEGER, INPUT) 
C     T	: TEMPERATURE IN KELVIN (REAL*8, INPUT) 
C	P	: PRESSURE IN KPA (REAL*8, INPUT)
C     METH : METHOD SELECTION FLAG(INTEGER)                   
C                  METH  = 1 -----> CHUNG et al. METHOD       
C                  METH  = 2 -----> BRULE AND STARLING METHOD 
C	IVOL : IF THERE IS EXPERIMENTAL VOLUME DATA, IVOL = 1
C		   ELSE IF, IVOL = 2 AND CALCULATE VOLUME BY EOS(CB_SOL)
C	VOL : MOLAR VOLUME IN CM^3/MOL (REAL*8, INPUT IF IVOL=1)
C
C     VSG	: GAS VISCOSITY IN MICRO POISE (REAL*8, OUTPUT) 
C     IST	: STATUS OF CALCULATION (INTEGER, OUTPUT) 
C			= 0		: NORMAL TERMINATION 
C	        = 541	: CRITICAL TEMPERATURE DATA NOT AVAILABLE 
C             = 542	: CRITICAL PRESSURE DATA NOT AVAILABLE 
C             = 543	: CRITICAL VOLUME DATA NOT AVAILABLE 
C			= 544	: DIPOLE MOMENT DATA NOT AVAILABLE
C			= 545	: ACCETRIC FACTOR DATA NOT AVAILABLE
C			= 1546  : NO CONVERGENCE IN CALCULATION OF DENSITY
C									BY EQUATION OF STATE(SRK)
C
C [COMMENTS]
C     
C [REQUIRED COMMON BLOCKS]
C     COMMON /HC_PROP/ COMPONENT BASIC PROPERTIES 
C     COMMON /HC_NAME/ COMPONENT NAME AND FORMULA 
C                                                                   
C [REQUIRED SUBROUTINES OR FUNCTIONS] 
C	SUBROUTINE CHUNGKP(ICN,T,KAP) 
C	SUBROUTINE CB_SRK(ICN,T,P,RHO,X,IPHASE,IST)
C
C [REFERENCE]
C     1. CHUNG,T.H. et al, Ind.Eng.Chem.Res., 27, P. 671(1988)
C	
C [REVISION INFORMATION]
C     1.PROGRMAMMED BY J.W.KANG, KOREA UNIVERSITY, 1996
C     2.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2000                                                              
C     3.REVISED BY J.W.KANG, KOREA UNIVERSITY, 2001  
C     4.REVISED BY Y.S.KIM, KOREA UNIVERSITY, 2002	 
C*******************************************************************

       SUBROUTINE HC_VSGCHUNG_HP(IDN,T,P,METH,IVOL,VOL,VISC,IST)
       IMPLICIT DOUBLE PRECISION (A-H,O-Z)
       REAL*8   VISC,Y(30)
       INTEGER  I,IDN,METH
       CHARACTER*50 CNAME
       CHARACTER*20 FORMULA 
       COMMON/HC_NAME/ICMP(50),CNAME(50),FORMULA(50),ICLASS(50) 
       COMMON/HC_PROP/WT(50),TB(50),TF(50),TC(50),PC(50),VC(50),ZC(50)
	1    ,ACCF(50),WSRK(50),VEST(50),ZRA(50),SOLP(50),VOLP(50)
     2    ,QI(50),RI(50),DM(50) 
       DIMENSION    SA(10),SB(10),SC(10),SD(10),EE(10),
     1              BSA(10),BSB(10)
       DATA (SA(J),J=1,10)/ 6.324D0 , 1.210D-3 , 5.283D0, 6.623D0 ,
     1                     19.745D0 ,-1.900D0  ,24.275D0, 0.7972D0,
     1                     -0.2382D0, 0.06863D0/
       DATA (SB(J),J=1,10)/50.412D0  , -1.154D-3,254.209D0,38.096D0,
     1                      7.630D0  ,-12.537D0 ,  3.450D0, 1.117D0,
     1                      0.06770D0,  0.3479D0/
       DATA (SC(J),J=1,10)/-51.680D0 ,-6.257D-3,-168.48D0,-8.464D0  ,
     1                     -14.354D0 , 4.985D0 ,-11.291D0, 0.01235D0,
     1                      -0.8163D0, 0.5926D0/
       DATA (SD(J),J=1,10)/1189.0D0  ,  0.03728D0,3898.0D0 ,31.42D0 ,
     1                       31.53D0 ,-18.15D0   ,  69.35D0,-4.117D0,
     1                        4.025D0, -0.727D0/
       DATA (BSA(J),J=1,10)/17.450D0 ,-9.611D-4,51.0443D0,-0.6059D0,
     1                      21.382D0 , 4.668D0 , 3.762D0 , 1.004D0 ,
     1                      -7.774D-2, 0.3175D0/
       DATA (BSB(J),J=1,10)/34.063D0,  7.235D-3,169.46D0 ,71.174D0,
     1                      -2.110D0,-39.941D0 , 56.623D0, 3.140D0,
     1                      -3.584D0,  1.1600D0/
       DATA A,B,C,D,E,F/1.16145D0,0.14874D0,0.52487D0,0.77320D0,
     1                  2.16178D0,2.43787D0/
C---------------------- INITIALIZE PARAMETERS ----------------------C
       IST = 0
       I   = IDN
       VK  = 0.D0
C --- CHECK IF ALL THE AVAILABALE DATA EXISTS 
	IF(TC(IDN).LE.0.) IST = 541
	IF(PC(IDN).LE.0.) IST = 542
	IF(VC(IDN).LE.0.) IST = 543
	IF(DM(IDN).LT.0.) IST = 544
	IF(IST.NE.0) RETURN 
C------------------- COMPUTE CHUNG'S PURE PARAMETERS ---------------C
       CALL CHUNGKP(I,VK)
       TR=T/TC(I)
       EPK=TC(I)/1.2593D0
       SIG=0.809D0*(VC(I)*1.D3)**(1.D0/3.D0)
       TST=1.2593D0*TR
       DMR=131.3D0*DM(I)/(VC(I)*1.D3*TC(I))**0.5D0
       FCP=1.D0-0.2756D0*ACCF(I)+0.059035D0*DMR**4.D0+VK
       OMV=A*TST**(-B)+C*(DEXP((-D)*TST))+E*(DEXP((-F)*TST))
C----------------------- EFFECT OF PRESSURE ------------------------C
	 IF(IVOL.EQ.1) THEN
		VM = VOL
	 ELSE
		Y(1) = 1.0D0
		IPHASE = 0
		P1 = P
		CALL CB_SRK(I,T,P1,RHO,Y,IPHASE,IST)
		IF(IST.NE.0) THEN
		IST = 1546
		RETURN      ! ERROR CODE
		ENDIF
		VM=1.D0/RHO
	 ENDIF
       SPVO=1.D0/VM
C-------- CALCULATE CHUNG et al./BRULE-STARLING COEFFICIENTS -------C
       DO 40 K = 1,10
         IF(METH.EQ.1) THEN
           EE(K)=SA(K)+SB(K)*ACCF(I)+SC(K)*DMR**4.D0+SD(K)*VK
         ELSE
           EE(K)=BSA(K)+BSB(K)*ACCF(I)
         ENDIF
40     CONTINUE
C--------------- CALCULATE PARAMETERS FOR HIGH PRESSURE ------------C
       YY=SPVO*VC(I)*1.D3/6.D0
       G1=(1.D0-0.5D0*YY)/(1.D0-YY)**3.D0
       G2=(EE(1)*((1.D0-EXP(-EE(4)*YY))/YY)+EE(2)*G1*EXP(EE(5)*YY)+
     1    EE(3)*G1) / (EE(1)*EE(4)+EE(2)+EE(3))
C----------------- CALCULATION OF PURE VISCOSITY -------------------C
       VISC=EE(7)*YY**2*G2*EXP(EE(8)+EE(9)/TST+(EE(10)/TST**2.D0))
       VISC=(TST**0.5D0/OMV)*(FCP*(1.D0/G2+EE(6)*YY))+VISC
       VISC=VISC*36.344D0*(WT(I)*TC(I))**0.5D0/(VC(I)*1.D3)**(2.D0/3.D0)
       RETURN
       END
C-------------------------------------------------------------------C
       SUBROUTINE CHUNGKP(ICN,KAP)
       IMPLICIT DOUBLE PRECISION (A-H,O-Z)
       INTEGER ICN
       REAL*8  KAP
       CHARACTER*50 CNAME
       CHARACTER*20 FORMULA 
       COMMON/HC_NAME/ICMP(50),CNAME(50),FORMULA(50),ICLASS(50) 
       COMMON/HC_PROP/WT(50),TB(50),TF(50),TC(50),PC(50),VC(50),ZC(50)
	1    ,ACCF(50),WSRK(50),VEST(50),ZRA(50),SOLP(50),VOLP(50)
     2    ,QI(50),RI(50),DM(50) 
       I   = ICN
       KAP = 0.D0
	 IF	(ICLASS(I).GE.11.AND.ICLASS(I).LE.14) ! OTHER ALCOHOLS
	1	  KAP=0.0682D0+4.704D0/WT(I)
	 IF (ICMP(I).EQ.817) KAP = 0.215D0 ! METHANOL
	 IF (ICMP(I).EQ.818) KAP = 0.175D0 ! ETHANOL
	 IF (ICMP(I).EQ.819 .OR. ICMP(I).EQ.820) KAP = 0.143D0 ! PROPANOL
	 IF (ICMP(I).EQ.821 .OR. ICMP(I).EQ.822) KAP = 0.132D0 ! BUTANOL
	 IF (ICMP(I).EQ.825) KAP = 0.122D0 ! PENTANOL
	 IF (ICMP(I).EQ.833) KAP = 0.114D0 ! HEXANOL
	 IF (ICMP(I).EQ.838) KAP = 0.109D0 ! HEPTANOL
	 IF (ICMP(I).EQ.930) KAP = 0.0916D0 ! ACETIC ACID
	 IF (ICMP(I).EQ.1914) KAP = 0.076D0 ! WATER

       RETURN
       END
C*******************************************************************
C     END OF FILE 
