Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract nodeset coordinates in abaqus with python script

Status
Not open for further replies.

Tarhouni

Student
Joined
Mar 3, 2021
Messages
4
Location
TN
Hello,

I would like to extract the Node set coordinates using a python script. i tried with this method using odb file :

import sys
from odbAccess import *
from abaqus import *
from abaqusConstants import *
import __main__

odb = openOdb('C:/Temp/Job-1.odb')
set = odb.rootAssembly.instances['part-1'].nodeSets['Set-1']
numNodes = len(set.nodes)
partlabel=[];
partxcord=[];
partycord=[];
partzcord=[];
for curNode in a.nodes:
partlabel.append(curNode.label)
partxcord.append(curNode.coordinates[0])
partycord.append(curNode.coordinates[1])
partzcord.append(curNode.coordinates[2])
The error displayed is : keyerror : Set-1.
knowing that when I defined the same syntax for the coordinates of the instance nodes, it works correctly.
myInstance = odb.rootAssembly.instances['part-1']
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top