Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

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

Status
Not open for further replies.

CompUser

New member
Dec 13, 2011
1
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.
 
Replies continue below

Recommended for you

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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor