top of page

Abaqus - Subroutine

Introduction

The objective of this course is to show you how to write, debug and develop of Fortran subroutine in Abaqus. We will help you to understand the concepts of each subroutine and try to develop your own Fortran code. This page, however, does not show you how to link the Fortran compiler and Abaqus. I myself asked the IT guys in the IT department of our university to install and link the Fortran compiler with Abaqus. It is not that much difficult though. You can watch a Youtube video or follow an instruction from a website to do it by yourself. In this pager, anyway, we assume that you have already liked your Abaqus with the Fortran compiler. To check that, write 

abaqus verify -user_std 

in your Abaqus command window. Then, of course, you should see that it works correctly. 

How to debug your code?

The best way to debug your code is to print the variables, tensors, parameters, etc from your code. The results will be printed in the .log file in your work directory (e.g., C/temp/..). You only need to write a Print commend in your Fortran code:

PRINT *, "My variable X = ", X 

 

UGENS subroutine

If you want to model an structure with a nonlinear shell element and you want to compute the stress resultants and the strain in a complicated way (so complicated that nobody would understand), it is better to use UGENS. In this subroutine, you would receive the strain increment (and many other parameters) from the solver that you can use to compute your stress resultants. The following shows the interface of this subroutine. 

  SUBROUTINE UGENS(DDNDDE,FORCE,STATEV,SSE,SPD,PNEWDT,STRAN, 1   DSTRAN,TSS,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CENAME,NDI, 2   NSHR,NSECV,NSTATV,PROPS,JPROPS,NPROPS,NJPROP,COORDS,CELENT, 3   THICK,DFGRD,CURV,BASIS,NOEL,NPT,KSTEP,KINC,NIT,LINPER)

 

C

 

  INCLUDE 'ABA_PARAM.INC’

C

CHARACTER*80 CENAME DIMENSION DDNDDE(NSECV,NSECV),FORCE(NSECV),STATEV(NSTATV), 1 STRAN(NSECV),DSTRAN(NSECV),TSS(2),TIME(2),PREDEF(*), 2 DPRED(*),PROPS(*),JPROPS(*),COORDS(3),DFGRD(3,3), 3 CURV(2,2),BASIS(3,3)

 

! user coding to define DDNDDE, FORCE, STATEV, SSE, PNEWDT 

 

RETURN 

END

To understand the concept of each variable, the best way is to carefully read the Abaqus documentation. You see in the Abaqus documentation, for all the subroutine, there are three groups of variables; "variables to be defined", "variables that can be updated" and "variables passed in for information". In the first group, this is our task to write a Fortran code to compute them, or we can simply set them equal to zero. For the second group, it is optional to whether or not update them and for the third group you cannot change then. 

For instance, the FORCE represents the force vector including the force resultants {N11, N22, N12} and the moment resultants {M11, M22, M12}. The following figure shows the force and moment resultants on a shell element. DDNDDE matrix represents the gradient of the force vector with respect to the strain tensor. Note that the force vector has 6 components and strain vector (in Voigt notation) has also 6 components. So this gradient would be 6*6 second order tensor. 

UGENS fig_edited.jpg

In general this is the main steps that I suggest you to develop your UGENS.

  1. Read Abaqus documentation for UGENS

  2. Write a simple Fortran code for elastic shell

  3. Prepare your .inp file

  4. Compile your Fortran code

  5. Debug your code

  6. Verify the results

  7. Develop your code

  8. Verify your results

Here we prepared a simple example of an elastic material (step 2) for you to start this subroutine. 

Example #1: UGENS subroutine 

Write a UGENS subroutine to compute the force resultant of a linearly elastic material. 

Solution: We create a FE model with only one element. One element is enough for us to be sure that our Fortran subroutine works well at this point. So one S4R element is used. The two left node is fixed and the two right nodes are moved to the right. In other word, the two right nodes are subjected to the displacement of 1.0. 

The .inp of the FE model should be generated in the job section. The .inp in fact include all the information of your FE model. You need to modify the shell section:

** Section: CompositeLayup-1-1

*Shell Section, elset=CompositeLayup-1-1, composite, layup=CompositeLayup-1

0.1, 3, Mat1, 0., Ply-1

0.1, 3, Mat1, 90., Ply-2

*End Part

with the following part:

** Section: CompositeLayup-1-1

*Shell General Section, elset=CompositeLayup-1-1, USER, PROPERTIES=1, VARIABLES=1

1.0 

1000.0

*Transverse Shear Stiffness

1,1,0

*** ------------

*End Part

In this way, we can insert our user defined shell section (UGENS) into the FE model. Here, PROPERTIES = 1 means that we insert only one parameter into the fortran subroutine. This property is inserted equal to 1000. Moreover, VARIABLES = 1 means that at the end of the step (end of all increments) we want to save only one variable into a Solution state Dependent Variable (SDV). The shell thickness is 1.0. 

For the .inp files and the the UGENS Fortran subroutine, see the codes on GitHub:

VUGENS subroutine

VUGENS subroutine is used for generalized shell element in Abaqus dynamic explicit. 

bottom of page