yzhan79 发表于 2016-5-27 14:50

利用Python输出Abaqus的结果数据

  from odbAccess import *
  #打开Ddb文件
  odb = openOdb(path='viewer_tutorial.odb')
  #创建变量lastFrame,得到载荷步Step-1的最后一帧
  lastFrame = odb.steps['Step-1'].frames[-1]
  # Create a variable that refers to the displacement 'U'
  # in the last frame of the first step.
  #创建变量displacement ,得到最后一帧的位移场数据
  displacement = lastFrame.fieldOutputs['U']
  #创建变量center,得到节点集PUNCH
  center = odb.rootAssembly.instances['PART-1-1'].\
  nodeSets['PUNCH']
  #创建变量centerDisplacement,得到region center的位移场数据
  centerDisplacement = displacement.getSubset(region=center)
  #输出各种信息,该节点集只有一个节点
  for v in centerDisplacement.values:

  print 'Position = ', v.position,'Type = ',v.type

  print 'Node label = ', v.nodeLabel

  print 'X displacement = ', v.data

  print 'Y displacement = ', v.data

  print 'Displacement magnitude =', v.magnitude

  odb.close()

  输出结果为:

  The resulting output is

  Position = NODAL Type = VECTOR

  Node label = 1000

  X displacement = -8.29017850095e-34

  Y displacement = -76.4554519653

  Displacement magnitude = 76.4554519653




转自:http://blog.sina.com.cn/s/blog_6465f2ed0102x4ei.html

页: [1]
查看完整版本: 利用Python输出Abaqus的结果数据