×
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

Getsubset not working on COORD?

Getsubset not working on COORD?

Getsubset not working on COORD?

(OP)
Hi guys,

I just noticed a problem with COORD and I want to get your opinion. I've written a small script to get stresses and coordinates out of a certain elementset. I'm doing exactly the same for both, but it only works for the stress. For COORD I always get an empty fieldoutput. I've posted my script below, with additional comments.

Why is this happening? Is there a workaround?


import odbAccess
instanceName = 'FEM_YSW-1'
mySetName = 'FIBRE3'
OdbName = 'Small.odb'
StepName = 'Step-1'
#Create the odb, step and frame
myOdb = session.openOdb(OdbName)
myStep = myOdb.steps[StepName]
myFrame = myStep.frames[-1]
#Create an odbSet object for the element set of a certain fibre
mySet = myOdb.rootAssembly.instances[instanceName].elementSets[mySetName]
#Create fieldoutputs for stress and coords of the entire odb
stress_full = myStep.frames[-1].fieldOutputs['S']
coords_full = myStep.frames[-1].fieldOutputs['COORD']
#Create fieldoutputs for stress and coords of a certain element set
stress = myStep.frames[-1].fieldOutputs['S'].getSubset(region = mySet)
coords = myStep.frames[-1].fieldOutputs['COORD'].getSubset(region = mySet)
#Check length of the fieldoutput. It works perfectly for the entire odb.
len(stress_full.values)
len(coords_full.values)
#However, for the coords of the subset, it only works for stress and not for coords. For coords it returns 0.
len(stress.values)
len(coords.values)

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