×
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

Bizarre error using Python session.XYDataFromPath

Bizarre error using Python session.XYDataFromPath

Bizarre error using Python session.XYDataFromPath

(OP)
Hi friends!

I've got a quick question regarding the extraction of xy data from a path using a Python script. I've successfully done it for both invariant and component field output variables but my script breaks down for status type variables like damage initiation (HSNFCCRT for instance). I'm pulling the data from SC8R continuum shell elements but end up with some bizarre errors. Here's what I've got and I've tried a few things here:

nodalPath = session.paths['Glass_0_deg_1']

session.XYDataFromPath(name='Glass_0_deg_1_HSNFCCRT', path=nodalPath, includeIntersections=False, shape=DEFORMED, labelType=TRUE_DISTANCE_X, variable=(('HSNFCCRT', INTEGRATION_POINT),))

OK, that one won't work because I haven't specified the level of refinement, category selection label or the section point label. Fine. Here we go again:

nodalPath = session.paths['Glass_90_deg_1']

session.XYDataFromPath(name='Glass_90_deg_1_HSNFCCRT', path=nodalPath, includeIntersections=False, shape=DEFORMED, labelType=TRUE_DISTANCE_X, variable=(('HSNFCCRT', INTEGRATION_POINT, ((NONE, 'HSNFCCRT'),),{'shell < S2-GLASS > < 5 section points >':'SNEG, (fraction = -1.0)', }), ))

This gives me an error stating that it is expecting INVARIANT, COMPONENT OR NO_REFINEMENT for the refinement type. If I change it again to reflect the message:

session.XYDataFromPath(name='Glass_90_deg_1_HSNFCCRT', path=nodalPath, includeIntersections=False, shape=DEFORMED, labelType=TRUE_DISTANCE_X, variable=(('HSNFCCRT', INTEGRATION_POINT, ((NO_REFINEMENT, 'HSNFCCRT'),),{'shell < S2-GLASS > < 5 section points >':'SNEG, (fraction = -1.0)', }), ))

It fails again citing "OdpError: Unsupported refinement type: NO_REFINEMENT" This error is somewhat counterintuitive since that particular output variable is clearly not an invariant nor a component and thus no refinement is all that should be valid...yet it is not? What's going on here? I've screwed something up here but can't figure it out! Any insight would be very much appreciated, thanks in advance ABAQUS wizards!!!

RE: Bizarre error using Python session.XYDataFromPath

I remember having problems with this method.

I am not sure what's wrong. As far as I remembered I had to display the contour plot of the variable to be extracted from path, before using XYDataFromPath(...), despite the fact that XYDataFromPath(...) was correctly written. Otherwise, I was getting an error or even ABAQUS was crashing.

I think is something like this (you have to check the doc for correct syntaxes):

#obtain the default viewport
viewport=session.viewports[session.viewports.keys()[-1]]
viewport.setValues(displayedObject=myOdbObject)
viewport.odbDisplay.setPrimaryVariable(...)
viewport.odbDisplay.display.setValues(plotState=(CONTOURS_ON_DEF,))

#now call XYDataFromPath()
session.XYDataFromPath()

For example, if you choose to display only a specific display group before calling session.XYDataFromPath(), the method will extract data only from that display group...I think.

RE: Bizarre error using Python session.XYDataFromPath

(OP)
Thanks xerf, I knew about that work around already. It works just fine but since I'll be repeating the session.XYDataFromPath repeatedly (for a number of output variables) I didn't want to have to call and refresh the viewport every time I change output flavours since it will bog down my script and bring things to a crawl.

Your also 100% correct about displaying specific display groups  in order to generate region specific XY data. I'm in fact exploiting this due to discontinuities in adjacent regions in my model which would otherwise generate data with non-unique Y values for each corresponding X.

Thanks again for your help, does anyone else know of a way to get around this without the viewport call?

RE: Bizarre error using Python session.XYDataFromPath

I am using the approach I mentioned for extracting XYData for several variables, along several paths from several frames for each of the .odb file in a set of 100 odb files.  Each database has ~ 0.5Gb. And need to be opened and closed after extraction.

I takes less than 1 hour on a machine with a single core CPU@3.4Ghz  and 4Gb RAM.


RE: Bizarre error using Python session.XYDataFromPath

(OP)
That's actually quite similar to what I am doing (about 60 odbs  with each one ~2.5Gb). I've implemented what we discussed and it is working at the time of this writing. If it is only about an hour then that is just fine (my machine is similar but has a dual CPU @ 2.4 GHz, same RAM); I was simply worried it would be a lot longer than that. Thanks again for the help and ballpark estimate on CPU time!!

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