资源简介
利用abaqus仿真软件进行激光增材温度场与应力场仿真,通过生死单元来优化模拟效果,其中生死单元添加利用python程序添加,方便快捷
代码片段和文件信息
from abaqus import *
from abaqusConstants import *
from caeModules import *
#m-s-kg
#------date input-----
#welding elements description
#maximum number of welding elements
maximum=360
#minnum number of welding elements
minnum=1
#the numbers per layer
cnum=12
#the total layers
zcnum=(maximum-minnum+1)/cnum
#the total time of welding
alltime=6.0
#time per analysis stop
dt=alltime/zcnum
#define modename
modename=‘Model-pinbanshengsi-python-shunxu‘
#keywords first line
positionnum=29
#number of rows between two analysis steps
linesincrement=10
#the elements set which need to dead in first steps
deadelmentset=‘set-welding‘
#the partname which the reactive elements bolong of in the assemble model
partname=‘Part-1-1.‘
#===================================================================================
mdb.models[modename].keywordBlock.setValues(edited=0)
import job
mdb.models[modename].keywordBlock.synchVersions(storeNodesAndElements=False)
mdb.models[modename].keywordBlock.insert(positionnum“““
*MODEL CHANGE TYPE=ELEMENTREMOVE
deadelmentset“““)
lab1=minnum
for j in range(zcnum):
data=range(cnum)
for i in range(cnum):
data[i]=lab1+i
initialstr=“““*MODEL CHANGE TYPE=ELEMENTADD
“““
for i in range(cnum):
if i%4==3:
initialstr=initialstr+partname+str(data[i])+‘\n‘
else:
initialstr=initialstr+partname+str(data[i])+‘ ‘
import job
mdb.models[modename].keywordBlock.synchVersions(storeNodesAndElements=False)
mdb.models[modename].keywordBlock.insert(positionnum+linesincrement+j*linesincrement
initialstr)
lab1=lab1+cnum
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1615 2020-12-09 20:20 shengsidanyuan\shengsidanyuan-temp.py
文件 960 2020-12-15 20:41 shengsidanyuan\Step-temp.py
目录 0 2020-12-23 15:48 shengsidanyuan
----------- --------- ---------- ----- ----
2575 3
- 上一篇:利用Python爬虫批量百度图库图片
- 下一篇:mysqldb64位
评论
共有 条评论