Abaqus Fortran User Subroutines – What They Are And How To Execute Them

We all know that Abaqus is an extremely powerful FEA solver that allows us to simulate all kinds of real-world physics… but what happens when a material model or other type of physical behavior is unavailable in the tool? It might be tempting just to give up and go a different route – but not so fast! User subroutines allow us to modify the way Abaqus works in the background and opens up a whole world of new possibilities with the software that you already know and love!

What Are User Subroutines?

User subroutines are a powerful tool for Abaqus analysis, which increase the functionality of several capabilities like material modeling, loading, elements, amplitude etc. An elaborate description including functionality, mathematical theory, discretized equations, variables to be defined and variables passed in for information in the subroutines are available in Abaqus user subroutine guide.

The Process

User subroutines are written in Fortran programming language. For the sake of brevity, we won’t go into too much detail on how to write these since there are so many different things that can be done and the language can be complex.

After writing a user subroutine, we need to first configure Abaqus to compile and run them. For this purpose, Visual studio and Intel Fortran compliers are needed. This article summarizes the step-by-step procedure to configure Abaqus for running user subroutines written in Fortran programming language. The links for downloading free versions of Visual studio and Intel compilers are also provided. The procedure for installing and acquiring license of Abaqus is also outside of the scope for this article.

Step 1: Ensure that you have the Abaqus software installed and configured correctly.

Step 2: Based on the Abaqus version you have, check for compatible versions of Microsoft Visual Studio and Intel Fortran. For example, ABAQUS 2022 version is compatible with Intel® Fortran Version 19.0.5 and higher, and Microsoft Visual Studio 2019 (Visual C++):

Check for compatible versions here

Step 3: Microsoft Visual Studio development environment is needed for Intel Fortran on Windows. Hence, we must complete installation of Visual studio before Fortran compilers. Follow this link to download a free version of Visual Studio:

Visual Studio Download

You will only need to install ‘Desktop Development with C++’ workload for this purpose.



Step 4: The next step is to download the Intel oneAPI Base Toolkit:

Intel oneAPI Base Toolkit Download

To save disk space, opt for the custom installation and select the options shown in the figure below.



Integrate the Microsoft Visual Studio (step 3) with Intel and finish the installation process.



Step 5: Now, download and install Intel oneAPI HPC Toolkit:

Intel oneAPI HPC Toolkit

Again, to save disk space, opt for the custom installation and select the options shown in the figure below.



Integrate the Microsoft Visual Studio (step 3) with Intel and finish the installation process.

Instead of steps 4 and 5, Intel Parallel Studio XE can also be used to run user subroutines on Abaqus. This is a paid software and using this is out of scope of this article.

Step 6: Once we have the software successfully installed, we have to specify search paths through environment variables. For this purpose, identify the batch files ‘vcvarsall.bat’ and ‘vars.bat’.

Typically, the file locations for the batch files are as follows:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build

C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\env

Now go to Environment Variables in System Properties and add the two batch file paths as shown in the below figure. You can find this by searching ‘Environment Variables’ in the windows (Cortana) search bar.



Step 7: The next step is to configure Abaqus CAE by modifying abq2022.bat file. The file location is: C:\SIMULIA\Commands

Add ‘@call “C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\env\vars.bat” intel64 vs2019’ to the file as shown in the below figure.



Step 8: Now, we must update the abaqus_v6.env file usually located at:

C:\SIMULIA\EstProducts\2022\win_b64\SMA\site

Add ‘compile_fortran += [‘/names:lowercase’,]’ at the end of the file and save it. With this, the configuration process is complete.

Step 9: To make sure we’ve done a good job, we can test for successful configuration in Abaqus command prompt by entering: ‘abaqus info=system’. This identifies the Fortran complier.



Use the commands ‘abaqus verify -user_std’ and ‘abaqus verify -user_exp’ to check that we have properly working subroutines for standard and explicit solvers respectively.



Step 10: Finally, we need to let Abaqus know that we’d like to run a job with our newly compiled subroutine. To do this, simply launch the job in the normal way but, at the end of the command, include ‘user=fortranfile.for’.



Final thoughts

When it comes to Abaqus, the possibilities to model physics are practically endless. The use of user subroutines essentially unlocks that capability to a whole new level and, hopefully, this post will help you to do exactly that!

If you ever need help with anything Abaqus or subroutine related, don’t hesitate to ,reach out to the team at Fidelis and we’ll do our best to point you in the right direction!

Share this post