[Fortran] 纯文本查看 复制代码
SUBROUTINE USDFLD(FIELD,STATEV,PNEWDT,DIRECT,T,CELENT,
1 TIME,DTIME,CMNAME,ORNAME,NFIELD,NSTATV,NOEL,NPT,LAYER,
2 KSPT,KSTEP,KINC,NDI,NSHR,COORD,JMAC,JMATYP,MATLAYO,
3 LACCFLA)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),
1 T(3,3),TIME(2)
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),
1 COORD(*)
C 数据初始化(上次计算结果以及常数)
C --------------------------
IF (KINC .EQ. 1) THEN
C 定义为初始密度
STATEV(1)=1.5E-9
ELSE
END IF
C 将解相关状态变量与场变量联系
FIELD(1)=STATEV(1)
C
RETURN
END
C--------------------------------------
C--------------------------------------
SUBROUTINE UMATHT(U,DUDT,DUDG,FLUX,DFDT,DFDG,
1 STATEV,TEMP,DTEMP,DTEMDX,TIME,DTIME,PREDEF,DPRED,
2 CMNAME,NTGRD,NSTATV,PROPS,NPROPS,COORDS,PNEWDT,
3 NOEL,NPT,LAYER,KSPT,KSTEP,KINC)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME
DIMENSION DUDG(NTGRD),FLUX(NTGRD),DFDT(NTGRD),
1 DFDG(NTGRD,NTGRD),STATEV(NSTATV),DTEMDX(NTGRD),
2 TIME(2),PREDEF(1),DPRED(1),PROPS(NPROPS),COORDS(3)
C
REAL rho_v, rho_f, phi_v, phi_f, A, E, n, R, m_g,
1 rho, M, delta_rho, f, Cv, Cf, Cp, Cpg, phi, delta_mg,
2 delta_U, V, kv, kf, rho_g, rho_pro, kv1, kf1,
3 miu,delta_rhog,mg,L,S
REAL GAMA(3)
INTEGER row1,i1,j1,row2,i2,j2
C 读取文件中的相关值
C ---------------------
REAL Data_T(33,11)
Data_T(1,:)=(/0.00,10.00,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0/)
Data_T(2,:)=(/1.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(3,:)=(/1.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(4,:)=(/1.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(5,:)=(/1.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(6,:)=(/1.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(7,:)=(/1.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(8,:)=(/1.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(9,:)=(/1.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(10,:)=(/2.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(11,:)=(/2.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(12,:)=(/2.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(13,:)=(/2.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(14,:)=(/2.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(15,:)=(/2.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(16,:)=(/2.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(17,:)=(/2.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(18,:)=(/3.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(19,:)=(/3.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(20,:)=(/3.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(21,:)=(/3.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(22,:)=(/3.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(23,:)=(/3.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(24,:)=(/3.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(25,:)=(/3.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(26,:)=(/4.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(27,:)=(/4.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(28,:)=(/4.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(29,:)=(/4.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(30,:)=(/4.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(31,:)=(/4.00,370.7,431.7,489.0,545.0,648.0,690.0,732.0,779.0,784.0,825.0/)
Data_T(32,:)=(/4.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
Data_T(33,:)=(/4.00,310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0/)
DO i1 = 2,33,1
IF(Data_T(i1,1) == NOEL)THEN
row1 = NPT + i1-1
EXIT
END IF
END DO
L = Data_T(row1,11)
DO j1 = 2,11,1
IF(Data_T(1,j1) >= TIME(1))THEN
IF(j1 == 2)THEN
L = Data_T(row1,2)
ELSE
L = Data_T(row1,j1 - 1)
& + (Data_T(row1,j1) - Data_T(row,j1 - 1))
& * (TIME(1) - Data_T(1,j1 - 1))
& / (Data_T(1,j1) - Data_T(1,j1 - 1))
END IF
EXIT
END IF
END DO
REAL Data_S(33,11)
Data_S(1,:)=(/0.00,10.00,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0/)
Data_S(2,:)=(/1.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(3,:)=(/1.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(4,:)=(/1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(5,:)=(/1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(6,:)=(/1.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(7,:)=(/1.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(8,:)=(/1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(9,:)=(/1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(10,:)=(/2.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(11,:)=(/2.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(12,:)=(/2.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(13,:)=(/2.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(14,:)=(/2.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(15,:)=(/2.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(16,:)=(/2.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(17,:)=(/2.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(18,:)=(/3.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(19,:)=(/3.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(20,:)=(/3.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(21,:)=(/3.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(22,:)=(/3.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(23,:)=(/3.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(24,:)=(/3.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(25,:)=(/3.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(26,:)=(/4.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(27,:)=(/4.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(28,:)=(/4.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(29,:)=(/4.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(30,:)=(/4.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(31,:)=(/4.00,1.00,1.00,1.00,1.00,0.99,0.99,0.98,0.80,0.60,0.20/)
Data_S(32,:)=(/4.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
Data_S(33,:)=(/4.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00/)
DO i2 = 2,33,1
IF(Data_S(i2,1) == NOEL)THEN
row2 = NPT + i2-1
EXIT
END IF
END DO
S = Data_S(row2,11)
DO j2 = 2,11,1
IF(Data_S(1,j2) >= TIME(1))THEN
IF(j2 == 2)THEN
S = Data_S(row2,2)
ELSE
S = Data_S(row2,j2 - 1)
& + (Data_S(row2,j2) - Data_S(row2,j2 - 1))
& * (TIME(1) - Data_S(1,j2 - 1))
& / (Data_S(1,j2) - Data_S(1,j2 - 1))
END IF
EXIT
END IF
END DO