Precision of vumat, a solution proposal with vaba_param.inc

Dear Jorgen,

I have very important outputs on finite precision responses of ABAQUS and I want to share with you. Since I havent seen a solution of this kind I will include a long explanation which may seem as if an ABAQUS FOR DUMBS TUTORIAL. Sorry for that at the first place.

Previously you have mentioned that:

I want to emphasis that what most people do is to use (v)aba_param include files and then simply use generic function call such as sqrt(), and not double precision function calls such as dsqrt().

So I have the following noteworthy observations:

If we include vaba_param.inc and run the routine with DOUBLE PRECISION,

AT FIRST, ABAQUS runs a SINGLE PRECISION TEST is run with including vaba_param_sp.inc.

This file is formed from the following lines:

[COLOR=Red] implicit real (a-h,o-z)

[B]parameter (j_sys_Dimension = 1)[/B]

parameter( n_vec_Length = 136 )

parameter( maxblk = n_vec_Length )

parameter(i_ipm_sta = -6)

character*5 j_ipm_Error

parameter(j_ipm_Error = Error)

parameter(j_ipm_Aborted = 20)

[/COLOR]

After this first test, ABAQUS recompiles the subroutine but not with DOUBLE PRECISION according to our wish. Here the vaba_param_dp.inc is activated and in this file we have the statements as:

[COLOR=Red] implicit double precision (a-h,o-z)

[B]parameter (j_sys_Dimension = 2)[/B]

parameter( n_vec_Length = 136 )

parameter( maxblk = n_vec_Length )

parameter(i_ipm_sta = -6)

character*5 j_ipm_Error

parameter(j_ipm_Error = Error)

parameter(j_ipm_Aborted = 20)[/COLOR]

We see that, the parameter j_sys_Dimension changes in these two files, moreover this is a GLOBAL variable thus may be used as a CONTROLLING GLOBAL PARAMETER for the PRECISION of our codes.

This means that we may use certain if statements and call the DOUBLE or SINGLE PRECISION versions of the functions.

Now check this out:

Suppose that one wants to carry out the following operation at an arbitrary place of the subroutine with a DOUBLE PRECISION analysis code. Since he wants to gather DOUBLE PRECISION results

he uses DEXP instead of EXP.

[COLOR=DarkOrchid] [B]rrr=3.0d0

aaa=dexp(rrr*rrr)[/B][/COLOR]

This will NOT PASS the SINGLE PRECISION TEST RUN and give an error of the following kind:

[COLOR=Red] VUMAT.obj : error LNK2001: unresolved external symbol _DEXP@4 [/COLOR]

Commonly one will justify DOUBLE PRECISION of DEXP and use EXP instead. However the code is no more double precision. Let us understand this:

[COLOR=Blue] DEXP(3x3)=8103.08392757539

EXP (3x3)=8103.084[/COLOR]

The level of catasthrophy depends on your NUMERICAL TOLERANCE expectations.

So here is the solution that I have created for this problem. It uses PRECISION CONTROLLING IF STATEMENTS which takes into account the PARAMETER passed as j_sys_Dimension as follows:

[COLOR=DarkOrchid][B]if(j_sys_Dimension.eq.1)then[/B] [COLOR=SeaGreen][I]! i.e. single precision test run[/I][/COLOR]

rrr=3.0d0

[B]aaa=exp(rrr*rrr)[/B]

write(6,*) single precision run of the code and exp(3x3) is........:,aaa

[B]else[/B] [COLOR=SeaGreen][I]! i.e. double precision run[/I][/COLOR]

ccc=3.0d0

[B]bbb=dexp(ccc*ccc)[/B]

write(6,*) double precision run of the code and exp(3x3) is........:,bbb

[B]endif[/B][/COLOR]

The code works without problem, where first portion is activated in the SINGLE PRECISION TEST and the second portion runs with the DOUBLE PRECISION PORTION.

Best

Kumar

Please note that with ABAQUS STANDARD and UMAT abaparam.inc includes a similar variable named nprecd.