Compiling Abaqus User Subroutines: Common Workflows

Compiling an Abaqus user subroutine is the step that connects a Fortran implementation to the Abaqus analysis environment. The process is more than simply writing a source file: Abaqus must identify the user subroutine, invoke a compatible compiler, compile the source, link the resulting code and then load it during the analysis.

This workflow is used for many different types of Abaqus customisation, including material models, user-defined elements, thermal behaviour, field variables, contact behaviour, amplitudes, initial conditions and other specialised capabilities.

This guide explains the common compilation workflows and provides a systematic way to distinguish compiler, linking, source-code and analysis problems.

What Does Compiling a User Subroutine Mean?

A Fortran user subroutine starts as source code. Before Abaqus can use that code during an analysis, it must be processed by a compatible compiler and incorporated into the Abaqus execution environment.

Fortran source ↓ Compiler ↓ Object / compiled code ↓ Linking ↓ Abaqus analysis ↓ User subroutine is called

The exact build process depends on the Abaqus release, operating system, compiler environment and type of user subroutine.

Which Abaqus Subroutines Can Be Compiled?

The Subroutine Tutorials collection includes several families of user-defined functionality. These include material models, elements, field variables, thermal routines, contact routines, amplitudes, boundary conditions, initial conditions and output. :contentReference[oaicite:2]{index=2}

Material Behaviour

Examples include UMAT, VUMAT and UHYPER.

User Elements

UEL and VUEL provide user-defined element interfaces for the corresponding solvers.

Thermal Behaviour

UMATHT, VDFLUX and VUEXPAN are examples of thermal-related user-subroutine applications.

Interactions

FRIC, VFRICTION, UINTER, VUINTER and UTRS support specialised interaction behaviour.

Before Compiling: Identify the Correct Subroutine

The first step is to determine exactly what functionality must be customised.

For example, a custom constitutive material in Abaqus/Standard may use UMAT , while an Explicit material implementation may use VUMAT .

Selecting the correct interface before writing the code avoids many compilation and implementation problems later.

Common Compilation Workflow

  1. Identify the required Abaqus user subroutine.
  2. Confirm the Abaqus release and solver.
  3. Confirm the supported compiler configuration.
  4. Prepare the Fortran source file.
  5. Configure the compiler environment.
  6. Submit the Abaqus job with the user source.
  7. Check compilation output.
  8. Check linking.
  9. Run the analysis.
  10. Validate the result.

Workflow 1: Compiling a UMAT

A common workflow is the compilation of a UMAT for Abaqus/Standard.

The source contains the constitutive calculations required by the material model. Abaqus compiles and links the source before using the routine during the analysis.

umat.for ↓ Abaqus compilation ↓ Linking ↓ Abaqus/Standard ↓ Material integration

Workflow 2: Compiling a VUMAT

For Abaqus/Explicit, the corresponding material workflow uses VUMAT .

Although the overall compilation concept is similar, the interface and numerical execution model differ from UMAT.

Important:

A UMAT source should not simply be renamed as a VUMAT. The two interfaces have different argument lists and solver requirements.

Workflow 3: Compiling a Thermal Material Routine

User-defined thermal material behaviour can be implemented through UMATHT in Abaqus/Standard.

The compilation sequence remains fundamentally the same: source code, compiler, linking and analysis.

The important difference is the physical data exchanged between Abaqus and the thermal user routine.

Workflow 4: Compiling a User-Defined Element

A user-defined finite element is a more advanced application of the compilation workflow.

The UEL interface is used for user-defined elements in Abaqus/Standard.

For Abaqus/Explicit, the corresponding interface is VUEL .

Because these routines implement element-level behaviour, they should normally be tested with very small models before being used in complex analyses.

Workflow 5: Compiling a Field-Variable Routine

A field-variable workflow can use the Explicit interface VUSDFLD .

The source is compiled in the same general manner, but the routine is called within the Explicit analysis environment.

A simple test should verify that the intended field variable is being calculated and passed into the model correctly.

Workflow 6: Compiling a Hyperelastic User Routine

For specialised hyperelastic material behaviour, UHYPER provides a user-subroutine interface for Abaqus/Standard.

The compiler workflow should be established before debugging the constitutive formulation itself.

Workflow 7: Compiling an Explicit Thermal Flux Routine

User-defined distributed fluxes in Abaqus/Explicit can be implemented through VDFLUX .

This is another example where the same compiler environment can support a different Abaqus user-subroutine interface.

Workflow 8: Compiling an Explicit Expansion Routine

For user-controlled expansion behaviour in Abaqus/Explicit, VUEXPAN provides the relevant interface.

Start with a simple thermal or expansion test before introducing complicated coupled behaviour.

Workflow 9: Compiling a User Friction Routine

Custom friction behaviour can require a user-subroutine compilation workflow.

For Abaqus/Standard, FRIC provides the relevant interface.

For Abaqus/Explicit, the corresponding interface is VFRICTION .

Workflow 10: Compiling a Custom Interaction Routine

More advanced contact behaviour can use user-defined interaction interfaces.

The UINTER interface is associated with Abaqus/Standard, while VUINTER is used for the corresponding Explicit interaction workflow.

These are advanced routines, so compilation should first be demonstrated using a deliberately simple interaction problem.

Workflow 11: Compiling a Custom Amplitude

Abaqus/Explicit custom amplitude behaviour can be implemented using VUAMP .

A simple time-dependent loading example can be used to confirm that the source compiles, links and is called correctly.

Workflow 12: Compiling a User-Defined Boundary Condition

For Abaqus/Explicit, user-defined displacement boundary conditions can be implemented with VDISP .

A controlled displacement test is preferable to a complicated production model when verifying the compilation workflow.

Workflow 13: Compiling Initial State Information

User-subroutine compilation is also relevant when initial conditions must be calculated programmatically.

The SDVINI interface can initialise solution-dependent state variables before an Abaqus/Standard analysis.

This type of routine should be tested with a model where the expected initial state is easy to inspect.

Workflow 14: Compiling Initial Stress Definitions

Initial stress fields can be defined using SIGINI in Abaqus/Standard.

A simple model with a known initial stress distribution is ideal for verifying that the compiled routine is being called correctly.

Workflow 15: Compiling Traction-Separation Behaviour

Advanced interaction development can use UTRS for user-specified traction-separation behaviour in Abaqus/Standard.

Because this is an advanced interface, it is best approached only after the basic compiler and linking workflow has been demonstrated with a simpler routine.

Source File Preparation

Before submitting the Abaqus job, verify that the source file contains the correct subroutine interface.

SUBROUTINE NAME(ARGUMENTS) IMPLICIT NONE ! Declarations ! User calculations RETURN END

The exact argument list must correspond to the selected Abaqus subroutine.

One Source File vs Multiple Source Files

Small projects can often be implemented in one Fortran source file.

Larger projects may contain:

main_subroutine.for material_model.for numerical_utils.for constants.for

All required source files must be available to the compilation and linking process.

Typical Command-Line Workflow

A typical Abaqus command-line submission specifies the user source file.

abaqus job=my_job user=my_subroutine.for

The exact command and compiler environment depend on the Abaqus release and operating system.

What Happens After the Command Is Submitted?

1. Abaqus reads the job configuration.

↓

2. The user source is identified.

↓

3. The Fortran compiler is invoked.

↓

4. The source is compiled.

↓

5. Compiled components are linked.

↓

6. Abaqus starts the analysis.

↓

7. Abaqus calls the user subroutine when required.

Compilation Errors

Compilation errors occur before the intended analysis can use the subroutine.

Typical causes include:

  • Fortran syntax errors;
  • incorrect declarations;
  • incorrect source format;
  • wrong argument lists;
  • missing source files;
  • compiler configuration problems.

Linking Errors

A source file may compile successfully and still fail during linking.

Linking problems can be related to:

  • compiler compatibility;
  • missing libraries;
  • multiple-source-file configuration;
  • environment configuration;
  • incompatible build components.

Runtime Errors

Runtime errors occur after compilation and linking have succeeded.

Common causes include:

  • invalid array indexing;
  • uninitialised variables;
  • division by zero;
  • invalid mathematical operations;
  • incorrect assumptions about the Abaqus interface.

Compilation vs Runtime Problems

Observation First area to investigate
Compiler cannot be found Compiler installation / environment
Fortran syntax error Source code
Linker error Compiler / libraries / build configuration
Analysis crashes Runtime code / arrays / numerical operations
Analysis runs but results are wrong Physical formulation / implementation

Use a Minimal Test Model

The most effective compilation workflow begins with a small Abaqus model.

Avoid testing a new user subroutine for the first time in a large model containing complex contact, multiple nonlinearities and many interacting physical processes.

Small model ↓ One user subroutine ↓ Simple loading ↓ Compile ↓ Run ↓ Check output

Single-Element Verification

For constitutive routines, single-element testing is particularly useful.

A controlled test can isolate the user material from unnecessary mesh, contact and geometry effects.

This approach is especially useful when validating a UMAT or VUMAT .

Verify That the Subroutine Is Being Called

During development, a controlled diagnostic message can help establish that Abaqus is actually entering the intended routine.

WRITE(*,*) 'USER SUBROUTINE CALLED'

Diagnostic output should be removed or restricted after debugging because a frequently called routine can generate very large amounts of output.

Check Input and Output Values

Once the routine is confirmed to be called, inspect the most important input and returned quantities.

  • Are coordinates reasonable?
  • Are time values reasonable?
  • Are material properties correct?
  • Are array dimensions correct?
  • Are returned values finite?
  • Are units consistent?

Compilation Workflow for Multiple Source Files

When several Fortran files are involved, the build process becomes more sensitive to dependencies.

main.for │ ├── calls → material.for │ ├── calls → utilities.for │ └── uses → constants.for ↓ Compilation ↓ Linking ↓ Abaqus analysis

Keep the source structure simple until the basic compilation workflow has been verified.

Compiler Environment Problems

If Abaqus cannot locate the compiler, changing the Fortran equations will not solve the problem.

Check the compiler installation, environment and supported configuration first.

Separate environment problems from source-code problems.

This single distinction can save considerable time when debugging Abaqus user-subroutine workflows.

Keep a Known-Good Compilation Test

After successfully compiling a user subroutine, keep a small model that can be rerun whenever the compiler or environment changes.

This becomes a regression test for the Abaqus-Fortran environment.

Document the Build Environment

For research and engineering projects, record:

  • Abaqus version;
  • operating system;
  • Fortran compiler;
  • compiler version;
  • source-code version;
  • test-model version.

Common Workflow for Research Projects

  1. Define the physical requirement.
  2. Select the appropriate Abaqus subroutine.
  3. Develop the smallest possible Fortran implementation.
  4. Compile the routine.
  5. Run a controlled verification model.
  6. Compare against analytical, experimental or reference results.
  7. Expand the model progressively.
  8. Validate the final implementation.

Common Workflow for Production Engineering

A production workflow should place greater emphasis on repeatability and traceability.

  • use a controlled compiler environment;
  • keep the source code under version control;
  • maintain regression models;
  • document compiler configuration;
  • validate important changes before release.

Common Compilation Mistakes

Wrong Subroutine

The source must match the physical functionality being customised.

Wrong Interface

Each Abaqus user subroutine has its own argument list and calling convention.

Unsupported Compiler

Compiler compatibility must be checked against the specific Abaqus release.

Missing Source File

Multiple-file projects must provide all required source files during compilation.

Testing a Huge Model

Start with a minimal model so that errors can be isolated.

No Regression Test

Keep a known-good model to detect problems after environment changes.

Recommended Compilation Checklist

  1. Confirm the Abaqus version.
  2. Confirm the required user subroutine.
  3. Confirm the Standard or Explicit solver.
  4. Confirm compiler compatibility.
  5. Verify the compiler independently.
  6. Verify the Abaqus compiler environment.
  7. Check the Fortran source interface.
  8. Submit a minimal Abaqus job.
  9. Check compilation output.
  10. Check linking.
  11. Verify that the subroutine is called.
  12. Check the numerical results.

From Compilation to Validation

Source code ↓ Compilation ↓ Linking ↓ Abaqus execution ↓ Subroutine call ↓ Numerical response ↓ Verification ↓ Validation

Successful compilation is therefore only one stage of the complete user-subroutine development process.

When Compilation Succeeds but Results Are Wrong

A successful build does not prove that the user subroutine is physically correct.

If the analysis runs but produces unexpected results, investigate:

  • constitutive equations;
  • state-variable updates;
  • units;
  • sign conventions;
  • boundary conditions;
  • time integration;
  • solver-specific requirements.

Advanced Compilation Workflow

Once the basic workflow is stable, more sophisticated subroutines can be introduced.

For example, an advanced interaction model can move from a simple compilation test toward UINTER or VUINTER .

Similarly, specialised traction-separation behaviour can be developed using UTRS .

Best Practice: Build Complexity Gradually

Level 1: Verify the compiler.

Level 2: Compile a minimal user routine.

Level 3: Run a simple Abaqus model.

Level 4: Verify against a known response.

Level 5: Introduce the full physical formulation.

Level 6: Validate the production model.

Final Compilation Checklist

  • The correct user subroutine has been selected.
  • The Standard or Explicit solver has been identified.
  • The compiler is compatible with the Abaqus release.
  • The compiler environment is working.
  • The Fortran source uses the correct interface.
  • All required source files are available.
  • Compilation completes successfully.
  • Linking completes successfully.
  • Abaqus actually calls the intended routine.
  • The smallest test model produces sensible results.
  • The implementation has been verified independently.
  • A known-good regression test has been retained.

Conclusion

Compiling an Abaqus user subroutine is a structured workflow rather than a single command. The process begins with selecting the correct subroutine, confirming the Abaqus and compiler environment, preparing the source, compiling and linking it, and finally verifying that Abaqus calls the routine correctly.

The same general workflow applies to material interfaces such as UMAT and VUMAT, user elements such as UEL and VUEL, thermal interfaces, Explicit field and loading routines, contact interfaces and specialised initial-condition or interaction routines.

The most reliable approach is to start small, isolate compilation from runtime behaviour, maintain a known-good test model and increase complexity only after each stage has been verified.

Practical rule:

If compilation fails, debug the build environment and source code. If linking fails, investigate the compiler and build configuration. If the analysis crashes, investigate the runtime implementation. If the analysis runs but the physics is wrong, validate the formulation.