3. Developing FORTRAN code of the UMAT
In this step, the theoretical model for our material is implemented in Fortran. We will pass the .for file generated, in the next step to Abaqus to be compiled and then used in Abaqus/Standard analysis.
As we explained before, in How to start wring subroutines…, the header part of UMAT, which is a template from documentation, remains unchanged. We need to define our main outputs (STRESS, DDSDDE) or any other mandatory outputs for the considered material model.
EXAMPLE: Isotropic Linear Elastic Material (Fortran code)
In this material model UMAT, we just define elements of DDSDDE and calculate STRESS elements using STRAND and DDSDDE:
This piece of code will replace the “user coding to define DDSDDE, STRESS,…” part of the template from documentation. See the article How to start writing subroutines (Section 5) again.
You can download the complete UMAT file to check by yourself from here.
Save this UMAT. The path to this file will be later entered in the Abaqus Job settings.
4. Implementation in Abaqus & Compilation
After successful development of the UMAT, the code must be incorporated into Abaqus so as to correctly compile a working Abaqus analysis. When defining Abaqus job, you can add the developed UMAT. After Submitting the job, the UMAT will be compiled into a working executable by Abaqus automatically and can then be used to run the FEA simulation. After normally defining your FEM model in Abaqus/CAE, generally, you need to pass 4 more steps within Abaqus/CAE to incorporate a UMAT in your analysis:
i. Define a User Material
Say Abaqus that you will use a UMAT as a material model. You can also use other material models of Abaqus if there is no intervention. For example, you can use Abaqus own model for elasticity but develop a UMAT to model a very specific plasticity model.
From Property module, when defining a material, from General tab select User Material. That is all you should do.
ii. Define inputs (Mechanical Constants) for UMAT
When you select User Material as a material model for your problem, you can add as many constants as you wish in Data section. Type under Mechanical Constants the values you want to pass into written UMAT. After entering any data, you can press Enter to add a new row. This values then will be accessible through UMAT via PROPS array (PROPS(1), PROPS(2),…).
iii. Define the No. of state variables
Many mechanical constitutive models may require the storage of Solution-Dependent state Variables (SDV) such as plastic strains, back stress, saturation values, etc. in rate constitutive forms or historical data for theories written in integral form. You should allocate storage for these variables in the associated material definition. There is no restriction on the number of state variables.
The number of such variables required at the points is entered as part of the material definition. In Abaqus/CAE, Property module when defining a material, from General tab select Depvar. Then select the required quantity in Number of solution-dependent state variables.
State variables can be output to the output database (.odb) file using output identifiers SDV. You can ask Abaqus to visualize them later after completion of the job. In Step module, after defining your analysis type, from Field Output Manager, you can edit the F-Output-1 created automatically by Abaqus:
Remember that the SDV in Abaqus/CAE is exactly the same as STATEV in Abaqus Subroutine Interface. That is just a difference in naming by developers of Abaqus.
iv. Give the Path of UMAT to Abaqus
Like any other subroutine, when creating an Abaqus job, you should provide the path of UMAT to Abaqus. You can include one or more UMATs in a model by specifying the name of a Fortran source file that contains the subroutines.
EXAMPLE: Isotropic Linear Elastic Material (Implementation)
As we will discuss in section 6 (Examining UMAT results), at first, we start from a very simple model like simple tension (displacement-based) on one-element mode. After building our FEM model in Abaqus/CAE like any other model without UMAT, we should (we do not need any state variable in this simple UMAT):
1. Define a User Material from Property module
2. Define two Mechanical Constants as inputs for our elastic model UMAT: E and Nu
3. Give the Path of our written UMAT to Abaqus when defining the job.
5. Testing and debugging UMAT subroutine
Keep in mind that writing a UMAT is exactly like developing a piece of code in Fortran. So, when you finished typing your code, the main task starts! After first run, you may encounter compiling errors, complaining by compiler about structures and so on. Be patient, this is really normal even for experienced UMAT developers.
When you are facing an error and you are not sure about the cause, in a most easygoing manner, you can check the values by using write command to write the variable values into .msg file. We will discuss most important Fortran commands that are really handy when writing a UMAT (and also any subroutine) in an article later.
6. Examining UMAT results and verification
In this step, we will verify the compiled UMAT by running a couple of examples and compare the results against analytical, experiment or semi-analytical (predicted) results. UMAT verification is a crucial step in any UMAT development in order to guarantee a high level of confidence and quality in the developed material model.
Always start verifying the UMAT with a small (one element) model.
1. Run tests with all displacements prescribed to verify the integration algorithm for stresses and state variables (if any).
Suggested tests include:
» Uniaxial tensile/compressional test
» Biaxial/triaxial in two/three direction especially when anisotropy is present.
» Simple shear test
2. Run similar tests with load prescribed to verify the accuracy of the Jacobian.
3. Compare test results with analytical solutions or standard ABAQUS material models, if possible. If the above verification is successful, apply to more complicated problems.
EXAMPLE: Isotropic Linear Elastic Material (Verification)
This very simple UMAT yields exactly the same results as the Abaqus elastic model. So, we can verify our subroutine by comparing the results with Abaqus results from the native elastic model.
For example, we can check simple tension, simple shear and then run a more complicated 3D model and compare the results.
This simple UMAT can be used in 3D and plane strain models. It is usually straightforward to write a single routine that handles (generalized) plane strain, axisymmetric, and three-dimensional geometries. Generally, plane stress must be treated as a separate case because the stiffness coefficients are different.
1) Try to develop a simple elastic UMAT like what we discussed for 3D and PE (plane strain) models, for a isotropic PS (plane stress) model. Follow exactly the steps.
You can find the theory in any basic Continuum or Elasticity reference books. Lazier to refer to books? Take a look at Abaqus documentation (Linear elastic behavior: Defining orthotropic elasticity in plane stress).
2) Combine two UMAT (3D, PE + PS) into one single Fortran file. Test it with PE and PS models in Abaqus.
Tip: Refer to the explanation beneath NTENS parameter in PART A: Foundation article. Try to use an IF structure to ask Abaqus whether it is a plane stress problem or not.
If you are looking for more information about UMAT or you need to write a VUMAT, take a look at our comprehensive training package for UMAT/VUMAT: