Abaqus二次开发怎么创建odb才能在odb中显示梁截面?
浏览:1385 回答:4
Abaqus后处理中设置View->ODB Display Options->Render beam profiles可以显示梁截面。我用以下代码创建了一个圆形梁的odb,却无法显示出梁截面,请各位看一下是什么原因,该怎么解决?谢谢。
from odbAccess import * from odbMaterial import * from odbSection import * from abaqusConstants import * def createODB(): odb = Odb(name='FEModel',path='Job-Beam-L-LoadZ-RotAlongXFE.odb') part1 = odb.Part(name='part-1', embeddedSpace=THREE_D,type=DEFORMABLE_BODY) nodeData = ( ( 1, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000), ( 2, 2.40000000e+002, 0.00000000e+000, 0.00000000e+000), ) part1.addNodes(nodeData=nodeData,nodeSetName='nset-1') sCatL = odb.SectionCategory(name='beam<L Profile>', description='Beam Section, L Profile') Right1fraction = sCatL.SectionPoint(number=1, description='Right, (1-fraction = 1.0)') Vertex = sCatL.SectionPoint(number=5, description='Vertex') Top2fraction = sCatL.SectionPoint(number=9, description='Top, (2-fraction = 1.0)') part1.addElements(elementData=((1,1,2),),type='B31',sectionCategory=sCatL) instance1 = odb.rootAssembly.Instance(name='part-1-1',object=part1) odb.CircularProfile(name='Profile-1', r=5) materialName='Material-1' odb.Material(name=materialName) elset_1 = instance1.ElementSetFromElementLabels(name='elset-1',elementLabels=(1,)) section_1 = odb.BeamSection(name='Section-1', integration=BEFORE_ANALYSIS, profile='Profile-1', material=materialName) odb.rootAssembly.instances['part-1-1'].assignSection(region=elset_1,section=section_1) step1 = odb.Step(name='Step-1',description='first analysis step',domain=TIME, timePeriod=1.0) analysisTime=0.1 frame1 = step1.Frame(incrementNumber=1,frameValue=analysisTime) uField = frame1.FieldOutput(name='U',description='Displacements', type=VECTOR, validInvariants=(MAGNITUDE,)) nodeLabelData = ( 1, 2, ) dispData = ( ( 5.34825733e+004,-5.62485892e+008, 1.10586118e+009), ( 9.93334113e-047, 1.00000000e-033, 1.73200000e-033), ) uField.addData(position=NODAL, instance=instance1,labels=nodeLabelData,data=dispData) step1.setDefaultDeformedField(uField) odb.save() odb.close() if __name__ == "__main__": createODB()
你没有在odb里增加截面,也没有指定梁的方向