$DEBUG
C     THIS IS THE EXAMPLE PROGRAM DESCRIBING HOW TO USE KDB ROUTINES.
      PROGRAM HC_VSL_E
      IMPLICIT DOUBLE PRECISION (A-H,O-Z) 
      INTEGER NCMP
      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/HC_KVSL/IEQ_VSL(50),VSL_A(50),VSL_B(50),VSL_C(50),
     1	VSL_D(50),VSL_E(50),VSL_F(50),VSL_G(50),VSL_T1(50),VSL_T2(50)

	REAL*8 TEXP(4),VSLEXP(4)

C	EXPERIMENTAL DATA FOR ETHANEOL AT LOW PRESSURE
	DATA (TEXP(J),J=1,4) /293.D0,353.D0,413.D0,463.D0/
	DATA (VSLEXP(J),J=1,4) /0.458D0,0.246D0,0.153D0,0.0998D0/
	OPEN(UNIT=5,FILE="RESULT.TXT")
C     NUMBER OF COMPONENT = 1
      NCMP = 1

C	GAS VISCOSITY FOR LOW PRESSURE

C     SPECIFY THE ID OF EACH COMPONENT 
      ICMP(1) = 1059	! ETHYL ACETATE
	CNAME(1) = "ETHYL ACETATE"
C	LOW PRESSURE VISCOSITY COEFFICIENT FOR ETHANOL
	IEQ_VSL(1) = 1		
      VSL_A(1)=-4.171D0
	VSL_B(1)=984.1D0
	VSL_C(1)=0.D0
	VSL_D(1)=0.D0
	VSL_T1(1)=273.15D0
	VSL_T2(1)=353.15D0
C	PURE PROPERTIES FOR ETHANOL
	WT(1)=8.81060D1
	TC(1)=5.23300D2 
	TF(1)=1.89500D2 			 
 	PC(1)=3.88200D3 
	VC(1)=0.286D0
	ACCF(1)=0.362D0
	VOLP(1)=98.49D0

	WRITE(5,*) CNAME(1)
	WRITE(5,*) 'COMPARISON OF EXPERIMENTAL AND ESTIMATED VALUE ',
	1		'(% ERROR)'
	WRITE(5,*) '-----------------------------------------------------'
	1	   ,'----------------'
	WRITE(5,*) ' T(K)   VSL(cP)     KDB        P-S      LET-SOU ',
	1		'     IST1  IST2  IST3'
	WRITE(5,*) '-----------------------------------------------------'
	1	   ,'----------------'

	DO I = 1, 4
	
		CALL HC_VSLEQN(1,TEXP(I),VSL1,IST1)
		CALL HC_VSLPS(1,TEXP(I),1,VSL2,IST2)
		CALL HC_VSLLETSOU(1,TEXP(I),VSL3,IST3)
		ERR1 = DABS( (VSL1-VSLEXP(I))/VSLEXP(I) )*100.D0
		ERR2 = DABS( (VSL2-VSLEXP(I))/VSLEXP(I) )*100.D0
		ERR3 = DABS( (VSL3-VSLEXP(I))/VSLEXP(I) )*100.D0
		WRITE(5,5) TEXP(I),VSLEXP(I),ERR1,ERR2,ERR3,IST1,IST2,IST3
	ENDDO
5	FORMAT(1x,F6.2,1X,4(1X,G10.5),3I6) 
	WRITE(5,*) '-----------------------------------------------------'
	1	   ,'----------------'

	CLOSE(5) 
      STOP 
      END 