×
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

No stop script code - Even with no convergence results

No stop script code - Even with no convergence results

No stop script code - Even with no convergence results

(OP)
Hi guys,

I wrote a Python script code to proceed a parametric plastic analysis in Abaqus.

Inside the loop, I added these below lines:
mdb.jobs[job_name].submit(consistencyChecking=OFF)
mdb.jobs[job_name].waitForCompletion()

Unfortunately, some models do not converge and the whole script (that includes other models) stops.

I would like to know how can I run the code without stopping when a analysis get wrong. Instead of stopping, just go to the next model and run it.

I can do it by calling my script code by using "abaqus cae script=code.py" but I would like to do it by calling to run without opening abaqus (i.e. abaqus cae nogui=code.py).

Does anyone has the code lines that I need to add it?

Thanks

RE: No stop script code - Even with no convergence results

You need to add exception handling for the events causing your code to stop, so that it properly writes out any output from the failed case you need for later before continuing on to the next case

https://docs.python.org/2/tutorial/errors.html

RE: No stop script code - Even with no convergence results

(OP)
Thanks zwtipp05.

But it seems that (in my case) there is no clear "Python Error" but an Abaqus Error.

In CMD, the following message appears:
"Abaqus Error: Abaqus/Standard Analysis exited with an error - Please see the message file for possible error messages if the file exists.
Abaqus/Analysis exited with errors
Abaqus/Analysis exited with error."

This error was caused by a Riks analysis that didn't converge.

There is no clear type of exception associate with this case.

To avoid using a stop criteria, I would like to know a way to have a no stop script code. In other words, a code that can run continually after a Riks analysis return an error.

Best regards

RE: No stop script code - Even with no convergence results

Not sure what method you're using to run the jobs from python, but section 6.8 of the Scripting User's Guide looks like it may help. With exceptions, you can process them yourself, it doesn't have to be an existing exceptions. You may for example parse the log file and see this error and then go to the next. Ultimately it depends a lot on how your code is setup, what you're doing and how you're doing it.

RE: No stop script code - Even with no convergence results

As mentioned, read out the .log file. Built a loop that waits for 60 seconds (e.g.) before it checks again. Use the sleep command from the time module to let the code wait.

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