abaquspython_(⼤四)运⽤python语⾔在Abaqus中进⾏建模(1)运⽤编程的⽅式建模,可以对参数的影响进⾏分析;
(2)inp和python语⾔的区别在于,python语⾔可以提供建模信息;
涠洲岛民宿推荐今天尝试建⽴⼀个薄壁圆柱壳的弯曲模型,#号开头表⽰注释⾏。
from abaqus import *
from abaqusConstants import *
#模型的名字为crack,因为最终想建⽴含裂缝的圆柱壳模型
myModel=mdb.Model(name='crack')
#进⼊part模块,⽤import表⽰导⼊
import part
#建⽴1/4模型,⽤拉伸的⽅式建模
mySketch=myModel.ConstrainedSketch(name='crackProfile',sheetSize=200)
mySketch.ArcByCenterEnds(center=(0.0, 0.0), point1=(0.0, 50.0), point2=(0.0, -50.0),
direction=CLOCKWISE)
mySketch.ArcByCenterEnds(center=(0.0, 0.0), point1=(0.0, 48.0), point2=(0.0, -48.0),
direction=CLOCKWISE)
mySketch.Line(point1=(0.0, 48.0), point2=(0.0, 50.0))
mySketch.Line(point1=(0.0, -48.0), point2=(0.0, -50.0))
#建⽴三维模型,提供厚度与模型的属性
myShell=myModel.Part(name='crack', dimensionality=THREE_D,
type=DEFORMABLE_BODY)
myShell.BaSolidExtrude(sketch=mySketch, depth=500.0)
我要向前飞
#进⼊材料模块
import material
mysteel=myModel.Material(name='steel')
elasticProperties=(2.0E5,0.3)
#这⾥长度单位采⽤的是mm,所以应⼒的单位是Mpa
mysteel.Elastic(table=(elasticProperties, ) )
#导⼊截⾯模块
import ction
mySection = myModel.HomogeneousSolidSection(name='ShellSection',
material='steel', thickness=1.0)
region=(lls,)
myShell.SectionAssignment(region=region,ctionName='ShellSection')
君是自可留
#导⼊装配模块,导⼊⾮独⽴实体
import asmbly
Asmbly
myInstance=myAsmbly.Instance(name='ShellInstance',part=myShell, dependent=OFF)
#这⼀步是建⽴参考点RP,这⾥的程序显得有⼀些冗长,是有pythonreader从Abaqus/cae中转换过来的
#由于对于RP的命令还并不熟悉,所以这⾥先采⽤pythonreader的结果
dels['crack'].rootAsmbly
distance=ModelAsmbly.instances['ShellInstance'].edges
ModelAsmbly.ReferencePoint(point=ModelAsmbly.instances['ShellInstance'].InterestingPoint( edge=distance[0], rule=CENTER))
#建⽴参考点的⽬的是,让参考点和⾯进⾏耦合,以便在点上施加弯矩
#在interaction模块中的coupling进⾏耦合,这⾥依然采⽤reader的结果
睡眠和休眠的区别
a = dels['crack'].rootAsmbly
r1 = a.referencePoints
refPoints1=(r1[3], )
一到十的成语大全region1=a.Set(referencePoints=refPoints1, name='m_Set-1')
指纹采集器
a = dels['crack'].rootAsmbly
s1 = a.instances['ShellInstance'].faces
side1Faces1 = s1.getSequenceFromMask(mask=('[#10 ]', ), )
region2=a.Surface(side1Faces=side1Faces1, name='s_Surf-1')
surface=region2, influenceRadius=WHOLE_SURFACE, couplingType=KINEMATIC,
localCsys=None, u1=ON, u2=ON, u3=ON, ur1=ON, ur2=ON, ur3=ON)
#接下来进⼊分析步,增加⼀个载荷步
import step
myModel.StaticStep(name='ShellLoad', previous='Initial', timePeriod=1.0,
initialInc=0.1,description='Boundry Condition')
#进⼊载荷模块
import load
#通过找点确定⾯的⽅式施加边界条件
endFaceCenter1 = (0,50,500)
桌面图标怎么设置endFace1 = myInstance.faces.findAt((endFaceCenter1,) )
endRegion1 = (endFace1,)
myModel.DisplacementBC(name='BC-1', createStepName='ShellLoad',
region=endRegion1, u1=0.0, u2=0.0, u3=UNSET, ur1=UNSET, ur2=UNSET, ur3=UNSET, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='',
localCsys=None)
endFaceCenter2 = (0,50,0)
endFace2 = myInstance.faces.findAt((endFaceCenter2,) )
endRegion2 = (endFace2,)
myModel.DisplacementBC(name='BC-2', createStepName='ShellLoad',
region=endRegion2, u1=0.0, u2=0.0, u3=0, ur1=UNSET, ur2=UNSET, ur3=UNSET, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='',
localCsys=None)
#这⾥的弯矩,加在前⾯定义好的region1(RP1)上即可
myModel.Moment(name='Load-1', createStepName='ShellLoad',
region=region1, cm1=100.0, distributionType=UNIFORM, field='',
localCsys=None)
这个模型也⽐较简单,我没有mesh,可以随便mesh⼀下看⼀下结果;
后续想在这个基础上做⼀些裂缝的参数分析,不过感觉并不能胜任... Mis应⼒云图
今天是六⼀⼉童节,祝各位⼉童节快乐~^.^~
怎么进入pe系统