ABAQUS用户子程序学习小结
1 FORTRAN语言中的“I-N规则”:I、J、K、L、M、N开头的为整型变量,其他开头为实型变量;
1.1 Fortran书写格式:1-5列:标号区;6列:续写标号区,一般就写"1";7-72列:语句区,本区内空格无效;注释行以C开头,本行内书写格式无要求;参考周煦《FORTRAN77结构化程序设计》,中国科学技术出版社,1995,38-40页 2 DIMENSION COORDS(3)表示声明一个含3个元素的数组,下标分别为1、2、3,访问形式为COORDS(n),n为1,3;
3 子程序(*.for)文件中如何输出调试信息:
WRITE(6,*)'COORDS(1)',COORDS(1),在*.dat文件中可看到输出,如果希望WRITE输出到msg文件中,则写为WRITE(7,*)';
4 用户子程序DLOAD中COORDS数组的含义:COORDS(1)也是一个数组,存贮单元集合中所有单元积分点的X坐标,COORDS(2)存贮Y坐标,相应INP文件中的写法为:
*DLOAD
PY,PYNU
其中PY为单元集合名称,定义方法为:
*Elset, elset=BEAM, generate
1, 5, 1
...
*ELSET,ELSET=PY
BEAM
5 DLOAD中F的定义方法:
F只有定义在单元积分点上才有效,例如:
F=1.0*COORDS (1)
附一个简单实例:
beam.inp文件:
*Heading
** Job name: Job-1 Model name: beam *Preprint, echo=NO, model=NO, history=NO, contact=NO
**
** PARTS
**
*Part, name=PART-1
调用子程序的例子*End Part
**
** ASSEMBLY
**
*Assembly, name=Assembly
**
*Instance, name=PART-1-1, part=PART-1 *Node
1, 0., 0.
2, 20., 0.
3, 40., 0.
4, 60., 0.
5, 80., 0.
6, 100., 0. *Element, type=B31
1, 1, 2
2, 2, 3
3, 3, 4
4, 4, 5
5, 5, 6
*Elset, elset=BEAM, generate
1, 5, 1
** Region: (Section-1-BEAM:BEAM), (Beam Orientation:BEAM)
** Section: Section-1-BEAM Profile: Profile-1
*Beam Section, elset=BEAM, material=STEEL, temperature=GRADIENTS,
section=RECT
0.2, 5.
0.,0.,-1.
*End Instance
*Nset, nset=ENDS, instance=PART-1-1
1, 6
*Nset, nset=_M4, internal, instance=PART-1-1
6,
*Nset, nset=_M5, internal, instance=PART-1-1
1,
*End Assembly
**
** MATERIALS
**
*Material, name=STEEL
*Elastic
210000., 0.3
*ELSET,ELSET=PY
BEAM
**
** BOUNDARY CONDITIONS
**
** Name: Disp-BC-1 Type: Symmetry/Antisymmetry/Encastre
*Boundary
_M4, ENCASTRE
** ----------------------------------------------------------------
**
** STEP: Step-1
**
*Step, name=Step-1
*Static
**
** LOADS
**
** Name: CFORCE-1 Type: Concentrated force
*DLOAD
PY,PYNU
**
** OUTPUT REQUESTS
**
**
** FIELD OUTPUT: F-Output-1 **
*Output, field, variable=PRESELECT **
** FIELD OUTPUT: F-Output-2 **
*Output, field
*Element Output
SF,
**
** HISTORY OUTPUT: H-Output-1 **
*Output, history
*Node Output, nset=ENDS
CF1, CF2, CF3, CM1, CM2, CM3, RF1, RF2 RF3, RM1, RM2, RM3, U1, U2, U3, UR1 UR2, UR3
*El Print, freq=999999
*Node Print, freq=999999
*End Step
bbb.for文件
SUBROUTINE DLOAD(F,KSTEP,KINC,TIME,NOEL,NPT,LAYER,KSPT,COORDS,
1 JLTYP,SNAME) C
INCLUDE 'ABA_PARAM.INC'
C
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
WRITE(6,*)'COORDS(3)',COORDS(3)
F=1.0*COORDS (1)
RETURN
END
运行方法:
在Abaqus Command提示符后输入:
abaqus job=beam user=bbb interactive 子程序如下~如何编写,调研子程序,

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。