Blog

Everything about Writing User Subroutines with Abaqus📝| Abaqus Subroutine Tutorial

abaqus subroutine
The Abaqus user subroutine allows customizing the program for specific applications that aren’t available through the main Abaqus features. You should write a subroutine if you can’t run your analysis using ABAQUS’ built-in models for materials, loads, properties, elements, etc. In this article, we, the CAE Assistant, provided a roadmap for writing user subroutines with Abaqus. Follow this article to become familiar with Abaqus subroutine examples and the best Abaqus subroutine tutorials. Writing user subroutines with Abaqus will be easier after reading this post.

1. Requirements for Writing Abaqus Subroutines

Abaqus user subroutines are mostly written in Fortran. When a simulation model that contains user subroutines is submitted to Abaqus, the correct compile and link commands should be used automatically. If the version of your Fortran compiler does not correspond to that specified, incompatibilities may occur. Therefore, it is important to have compatible components for subroutine configuration. You can find a comprehensive guide to compatible versions of Abaqus, Intel Fortran and Visual Studio In this article:

Compatible Fortran and Visual Studio for Abaqus

First, prepare the required programs. Then you should follow an instruction to link Abaqus with Intel Fortran and Visual Studio. For example, this article helps you with Abaqus 2017:

Linking Abaqus 2017 and Fortran

The basics are similar to other versions of Abaqus. Just pick the compatible versions from the former article

These are some of the necessary requirements to begin writing user subroutines with Abaqus. So, before we proceed with this Abaqus subroutines tutorial, make sure you have followed these instructions.

abaqus subroutine ⭐⭐⭐ Abaqus Course |10 hours Video  👩‍🎓+1000 Students   ♾️ Lifetime Access

✅ Module by Module Training                                  ✅ Standard/Explicit Analyses Tutorial

✅ Subroutines (UMAT) Training                    …         ✅ Python Scripting Lesson & Examples

…………………………                 …………………….. ……………   …………………………………….

2.An Introduction to Different Abaqus User Subroutines | Abaqus Subroutine Example

One of the most important Abaqus subroutine example is UMAT, which allows adding constitutive models to the program. A more advanced subroutine is UEL, enabling the creation of user-defined elements. Other, less complex Abaqus user subroutine examples include:

  • DLOAD for specifying user-defined loading
  • DISP to define the magnitudes of prescribed boundary conditions
  • UVARM for defining a user output variable
  • URDFIL for reading the results file during analyses
  • SIGINI for specifying initial stress fields
  • USDFLD for defining field variable dependence

UEL or UMAT are more complicated and require a good understanding of applied mechanics concepts (FEM, Continuum mechanics, Computational Plasticity…).


Read More: Units in Abaqus | Consistent units Abaqus


abaqus subroutine example | Abaqus documentation

Although, several Abaqus user subroutines like DLOAD, USDFLD or DISP could be simple and can be learned with little effort using the Abaqus documentation and examples that come with it. If you want to learn more about each of the Abaqus subroutines mentioned in this section, you can easily click on Most Typically Used Subroutines in Abaqus.

3. Choosing the Appropriate Abaqus user Subroutine for Your Specific Issue

First, I have to say, The subroutines are available for both Abaqus/Standard and Abaqus/Explicit. For example, we have DLOAD in Abaqus/Standard and VDLOAD in Abaqus/Explicit.

This is where you should decide which subroutine is the answer to your need. While a complete understanding of the structure of Abaqus is not required to develop a user subroutine, it helps if the developer has at least an overview of the structure. This understanding is really mandatory when writing advanced subroutines like UMAT or UEL.

This is the basic flow of data and actions from the start of an Abaqus/Standard analysis to the end:

Abaqus/Standard flowchart

In addition, you can see this article to master the step, increment and iteration concepts:

Step, Increment, Iteration and Attempt concepts in Abaqus

And this is the basic flow diagram in an Abaqus/Explicit analysis:

Abaqus user subroutine /Explicit Solver Flow diagram

There is some Abaqus subroutine example or Abaqus user subroutine manual in our Package shop. Follow this post to learn the basics about user subroutine writing or Abaqus user subroutine, and after that, you can learn each subroutine in our packages.


If you are looking for a quick guide about the compatible versions of Fortran and Visual Studio, click on the link below:

Q&A: What are the compatible versions of Intel Fortran and Visual Studio for my Abaqus version?


4. Referring to Abaqus Documentation

Reading the Abaqus user subroutine manual in the Documentation before working on it can save your time in the end and complete this Abaqus subroutine tutorial. You’re in good hands, in the following, we will explain how you can utilize the Abaqus Documentation.

Most difficulties in using Abaqus user subroutines can be solved by following the instructions in the manuals carefully. Open Abaqus User Subroutines Reference Guide from Abaqus Documentation:

Subroune Guide in Abaqus Documentation | Abaqus user subroutine manual

First, select User Subroutines in the left panel. Then, Find your subroutine name from the list either for Abaqus/Standard or Abaqus/Explicit. Now, you will see these details on the right:

writing user subroutine with Abaqus : the Structure

In the next section, we will provide detailed explanations to help you better understand the structure of Abaqus user subroutines.

4.1. Sections of a Subroutine Guide in Abaqus Documentation:

(1) Subroutine title and a short description of its usage in Abaqus

(2) Some links to the related topics of Documentation. Relation of the subroutine and the keywords of Abaqus.

(3) There are some refers to different examples included in Abaqus Documentation related to this subroutine. Open those examples too and look at them carefully.

It is generally useful to look for relevant examples in Abaqus Documentation to review them when embarking on a new class of problems. You may find these examples in Example Problems Guide, Benchmarks Guide, Verification Guide and less likely in Getting Started with Abaqus/CAE. Study the example problem description and the inputs and outputs. Find the most similar example to your specific problem.

(4) Here, you can learn what this subroutine can do, its limitations, etc.

Sometimes, after the Overview, there are some notes about the theory behind the subroutine and so on (for example, see Creep subroutine section in Documentation). Read them carefully, too.

(5) That is the code structure for the Abaqus user subroutine. Copy this part exactly

Generally, the variables passed into a user subroutine via the argument list are classified as either variables to be defined, variables that can be defined, or variables passed in for information.

(6) The parameters introduced in this part constitute the main part of a subroutine. You should define the parameters listed here.

(7) The user must not alter the values of the Variables passed in for information at all. Doing so will have unpredictable results.

Now, let’s dive into the main part of this Abaqus subroutine tutorial: writing user subroutines with Abaqus.

5. Writing User Subroutines with Abaqus

Now, you need to create a Fortran file (a simple txt file with .for ending) with whatever name you like.
Open the file. Here, we named our Abaqus subroutine example “myDISP.for” . By default, Microsoft Visual Studio will show up:

Visual studio for writing Abaqus subroutine

First, copy exactly the User subroutine interface part of the Documentation ((5) in the above figure). Now you should define the parameters listed in Variables to be defined section (6) instead of user coding to define x line. Here your coding skill come in! Write the customized expression for the parameters.

For example, for a DISP subroutine, we should define U (user defined special form of displacement B.C. that is not supported in Abaqus itself). Therefore, you need to be familiar with Fortran coding language. However, knowing just the main commands (loops, conditions…) and the data structures can be sufficient for most applications.

For this part, you can read the related post about UMAT Abaqus that completely describe how to write your first UMAT subroutine in Abaqus.

abaqus subroutine ⭐⭐⭐ Abaqus Course |10 hours Video  👩‍🎓+1000 Students   ♾️ Lifetime Access

✅ Module by Module Training                                  ✅ Standard/Explicit Analyses Tutorial

✅ Subroutines (UMAT) Training                    …           ✅ Python Scripting Lesson & Examples

…………………………               ………….  …………………….. ……………   …………………………….

6. Using the Subroutine in Abaqus Analysis

After you have written your own Abaqus user subroutine, you need to inform Abaqus where to use the subroutine. It depends on the type of subroutine. For example, DISP is a type of B.C. So, we go to Load module:

Using the DLOAD Subroutine in Abaqus Analysis

And when creating a new job, you give the address of your written subroutine.

7. Testing Your Written Abaqus Subroutine

The last and the trickiest step! Follow these instructions when running your sample jobs with subroutines:

» Always test your subroutines on the smallest possible model.

» Do not include other complicated features, such as contact, unless they are absolutely necessary when testing the subroutine.

» Test the most basic model of the user subroutine before adding additional complexity to the subroutine. Whenever add a new feature to the model in a user subroutine, test it before adding another feature.

» When appropriate, try to test the user subroutine in models where only values of the nodal degrees of freedom (displacement, rotations, temperature) are specified: simple tension test, simple shear test, simple temp B.C. s, etc.

To start to write the subroutine, you need to have Fortran knowledge. You can read “Fortran ‘Must Knows’ for Writing Subroutines in Abaqus article to get what you need!

8. How to Learn Abaqus Subroutine Writing Correctly? | Abaqus subroutine tutorial

Here below, I have listed some main Abaqus subroutine tutorials that you may encounter when using Abaqus at an advanced level as a graduate student or researcher. Good news for you! You can learn each subroutine you want by clicking on that.

UMAT Subroutine Video packageIntroduction to UEL SUBROUTINE in ABAQUSUVARM subroutine (VUVARM subroutine) in ABAQUS-packageUMESHMOTION Subroutine in ABAQUS-packageDFLUX subroutine in ABAQUS-packageUSDFLD AND VUSDFLD SUBROUTINES in ABAQUSUHARD Subroutine (UHARD Subroutine) in ABAQUS-packageUAMP subroutine (VUAMP Subroutine)in ABAQUS-packageIntroduction to VFRICTION and VFRIC Subroutines in ABAQUSUHYPER Subroutine in ABAQUSDISP AND VDISP SUBROUTINES in ABAQUSUEXPAN and VUEXPAN SUBROUTINEDLOAD subroutine

In the last part of this post, I invite you to watch the below video, which presents our main Abaqus tutorial package that can save a lot of time if you are a beginner in Abaqus.

Get this post as a PDF file: Writing User Subroutines with Abaqus

References:

Abaqus Documentation (User Subroutine Reference Guide)

Abaqus Documentation (Analysis User’s Guide)

Eager to hear from you…

The CAE Assistant is committed to addressing all your CAE needs, and your feedback greatly assists us in achieving this goal. If you have any questions or encounter complications, please feel free to comment here.

✅ Subscribed students +80,000
✅ Upcoming courses +300
✅ Tutorial hours +300
✅ Tutorial packages +100

What is a Abaqus subroutine?

The Abaqus user subroutine allows the program to be customized for particular applications unavailable through the main Abaqus facilities. You should write a user subroutine if you cannot run your analysis by ABAQUS built-in models for materials, loads, properties, elements, etc.

What is UMAT subroutine in ABAQUS?

The UMAT subroutine is used in Abaqus/Standard. If you need to model a user-defined nonlinear stress-strain relation, which is not provided by Abaqus, then look for the UMAT user subroutine. UMAT will allow you to define the customized material model for your problem.

What are the prerequisites to writing a subroutine in Abaqus?

Abaqus User subroutines are mostly written in Fortran. When a simulation model that contains user subroutines is submitted to Abaqus, the correct compile and link commands should be used automatically. If the version of your Fortran compiler does not correspond to that specified, incompatibilities may occur. Therefore, it is important to have compatible components for subroutine configuration. You can find a comprehensive guide to compatible versions of Abaqus, Intel Fortran and Visual Studio In this article: Compatible Fortran and Visual Studio for Abaqus

What kind of subroutines are there in Abaqus software?

There are different kinds of subroutines used in Abaqus. Each subroutine is useful for a certain part of the simulation. For example, User subroutines UMAT allows constitutive models to be added to the program. A more advanced subroutine is UEL, which allows the creation of user-defined elements. Also, different other subroutines are applicable in ABAQUS. Less complex Abaqus user subroutine examples are DLOAD, DISP, UVARM, URDFIL, etc. You can get familiar with the most important and typical subroutines by reading these articles: 10 Useful ABAQUS subroutines (Part 1), 10 Useful Abaqus Subroutine (Part 2).

How can I learn to create subroutines using Abaqus Documentation?

To learn about a certain subroutine, you need to find your subroutine name from Abaqus User Subroutines Reference Guide in Abaqus Documentation. Each subroutine guide contains seven sections. The first four sections are used to describe subroutine usage and ability in Abaqus, its limitations, etc. The final three sections provide the code structure used for this subroutine. Generally, the variables passed into a user subroutine via the argument list are classified as either variables to be defined, variables that can be defined, or variables passed in for information.

6 thoughts on “Everything about Writing User Subroutines with Abaqus📝| Abaqus Subroutine Tutorial

  1. Avatar of altyazili altyazili says:

    You made a number of good points there. I did a search on the subject and found most persons will agree with your blog. Elspeth Kit Hobey

  2. User Avatar sara.nik-4868 says:

    This article was one of the most complete articles I have ever read about subroutine. Thank you for preparing this article
    If it is possible, can you suggest me training packages about writing subroutines?
    thanks for your help

Leave a Reply