×
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

Path plot based on centroid element data (not nodal based) - script?

Path plot based on centroid element data (not nodal based) - script?

Path plot based on centroid element data (not nodal based) - script?

(OP)
Hello everybody,

This is my first post here, but I hope not to be the last one.
 
My models are usually based on shell elements.
What I am looking for is a quick way to obtain both centroid based values (say, S11) along with centroid coordinates in order to be able to create a plot afterwards.

I know how to do this for nodal values: with report generator or by creating a path of nodes. However, none of thse options is possible for centroid values (since COORDS are given for nodes only).

Is there any quick way to post-process this data that I am missing.

If there is not avident way, this is the algorithm I thought for a script that would retrieve the data I need:
 - Create a viewGroup on my viewport consisting only of the elements that I am interested in obtaingin the data.
- The script would consist of a loop that goes through all the elements contained in the viewGroup (here lies my problem). Then it would store the centroid stress of these elements. At the same time it would store the centroid coordinates - by accessing the connected nodes and averaging their coordinates.

So here, the question would be how to go through the elements of my viewGroup only (not though all the elements of the model). Not sure if an element set would need to be created (but again, how to tell the script to focus just on the viewport elements?).

Any help would be very much appreciated.

Thanks in advance.

RE: Path plot based on centroid element data (not nodal based) - script?

Dear CompUser,

Using a python script, you can either retrieve the corresponding data (say S11) through node sets or particular nodes, which can be chosen by a rule or formula.
for a node set, your code could be somewhat like this:
session.xyDataListFromField(
odb=odb, outputPosition=NODAL
, variable=(('S', NODAL, ((COMPONENT, 'S11'),)),)
, nodeSets=('your node set',))

Best,

 

Mohammad M. Shahbazi
http://www.omranafzar.com/en

RE: Path plot based on centroid element data (not nodal based) - script?

I'm not so sure its possible to get data like that only for elements in a certain display group through python scripting in an ODB. (It is with some tricks if you were using an MDB object but that's not much help for you).

What you can do is create an element set before your analysis and use that after. If that isn't feasible then you could get the element labels you need by creating a set in you original CAE (or INP) file used to run the analysis and pass the required element labels into your post-processing script. Messy, but should work.

There may be a more straightforward way than scripting, I've never tried to do what you're doing, but I don't think you'll have much luck trying to use display groups in the way you've planned.

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