Fortran Coder

查看: 11017|回复: 4
打印 上一主题 下一主题

[求助] 数组问题,添加一新数组不运行

[复制链接]

29

帖子

10

主题

0

精华

熟手

F 币
152 元
贡献
98 点
跳转到指定楼层
楼主
发表于 2020-10-21 11:09:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
原本只有Data_T(33,11)数组,提交abaqus后可以运行计算,添加新的Data_S(33,11)数组后,提交abaqus后一直在提交中,不进行计算 求大神告知原因



分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

29

帖子

10

主题

0

精华

熟手

F 币
152 元
贡献
98 点
沙发
 楼主| 发表于 2020-10-21 11:13:20 | 只看该作者
[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
      

29

帖子

10

主题

0

精华

熟手

F 币
152 元
贡献
98 点
板凳
 楼主| 发表于 2020-10-21 11:14:15 | 只看该作者
[Fortran] 纯文本查看 复制代码
     C     气体的分子量
      mg= 1.5E-9
      M = 30.0
C     定义孔隙率
      phi = 0.113 * S + 0.274 * S
C     普适气体常数 (mJ/mol/K)
      R = 8.3144E3
C     定义气体粘度(MPa·s)
      miu = (1.48E-5+2.5E-8*L)*1E-6
C     计算气体密度和质量的变化
      rho_g = TEMP*M/R/L
      delta_mg = DTEMP*M*phi/R
      delta_rhog = DTEMP*phi*M/R/L
C     ------------------------------
C     计算delta_U
      delta_U = -1E-8+delta_rhog
C      计算U
      U = U + delta_U

C     DUDT
C     ---------------------------------
C     ---------------------------------
      DUDT = M*phi/R/L

C     DUDG
C     ---------------------------------
C     ---------------------------------
C     不定义,默认为零

C     FLUX, DFDG, DFDT
C     ---------------------------------
C     ---------------------------------
C     定义渗透率数组
      GAMA(1) = 6.18E-18 * S + 4.85E-15 *  S
      GAMA(2) = 6.18E-18 * S + 4.85E-15 *  S
      GAMA(3) = 6.18E-18 * S + 4.85E-15 *  S
C     ---------------------------------
C     定义FLUX、DFDT、DFDG
      DO I=1, NTGRD
         FLUX(I) = -(TEMP*M/R/L/miu)*(GAMA(I) * DTEMDX(I))
         DFDG(I,I) = -(TEMP*M/R/L/miu)*GAMA(I)
         DFDT(I) = -(M/R/L/miu)*(GAMA(I)*DTEMDX(I))
      END DO
C     ---------------------------------
C     定义需要输出的状态变量,可以多个,最好与MAT1中一致,便于对比
      STATEV(1) = L
      STATEV(2) = S
      STATEV(3) = DTEMP
      STATEV(4) = DTEMP+TEMP
      STATEV(5) = rho_g
      STATEV(6) = delta_mg
      STATEV(7) = delta_rhog
      STATEV(8) = delta_U
      STATEV(9) = DUDT
      STATEV(10) = GAMA(1)

C
      RETURN
      END

213

帖子

2

主题

0

精华

宗师

F 币
2126 元
贡献
875 点

规矩勋章

地板
发表于 2020-10-23 11:13:13 | 只看该作者
把107~140行移到83行。

29

帖子

10

主题

0

精华

熟手

F 币
152 元
贡献
98 点
5#
 楼主| 发表于 2020-10-28 16:26:46 | 只看该作者
风平老涡 发表于 2020-10-23 11:13
把107~140行移到83行。

好的 谢谢 已经解决问题
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-11-15 02:07

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表