Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

values in Fortran

Qingqing_Z_
Beginner
2,732 Views

I'm writing UMAT with the help of fortran to be used with ABAQUS input file. I just wonder why I input value such as 0.38 in the input file and write in the output of the UMAT it will be 0. Anyone knows how to solve this? Thank you.

Regards,

Vicky

0 Kudos
1 Solution
Greg_T_
Valued Contributor I
2,732 Views

Hi Vicky,

The small floating point value of 0.38 getting set to 0 does sound like it could be a variable type mismatch problem as Les has suggested.  Most of the Abaqus user subroutines reference an include file provided by the Abaqus install:

INCLUDE 'ABA_PARAM.INC'

It is worth investigating the include file to check if is using the implicit variable typing with a statement like:

implicit real*8(a-h,o-z)

If the include file is using implicit variable typing, that might be the cause of the value getting set to 0, especially if the variable in question starts with a letter in the implicit real definition.  You could consider replacing the implicit typing so that you could use "implicit none" as a way to check all the variable declarations in the user subroutine.  I have done that in Abaqus user subroutines successfully, although you need to be careful that each variable type is defined correctly.

You may have already referred to the Abaqus documentation, and especially the "Abaqus User Subroutines Reference Guide", which will provide useful details for using the Fortran user subroutines in an Abaqus analysis.  I recommend also writing a small main program where you can set input values for the UMAT, and run the UMAT from this testing program to confirm the input values are correct.  This way you can test the user subroutine independently of an Abaqus analysis.  Then if the user subroutine does not behave as expected in an Abaqus analysis at least you have narrowed the possible problems.

I hope this helps.

Regards,

Greg

View solution in original post

0 Kudos
4 Replies
Les_Neilson
Valued Contributor II
2,732 Views

I know nothing about UMAT or ABAQUS but my guess would be that you are using integer variables instead of real variables. Assigning 0.38 to an integer variable will result in the value being 0 (zero).

Les

0 Kudos
mecej4
Honored Contributor III
2,732 Views

Vicky, you need to make the question specific to Fortran, keeping in mind that few of the members of this forum use Abaqus. What does the input data file contain? Show the READ statement that caused the problem that you mentioned. What are the declarations of the variables in the I/O list of that READ statement?

0 Kudos
Greg_T_
Valued Contributor I
2,733 Views

Hi Vicky,

The small floating point value of 0.38 getting set to 0 does sound like it could be a variable type mismatch problem as Les has suggested.  Most of the Abaqus user subroutines reference an include file provided by the Abaqus install:

INCLUDE 'ABA_PARAM.INC'

It is worth investigating the include file to check if is using the implicit variable typing with a statement like:

implicit real*8(a-h,o-z)

If the include file is using implicit variable typing, that might be the cause of the value getting set to 0, especially if the variable in question starts with a letter in the implicit real definition.  You could consider replacing the implicit typing so that you could use "implicit none" as a way to check all the variable declarations in the user subroutine.  I have done that in Abaqus user subroutines successfully, although you need to be careful that each variable type is defined correctly.

You may have already referred to the Abaqus documentation, and especially the "Abaqus User Subroutines Reference Guide", which will provide useful details for using the Fortran user subroutines in an Abaqus analysis.  I recommend also writing a small main program where you can set input values for the UMAT, and run the UMAT from this testing program to confirm the input values are correct.  This way you can test the user subroutine independently of an Abaqus analysis.  Then if the user subroutine does not behave as expected in an Abaqus analysis at least you have narrowed the possible problems.

I hope this helps.

Regards,

Greg

0 Kudos
Qingqing_Z_
Beginner
2,732 Views

Thank you everyone. I went back to check the value specification. What I've found is that all variable names begins with letters A-H and O-Z represent single precision real numbers by default (http://www-classes.usc.edu/engr/ce/108/text/fbk01.htm).I've changed my variable name and it works. Thank you.

0 Kudos
Reply