美文网首页
python提取abaqus节点载荷位移到excel

python提取abaqus节点载荷位移到excel

作者: focus_reality | 来源:发表于2018-05-25 19:51 被阅读0次
    #!/user/bin/python
    # -*- coding:UTF-8 -*-
    from visualization import *
    from odbAccess import *
    from abaqusConstants import *
    import string
    import xlwt
    odb = openOdb(path = 'Job1.odb')
    wbkName = 'RF2Exaction'                         #命名表格文件名
    wbk = xlwt.Workbook()                           #创建新的表格
    sheet = wbk.add_sheet('sheet1')                 #创建sheet1
    myAssembly = odb.rootAssembly                   
    frameRepository = odb.steps['Step-1'].frames
    RefPointSet = myAssembly.nodeSets['Master Node 5']
    for i in range(len(frameRepository)):
        #提取参考点RF1在y方向的支反力
        RForce = frameRepository[i].fieldOutputs['RF']
        RefPointRForce = RForce.getSubset(region = RefPointSet)
        RForceValues = RefPointRForce.values
        RF_2 = RForceValues[0].data[2]
        #提取参考点RF1的位移量
        displacement =frameRepository[i].fieldOutputs['U']
        RefPointDisp = displacement.getSubset(region = RefPointSet)
        DispValue = RefPointDisp.values
        Disp = DispValue[0].data[2]
        #将结果写入相应的行和列
        sheet.write(i,0,round(Disp,3))
        sheet.write(i,1,round(RF_2,2))
    wbk.save('wbkName.xls')
    

    侵删,来源于微信公众号:ABAQUS二次开发

    相关文章

      网友评论

          本文标题:python提取abaqus节点载荷位移到excel

          本文链接:https://www.haomeiwen.com/subject/ecgujftx.html