Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SUBROUTINE TRANSFORMATION(TIME1,TEMP1,TIME2,TEMP2,DELTAT,PEAK,VR,NNODE)
- IMPLICIT REAL*8 (A-H,O-Z)
- PARAMETER(NN=10000,ZERO=1.0D-6,GA0=0.005D0)
- LOGICAl COOLING,HEATING
- INTEGER I,K,NSTEPS
- REAL*8 DELTAT,XTERM,DIFF
- REAL*8 TIME1,TIME2
- dimension TEMP1(NN),TEMP2(NN),PEAK(NN),VR(NN),XCOMPOS(13)
- 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 AC1,AC3,TDISS,AE4,AE3,AE1,TBS,TMS,as1,Tliquid,Tsolid
- real*8 xfe,xpe,fc,pc,bc
- 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
- real*8 XFE1,XPE1,XFE2,XPE2
- REAL*8 XA(NN),XF(NN),XP(NN),XB(NN),XM(NN),GS(NN),G(NN),HV(NN),XL(NN)
- real*8 fc1,pc1,bc1,FC2,PC2,BC2
- real*8 GS0,G0,hv0,gsmax
- dimension nodeflag(nn)
- 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/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
- COMMON/STRUCT/XA,XF,XP,XB,XM,GS,G,HV,XL
- COMMON/KCONST/fc1,pc1,bc1
- COMMON/KCONST2/fc2,pc2,bc2
- COMMON/BASELINE/XFE1,XPE1
- COMMON/BASELINE2/XFE2,XPE2
- common/nodetype/nodeflag
- COMMON/KINI/GS0,G0,hv0,gsmax
- include 'common.f'
- DO 100 I=1,NNODE,1
- if ( nodeflag(i) .eq. 1 ) then
- fc = fc1
- pc = pc1
- bc = bc1
- ac1=ac1_1
- ac3=ac3_1
- tdiss = tdiss1
- ae4 = ae4_1
- ae3 = ae3_1
- ae1 = ae1_1
- tbs = tbs1
- tms = tms1
- as1 = as1_1
- tliquid = tliquid1
- tsolid = tsolid1
- xfe = xfe1
- xpe = xpe1
- XCOMPOS(1) = C
- XCOMPOS(2) = Mn
- XCOMPOS(3) = Si
- XCOMPOS(4) = Ni
- XCOMPOS(5) = Cr
- XCOMPOS(6) = Mo
- XCOMPOS(7) = Cu
- XCOMPOS(8) = W
- XCOMPOS(9) = V
- XCOMPOS(10) = Nb
- XCOMPOS(11) = Ti
- XCOMPOS(12) = Al
- XCOMPOS(13) = N
- GS0=GS01*1.0d-3
- else
- fc=fc2
- PC = PC2
- BC = BC2
- ac1=ac1_2
- ac3=ac3_2
- tdiss = tdiss2
- ae4 = ae4_2
- ae3 = ae3_2
- ae1 = ae1_2
- tbs = tbs2
- tms = tms2
- as1 = as1_2
- tliquid = tliquid2
- tsolid = tsolid2
- xfe = xfe2
- xpe = xpe2
- XCOMPOS(1) = C2
- XCOMPOS(2) = Mn2
- XCOMPOS(3) = Si2
- XCOMPOS(4) = Ni2
- XCOMPOS(5) = Cr2
- XCOMPOS(6) = Mo2
- XCOMPOS(7) = Cu2
- XCOMPOS(8) = W2
- XCOMPOS(9) = V2
- XCOMPOS(10) = Nb2
- XCOMPOS(11) = Ti2
- XCOMPOS(12) = Al2
- XCOMPOS(13) = N2
- GS0 = GS02*1.0d-3
- end if
- IF (TEMP2(I) .GT. TEMP1(I)) THEN
- HEATING=.TRUE. !!!!! HEATING
- COOLING=.FALSE.
- ELSE
- COOLING=.TRUE. !!!!! COOLING
- HEATING=.FALSE.
- ENDIF
- IF (PEAK(I) .LT. TEMP2(I)) THEN
- PEAK(I)=TEMP2(I) !!!!! UPDATE PEAK TEMPERATURE
- ENDIF
- IF (TEMP2(I) .GT. TSOLID) Then
- XF(I)=ZERO
- XP(I)=ZERO
- XA(I)=0.0D0
- XL(I)=1.0D0
- XB(I)=ZERO
- XM(I)=0.0D0
- ELSEIF (TEMP2(I) .GT. AE3) THEN
- XF(I)=ZERO
- XP(I)=ZERO
- XA(I)=1.0D0
- XB(I)=ZERO
- XM(I)=0.0D0
- XL(I)=0.0D0
- ENDIF
- if (heating) then
- if (PEAK(I) .GT. Tsolid) then
- GS(I)=0.05D0
- elseif (TEMP2(I) .GT. TDISS) then
- if (TEMP1(I) .LT. TDISS) then
- GS(I)=GS0
- endif
- if (GS(I) .lt. gsmax) then
- CALL STARTSTOPH (TEMP1(I),TEMP2(I),TIME1,TIME2,& TDISS,Tsolid,TEMP0,DTEMP,DTIME)
- NSTEPS=NINT(100*DTIME)
- if (NSTEPS .gt. 100) then
- NSTEPS=100
- elseif (NSTEPS .lt. 10) then
- NSTEPS=10
- endif
- TIMEINC=DTIME/NSTEPS
- DO 10 K=1,NSTEPS,1
- TEMP=TEMP0+K*DTEMP/NSTEPS
- if (GS(I) .LT. GSMAX) then
- CALL GRAINGROWTH (TEMP,TIMEINC,GS(I),GSMAX)
- endif
- 10 continue
- endif
- elseif ((TEMP2(I) .GT. AE1) .and. (TEMP2(I) .LT. AE3)& .AND. (abs(PEAK(I)-TEMP2(I)) .LT. 0.1D0)& .AND. (XA(I) .LT. 0.999D0)) then
- XF(I)=XFE*(TEMP2(I)-AE1)/(AE3-AE1)
- XP(I)=ZERO
- XA(I)=1.0D0-XF(I)-XP(I)
- XL(I)=0.0D0
- XB(I)=ZERO
- XM(I)=0.0D0
- GS(I)=GS0
- endif
- endif
- if (COOLING .AND. (TEMP2(I) .LT. AE3) .AND. (TEMP1(I) .GT. AE1)& .and. (XA(I) .GT. 1.0D-4)) then
- CALL STARTSTOPC (TEMP1(I),TEMP2(I),TIME1,TIME2, & AE3,AE1,TEMP0,DTEMP,DTIME)
- NSTEPS=NINT(1000*DTIME)
- if (NSTEPS .gt. 1000) then
- NSTEPS=1000
- elseif (NSTEPS .lt. 10) then
- NSTEPS=10
- endif
- TIMEINC=DTIME/NSTEPS
- DO 20 K=1,NSTEPS,1
- TEMP=TEMP0+K*DTEMP/NSTEPS
- DXF=0.4275D0*(AE3-TEMP)**3.0D0*XTERM(XF(I))*TIMEINC& *DIFF(TEMP)/fc/GS(I)**0.83D0
- IF (DXF .GT. (XFE-XF(I))) THEN
- XF(I)=XFE
- XA(I)=1.0D0-(XF(I)+XP(I)+XB(I)+XM(I))
- goto 20
- else
- XF(I)=XF(I)+DXF
- XA(I)=1.0D0-(XF(I)+XP(I)+XB(I)+XM(I))
- endif
- 20 continue
- endif
- 40 if ((TEMP2(I) .LT. AE1) .and. (TEMP1(I) .GT. TBS)& .and. (XA(I) .GT. 1.0D-4)) then
- CALL STARTSTOPC (TEMP1(I),TEMP2(I),TIME1,TIME2,& AE1,TBS,TEMP0,DTEMP,DTIME)
- NSTEPS=NINT(1000*DTIME
- if (NSTEPS .gt. 1000) then
- NSTEPS=1000
- elseif (NSTEPS .lt. 10) then
- NSTEPS=10
- endif
- TIMEINC=DTIME/NSTEPS
- DO 60 K=1,NSTEPS,1
- TEMP=TEMP0+K*DTEMP/NSTEPS
- IF (XF(I) .LT. XFE) THEN
- DXF=0.4275D0*(AE3-TEMP)**3.0D0*XTERM(XF(I))*TIMEINC& *DIFF(TEMP)/fc/GS(I)**0.83D0
- IF (DXF .LT. (XFE-XF(I))) THEN
- XF(I)=XF(I)+DXF
- else
- XF(I)=XFE
- endif
- endif
- IF (XP(I) .LT. XPE) THEN
- DXP=0.52037D0*(AE1-TEMP)**3.0D0*XTERM(XP(I)/XPE)*TIMEINC& *DIFF(TEMP)*XPE/pc/GS(I)**0.638D0
- IF (DXP .LT. (XPE-XP(I))) THEN
- XP(I)=XP(I)+DXP
- else
- XP(I)=XPE
- endif
- endif
- XA(I)=1.0D0-(XF(I)+XP(I)+XB(I)+XM(I))
- 60 continue
- endif
- if ((TEMP2(I) .LT. TBS) .and. (TEMP1(I) .GT. TMS) & .and. (XA(I) .GT. 1.0D-4)) then
- CALL STARTSTOPC (TEMP1(I),TEMP2(I),TIME1,TIME2,& TBS,TMS,TEMP0,DTEMP,DTIME)
- NSTEPS=NINT(1000*DTIME)
- if (NSTEPS .gt. 1000) then
- NSTEPS=1000
- elseif (NSTEPS .lt. 10) then
- NSTEPS=10
- endif
- TIMEINC=DTIME/NSTEPS
- DO 80 K=1,NSTEPS,1
- TEMP=TEMP0+K*DTEMP/NSTEPS
- DXB=0.55561D0*(TBS-TEMP)**2.0D0*XTERM(XB(I))*TIMEINC & *DIFF(TEMP)/bc/GS(I)**0.574D0
- IF (DXB .LT. XA(I)) THEN
- XB(I)=XB(I)+DXB
- XA(I)=1.0D0-(XF(I)+XP(I)+XB(I)+XM(I))
- else
- XB(I)=1.0D0-(XF(I)+XP(I)+XM(I))
- XA(I)=0.0D0
- GOTO 99
- endif
- 80 continue
- endif
- if ((XA(I) .GT. ZERO) .and. (TEMP2(I) .LT. TMS) & .and. (TEMP1(I) .GT. TMS)) then
- XM(I)=1.0D0-(XF(I)+XP(I)+XB(I))
- XA(I)=0.0D0
- GOTO 99
- endif
- 99 if ((TEMP1(I) .lt. AE1) .and. (TEMP2(I) .gt. AE1)) then
- HV(I)=0.0D0
- endif
- if ((TEMP1(I) .ge. as1) .and. (TEMP2(I) .lt. as1)) then
- VR(I)=3600.0D0*(TEMP1(I)-TEMP2(I))/(TIME2-TIME1)
- endif
- if ((HV(I) .lt. zero) .and. (VR(I) .gt. 1.0D0)& .and. (TEMP2(I) .lt. TMS) .and. (XA(I) .le. zero)) then
- call hardness2(XCOMPOS,XF(I),XP(I),XB(I),XM(I),VR(I),HV(I))
- endif
- 100 CONTINUE
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement