Tag Archives: script

Coding subroutines in Abaqus

If you are an advanced Abaqus user, I am sure you have heard a word which some people try to avoid at all costs: subroutines. Today, I write about them as well as about my recent experience coding one for my research.


First of all, lets start with the main question: what is a subroutine? It is a script that, when run in parallel with the Finite Element (FE) model, allows users to request features which are not defined by default in the commercial software Abaqus. This FE package recognises a lot of different types of subroutines for both implicit and explicit simulations, depending on the information that we want to include, recalculate, modify, request… In other words, subroutines are useful when we want something that is not already available within the software and we need it in order to produce acceptable results.

Consider, for instance, that we were trying to simulate the response of a certain material, but the material model which was available in Abaqus did not quite reproduce the correct behaviour. What could we do then? The first option would be to contact Dassault Systemes to ask if they had any kind of expansion (with its corresponding extra cost, not too many things are given for free these days I’m afraid); sometimes, since a lot of users request the same thing, it is the company itself the one that creates the official subroutine. This option would save time and effort, but it would also affect our wallet. The second option would be to create a new material model from scratch. How could we do that? Well, we would need to code a UMAT (implicit) or a VUMAT (explicit) subroutine. In order to do so, we would need to learn how to code in Fortran, which is the only language supported by Abaqus (I know, this is a bit of a pain since Fortran is basically obsolete, but hey! It’s always good to learn something new!). We would also need to install two compilers and link them to the FE package, which once again is not straight forward (don’t worry, I’ll try to write another post to explain this). Some people might say that giving up would be the third option, but to me that attitude would be unacceptable, so don’t you dare! Read more

How to receive automatic notifications when your FE simulations are done

If you are a regular Abaqus user, I am sure that eventually you will need to run models for long periods of time. It can be quite annoying to go back to the office just to check if the simulation has finished to then find out that it is still running. For that reason, I’ve coded a simple python script that sends an automatic e-mail to the user once the simulation is completed or aborts due to errors.


While you run FE models that take a huge amount of computational time to finish, it is likely that you will be working on other things, such as experimental tests, reports, meetings and so on. Obviously, we want to check our results as soon as they are ready, but in order to do so we need to be checking our computer every now and then. This can be particularly annoying when you leave a simulation running for a few days and you are doing things out of the office. Hence you need to go and check if the model is done… and then you realise it’s still there, calculating more stresses and strains and that your trip to the office was a waste of time. To overcome this problem, I decided to create a python script to send a notification directly to my e-mail every time my analyses finish. I will try to explain you the basics so you can use this code on your computer. Read more