2022年ABAQUS初学者用户子程序小例子 .pdf
实例:最简单的杆件单轴拉伸,材料本构模型采用线弹性模型,E206000MPa, =0.3。左端约束,右端施加均布力q=1。Author: xueweek希望这个小例子能帮助初学者减少一两天的摸索时间1材料本构模型:=E在 Property 中定义材料时,在General 下选中 UserMaterial ,输入 206000,0.3。以上两个数值代表E、,在用户子程序中代表着PROPS(1)、PROPS(2)。然后在 General下选中 Depvar,由于该例子中没有使用状态变量,因此在第一项中输入大于0 的数值即可。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 26 页 - - - - - - - - - 建模大家都会,故省略2ABAQUS 调用用户子程序大家在论坛上也可以看到很多方法,我这里指介绍最简单的一种。在 Job Manager 中点击 Edit 选项,在General 选项的最后一项中选择自己建立好的用户子程序文件。 (注:用户子程序文件可以使用文本编辑器进行编辑,当然也可以用Fortran编译器,如果对自己的用户子程序文件的语法不放心,可以先用Fortan 编译器进行编译,不过编译前要先建立Project,关于 Fortran 编译,这里不再介绍) 。完成后,点击submit 即可进行分析。3结果以下两张图分布是用户子程序和ABAQUS 自带的材料模型得到的应力云图,可以看出两种图形完全相同。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 26 页 - - - - - - - - - 4UMAT 子程序对于初学者来说,需要注意的是,FORTRAN 对于程序语言格式上的要求。例如,对于FORTRAN 语言, 前六个字符必须空出来,等等。 检查语法最好的方法就是在FORTRAN 编译器上进行编译。 SUBROUTINE UMAT(STRESS,STATEV ,DDSDDE,SSE,SPD,SCD,RPL,DDSDDT, 1 DRPLDE,DRPLDT,STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED, 2 CMNAME,NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT, 3 PNEWDT,CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,KSTEP,KINC) include aba_param.inc CHARACTER*8 CMNAME DIMENSION STRESS(NTENS),STATEV(NSTATV),DDSDDE(NTENS,NTENS), 1 DDSDDT(NTENS),DRPLDE(NTENS),STRAN(NTENS),DSTRAN(NTENS), 2 TIME(2),PREDEF(1),DPRED(1),PROPS(NPROPS),COORDS(3),DROT(3,3), 3 DFGRD0(3,3),DFGRD1(3,3) C UMAT FOR ISOTROPIC ELASTICITY C CANNOT BE USED FOR PLANE STRESS C - C PROPS(1) - E C PROPS(2) - NU C - 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 26 页 - - - - - - - - - C IF (NDI.NE.3) THEN WRITE (6,*) THIS UMAT MAY ONLY BE USED FOR ELEMENTS 1 WITH THREE DIRECT STRESS COMPONENTS CALL XIT ENDIF C C ELASTIC PROPERTIES EMOD=PROPS(1) ENU=PROPS(2) EBULK3=EMOD/(1-2*ENU) EG2=EMOD/(1+ENU) EG=EG2/2 EG3=3*EG ELAM=(EBULK3-EG2)/3 C C ELASTIC STIFFNESS C DO K1=1, NDI DO K2=1, NDI DDSDDE(K2, K1)=ELAM END DO DDSDDE(K1, K1)=EG2+ELAM END DO DO K1=NDI+1, NTENS DDSDDE(K1 ,K1)=EG END DO C C CALCULATE STRESS C DO K1=1, NTENS DO K2=1, NTENS STRESS(K2)=STRESS(K2)+DDSDDE(K2, K1)*DSTRAN(K1) END DO END DO C RETURN END 5INP 输入文件*Heading * Job name: Job-1 Model name: Model-1 * Generated by: Abaqus/CAE 6.10-1 *Preprint, echo=NO, model=NO, history=NO, contact=NO * * PARTS * *Part, name=Part-1 *End Part * 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 26 页 - - - - - - - - - * * ASSEMBLY * *Assembly, name=Assembly * *Instance, name=Part-1-1, part=Part-1 *Node 1, 0.0399999991, 0.0399999991, 0.400000006 2, 0.0399999991, 0.0299999993, 0.400000006 3, 0.0399999991, 0.0199999996, 0.400000006 4, 0.0399999991, 0.00999999978, 0.400000006 5, 0.0399999991, 0., 0.400000006 6, 0.0399999991, 0.0399999991, 0.389999986 7, 0.0399999991, 0.0299999993, 0.389999986 8, 0.0399999991, 0.0199999996, 0.389999986 9, 0.0399999991, 0.00999999978, 0.389999986 10, 0.0399999991, 0., 0.389999986 11, 0.0399999991, 0.0399999991, 0.379999995 12, 0.0399999991, 0.0299999993, 0.379999995 13, 0.0399999991, 0.0199999996, 0.379999995 14, 0.0399999991, 0.00999999978, 0.379999995 15, 0.0399999991, 0., 0.379999995 16, 0.0399999991, 0.0399999991, 0.370000005 17, 0.0399999991, 0.0299999993, 0.370000005 18, 0.0399999991, 0.0199999996, 0.370000005 19, 0.0399999991, 0.00999999978, 0.370000005 20, 0.0399999991, 0., 0.370000005 21, 0.0399999991, 0.0399999991, 0.360000014 22, 0.0399999991, 0.0299999993, 0.360000014 23, 0.0399999991, 0.0199999996, 0.360000014 24, 0.0399999991, 0.00999999978, 0.360000014 25, 0.0399999991, 0., 0.360000014 26, 0.0399999991, 0.0399999991, 0.349999994 27, 0.0399999991, 0.0299999993, 0.349999994 28, 0.0399999991, 0.0199999996, 0.349999994 29, 0.0399999991, 0.00999999978, 0.349999994 30, 0.0399999991, 0., 0.349999994 31, 0.0399999991, 0.0399999991, 0.340000004 32, 0.0399999991, 0.0299999993, 0.340000004 33, 0.0399999991, 0.0199999996, 0.340000004 34, 0.0399999991, 0.00999999978, 0.340000004 35, 0.0399999991, 0., 0.340000004 36, 0.0399999991, 0.0399999991, 0.330000013 37, 0.0399999991, 0.0299999993, 0.330000013 38, 0.0399999991, 0.0199999996, 0.330000013 39, 0.0399999991, 0.00999999978, 0.330000013 40, 0.0399999991, 0., 0.330000013 41, 0.0399999991, 0.0399999991, 0.319999993 42, 0.0399999991, 0.0299999993, 0.319999993 43, 0.0399999991, 0.0199999996, 0.319999993 44, 0.0399999991, 0.00999999978, 0.319999993 45, 0.0399999991, 0., 0.319999993 46, 0.0399999991, 0.0399999991, 0.310000002 47, 0.0399999991, 0.0299999993, 0.310000002 48, 0.0399999991, 0.0199999996, 0.310000002 49, 0.0399999991, 0.00999999978, 0.310000002 50, 0.0399999991, 0., 0.310000002 51, 0.0399999991, 0.0399999991, 0.300000012 52, 0.0399999991, 0.0299999993, 0.300000012 53, 0.0399999991, 0.0199999996, 0.300000012 54, 0.0399999991, 0.00999999978, 0.300000012 55, 0.0399999991, 0., 0.300000012 56, 0.0399999991, 0.0399999991, 0.289999992 57, 0.0399999991, 0.0299999993, 0.289999992 58, 0.0399999991, 0.0199999996, 0.289999992 59, 0.0399999991, 0.00999999978, 0.289999992 60, 0.0399999991, 0., 0.289999992 61, 0.0399999991, 0.0399999991, 0.280000001 62, 0.0399999991, 0.0299999993, 0.280000001 63, 0.0399999991, 0.0199999996, 0.280000001 64, 0.0399999991, 0.00999999978, 0.280000001 65, 0.0399999991, 0., 0.280000001 66, 0.0399999991, 0.0399999991, 0.270000011 67, 0.0399999991, 0.0299999993, 0.270000011 68, 0.0399999991, 0.0199999996, 0.270000011 69, 0.0399999991, 0.00999999978, 0.270000011 70, 0.0399999991, 0., 0.270000011 71, 0.0399999991, 0.0399999991, 0.25999999 72, 0.0399999991, 0.0299999993, 0.25999999 73, 0.0399999991, 0.0199999996, 0.25999999 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 26 页 - - - - - - - - - 74, 0.0399999991, 0.00999999978, 0.25999999 75, 0.0399999991, 0., 0.25999999 76, 0.0399999991, 0.0399999991, 0.25 77, 0.0399999991, 0.0299999993, 0.25 78, 0.0399999991, 0.0199999996, 0.25 79, 0.0399999991, 0.00999999978, 0.25 80, 0.0399999991, 0., 0.25 81, 0.0399999991, 0.0399999991, 0.239999995 82, 0.0399999991, 0.0299999993, 0.239999995 83, 0.0399999991, 0.0199999996, 0.239999995 84, 0.0399999991, 0.00999999978, 0.239999995 85, 0.0399999991, 0., 0.239999995 86, 0.0399999991, 0.0399999991, 0.230000004 87, 0.0399999991, 0.0299999993, 0.230000004 88, 0.0399999991, 0.0199999996, 0.230000004 89, 0.0399999991, 0.00999999978, 0.230000004 90, 0.0399999991, 0., 0.230000004 91, 0.0399999991, 0.0399999991, 0.219999999 92, 0.0399999991, 0.0299999993, 0.219999999 93, 0.0399999991, 0.0199999996, 0.219999999 94, 0.0399999991, 0.00999999978, 0.219999999 95, 0.0399999991, 0., 0.219999999 96, 0.0399999991, 0.0399999991, 0.209999993 97, 0.0399999991, 0.0299999993, 0.209999993 98, 0.0399999991, 0.0199999996, 0.209999993 99, 0.0399999991, 0.00999999978, 0.209999993 100, 0.0399999991, 0., 0.209999993 101, 0.0399999991, 0.0399999991, 0.200000003 102, 0.0399999991, 0.0299999993, 0.200000003 103, 0.0399999991, 0.0199999996, 0.200000003 104, 0.0399999991, 0.00999999978, 0.200000003 105, 0.0399999991, 0., 0.200000003 106, 0.0399999991, 0.0399999991, 0.189999998 107, 0.0399999991, 0.0299999993, 0.189999998 108, 0.0399999991, 0.0199999996, 0.189999998 109, 0.0399999991, 0.00999999978, 0.189999998 110, 0.0399999991, 0., 0.189999998 111, 0.0399999991, 0.0399999991, 0.180000007 112, 0.0399999991, 0.0299999993, 0.180000007 113, 0.0399999991, 0.0199999996, 0.180000007 114, 0.0399999991, 0.00999999978, 0.180000007 115, 0.0399999991, 0., 0.180000007 116, 0.0399999991, 0.0399999991, 0.170000002 117, 0.0399999991, 0.0299999993, 0.170000002 118, 0.0399999991, 0.0199999996, 0.170000002 119, 0.0399999991, 0.00999999978, 0.170000002 120, 0.0399999991, 0., 0.170000002 121, 0.0399999991, 0.0399999991, 0.159999996 122, 0.0399999991, 0.0299999993, 0.159999996 123, 0.0399999991, 0.0199999996, 0.159999996 124, 0.0399999991, 0.00999999978, 0.159999996 125, 0.0399999991, 0., 0.159999996 126, 0.0399999991, 0.0399999991, 0.150000006 127, 0.0399999991, 0.0299999993, 0.150000006 128, 0.0399999991, 0.0199999996, 0.150000006 129, 0.0399999991, 0.00999999978, 0.150000006 130, 0.0399999991, 0., 0.150000006 131, 0.0399999991, 0.0399999991, 0.140000001 132, 0.0399999991, 0.0299999993, 0.140000001 133, 0.0399999991, 0.0199999996, 0.140000001 134, 0.0399999991, 0.00999999978, 0.140000001 135, 0.0399999991, 0., 0.140000001 136, 0.0399999991, 0.0399999991, 0.129999995 137, 0.0399999991, 0.0299999993, 0.129999995 138, 0.0399999991, 0.0199999996, 0.129999995 139, 0.0399999991, 0.00999999978, 0.129999995 140, 0.0399999991, 0., 0.129999995 141, 0.0399999991, 0.0399999991, 0.119999997 142, 0.0399999991, 0.0299999993, 0.119999997 143, 0.0399999991, 0.0199999996, 0.119999997 144, 0.0399999991, 0.00999999978, 0.119999997 145, 0.0399999991, 0., 0.119999997 146, 0.0399999991, 0.0399999991, 0.109999999 147, 0.0399999991, 0.0299999993, 0.109999999 148, 0.0399999991, 0.0199999996, 0.109999999 149, 0.0399999991, 0.00999999978, 0.109999999 150, 0.0399999991, 0., 0.109999999 151, 0.0399999991, 0.0399999991, 0.100000001 152, 0.0399999991, 0.0299999993, 0.100000001 153, 0.0399999991, 0.0199999996, 0.100000001 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 26 页 - - - - - - - - - 154, 0.0399999991, 0.00999999978, 0.100000001 155, 0.0399999991, 0., 0.100000001 156, 0.0399999991, 0.0399999991, 0.0900000036 157, 0.0399999991, 0.0299999993, 0.0900000036 158, 0.0399999991, 0.0199999996, 0.0900000036 159, 0.0399999991, 0.00999999978, 0.0900000036 160, 0.0399999991, 0., 0.0900000036 161, 0.0399999991, 0.0399999991, 0.0799999982 162, 0.0399999991, 0.0299999993, 0.0799999982 163, 0.0399999991, 0.0199999996, 0.0799999982 164, 0.0399999991, 0.00999999978, 0.0799999982 165, 0.0399999991, 0., 0.0799999982 166, 0.0399999991, 0.0399999991, 0.0700000003 167, 0.0399999991, 0.0299999993, 0.0700000003 168, 0.0399999991, 0.0199999996, 0.0700000003 169, 0.0399999991, 0.00999999978, 0.0700000003 170, 0.0399999991, 0., 0.0700000003 171, 0.0399999991, 0.0399999991, 0.0599999987 172, 0.0399999991, 0.0299999993, 0.0599999987 173, 0.0399999991, 0.0199999996, 0.0599999987 174, 0.0399999991, 0.00999999978, 0.0599999987 175, 0.0399999991, 0., 0.0599999987 176, 0.0399999991, 0.0399999991, 0.0500000007 177, 0.0399999991, 0.0299999993, 0.0500000007 178, 0.0399999991, 0.0199999996, 0.0500000007 179, 0.0399999991, 0.00999999978, 0.0500000007 180, 0.0399999991, 0., 0.0500000007 181, 0.0399999991, 0.0399999991, 0.0399999991 182, 0.0399999991, 0.0299999993, 0.0399999991 183, 0.0399999991, 0.0199999996, 0.0399999991 184, 0.0399999991, 0.00999999978, 0.0399999991 185, 0.0399999991, 0., 0.0399999991 186, 0.0399999991, 0.0399999991, 0.0299999993 187, 0.0399999991, 0.0299999993, 0.0299999993 188, 0.0399999991, 0.0199999996, 0.0299999993 189, 0.0399999991, 0.00999999978, 0.0299999993 190, 0.0399999991, 0., 0.0299999993 191, 0.0399999991, 0.0399999991, 0.0199999996 192, 0.0399999991, 0.0299999993, 0.0199999996 193, 0.0399999991, 0.0199999996, 0.0199999996 194, 0.0399999991, 0.00999999978, 0.0199999996 195, 0.0399999991, 0., 0.0199999996 196, 0.0399999991, 0.0399999991, 0.00999999978 197, 0.0399999991, 0.0299999993, 0.00999999978 198, 0.0399999991, 0.0199999996, 0.00999999978 199, 0.0399999991, 0.00999999978, 0.00999999978 200, 0.0399999991, 0., 0.00999999978 201, 0.0399999991, 0.0399999991, 0. 202, 0.0399999991, 0.0299999993, 0. 203, 0.0399999991, 0.0199999996, 0. 204, 0.0399999991, 0.00999999978, 0. 205, 0.0399999991, 0., 0. 206, 0.0299999993, 0.0399999991, 0.400000006 207, 0.0299999993, 0.0299999993, 0.400000006 208, 0.0299999993, 0.0199999996, 0.400000006 209, 0.0299999993, 0.00999999978, 0.400000006 210, 0.0299999993, 0., 0.400000006 211, 0.0299999993, 0.0399999991, 0.389999986 212, 0.0299999993, 0.0299999993, 0.389999986 213, 0.0299999993, 0.0199999996, 0.389999986 214, 0.0299999993, 0.00999999978, 0.389999986 215, 0.0299999993, 0., 0.389999986 216, 0.0299999993, 0.0399999991, 0.379999995 217, 0.0299999993, 0.0299999993, 0.379999995 218, 0.0299999993, 0.0199999996, 0.379999995 219, 0.0299999993, 0.00999999978, 0.379999995 220, 0.0299999993, 0., 0.379999995 221, 0.0299999993, 0.0399999991, 0.370000005 222, 0.0299999993, 0.0299999993, 0.370000005 223, 0.0299999993, 0.0199999996, 0.370000005 224, 0.0299999993, 0.00999999978, 0.370000005 225, 0.0299999993, 0., 0.370000005 226, 0.0299999993, 0.0399999991, 0.360000014 227, 0.0299999993, 0.0299999993, 0.360000014 228, 0.0299999993, 0.0199999996, 0.360000014 229, 0.0299999993, 0.00999999978, 0.360000014 230, 0.0299999993, 0., 0.360000014 231, 0.0299999993, 0.0399999991, 0.349999994 232, 0.0299999993, 0.0299999993, 0.349999994 233, 0.0299999993, 0.0199999996, 0.349999994 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 26 页 - - - - - - - - - 234, 0.0299999993, 0.00999999978, 0.349999994 235, 0.0299999993, 0., 0.349999994 236, 0.0299999993, 0.0399999991, 0.340000004 237, 0.0299999993, 0.0299999993, 0.340000004 238, 0.0299999993, 0.0199999996, 0.340000004 239, 0.0299999993, 0.00999999978, 0.340000004 240, 0.0299999993, 0., 0.340000004 241, 0.0299999993, 0.0399999991, 0.330000013 242, 0.0299999993, 0.0299999993, 0.330000013 243, 0.0299999993, 0.0199999996, 0.330000013 244, 0.0299999993, 0.00999999978, 0.330000013 245, 0.0299999993, 0., 0.330000013 246, 0.0299999993, 0.0399999991, 0.319999993 247, 0.0299999993, 0.0299999993, 0.319999993 248, 0.0299999993, 0.0199999996, 0.319999993 249, 0.0299999993, 0.00999999978, 0.319999993 250, 0.0299999993, 0., 0.319999993 251, 0.0299999993, 0.0399999991, 0.310000002 252, 0.0299999993, 0.0299999993, 0.310000002 253, 0.0299999993, 0.0199999996, 0.310000002 254, 0.0299999993, 0.00999999978, 0.310000002 255, 0.0299999993, 0., 0.310000002 256, 0.0299999993, 0.0399999991, 0.300000012 257, 0.0299999993, 0.0299999993, 0.300000012 258, 0.0299999993, 0.0199999996, 0.300000012 259, 0.0299999993, 0.00999999978, 0.300000012 260, 0.0299999993, 0., 0.300000012 261, 0.0299999993, 0.0399999991, 0.289999992 262, 0.0299999993, 0.0299999993, 0.289999992 263, 0.0299999993, 0.0199999996, 0.289999992 264, 0.0299999993, 0.00999999978, 0.289999992 265, 0.0299999993, 0., 0.289999992 266, 0.0299999993, 0.0399999991, 0.280000001 267, 0.0299999993, 0.0299999993, 0.280000001 268, 0.0299999993, 0.0199999996, 0.280000001 269, 0.0299999993, 0.00999999978, 0.280000001 270, 0.0299999993, 0., 0.280000001 271, 0.0299999993, 0.0399999991, 0.270000011 272, 0.0299999993, 0.0299999993, 0.270000011 273, 0.0299999993, 0.0199999996, 0.270000011 274, 0.0299999993, 0.00999999978, 0.270000011 275, 0.0299999993, 0., 0.270000011 276, 0.0299999993, 0.0399999991, 0.25999999 277, 0.0299999993, 0.0299999993, 0.25999999 278, 0.0299999993, 0.0199999996, 0.25999999 279, 0.0299999993, 0.00999999978, 0.25999999 280, 0.0299999993, 0., 0.25999999 281, 0.0299999993, 0.0399999991, 0.25 282, 0.0299999993, 0.0299999993, 0.25 283, 0.0299999993, 0.0199999996, 0.25 284, 0.0299999993, 0.00999999978, 0.25 285, 0.0299999993, 0., 0.25 286, 0.0299999993, 0.039999