In some cases, we may have to wait several hours or even days for a simulation to be completed or to post-process hundreds of analysis. So, from time to time we have to go to the computer to check whether it has already finished or not. This “check” is trivial in many cases: go to your PC, take a look and that’s it.
However, in many other cases it is a bit more annoying: connect to a server/cluster, open a remote desktop, interrupt whatever you are doing at that moment, etc…
1. Setting up a Google account (Gmail)
In the video-tutorial below, I explain how to send emails from Abaqus using a Google account. It is the easiest mail server that I have found to send emails from Abaqus. Follow this steps to set it up:
- Create a Google account.
- Go to the Google account settings and in the “Security” tab, enable “Less secure app access”. Recently, this has changed and now you will have to set up an “App password” and use it, instead of your regular password.
2. Sending email notifications from Abaqus
The keypoint to send emails from Abaqus is using a Python script in which we make use of a library to send these emails. The Python library responsible for this is smtplib. Then, we only have to open a port to the Gmail server and login with the credentials of our new Google account (username and password).
In the following video you will see a detailed description of how to:
- Setup the Google account.
- Create a Python script to send notifications by email from Abaqus.
- Put everything together: pre-processing, solution, post-processing and email notification using a simple finite element model in the same workflow.
You can download all the scripts here and don’t forget to put them in the work directory of Abaqus (as shown in the video).
If you have any question or you come up with more ideas to take advantage of sending email notifications from Abaqus, leave it in the comments section below!
And if you want to know more about Abaqus Scripting with Python take a look at this post and learn how to create your own scripts from scratch.
I hope that you find this tip useful!