×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Scripting problem,node coordinate
3

Scripting problem,node coordinate

Scripting problem,node coordinate

(OP)
Hi
Here is the Problem.I want read node coordinates of a defomed part (by scripting) from an Odb and later submit the edited meshing as a new model for analysis.But i dont know where the deformed node coordinate data is saved and how to access them.I could n't access them like the outputfield.pls help.
thank you so much

Ps. i have submited another subject to which nobody replied.I would appreciate it if you could read it too.
the title was:
HELP!How to find the intersection of a line with an arbitrary surfac

RE: Scripting problem,node coordinate

3
The current nodal coordinates are not output by default.

Therefore,
1. You have to request COORD to be output.

or:

2. Compute them from initial coordinates + current displacements.

RE: Scripting problem,node coordinate

(OP)

Thank you so much Xerf it realy helped i realy admire your

knowledge and help!But still i have problem with seprateing

x,y,z variables :

firstStep = myOdb.steps['forming']
frame1 = firstStep.frames[1]
coordinate1=frame1.fieldOutputs['COORD']
x=coordinate1.values[0]    ????

i dont know how to assign COOR1 to x?

RE: Scripting problem,node coordinate

See the next example:


myOdb=session.odbs["odb_name]
myStep=myOdb.steps["step_name"]
last_frame_in_step=myStep.frame[-1]
coords=last_frame_in_step.fieldOutputs['COORD']
no_of_Nodes=len(coords.values)
for iValue in coords.values:
   node_label=iValue.nodeLabel
   instance_name=iValue.instance.name
   x_node=iValue.data[0]
   y_node=iValue.data[1]
   z_node=iValue.data[2] #for 3D models
   print "Part instance =%s, Node label = %i , x=%.15f, y=%.15f, z=%.15f"%(instance_name, node_label, x_node, y_node, z_node)

RE: Scripting problem,node coordinate

(OP)
Dear Xerf i thought you would have the answer as you had  last time so i asked the question here either.
I m trying to read the COORD data from an specifies instance nodes.But i get an following error:

this is what i wrote:

myOdb = visualization.openOdb(path='initial.odb',readOnly=FALSE)
firstStep = myOdb.steps['forming']
coords0=frame0.fieldOutputs['COORD']
coordxValue=coords0.values
coordxinstance=coordxValue.instance(name='TUBE-1',object=)

the error is :
AttributeError:'FieldValueArray' object has no Attribute 'instance'

And also i m not sure if i can get each Coordinate(x,y,z) using : iValue.data[i]

Thank you
Dariush

RE: Scripting problem,node coordinate

If you pay attention to the example I wrote above you can see the differences.

Concerning your code:
coords0.values  represents and array, namely a 'FieldValueArray' . If you want to see the name of the instance corresponding to a specific value in this array use:  coords0.values[index].instance.name , where index is an integer.

To obtain a the a fieldOutput containing only the values of within a specific part instance use
subField=fieldOutput.getSubset(region=myOdbInstance) method,
where for region you should supply and OdbInstance object.

You can obtain the OdbInstance object from:
myOdbInstance=session.odbs["myOdbName"].rootAssembly.instances["myInstanceName"]

I recommend to read "ABAQUS Scripting User's Manual" which contains a very good introduction to how to use the scripting features.

Best.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources