Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SUBROUTINE THERMODYNAMICS(XCOMPOS,XFE,XPE,TMS,TBS,AE1,AE3,TDISS&,AE4,Tsolid,Tliquid,as1,krate)
- IMPLICIT REAL*8 (A-H,O-Z)
- PARAMETER(ZERO=1.0D-6)
- REAL*8 XFE,XPE,CEUT,TMS,TBS,AE1,AE3,TDISS,AE4,Tsolid,Tliquid,as1
- REAL*8 C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N,FC, PC, BC
- REAL*8 XCOMPOS(*), KRATE(*)
- C = XCOMPOS(1)
- Mn = XCOMPOS(2)
- Si = XCOMPOS(3)
- Ni = XCOMPOS(4)
- Cr = XCOMPOS(5)
- Mo = XCOMPOS(6)
- Cu = XCOMPOS(7)
- W = XCOMPOS(8)
- V = XCOMPOS(9)
- Nb = XCOMPOS(10)
- Ti = XCOMPOS(11)
- Al = XCOMPOS(12)
- N = XCOMPOS(13)
- CALL THERMCALC (C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N,& XFE,XPE,CEUT,AE1,AE3,TDISS,AE4,Tsolid,Tliquid,as1)
- TBS=637.D0-58.D0*C-35.D0*Mn-15.D0*NI-34.D0*Cr-41.D0*Mo
- TMS=539.D0-423.D0*C-30.4D0*Mn-17.7D0*Ni-12.1D0*Cr-7.5D0*Mo-7.5D0*Si
- FC=EXP(-0.281D0+1.780D0*Mn+0.306D0*Si+1.123D0*Ni& +2.720D0*Cr+4.057D0*Mo)
- PC=EXP(-4.246D0+4.356D0*Mn+0.441D0*Si+1.705D0*Ni & +3.329D0*Cr+5.194D0*SQRT(Mo))
- BC=EXP(-10.230D0+10.177D0*C+0.847D0*Mn+0.547D0*Ni & +0.902D0*Cr+0.364D0*Mo)
- KRATE(1) = FC
- KRATE(2) = PC
- KRATE(3) = BC
- RETURN
- END
- SUBROUTINE THERMCALC (C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N,& XFE,XPE,CEUT,AE1,AE3,TDISS,AE4,Tsolid,Tliquid,as1)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N,X(0:10)
- REAL*8 AS1,AE1,AE3,TDISS,AE4,TNJ,TNH,TAH,THJ,THB,TJE,TAB,TBC
- CALL XCOMP(C,MN,SI,NI,CR,MO,CU,W,V,NB,X)
- CALL AS1CALC(X,AS1,CEUT,CF)
- CALL AE1CALC(X,AE1,CEUTU,CFU)
- IF (AE1 .LT. AS1) THEN
- TEMP=AE1
- AE1=AS1
- AS1=TEMP
- CEUT=CEUTU
- CF=CFU
- ENDIF
- XFE=(CEUT-C)/(CEUT-CF)
- XPE=(C-CF)/(CEUT-CF)
- IF (C .GT. CEUT) THEN
- WRITE(*,*) '*** WARNING ***'
- WRITE(*,*) 'Composition of the steel is out of the range of ', & 'this model!'
- WRITE(*,*) 'No results available!'
- STOP
- ENDIF
- CALL AE3CALC(X,AE3)
- CALL TDISSCALC (C,Mn,Cr,Mo,V,Nb,Ti,& Al,N,AE3,TDISS)
- IF (C .LT. 0.20D0) THEN
- CALL TNJCALC(X,TNJ)
- IF (TNJ .NE. 0.0D0) THEN
- AE4=TNJ
- ENDIF
- ENDIF
- IF ((C .LT. 0.10D0) .AND. (TNJ .GT. 0.0D0)) THEN
- CALL TNHCALC(X,TNH)
- IF (TNH .NE. 0.0D0) THEN
- CALL TAHCALC (X,TAH)
- Tsolid=TAH
- CALL TABCALC (X,TAB)
- Tliquid=TAB
- ENDIF
- ENDIF
- IF ((TNJ .NE. 0.0D0) .AND. (TNH .EQ. 0.0D0)) THEN
- CALL THJCALC(X,THJ,XCH,XCJ)
- Tsolid=THJ
- CALL THBCALC(X,THB)
- CALL TABCALC (X,TAB)
- Tliquid=TAB
- ENDIF
- IF (TNJ .EQ. 0.0D0) THEN
- CALL TJECALC(X,TJE)
- Tsolid=TJE
- AE4=TJE
- CALL TJBCALC (X,TJB)
- CALL THBCALC (X,THB)
- CALL TABCALC (X,TAB)
- IF ((TJB .NE. 0.0D0) .AND. & ((THB .NE. 0.0D0) .OR. (TAB .NE. 0.0D0))) THEN
- Tliquid=TAB
- ELSE
- CALL TBCCALC (X,TBC)
- Tliquid=TBC
- ENDIF
- ENDIF
- RETURN
- END
- SUBROUTINE XCOMP (C,MN,SI,NI,CR,MO,CU,W,V,NB,X)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 X(0:10),AW(0:10)
- REAL*8 C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,XTOTAL
- DATA AW /55.875D0, 12.011D0, 54.938D0, 28.0855D0, 58.7D0, 51.996D0,& 95.94D0, 63.546D0, 183.85D0, 50.9415D0, 92.9064D0/
- X(0)=(100.0D0-C-Mn-Si-Ni-Cr-Mo-Cu-W-V-Nb)/AW(0)
- X(1)=C/AW(1)
- X(2)=Mn/AW(2)
- X(3)=Si/AW(3)
- X(4)=Ni/AW(4)
- X(5)=Cr/AW(5)
- X(6)=Mo/AW(6)
- X(7)=Cu/AW(7)
- X(8)=W/AW(8)
- X(9)=V/AW(9)
- X(10)=Nb/AW(10)
- XTOTAL=0.0D0
- DO 10 J=0,10,1
- XTOTAL=XTOTAL+X(J)
- 10 CONTINUE
- DO 20 J=0,10,1
- X(J)=X(J)/XTOTAL
- 20 CONTINUE
- RETURN
- END
- SUBROUTINE AS1CALC (X,AS1,CEUT,CF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 AS1,CEUT,CF
- REAL*8 X(0:10),XA(0:10),XF(0:10)
- REAL*8 A0(2:10),A1(2:10),Y(0:10)
- REAL*8 DGAF0,DGAF(1:10),GCA(0:10)
- REAL*8 EIIA(1:10),EIIF(1:10),ECIA(1:10),ECIF(1:10)
- REAL*8 F(2,2),G(2,2),FAVG,GAVG
- REAL*8 AW(0:10),T0,T,DT,DTT,XC,DX,DXC,Z,DTTMAX
- INTEGER INDEX,ITER,I,J,K
- DATA AW /55.875D0, 12.011D0, 54.9398D0, 28.0855D0, 58.70D0, 51.996D0,& 95.94D0, 63.546D0, 183.85D0, 50.9415D0, 92.9064D0/
- T0=1000.D0
- XC=0.0364D0
- INDEX=0
- DX=1.0D-5
- DT=0.01D0
- DXC=1.0D-5
- DTTMAX=10.
- DXCMAX=XC/2.0D0
- 10 INDEX=INDEX+1
- DO 200 J=1,2,1
- T=T0+(J-1.5D0)*DT
- DO 200 K=1,2,1
- XA(1)=XC+(K-1.5D0)*DX
- RT=1.987D0*T
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGAFCALC (T,DGAF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIIACALC (T,EIIA)
- CALL ECIFCALC (T,ECIF)
- CALL ECIACALC (T,ECIA)
- CALL GCACALC (T,GCA)
- CALL A01CALC (T,A0,A1)
- XF(1)=XA(1)*EXP(DGAF(1)/RT)
- XF(1)=XF(1)*EXP(EIIA(1)*XA(1)-EIIF(1)*XF(1))
- EXSUM=ECIA(1)*XA(1)
- DO 20 I=2,10,1
- XA(I)=X(I)
- XF(I)=XA(I)*EXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1))
- EXSUM=EXSUM+ECIA(I)*XA(I)
- 20 CONTINUE
- DO 40 I=2,10,1
- IF ((I .NE. 3) .AND. (I .NE. 7)) THEN
- Y(I)=XA(I)*EXP(-GCA(I)/RT-A0(I)/RT+ECIA(I)*XA(1) & +EIIA(I)*XA(I)+DLOG(XA(1))/3.0D0+EXSUM/3.0D0)
- ELSE
- Y(I)=0.
- ENDIF
- 40 CONTINUE
- DO 80 ITER=1,10,1
- XF(1)=XA(1)*DEXP(DGAF(1)/RT+EIIA(1)*XA(1)-EIIF(1)*XF(1))
- EXSUM=ECIA(1)*XA(1)
- DO 60 I=2,10,1
- IF ((I .EQ. 3) .OR. (I .EQ. 7)) THEN
- XF(I)=X(I)*(XF(1)-0.25)/(X(1)-0.25)
- ELSE
-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Y(0)-Y(I)
- 120 CONTINUE
- G(J,K)=G(J,K)+DLOG(Y(0))
- 200 CONTINUE
- DFX=(F(1,2)-F(1,1)+F(2,2)-F(2,1))/DX/2
- DGX=(G(1,2)-G(1,1)+G(2,2)-G(2,1))/DX/2
- DFT=(F(2,1)-F(1,1)+F(2,2)-F(1,2))/DT/2
- DGT=(G(2,1)-G(1,1)+G(2,2)-G(1,2))/DT/2
- Z=DFX*DGT-DFT*DGX
- FAVG=(F(1,1)+F(1,2)+F(2,1)+F(2,2))/4
- GAVG=(G(1,1)+G(1,2)+G(2,1)+G(2,2))/4
- DXC=(-FAVG*DGT+GAVG*DFT)/Z
- DTT=(-GAVG*DFX+FAVG*DGX)/Z
- IF ((ABS(DXC/XC) .LE. 0.01D0) .AND. (ABS(DTT) .LE. 1.0D0)) THEN
- AS1=T0+DTT-273.15D0
- GOTO 400
- ENDIF
- IF (INDEX .GT. 40) THEN
- IF ((DTTMAX .GT. DT) .OR. (DXCMAX .GT. DX)) THEN
- IF (DTTMAX .GT. DT) THEN
- DTTMAX=2.0D0*DTTMAX/3.0D0
- ENDIF
- IF (DXCMAX .GT. DX) THEN
- DXCMAX=2.0D0*DXCMAX/3.0D0
- ENDIF
- INDEX=0
- GOTO 10
- ELSE
- AS1=T0-273.15D0
- GOTO 400
- ENDIF
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- IF (DABS(DXC) .GT. DXCMAX) THEN
- DXC=SIGN(DXCMAX,DXC)
- ENDIF
- T0=T0+DTT
- XC=XC+DXC
- GOTO 10
- 400 XAM=0.0D0
- XFM=0.0D0
- DO 500 I=0,10,1
- XAM=XAM+XA(I)*AW(I)
- XFM=XFM+XF(I)*AW(I)
- 500 CONTINUE
- CEUT=100.0D0*XA(1)*AW(1)/XAM
- CF=100.0D0*XF(1)*AW(1)/XFM
- RETURN
- END
- SUBROUTINE AE1CALC (X,AE1,CEUT,CF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 AE1,CEUT,CF
- REAL*8 X(0:10),XA(0:10),XF(0:10)
- REAL*8 A0(2:10), A1(2:10), A(1:10),Y(0:10)
- REAL*8 DGAF0,DGAF(1:10),GCA(0:10)
- REAL*8 EIIA(1:10),EIIF(1:10),ECIA(1:10),ECIF(1:10)
- REAL*8 AW(0:10),F(2,2),G(2,2),FAVG,GAVG
- REAL*8 T0,T,DT,DTT,XC,DX,DXC,Z,DTTMAX,DXCMAX
- INTEGER INDEX,ITER,I,J,K
- DATA AW /55.875D0, 12.011D0, 54.9398D0, 28.0855D0, 58.7D0, 51.996D0,& 95.94D0, 63.546D0, 183.85D0, 50.9415D0, 92.9064D0/
- T0=1000.0D0
- XC=0.0364D0
- INDEX=0
- DT=0.01
- DX=1.0D-5
- DTTMAX=10.0D0
- DXCMAX=1.0D-4
- 10 INDEX=INDEX+1
- DO 200 J=1,2,1
- T=T0+(J-1.5)*DT
- RT=1.987*T
- DO 200 K=1,2,1
- XA(1)=XC+(K-1.5D0)*DX
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGAFCALC (T,DGAF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIIACALC (T,EIIA)
- CALL ECIFCALC (T,ECIF)
- CALL ECIACALC (T,ECIA)
- CALL GCACALC (T,GCA)
- CALL A01CALC (T,A0,A1)
- XF(1)=XA(1)*EXP(DGAF(1)/RT)
- XF(1)=XF(1)*EXP(ECIA(1)*XA(1)-ECIF(1)*XF(1))
- B=(XA(1)-X(1))/(XA(1)-XF(1))
- DO 20 I=2,10,1
- A(I)=EXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1))
- XA(I)=X(I)/(1-B*(1-A(I)))
- XF(I)=A(I)*XA(I)
- XF(1)=XF(1)*EXP(ECIA(I)*XA(I)-ECIF(I)*XF(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XF(1)=XA(1)*EXP(DGAF(1)/RT+ECI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- G(J,K)=GCA(0)/RT-DLOG(XA(0))+EIIA(1)*XA(1)*XA(1)/2.0D0& -DLOG(XA(1))/3.0D0-ECIA(1)*XA(1)/3.0D0
- DO 120 I=2,10,1
- G(J,K)=G(J,K)+Y(I)*Y(I)*(A0(I)+Y(I)*A1(I))/RT& +EIIA(I)*XA(I)*XA(I)/2+ECIA(I)*XA(1)*XA(I) & -ECIA(I)*XA(I)/3.0D0
- Y(0)=Y(0)-Y(I)
- 120 CONTINUE
- G(J,K)=G(J,K)+DLOG(Y(0))
- 200 CONTINUE
- DFX=(F(1,2)-F(1,1)+F(2,2)-F(2,1))/DX/2
- DGX=(G(1,2)-G(1,1)+G(2,2)-G(2,1))/DX/2
- DFT=(F(2,1)-F(1,1)+F(2,2)-F(1,2))/DT/2
- DGT=(G(2,1)-G(1,1)+G(2,2)-G(1,2))/DT/2
- Z=DFX*DGT-DFT*DGX
- FAVG=(F(1,1)+F(1,2)+F(2,1)+F(2,2))/4
- GAVG=(G(1,1)+G(1,2)+G(2,1)+G(2,2))/4
- DXC=(-FAVG*DGT+FAVG*DFT)/Z
- DTT=(-GAVG*DFX+FAVG*DGX)/Z
- IF ((DABS(DXC/XC) .LE. 0.01) .AND. (DABS(DTT) .LE. 1.0D0)) THEN
- AE1=T0+DTT-273.15D0
- GOTO 400
- ENDIF
- IF (INDEX .GT. 40) THEN
- IF ((DTTMAX .GT. DT) .OR. (DXCMAX .GT. DX)) THEN
- IF (DTTMAX .GT. DT) THEN
- DTTMAX=2*DTTMAX/3.0D0
- ENDIF
- IF (DXCMAX .GT. DX) THEN
- DXCMAX=2*DXCMAX/3.0D0
- ENDIF
- INDEX=0
- GOTO 10
- ELSE
- AE1=T0-273.15D0
- GOTO 400
- ENDIF
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- IF (DABS(DXC) .GT. DXCMAX) THEN
- DXC=SIGN(DXCMAX,DXC)
- ENDIF
- T0=T0+DTT
- XC=XC+DXC
- GOTO 10
- 400 XAM=0.0D0
- XFM=0.0D0
- DO 500 I=0,10,1
- XAM=XAM+XA(I)*AW(I)
- XFM=XFM+XF(I)*AW(I)
- 500 CONTINUE
- CEUT=100.0*XA(1)*AW(1)/XAM
- CF=100.0*XF(1)*AW(1)/XFM
- RETURN
- END
- SUBROUTINE AE3CALC (XA,AE3)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XA(0:10),XF(0:10),AE3
- REAL*8 DGAF0,DGAF(1:10)
- REAL*8 EIIF(1:10),EIIA(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 F(1:2),FAVG
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- INTEGER INDEX,ITER,I
- T0=1127.5D0-4805*XA(1)
- DT=0.01D0
- DTTMAX=10.0D0
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGAFCALC (T,DGAF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIIACALC (T,EIIA)
- CALL ECIFCALC (T,ECIF)
- CALL ECIACALC (T,ECIA)
- XF(1)=XA(1)*DEXP(DGAF(1)/RT)
- XF(1)=XF(1)*DEXP(ECIA(1)*XA(1)-ECIF(1)*XF(1))
- DO 20 I=2,10,1
- XF(I)=XA(I)*EXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1))
- XF(1)=XF(1)*EXP(ECIA(I)*XA(I)-ECIF(I)*XF(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XF(1)=XA(1)*DEXP(DGAF(1)/RT+ECIA(1)*XA(1)-ECIF(1)*XF(1))
- DO 40 I=2,10,1
- XF(I)=XA(I)*DEXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1) & +EIIA(I)*XA(I)-EIIF(I)*XF(I))
- XF(3)=XA(3)*DEXP(DGAF(3)/RT+ECIA(3)*XA(1)-ECIF(3)*XF(1) & +EIIA(3)*XA(3)-EIIF(3)*XF(3))
- XF(1)=XF(1)*DEXP(ECIA(I)*XA(I)-ECIF(I)*XF(I))
- 40 CONTINUE
- XF(0)=1.0
- DO 60 I=1,10,1
- XF(0)=XF(0)-XF(I)
- 60 CONTINUE
- F(K)=DGAF0/RT+DLOG(XA(0)/XF(0))+EIIF(1)*XF(1)*XF(1)/2& -EIIA(1)*XA(1)*XA(1)/2
- DO 100 I=2,10,1
- F(K)=F(K)+ECIF(I)*XF(1)*XF(I)-ECIA(I)*XA(1)*XA(I) & +EIIF(I)*XF(I)*XF(I)/2-EIIA(I)*XA(I)*XA(I)/2
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0D0) THEN
- AE3=T0+DTT-273.15D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- WRITE(*,*) '****** WARNING ******'
- WRITE(*,*) 'AE3 COMPUTATION FAILS TO CONVERGE',& ' IN 40 ITERATIONS!'
- STOP
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- END
- SUBROUTINE TNJCALC (XA,TNJ)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XA(0:10),XF(0:10),TNJ
- REAL*8 DGAF0,DGAF(1:10),F(1:2),FAVG
- REAL*8 EIIF(1:10),EIIA(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- T0=1673.0D0+10555.0D0*XA(1)
- DT=0.01
- DTTMAX=10.
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGAFCALC (T,DGAF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIIACALC (T,EIIA)
- CALL ECIFCALC (T,ECIF)
- CALL ECIACALC (T,ECIA)
- XF(1)=XA(1)*DEXP(DGAF(1)/RT)
- XF(1)=XF(1)*DEXP(EIIA(1)*XA(1)-EIIF(1)*XF(1))
- DO 20 I=2,10,1
- XF(I)=XA(I)*DEXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1))
- XF(I)=XF(I)*DEXP(EIIA(I)*XA(I)-EIIF(I)*XF(I))
- XF(1)=XF(1)*DEXP(ECIA(I)*XA(I)-ECIF(I)*XF(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XF(1)=XA(1)*DEXP(DGAF(1)/RT+EIIA(1)*XA(1)-EIIF(1)*XF(1))
- DO 40 I=2,10,1
- XF(I)=XA(I)*DEXP(DGAF(I)/RT+ECIA(I)*XA(1)-ECIF(I)*XF(1) & +EIIA(I)*XA(I)-EIIF(I)*XF(I))
- XF(1)=XF(1)*DEXP(ECIA(I)*XA(I)-ECIF(I)*XF(I))
- 40 CONTINUE
- XF(0)=1.0
- DO 60 I=1,10,1
- XF(0)=XF(0)-XF(I)
- 60 CONTINUE
- F(K)=DGAF0/RT+DLOG(XA(0)/XF(0))& +(EIIF(1)*XF(1)*XF(1)-EIIA(1)*XA(1)*XA(1))/2
- DO 80 I=2,10,1
- F(K)=F(K)+ECIF(I)*XF(1)*XF(I)-ECIA(I)*XA(1)*XA(I) & +(EIIF(I)*XF(I)*XF(I)-EIIA(I)*XA(I)*XA(I))/2
- 80 CONTINUE
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0) THEN
- TNJ=T0+DTT-273.15D0
- RETURN
- ELSEIF ((T0+DTT) .GT. 1820.0D0) THEN
- TNJ=0.0D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- WRITE(*,*) '****** WARNING ******'
- WRITE(*,*) 'TNJ COMPUTATION FAILS TO CONVERGE',& ' IN 40 ITERATIONS!'
- STOP
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- 1000 RETURN
- END
- SUBROUTINE TNHCALC (XF,TNH)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XA(0:10),XF(0:10),TNH
- REAL*8 DGAF0,DGAF(1:10),F(1:2),FAVG
- REAL*8 EIIF(1:10),EIIA(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- T0=1673.0D0+23750.0D0*XF(1)
- DT=0.01D0
- DTTMAX=10.0D0
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGAFCALC (T,DGAF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIIACALC (T,EIIA)
- CALL ECIFCALC (T,ECIF)
- CALL ECIACALC (T,ECIA)
- XA(1)=XF(1)*DEXP(-DGAF(1)/RT)
- XA(1)=XA(1)*DEXP(ECIF(1)*XF(1)-ECIA(1)*XA(1))
- DO 20 I=2,10,1
- XA(I)=XF(I)*DEXP(-DGAF(I)/RT+ECIF(I)*XF(1)-ECIA(I)*XA(1))
- XA(I)=XA(I)*DEXP(EIIF(I)*XF(I)-EIIA(I)*XA(I))
- XA(1)=XA(1)*DEXP(ECIF(I)*XF(I)-ECIA(I)*XA(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XA(1)=XF(1)*DEXP(-DGAF(1)/RT+ECIF(1)*XF(1)-ECIA(1)*XA(1))
- DO 40 I=2,10,1
- XA(I)=XF(I)*DEXP(-DGAF(I)/RT+ECIF(I)*XF(1)+EIIF(I)*XF(I)& -EIIA(I)*XA(I)-ECIA(I)*XA(1))
- XA(1)=XA(1)*DEXP(ECIF(I)*XF(I)-ECIA(I)*XA(I))
- 40 CONTINUE
- XA(0)=1.0
- DO 60 I=1,10,1
- XA(0)=XA(0)-XA(I)
- 60 CONTINUE
- F(K)=DGAF0/RT+DLOG(XA(0)/XF(0))+EIIF(1)*XF(1)*XF(1)/2& -EIIA(1)*XA(1)*XA(1)/2
- DO 100 I=2,10,1
- F(K)=F(K)+ECIF(I)*XF(1)*XF(I)-ECIA(I)*XA(1)*XA(I)& +EIIF(I)*XF(I)*XF(I)/2-EIIA(I)*XA(I)*XA(I)/2
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0) THEN
- TNH=T0+DTT-273.15D0
- RETURN
- ELSEIF ((T0+DTT) .GT. 1820.0D0) THEN
- TNH=0.0D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- WRITE(*,*) '****** WARNING ******'
- WRITE(*,*) 'TNH COMPUTATION FAILS TO CONVERGE',& ' IN 40 ITERATIONS!'
- TNH=0.0D0
- RETURN
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- 1000 RETURN
- END
- SUBROUTINE TAHCALC (XF,TAH)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XL(0:10),XF(0:10),TAH
- REAL*8 DGAF0,DGLF0,DGLF(1:10),F(1:2),FAVG
- REAL*8 EIIF(1:10),EIIL(1:10),ECIF(1:10),ECIL(1:10)
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- INTEGER INDEX,ITER,I
- T0=1811.0D0-10750.0D0*XF(1)
- DT=0.01D0
- DTTMAX=10.0D0
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL SFECALC (T,SFE)
- CALL DGAF0CALC (T,DGAF0)
- CALL DGLFCALC (T,DGLF)
- CALL EIIFCALC (T,SFE,EIIF)
- CALL EIILCALC (T,EIIL)
- CALL ECIFCALC (T,ECIF)
- CALL ECILCALC (T,ECIL)
- DGLF0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T+DGAF0
- XL(1)=XF(1)*DEXP(-DGLF(1)/RT)
- XL(1)=XL(1)*DEXP(ECIF(1)*XF(1)-ECIL(1)*XL(1))
- DO 20 I=2,10,1
- XL(I)=XF(I)*DEXP(-DGLF(I)/RT+ECIF(I)*XF(1)-ECIL(I)*XL(1))
- XL(I)=XL(I)*DEXP(EIIF(I)*XF(I)-EIIL(I)*XL(I))
- XL(1)=XL(1)*DEXP(ECIF(I)*XF(I)-ECIF(I)*XL(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XL(1)=XF(1)*DEXP(-DGLF(1)/RT+ECIF(1)*XF(1)-ECIL(1)*XL(1))
- DO 40 I=2,10,1
- XL(I)=XF(I)*DEXP(-DGLF(I)/RT+ECIF(I)*XF(1)-ECIL(I)*XL(1) & +EIIF(I)*XF(I)-EIIL(I)*XL(I))
- XL(1)=XL(1)*DEXP(ECIF(I)*XF(I)-ECIL(I)*XL(I))
- 40 CONTINUE
- XL(0)=1.0D0
- DO 60 I=1,10,1
- XL(0)=XL(0)-XL(I)
- 60 CONTINUE
- F(K)=DGLF0/RT+DLOG(XL(0)/XF(0))+EIIF(1)*XF(1)*XF(1)/2 & -EIIL(1)*XL(1)*XL(1)/2
- DO 100 I=2,10,1
- F(K)=F(K)+ECIF(I)*XF(1)*XF(I)-ECIL(I)*XL(1)*XL(I)& +EIIF(I)*XF(I)*XF(I)/2-EIIL(I)*XL(I)*XL(I)/2
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0) THEN
- TAH=T0+DTT-273.15D0
- RETURN
- ELSEIF ((T0+DTT) .GT. 1820.0D0) THEN
- TAH=0.0D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- WRITE(*,*) '****** WARNING ******'
- WRITE(*,*) 'TAH COMPUTATION FAILS TO CONVERGE',& ' IN 40 ITERATIONS!'
- STOP
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- END
- SUBROUTINE THJCALC(X,THJ,XCH,XCJ)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 X(0:10),XA(0:10),XF(0:10),XL(0:10),THJ
- REAL*8 DGAF0,DGFA(1:10),DGLA0,DGLA(1:10)
- REAL*8 EIIL(1:10),EIIF(1:10),EIIA(1:10)
- REAL*8 ECIL(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 A(1:10),B,F(2,2),G(2,2)
- REAL*8 T0,T,DT,DTT,XC,DX,DXC,Z,DTTMAX
- INTEGER INDEX
- T0=1765.0D0
- XC=0.008D0
- DTTMAX=10.0D0
- INDEX=0
- DX=1.0D-5
- DT=0.01D0
- DXC=1.0D-5
- DTTMAX=10
- DXCMAX=XC/2.0D0
- 10 INDEX=INDEX+1
- DO 100 J=1,2,1
- T=T0+(J-1.5D0)*DT
- RT=1.987D0*T
- DO 100 K=1,2,1
- XA(1)=XC+(K-1.5D0)*DX
- CALL DGAF0CALC(T,DGAF0)
- CALL DGFACALC(T,DGFA)
- CALL DGLACALC(T,DGLA)
- CALL EIIACALC(T,EIIA)
- CALL EIIFCALC(T,SFE,EIIF)
- CALL EIILCALC(T,EIIL)
- CALL ECIACALC(T,ECIA)
- CALL ECIFCALC(T,ECIF)
- CALL ECILCALC(T,ECIL)
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- XF(1)=XA(1)*DEXP(-DGFA(1)/RT)
- XF(1)=XF(1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K)=DGAF0/RT+DLOG(XA(0)/XF(0)) & +(EIIF(1)*XF(1)*XF(1)-EIIA(1)*XA(1)*XA(1))/2
- G(J,K)=DGLA0/RT+DLOG(XL(0)/XA(0))& +(EIIA(1)*XA(1)*XA(1)-EIIL(1)*XL(1)*XL(1))/2
- DO 80 I=2,10,1
- F(J,K)=F(J,K)+(EIIF(I)*XF(I)*XF(I)-EIIA(I)*XA(I)*XA(I))/2& +ECIF(I)*XF(1)*XF(I)-ECIA(I)*XA(1)*XA(I)
- G(J,K)=G(J,K)+(EIIA(I)*XA(I)*XA(I)-EIIL(I)*XL(I)*XL(I))/2 & +ECIA(I)*XA(1)*XA(I)-ECIL(I)*XL(1)*XL(I)
- 80 CONTINUE
- 100 CONTINUE
- DFX=(F(1,2)-F(1,1)+F(2,2)-F(2,1))/DX/2
- DGX=(G(1,2)-G(1,1)+G(2,2)-G(2,1))/DX/2
- DFT=(F(2,1)-F(1,1)+F(2,2)-F(1,2))/DT/2
- DGT=(G(2,1)-G(1,1)+G(2,2)-G(1,2))/DT/2
- Z=DFX*DGT-DFT*DGX
- FAVG=(F(1,1)+F(1,2)+F(2,1)+F(2,2))/4
- GAVG=(G(1,1)+G(1,2)+G(2,1)+G(2,2))/4
- DXC=(-FAVG*DGT+GAVG*DFT)/Z
- DTT=(-GAVG*DFX+FAVG*DGX)/Z
- IF ((DABS(DXC/XC) .LE. 0.01D0) .AND. (DABS(DTT) .LE. 1.0D0)) THEN
- THJ=T0+DTT-273.15D0
- XCH=XF(1)
- XCJ=XA(1)
- RETURN
- ENDIF
- IF (INDEX .GT. 40) THEN
- THJ=0.0
- RETURN
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- IF (DABS(DXC) .GT. DXCMAX) THEN
- DXC=SIGN(DXCMAX,DXC)
- ENDIF
- T0=T0+DTT
- XC=XC+DXC
- GOTO 10
- END
- SUBROUTINE THBCALC(X,THB)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 X(0:10),XA(0:10),XF(0:10),XL(0:10),THB
- REAL*8 DGAF0,DGFA0,DGFA(1:10),DGLA0,DGLA(1:10),DGLF(1:10)
- REAL*8 EIIL(1:10),EIIF(1:10),EIIA(1:10)
- REAL*8 ECIL(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 A(1:10),B,F(2,2),G(2,2)
- REAL*8 T0,T,DT,DTT,XC,DX,DXC,Z,DTTMAX
- INTEGER INDEX
- T0=1765.0D0
- XC=0.008D0
- DTTMAX=10.0D0
- INDEX=0
- DX=1.0D-5
- DT=0.01D0
- DXC=1.0D-5
- DTTMAX=10
- DXCMAX=XC/2.0D0
- 10 INDEX=INDEX+1
- DO 100 J=1,2,1
- T=T0+(J-1.5D0)*DT
- DO 100 K=1,2,1
- XA(1)=XC+(K-1.5D0)*DX
- RT=1.987D0*T
- CALL DGAF0CALC(T,DGAF0)
- CALL DGFACALC(T,DGFA)
- CALL DGLACALC(T,DGLA)
- CALL DGLFCALC(T,DGLF)
- CALL SFECALC(T,SFE)
- CALL EIIACALC(T,EIIA)
- CALL EIIFCALC(T,SFE,EIIF)
- CALL EIILCALC(T,EIIL)
- CALL ECIACALC(T,ECIA)
- CALL ECIFCALC(T,ECIF)
- CALL ECILCALC(T,ECIL)
- DGFA0=-DGAF0
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- XF(1)=XA(1)*DEXP(-DGFA(1)/RT)
- XF(1)=XF(1)*DEXP(EIIA(1)*XA(1)-EIIF(1)*XF(1))
- XL(1)=XA(1)*DEXP(-DGLA(1)/RT)
- XL(1)=XL(1)*DEXP(EIIA(1)*XA(1)-EIIL(1)*XL(1))
- B=(XL(1)-X(1))/(XL(1)-XF(1))
- DO 20 I=2,10,1
- A(I)=DEXP(DGLF(I)/RT+ECIL(I)*XL(1)-ECIL(I)*XF(1))
- XL(I)=X(I)/(1-B*(1-A(I)))
- XF(I)=XL(I)*A(I)
-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AND. (ABS(DTT) .LE. 1.)) THEN
- THB=T0+DTT-273.15D0
- IF (X(1) .GT. XL(1)) THEN
- THB=0.0D0
- ENDIF
- RETURN
- ENDIF
- IF (INDEX .GT. 40) THEN
- THB=0.0D0
- RETURN
- ENDIF
- IF (((T0+DTT) .GT. 1820.D0) .OR. ((T0+DTT) .LT. 600.0D0)) THEN
- THB=0.0D0
- RETURN
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- IF (DABS(DXC) .GT. DXCMAX) THEN
- DXC=SIGN(DXCMAX,DXC)
- ENDIF
- T0=T0+DTT
- XC=XC+DXC
- GOTO 10
- END
- SUBROUTINE TABCALC(XL,TAB)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XL(0:10),XF(0:10),TAB
- REAL*8 DGAF0,DGLA0,DGLF0,DGFA(1:10),DGLF(1:10),SFE
- REAL*8 EIIL(1:10),EIIF(1:10),ECIL(1:10),ECIF(1:10)
- REAL*8 F(1:2),T0,T,DT,DTT,DTTMAX
- INTEGER I,J,INDEX
- T0=1811.15D0-2000*XL(1)
- DTTMAX=10.0D0
- INDEX=0
- DT=0.01D0
- DTTMAX=10.0D0
- 10 INDEX=INDEX+1
- DO 100 J=1,2,1
- T=T0+(J-1.5D0)*DT
- RT=1.987D0*T
- CALL DGAF0CALC(T,DGAF0)
- CALL DGLFCALC(T,DGLF)
- CALL DGFACALC(T,DGFA)
- CALL SFECALC(T,SFE)
- CALL EIIFCALC(T,SFE,EIIF)
- CALL EIILCALC(T,EIIL)
- CALL ECIFCALC(T,ECIF)
- CALL ECILCALC(T,ECIL)
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- DGLF0=DGLA0+DGAF0
- XF(1)=XL(1)*DEXP(DGLF(1)/RT)
- XF(1)=XF(1)*DEXP(EIIL(1)*XL(1)-EIIF(1)*XF(1))
- DO 20 I=2,10,1
- XF(I)=XL(I)*DEXP(DGLF(I)/RT+ECIL(I)*XL(1)-ECIF(I)*XF(1))
- XF(I)=XF(I)*DEXP(EIIL(I)*XL(I)-EIIF(I)*XF(I))
- XF(1)=XF(1)*DEXP(ECIL(I)*XL(I)-ECIF(I)*XF(I))
- 20 CONTINUE
- GOTO 60
- DO 40 ITER=1,10,1
- XF(1)=XL(1)*DEXP(DGLF(1)/RT+EIIL(1)*XL(1)-EIIF(1)*XF(1))
- DO 40 I=2,10,1
- XF(I)=XL(I)*DEXP(DGLF(I)/RT+ECIL(I)*XL(1)-ECIF(I)*XF(1)& +EIIL(I)*XL(I)-EIIF(I)*XF(I))
- XF(1)=XF(1)*DEXP(ECIL(I)*XL(I)-ECIF(I)*XF(I))
- 40 CONTINUE
- 60 CONTINUE
- XF(0)=1.0-XF(1)
- F(J)=DGLF0/RT+(EIIF(1)*XF(1)*XF(1)-EIIL(1)*XL(1)*XL(1))/2.0D0
- DO 80 I=2,10,1
- XF(0)=XF(0)-XF(I)
- F(J)=F(J)+(EIIF(I)*XF(I)*XF(I)-EIIL(I)*XL(I)*XL(I))/2.0D0& +ECIF(I)*XF(1)*XF(I)-ECIL(I)*XL(1)*XL(I)
- 80 CONTINUE
- F(J)=F(J)+DLOG(XL(0)/XF(0))
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2.0D0
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0D0) THEN
- TAB=T0+DTT-273.15D0
- RETURN
- ENDIF
- IF (((T0+DTT) .GT. 1820.0D0) .OR. ((T0+DTT) .LT. 600.0D0)) THEN
- TAB=0.0D0
- RETURN
- ENDIF
- IF (INDEX .GT. 40) THEN
- TAB=0.0D0
- RETURN
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- T0=T0+DTT
- GOTO 10
- END
- SUBROUTINE TJECALC (XA,TJE)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XL(0:10),XA(0:10),TJE
- REAL*8 DGLA0,DGFA(1:10),DGLA(1:10),F(1:2),FAVG
- REAL*8 EIIL(1:10),EIIA(1:10),ECIL(1:10),ECIA(1:10)
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- INTEGER INDEX,I
- T0=1808.0D0-4480.0D0*XA(1)
- DT=0.01D0
- DTTMAX=10.
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL DGLACALC (T,DGLA)
- CALL DGFACALC (T,DGFA)
- CALL EIILCALC (T,EIIL)
- CALL EIIACALC (T,EIIA)
- CALL ECILCALC (T,ECIL)
- CALL ECIACALC (T,ECIA)
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- XL(1)=XA(1)*DEXP(-DGLA(1)/RT)
- XL(1)=XL(1)*DEXP(ECIA(1)*XA(1)-ECIL(1)*XL(1))
- DO 20 I=2,10,1
- XL(I)=XA(I)*DEXP(-DGLA(I)/RT+ECIA(I)*XA(1)-ECIL(I)*XL(1))
- XL(I)=XL(I)*DEXP(EIIA(I)*XA(I)-EIIL(I)*XL(I))
- XL(1)=XL(1)*DEXP(ECIA(I)*XA(I)-ECIL(I)*XL(I))
- 20 CONTINUE
- XL(0)=1.0
- DO 60 I=1,10,1
- XL(0)=XL(0)-XL(I)
- 60 CONTINUE
- F(K)=DGLA0/RT+DLOG(XL(0)/XA(0))& +(EIIA(1)*XA(1)*XA(1)-EIIL(1)*XL(1)*XL(1))/2
- DO 100 I=2,10,1
- F(K)=F(K)+ECIA(I)*XA(1)*XA(I)-ECIL(I)*XL(1)*XL(I)& +(EIIA(I)*XA(I)*XA(I)-EIIL(I)*XL(I)*XL(I))/2
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0) THEN
- TJE=T0+DTT-273.15D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- TJE=0.0D0
- RETURN
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- END
- SUBROUTINE TJBCALC(X,TJB)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 X(0:10),XA(0:10),XF(0:10),XL(0:10),TJB
- REAL*8 DGAF0,DGFA0,DGFA(1:10),DGLA0,DGLA(1:10)
- REAL*8 EIIL(1:10),EIIF(1:10),EIIA(1:10)
- REAL*8 ECIL(1:10),ECIF(1:10),ECIA(1:10)
- REAL*8 A(1:10),B,F(2,2),G(2,2)
- REAL*8 T0,T,DT,DTT,XC,DX,DXC,Z,DTTMAX
- INTEGER INDEX
- T0=1765.0D0
- XC=0.008D0
- DTTMAX=10.0D0
- INDEX=0
- DX=1.0D-5
- DT=0.01D0
- DTTMAX=10.0D0
- DXCMAX=XC/2.0D0
- 10 INDEX=INDEX+1
- DO 100 J=1,2,1
- T=T0+(J-1.5)*DT
- RT=1.987D0*T
- DO 100 K=1,2,1
- XA(1)=XC+(K-1.5D0)*DX
- CALL DGAF0CALC(T,DGAF0)
- CALL DGFACALC(T,DGFA)
- CALL DGLACALC(T,DGLA)
- CALL EIIACALC(T,EIIA)
- CALL EIIFCALC(T,SFE,EIIF)
- CALL EIILCALC(T,EIIL)
- CALL ECIACALC(T,ECIA)
- CALL ECIFCALC(T,ECIF)
- CALL ECILCALC(T,ECIL)
- DGFA0=-DGAF0
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- XF(1)=XA(1)*DEXP(-DGFA(1)/RT)
- XF(1)=XF(1)*DEXP(EIIA(1)*XA(1)-EIIF(1)*XF(1))
- XL(1)=XA(1)*DEXP(-DGLA(1)/RT)
- XL(1)=XL(1)*DEXP(EIIA(1)*XA(1)-EIIL(1)*XL(1))
- B=(X(1)-XA(1))/(X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1))/2
- DO 80 I=2,10,1
- F(J,K)=F(J,K)+(EIIA(I)*XA(I)*XA(I)-EIIF(I)*XF(I)*XF(I))/2& +ECIA(I)*XA(1)*XA(I)-ECIF(I)*XF(1)*XF(I)
- G(J,K)=G(J,K)+(EIIA(I)*XA(I)*XA(I)-EIIL(I)*XL(I)*XL(I))/2& +ECIA(I)*XA(1)*XA(I)-ECIL(I)*XL(1)*XL(I)
- 80 CONTINUE
- 100 CONTINUE
- DFX=(F(1,2)-F(1,1)+F(2,2)-F(2,1))/DX/2
- DGX=(G(1,2)-G(1,1)+G(2,2)-G(2,1))/DX/2
- DFT=(F(2,1)-F(1,1)+F(2,2)-F(1,2))/DT/2
- DGT=(G(2,1)-G(1,1)+G(2,2)-G(1,2))/DT/2
- Z=DFX*DGT-DFT*DGX
- FAVG=(F(1,1)+F(1,2)+F(2,1)+F(2,2))/4
- GAVG=(G(1,1)+G(1,2)+G(2,1)+G(2,2))/4
- DXC=(-FAVG*DGT+GAVG*DFT)/Z
- DTT=(-GAVG*DFX+FAVG*DGX)/Z
- IF ((DABS(DXC/XC) .LE. 0.01D0) .AND. (DABS(DTT) .LE. 1.0D0)) THEN
- IF ((X(1) .GE. XF(1)) .AND. (X(1) .LE. XL(1))) THEN
- TJB=T0+DTT-273.15D0
- RETURN
- ELSE
- TJB=0.0D0
- RETURN
- ENDIF
- ENDIF
- IF ((T0+DTT) .GT. 1820.0D0) THEN
- TJB=0.0D0
- RETURN
- ENDIF
- IF (INDEX .GT. 20) THEN
- TJB=0.0
- RETURN
- ENDIF
- IF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- ENDIF
- IF (DABS(DXC) .GT. DXCMAX) THEN
- DXC=SIGN(DXCMAX,DXC)
- ENDIF
- T0=T0+DTT
- XC=XC+DXC
- GOTO 10
- END
- SUBROUTINE TBCCALC (XL,TBC)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 XL(0:10),XA(0:10),TBC
- REAL*8 DGLA0,DGLF(1:10),F(1:2),FAVG,DGLA(1:10),DGFA(1:10)
- REAL*8 EIIL(1:10),EIIA(1:10),ECIL(1:10),ECIA(1:10)
- REAL*8 T0,DT,T,RT,DTT,DTTMAX
- INTEGER INDEX,ITER,I
- T0=1818.0D0-1820.0D0*XL(1)
- DT=0.01D0
- DTTMAX=10.0D0
- INDEX=0
- 10 INDEX=INDEX+1
- DO 100 K=1,2,1
- T=T0+(K-1.5D0)*DT
- RT=1.987D0*T
- CALL DGLFCALC (T,DGLF)
- CALL DGFACALC (T,DGFA)
- CALL DGLACALC (T,DGLA)
- CALL EIILCALC (T,EIIL)
- CALL EIIACALC (T,EIIA)
- CALL ECILCALC (T,ECIL)
- CALL ECIACALC (T,ECIA)
- DGLA0=-2646.0D0+39.1693D0*T-5.27D0*T*DLOG(T)+0.001D0*T*T
- DO 12 I=1,10,1
- DGLA(I)=DGLF(I)+DGFA(I)
- 12 CONTINUE
- XA(1)=XL(1)*DEXP(DGLA(1)/RT)
- XA(1)=XA(1)*DEXP(ECIL(1)*XL(1)-ECIA(1)*XA(1))
- DO 20 I=2,10,1
- XA(I)=XL(I)*DEXP(DGLA(I)/RT+ECIL(I)*XL(1)-ECIA(I)*XA(1))
- XA(I)=XA(I)*DEXP(EIIL(I)*XL(I)-EIIA(I)*XA(I))
- XL(1)=XL(1)*DEXP(ECIL(I)*XL(I)-ECIA(I)*XA(I))
- 20 CONTINUE
- DO 40 ITER=1,10,1
- XA(1)=XL(1)*DEXP(DGLA(1)/RT+ECIL(1)*XL(1)-ECIA(1)*XA(1))
- DO 40 I=2,10,1
- XA(I)=XL(I)*DEXP(DGLA(I)/RT+ECIL(I)*XA(1)-ECIA(I)*XA(1& +EIIL(I)*XL(I)-EIIA(I)*XA(I))
- XA(1)=XA(1)*DEXP(ECIL(I)*XL(I)-ECIA(I)*XA(I))
- 40 CONTINUE
- 50 XA(0)=1.0
- DO 60 I=1,10,1
- XA(0)=XA(0)-XA(I)
- 60 CONTINUE
- F(K)=DGLA0/RT+DLOG(XL(0)/XA(0)) & +(EIIA(1)*XA(1)*XA(1)-EIIL(1)*XL(1)*XL(1))/2
- DO 100 I=2,10,1
- F(K)=F(K)+ECIA(I)*XA(1)*XA(I)-ECIL(I)*XL(1)*XL(I)& +EIIA(I)*XA(I)*XA(I)/2-EIIL(I)*XL(I)*XL(I)/2
- 100 CONTINUE
- FAVG=(F(1)+F(2))/2
- DTT=-DT*FAVG/(F(2)-F(1))
- IF (DABS(DTT) .LE. 1.0D0) THEN
- TBC=T0+DTT-273.15D0
- RETURN
- ENDIF
- IF (INDEX .GE. 40) THEN
- TBC=0.0D0
- RETURN
- ELSEIF (DABS(DTT) .GT. DTTMAX) THEN
- DTT=SIGN(DTTMAX,DTT)
- T0=T0+DTT
- GOTO 10
- ELSE
- T0=T0+DTT
- GOTO 10
- ENDIF
- END
- SUBROUTINE SFECALC(TEMP,SFE)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,SFE
- REAL*8 T(15),S(15)
- DATA T /400.D0,500.D0,600.D0,700.D0,800.D0,900.D0,1000.D0,1100.D0,& 1200.D0,1300.D0,1400.D0,1500.D0,1600.D0,1700.D0,1800.D0/
- DATA S/0.05D0,0.09D0,0.16D0,0.28D0,0.45D0,0.72D0,1.16D0,1.67D0, & 1.84D0,1.94D0,1.99D0,2.02D0,2.04D0,2.05D0,2.06D0/
- DO 50 I=1,14,1
- IF ((TEMP .GE. T(I)) .AND. (TEMP .LE. T(I+1))) THEN
- SFE=S(I)+(S(I+1)-S(I))*(TEMP-T(I))/(T(I+1)-T(I))
- GOTO 100
- ENDIF
- 50 CONTINUE
- 100 RETURN
- END
- SUBROUTINE DGAF0CALC (TEMP,DGAF0)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 T(126),G(126)
- REAL*8 TEMP,DGAF0
- DATA T /600.0D0,610.0D0,620.0D0,630.0D0,640.0D0,650.0D0,660.0D0,& 670.0D0,680.0D0,690.0D0,700.0D0,710.0D0,720.0D0,730.0D0,
- & 740.0D0,750.0D0,760.0D0,770.0D0,780.0D0,790.0D0,800.0D0,& 810.0D0,820.0D0,830.0D0,840.0D0,850.0D0,860.0D0,870.0D0,
- & 880.0D0,890.0D0,900.0D0,910.0D0,920.0D0,930.0D0,940.0D0, & 950.0D0,960.0D0,970.0D0,980.0D0,990.0D0,1000.D0,1010.D0,
- & 1020.D0,1030.D0,1040.D0,1050.D0,1060.D0,1070.D0,1080.D0, & 1090.D0,1100.D0,1110.D0,1120.D0,1130.D0,1140.D0,1150.D0,& 1160.D0,1170.D0,1180.D0,1184.D0,1190.D0,1200.D0,1210.D0,& 1220.D0,1230.D0,1240.D0,1250.D0,1260.D0,1270.D0,1280.D0,& 1290.D0,1300.D0,1310.D0,1320.D0,1330.D0,1340.D0,1350.D0,& 1360.D0,1370.D0,1380.D0,1390.D0,1400.D0,1410.D0,1420.D0,& 1430.D0,1440.D0,1450.D0,1460.D0,1470.D0,1480.D0,1490.D0,& 1500.D0,1510.D0,1520.D0,1530.D0,1540.D0,1550.D0,1560.D0, & 1570.D0,1580.D0,1590.D0,1600.D0,1610.D0,1620.D0,1630.D0,& 1640.D0,1650.D0,1660.D0,1668.D0,1670.D0,1680.D0,1690.D0,& 1700.D0,1710.D0,1720.D0,1730.D0,1740.D0,1750.D0,1760.D0,& 1770.D0,1780.D0,1790.D0,1800.D0,1810.D0,1820.D0,1830.D0/
- DATA G /677.4D0,658.6D0,640.0D0,621.6D0,603.3D0,585.2D0,567.3D0, & 549.5D0,531.9D0,514.4D0,497.0D0,479.7D0,462.6D0,445.7D0,& 429.0D0,412.5D0,396.1D0,379.9D0,364.0D0,348.4D0,333.0D0,& 317.8D0,302.8D0,288.1D0,273.5D0,259.1D0,244.7D0,230.8D0,& 217.3D0,204.1D0,191.1D0,178.3D0,166.0D0,154.1D0,142.4D0,& 131.0D0,119.9D0,109.3D0,99.30D0,89.80D0,80.80D0,72.18D0,& 64.16D0,56.75D0,50.15D0,44.31D0,39.11D0,34.21D0,29.92D0,& 26.07D0,22.22D0,18.37D0,14.92D0,11.84D0, 9.10D0, 6.66D0,& 4.48D0, 2.52D0, 0.71D0, 0.00D0,-0.89D0,-2.40D0,-3.82D0,& -5.15D0,-6.39D0,-7.55D0,-8.63D0,-9.63,-10.55,-11.40D0,& -12.17D0,-12.87D0,-13.50D0,-14.06D0,-14.54D0,-14.95D0,-15.29D0,& -15.57D0,-15.79D0,-15.95D0,-16.05D0,-16.10D0,-16.10D0,-16.06D0,& -15.97D0,-15.83D0,-15.64D0,-15.40D0,-15.11D0,-14.77D0,-14.38D0,& -13.95D0,-13.48D0,-12.97D0,-12.41D0,-11.80D0,-11.15D0,-10.45D0,& -9.92D0,-9.71D0,-8.98D0,-7.20D0,-6.27D0,-5.30D0,-4.28D0,& -3.22D0,-2.11D0,-0.96D0, 0.00D0, 0.23D0, 1.47D0, 2.75D0,& 4.08D0, 5.45D0, 6.86D0, 8.31D0, 9.81D0,11.36D0,12.97D0,& 14.63D0,16.35D0,18.13D0,19.98D0,21.83D0,23.68D0,25.53D0/
- DO 10 I=1,126,1
- IF ((TEMP .GT. T(I)) .AND. (TEMP .LE. T(I+1))) THEN
- DGAF0=G(I)+(TEMP-T(I))*(G(I+1)-G(I))/(T(I+1)-T(I))
- GOTO 100
- ENDIF
- 10 CONTINUE
- WRITE(*,*) '****** ERROR ******'
- WRITE(*,*) 'TEMPERATURE OUT OF THE RANGE 600-1800 K'
- STOP
- 100 RETURN
- END
- SUBROUTINE DGAFCALC (TEMP,DGAF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,DGAF(1:10)
- DGAF(1)=-15323.0D0+7.686D0*TEMP
- DGAF(2)=-26650.0D0+42.69D0*TEMP-0.017D0*TEMP*TEMP
- DGAF(3)=-5954.0D0+38.7996D0*TEMP-4.7244D0*TEMP*DLOG(TEMP)
- DGAF(4)=-4545.0D0+3.233D0*TEMP
- DGAF(5)=-367.0D0-4.656D0*TEMP+0.6568D0*TEMP*DLOG(TEMP)
- DGAF(6)=565+0.15*TEMP
- DGAF(7)=-25500.0D0+41.183D0*TEMP-0.017D0*TEMP*TEMP
- DGAF(8)=1290.0D0-0.3D0*TEMP
- DGAF(9)=-8357.0D0+13.8D0*TEMP-0.0051D0*TEMP*TEMP
- DGAF(10)=5160.0D0-2.875D0*TEMP
- RETURN
- END
- SUBROUTINE DGFACALC (TEMP,DGFA)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,DGFA(1:10)
- DGFA(1)=15940.0D0-5.7D0*TEMP
- DGFA(2)=430.0D0-0.305D0*TEMP
- DGFA(3)=5954.0D0-38.799D0*TEMP+4.7244D0*TEMP*DLOG(TEMP)
- DGFA(4)=1330.0D0-0.26D0*TEMP
- DGFA(5)=367.0D0+4.646D0*TEMP-0.6568D0*TEMP*DLOG(TEMP)
- DGFA(6)=-565.0D0-0.15D0*TEMP
- DGFA(7)=-1450.0D0-0.8D0*TEMP
- DGFA(8)=-2500.0D0-0.15D0*TEMP
- DGFA(9)=-8357.0D0-13.8D0*TEMP+0.0051D0*TEMP*TEMP
- DGFA(10)=-5700.0D0+0.04D0*TEMP
- RETURN
- END
- SUBROUTINE DGLFCALC (TEMP,DGLF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,DGLF(1:10)
- DGLF(1)=-21300.0D0+6.3D0*TEMP
- DGLF(2)=3500.0D0-2.308D0*TEMP
- DGLF(3)=-8200.0D0+3.9D0*TEMP
- DGLF(4)=-2120.0D0-0.38D0*TEMP
- DGLF(5)=4600.0D0+2.19D0*TEMP
- DGLF(6)=-6600.0D0+2.29D0*TEMP
- DGLF(7)=-1200.0D0
- DGLF(8)=-7500.0D0+3.65D0*TEMP
- DGLF(9)=-5100.0D0+2.3D0*TEMP
- DGLF(10)=-5500.0D0+2.3D0*TEMP
- RETURN
- END
- SUBROUTINE DGLACALC (TEMP,DGLA)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,DGLA(1:10)
- DGLA(1)=-5360.0D0+0.6D0*TEMP
- DGLA(2)=3930.0D0-2.613D0*TEMP
- DGLA(3)=-2246.0D0-34.899D0*TEMP+4.7244D0*TEMP*DLOG(TEMP)
- DGLA(4)=-790.0D0-0.64D0*TEMP
- DGLA(5)=-4233.0D0+6.89D0*TEMP-0.6568D0*TEMP*DLOG(TEMP)
- DGLA(6)=-7165.0D0+2.14D0*TEMP
- DGLA(7)=-2650.0D0+0.8D0*TEMP
- DGLA(8)=-8790.0D0+3.95D0*TEMP
- DGLA(9)=3257.0D0-11.5D0*TEMP+0.0051D0*TEMP*TEMP
- DGLA(10)=-10661.0D0+5.175D0*TEMP
- RETURN
- END
- SUBROUTINE EIIFCALC (TEMP,SFE,EIIF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,SFE,EIIF(1:10)
- EIIF(1)=1.3D0
- EIIF(2)=-3.082D0+4679.0D0/TEMP+1509.8D0*SFE/TEMP
- EIIF(3)=-16.35D0+44829.0D0/TEMP
- EIIF(4)=2.013D0-4595.0D0/TEMP+385.5D0*SFE/TEMP
- EIIF(5)=2.819D0-6039.0D0/TEMP
- EIIF(6)=-0.219D0-4772.0D0/TEMP+402.6D0*SFE/TEMP
- EIIF(7)=0.634D0-11270.0D0/TEMP+1006.5D0*SFE/TEMP
- EIIF(8)=-9058.0D0/TEMP
- EIIF(9)=9.863D0-3849.0D0/TEMP
- EIIF(10)=9.863D0-3849.0D0/TEMP
- RETURN
- END
- SUBROUTINE EIIACALC (TEMP,EIIA)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,EIIA(1:10)
- EIIA(1)=4.786D0+5066.D0/TEMP
- EIIA(2)=2.406D0-175.0D0/TEMP
- EIIA(3)=26048.0D0/TEMP
- EIIA(4)=-2839.0D0/TEMP
- EIIA(5)=7.655D0-3154.0D0/TEMP-0.661D0*DLOG(TEMP)
- EIIA(6)=-2330.0D0/TEMP
- EIIA(7)=-1.376D0-5766.0D0/TEMP
- EIIA(8)=0.453D0-7851.0D0/TEMP
- EIIA(9)=11.366D0-3524.0D0/TEMP
- EIIA(10)=11.366D0-3524.0D0/TEMP
- RETURN
- END
- SUBROUTINE EIILCALC (TEMP,EIIL)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,EIIL(1:10)
- EIIL(1)=0.389D0+7810.0D0/TEMP
- EIIL(2)=31.4D0/TEMP
- EIIL(3)=24751.0D0/TEMP
- EIIL(4)=312.6D0/TEMP
- EIIL(5)=9.8D0/TEMP
- EIIL(6)=-1343.0D0/TEMP
- EIIL(7)=11011.0D0/TEMP
- EIIL(8)=-4289.0D0/TEMP
- EIIL(9)=-6056.0D0/TEMP
- EIIL(10)=-6056.0D0/TEMP
- RETURN
- END
- SUBROUTINE ECIFCALC (TEMP,ECIF)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,ECIF(1:10)
- ECIF(1)=1.3D0
- ECIF(2)=-5834.0D0/TEMP
- ECIF(3)=16205.0D0/TEMP
- ECIF(4)=5533.0D0/TEMP
- ECIF(5)=1.558-6160/TEMP
- ECIF(6)=-10714.0D0/TEMP
- ECIF(7)=6.615-5533/TEMP
- ECIF(8)=-3447.0D0/TEMP
- ECIF(9)=-21650.0D0/TEMP
- ECIF(10)=-28770.0D0/TEMP
- RETURN
- END
- SUBROUTINE ECIACALC (TEMP,ECIA)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,ECIA(1:10)
- ECIA(1)=4.786D0+5066.0D0/TEMP
- ECIA(2)=-4811.0D0/TEMP
- ECIA(3)=14794.0D0/TEMP
- ECIA(4)=5533.0D0/TEMP
- ECIA(5)=14.193-30209.0D0/TEMP
- ECIA(6)=-10714.0D0/TEMP
- ECIA(7)=6.615D0-5533.0D0/TEMP
- ECIA(8)=-10342.0D0/TEMP
- ECIA(9)=-21650.0D0/TEMP
- ECIA(10)=-28770.0D0/TEMP
- RETURN
- END
- SUBROUTINE ECILCALC (TEMP,ECIL)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,ECIL(1:10)
- ECIL(1)=0.389D0+7810.0D0/TEMP
- ECIL(2)=-5060.0D0/TEMP
- ECIL(3)=-0.428D0+18740.0D0/TEMP
- ECIL(4)=5340.0D0/TEMP
- ECIL(5)=-9500.0D0/TEMP
- ECIL(6)=-7490.0D0/TEMP
- ECIL(7)=7586.0D0/TEMP
- ECIL(8)=-12230.0D0/TEMP
- ECIL(9)=-30100.0D0/TEMP
- ECIL(10)=-46615.0D0/TEMP
- RETURN
- END
- SUBROUTINE GCACALC (TEMP,GCA)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,GCA(0:10)
- GCA(0)=13320.D0-64.72D0*TEMP+7.4833D0*TEMP*DLOG(TEMP)
- GCA(1)=46150.D0-19.221D0*TEMP
- GCA(2)=-13532.+730.0D0+10.0D0*TEMP
- GCA(4)=14540.D0-2.367D0*TEMP-(-14600.D0+8800.D0)
- GCA(5)=-850.D0-14.58D0*TEMP-(10460.D0+0.628D0*TEMP)& -(13110.D0-31.820*TEMP+2.748D0*TEMP*DLOG(TEMP))
- GCA(6)=502.D0-(10460.D0+0.628D0*TEMP)-9686.
- GCA(8)=63200.0D0-30.392*TEMP-(10460.D0+0.628D0*TEMP)& -(32635.0D0-1.883D0*TEMP)
- GCA(9)=-12763.D0-14.345D0*TEMP-(9000.D0+3.556D0*TEMP)& -(-21350.D0-12.75D0*TEMP)
- GCA(10)=GCA(9)
- DO 10 I=0,10,1
- GCA(I)=(GCA(I)-GCA(1)/3.0)/4.184D0
- 10 CONTINUE
- RETURN
- END
- SUBROUTINE A01CALC (TEMP,A0,A1)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP,A0(2:10), A1(2:10)
- A0(2)=1996.D0-3.633D0*TEMP
- A0(4)=0.0D0
- A0(5)=427.8D0
- A0(6)=0.0D0
- A0(8)=0.0D0
- A0(9)=-7170.D0
- A0(10)=-7170.D0
- A1(2)=-956.D0
- RETURN
- END
- SUBROUTINE TDISSCALC (C,Mn,Cr,Mo,V,Nb,Ti,Al,N,& AE3,TDISS)
- IMPLICIT REAL*8 (A-H,O-Z)
- PARAMETER (ZERO=1.0D-6)
- REAL*8 C,Mn,Cr,Mo,V,Nb,Ti,Al,N,AE3,TDISS
- REAL*8 NbC,TiC,CrC,VC,MoC,VN,VN2,AlN,AlN2,NbN,NbN2,TiN
- IF (Nb .EQ. 0.D0) THEN
- Nb=ZERO
- ENDIF
- IF(Ti .EQ. 0.D0) THEN
- Ti=ZERO
- ENDIF
- IF (Cr .EQ. 0.D0) THEN
- Cr=ZERO
- ENDIF
- IF (Mo .EQ. 0.D0) THEN
- Mo=ZERO
- ENDIF
- IF (Al .EQ. 0.D0) THEN
- Al=ZERO
- ENDIF
- IF (V .EQ. 0.D0) THEN
- V=ZERO
- ENDIF
- IF (N .EQ. 0.D0) THEN
- N=ZERO
- ENDIF
- NbC=7520.D0/(3.11D0-DLOG10(Nb*C))-273.D0
- TiC=7000.D0/(2.75D0-DLOG10(Ti*C))-273.D0
- CrC=7375.D0/(5.90D0-DLOG10((Cr**23.0D0)*(C**6.0D0)))-273.D0
- VC=8000.D0/(5.36D0-DLOG10((V**4.0D0)*(C**3.0D0)))-273.D0
- MoC=7375.D0/(5.0D0-DLOG10((Mo**2.0D0)*C))-273.D0
- VN=7070.D0/(2.27D0-DLOG10(V*N))-273.D0
- VN2=8330.D0/(3.46D0-0.012*Mn-DLOG10(V*N))-273.D0
- AlN=7750.D0/(1.8D0-DLOG10(Al*N))-273.15D0
- AlN2=6770.D0/(1.03D0-DLOG10(Al*N))-273.D0
- NbN=10230.D0/(4.04D0-DLOG10(Nb*N))-273.D0
- NbN2=10800.D0/(3.7D0-DLOG10(Nb*N))-273.D0
- TiN=8000.D0/(0.32D0-DLOG10(Ti*N))-273.D0
- TDISS=MAX(NbC,TiC,CrC,VC,MoC,VN,VN2,AlN,AlN2,NbN,& NbN2,TiN,AE3)
- RETURN
- END
- SUBROUTINE STARTSTOPH (TEMP1,TEMP2,TIME1,TIME2,& T3,T4,TEMP0,DTEMP,DTIME)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP1,TEMP2,TIME1,TIME2,T3,T4,TEMP0,DTEMP,DTIME
- REAL*8 TIME0
- IF (TEMP1 .GE. T3) THEN
- TEMP0=TEMP1
- TIME0=TIME1
- ELSE
- TEMP0=T3
- TIME0=TIME1+(TIME2-TIME1)*(TEMP0-TEMP1)/(TEMP2-TEMP1)
- ENDIF
- IF (TEMP2 .LE. T4) THEN
- DTEMP=TEMP2-TEMP0
- DTIME=TIME2-TIME0
- ELSE
- DTEMP=T4-TEMP0
- DTIME=TIME1-TIME0+(TIME2-TIME1)*(T4-TEMP1)/(TEMP2-TEMP1)
- ENDIF
- RETURN
- END
- SUBROUTINE STARTSTOPC (TEMP1,TEMP2,TIME1,TIME2, & T3,T4,TEMP0,DTEMP,DTIME)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TEMP1,TEMP2,TIME1,TIME2,T3,T4,TEMP0,DTEMP,DTIME
- REAL*8 TIME0
- IF (TEMP1 .LT. T3) THEN
- TEMP0=TEMP1
- TIME0=TIME1
- ELSE
- TEMP0=T3
- TIME0=TIME1+(TIME2-TIME1)*(T3-TEMP1)/(TEMP2-TEMP1)
- ENDIF
- IF (TEMP2 .GT. T4) THEN
- DTEMP=TEMP2-TEMP0
- DTIME=TIME2-TIME0
- ELSE
- DTEMP=T4-TEMP0
- DTIME=TIME1-TIME0+(TIME2-TIME1)*(T4-TEMP1)/(TEMP2-TEMP1)
- ENDIF
- RETURN
- END
- SUBROUTINE GRAINGROWTH (TEMP,TIMEINC,GS,gsmax)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 TIMEINC,TEMP,GS,gsmax
- REAL*8 DGS,QR,T
- REAL*8 N
- N=4.0D0
- QR=69300.0D0
- T=TEMP+273.15D0
- DGS=2.969D15*TIMEINC*DEXP(-QR/T)/N/GS**(N-1.0D0)
- GS=GS+DGS
- IF (GS .gt. gsmax) then
- GS=gsmax
- ENDIF
- RETURN
- END
- REAL*8 FUNCTION XTERM (X)
- REAL*8 X
- IF ( X .GT. 1.0D0 ) THEN
- X = 1.0D0
- END IF
- IF (X .LT. 1.0D-6) THEN
- X=1.0D-6
- ENDIF
- XTERM=X**(0.4D0*(1.0D0-X))*(1.0D0-X)**(0.4D0*X)
- RETURN
- END
- REAL*8 FUNCTION DIFF(TEMP)
- REAL*8 TEMP
- DIFF=DEXP(-27500.D0/1.987D0/(TEMP+273.15D0))
- RETURN
- END
- SUBROUTINE HARDNESS (TEMP2,VR,NNODE)
- IMPLICIT REAL*8 (A-H,O-Z)
- PARAMETER (NN=10000)
- real*8 C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N
- REAL*8 C2,Mn2,Si2,Ni2,Cr2,Mo2,Cu2,W2,V2,Nb2,Ti2,Al2,N2
- REAL*8 CE,HM,HB,HVM,HVB,HVFP
- REAL*8 VR(NN),TEMP2(NN)
- REAL*8 XA(NN),XF(NN),XP(NN),XB(NN),XM(NN),GS(NN),G(NN),HV(NN),XL(NN)
- real*8 AC1_1,AC3_1,TDISS1,AE4_1,AE3_1,AE1_1,TBS1,TMS1,as1_1& ,Tliquid1,Tsolid1
- real*8 AC1_2,AC3_2,TDISS2,AE4_2,AE3_2,AE1_2,TBS2,TMS2,as1_2& ,Tliquid2,Tsolid2
- COMMON/COMP/C,Mn,Si,Ni,Cr,Mo,Cu,W,V,Nb,Ti,Al,N
- COMMON/COMP2/C2,Mn2,Si2,Ni2,Cr2,Mo2,Cu2,W2,V2,Nb2,Ti2,Al2,N2
- COMMON/STRUCT/XA,XF,XP,XB,XM,GS,G,HV,XL
- COMMON/TEMPS/AC1_1,AC3_1,TDISS1,AE4_1,AE3_1,AE1_1,TBS1,TMS1,as1_1& ,Tliquid1,Tsolid1
- COMMON/TEMPS2/AC1_2,AC3_2,TDISS2,AE4_2,AE3_2,AE1_2,TBS2,TMS2,as1_2& ,Tliquid2,Tsolid2
- DO 20 I=1,NNODE,1
- if ((HV(I) .lt. 1.0D0) .and. (VR(I) .gt. 1.0D0) & .and. (TEMP2(I) .lt. TMS) .and. (XA(I) .le. 1.0d-6)) then
- HM=294.0D0+884.0D0*C-265.2D0*C**3.0D0
- CE=C+Si/24.D0+Mn/5.D0+Cu/10.D0+Ni/18.D0& +Cr/5.D0+Mo/2.5D0+V/5.0D0+Nb/3.0D0
- IF (CE .LE. 0.75D0) THEN
- HB=117.0D0+197.0D0*CE
- ELSE
- HB=145.0D0+130.D0*DTANH(2.65D0*CE-0.69D0)
- ENDIF
- HVM=902.60D0*C+121.15D0+26.68D0*DLOG10(VR(I))
- HVB=-323.0D0+185.0D0*C+330.0D0*Si+153.0D0*Mn+66.0D0*Ni& +144.0D0*Cr+191.0D0*Mo+DLOG10(VR(I))*(89.0D0+53.D0*C& -55.D0*Si-22.0D0*Mn-10.D0*Ni-20.D0*Cr-33.D0*Mo)
- HVFP=42.0D0+223.D0*C+53.D0*Si+30.D0*Mn+12.6D0*Ni+7.D0*Cr& +19.D0*Mo& +DLOG10(VR(I))*(10.D0-19.D0*Si+4.D0*Ni+8.D0*Cr+130.D0*V)
- IF(HVM .GT. HM) THEN
- HVM=HM
- ENDIF
- IF(HVB .GT. HB) THEN
- HVB=HB
- ENDIF
- HV(I)=XM(I)*HVM+XB(I)*HVB+(XF(I)+XP(I))*HVFP
- endif
- 20 CONTINUE
- RETURN
- END
- SUBROUTINE HARDNESS2(XCOMPOS,XF,XP,XB,XM,VR,HV)
- IMPLICIT REAL*8 (A-H,O-Z)
- real*8 xcompos(*)
- REAL*8 CE,HM,HB,HVM,HVB,HVFP
- REAL*8 VR,HV
- REAL*8 XF,XP,XB,XM
- C = XCOMPOS(1)
- Mn = XCOMPOS(2)
- Si = XCOMPOS(3)
- Ni = XCOMPOS(4)
- Cr = XCOMPOS(5)
- Mo = XCOMPOS(6)
- Cu = XCOMPOS(7)
- W = XCOMPOS(8)
- V = XCOMPOS(9)
- Nb = XCOMPOS(10)
- Ti = XCOMPOS(11)
- Al = XCOMPOS(12)
- N = XCOMPOS(13)
- HM=294.0D0+884.0D0*C-265.2D0*C**3.0D0
- CE=C+Si/24.D0+Mn/5.D0+Cu/10.D0+Ni/18.D0& +Cr/5.D0+Mo/2.5D0+V/5.0D0+Nb/3.0D0
- IF (CE .LE. 0.75D0) THEN
- HB=117.0D0+197.0D0*CE
- ELSE
- HB=145.0D0+130.D0*DTANH(2.65D0*CE-0.69D0)
- ENDIF
- HVM=902.6D0*C+121.15D0+26.68D0*DLOG10(VR)
- HVB=-323.D0+185.0D0*C+330.0D0*Si+153.0D0*Mn+66.0D0*Ni& +144.0D0*Cr+191.0D0*Mo+DLOG10(VR)*(89.0D0+53.D0*C& -55.D0*Si-22.0D0*Mn-10.D0*Ni-20.D0*Cr-33.D0*Mo)
- HVFP=42.D0+223.D0*C+53.D0*Si+30.D0*Mn+12.6D0*Ni+7.D0*Cr+19.D0*Mo & +DLOG10(VR)*(10.D0-19.D0*Si+4.D0*Ni+8.D0*Cr+130.D0*V)
- IF(HVM .GT. HM) THEN
- HVM=HM
- ENDIF
- IF(HVB .GT. HB) THEN
- HVB=HB
- ENDIF
- HV=XM*HVM+XB*HVB+(XF+XP)*HVFP
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement