Skip to main content

how to get the element number in vumat

Submitted by Wang Guofeng on

Hi, all,

I am writing one code of vumat. I want to know how to get the element number of current material point in vumat.As you know, we can know it in umat from NOEL. But in vumat, how to get it?

thanks 

wang 

Hello Wang,

I have some information concerning how to obtain the element number in VUMAT:


Obtaining element number and material integration number from VUMAT

--------------------------------------------------------------------------------



Starting with v6.4, the following information is passed to (and can be

accessed from) VUMAT:

element number,

integration station number,

layer (or segment) number,

integration point number.



To preserve backward compatibility the interface of VUMAT has not been

modified. However, VUMAT is now called with a pointer to an array of

integers as first argument, in the usual location for nblock. The first

component of the array contains nblock, which ensures that all existing

VUMATs will continue to work. The rest of the array contains all other

relevant information. In order to extract the extra information in the

array we recommend following the example illustrated below, which is

self-explanatory.



--------------------------------------------------------------------------------



c

c User subroutine VUMAT

     subroutine vumat (

c Read only -

    *     jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,

    *     stepTime, totalTime, dt, cmname, coordMp, charLength,

    *     props, density, strainInc, relSpinInc,

    *     tempOld, stretchOld, defgradOld, fieldOld,

    *     stressOld, stateOld, enerInternOld, enerInelasOld,

    *     tempNew, stretchNew, defgradNew, fieldNew,

c Write only -

    *     stressNew, stateNew, enerInternNew, enerInelasNew )

c

     include 'vabua_param.inc'

c

     dimension jblock(*), props(nprops),density(*), coordMp(*),

    1     charLength(*), strainInc(*),

    2     relSpinInc(*), tempOld(*),

    3     stretchOld(*),

    4     defgradOld(*),

    5     fieldOld(*), stressOld(*),

    6     stateOld(*), enerInternOld(*),

    7     enerInelasOld(*), tempNew(*),

    8     stretchNew(*),

    9     defgradNew(*),

    1     fieldNew(*),

    2     stressNew(*), stateNew(*),

    3     enerInternNew(*), enerInelasNew(*)

c

     character*80 cmname



  parameter (

    *     i_umt_nblock = 1,

    *     i_umt_npt    = 2,

    *     i_umt_layer  = 3,

    *     i_umt_kspt   = 4,

    *     i_umt_noel   = 5 )



     call  vumatXtrArg ( jblock(i_umt_nblock),

    *     ndir, nshr, nstatev, nfieldv, nprops, lanneal,

    *     stepTime, totalTime, dt, cmname, coordMp, charLength,

    *     props, density, strainInc, relSpinInc,

    *     tempOld, stretchOld, defgradOld, fieldOld,

    *     stressOld, stateOld, enerInternOld, enerInelasOld,

    *     tempNew, stretchNew, defgradNew, fieldNew,

    *     stressNew, stateNew, enerInternNew, enerInelasNew,

    *     jblock(i_umt_noel), jblock(i_umt_npt),

    *     jblock(i_umt_layer), jblock(i_umt_kspt))



     return

     end



c

subroutine vumatXtrArg (

c Read only -

    *     nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,

    *     stepTime, totalTime, dt, cmname, coordMp, charLength,

    *     props, density, strainInc, relSpinInc,

    *     tempOld, stretchOld, defgradOld, fieldOld,

    *     stressOld, stateOld, enerInternOld, enerInelasOld,

    *     tempNew, stretchNew, defgradNew, fieldNew,

c Write only -

    *     stressNew, stateNew, enerInternNew, enerInelasNew,

c Read only extra arguments -

    *     nElement, nMatPoint, nLayer, nSecPoint )

     include 'vaba_param.inc'

c

     dimension props(nprops), density(nblock), coordMp(nblock,*),

    1     charLength(nblock), strainInc(nblock,ndir+nshr),

    2     relSpinInc(nblock,nshr), tempOld(nblock),

    3     stretchOld(nblock,ndir+nshr),

    4     defgradOld(nblock,ndir+nshr+nshr),

    5     fieldOld(nblock,nfieldv), stressOld(nblock,ndir+nshr),

    6     stateOld(nblock,nstatev), enerInternOld(nblock),

    7     enerInelasOld(nblock), tempNew(nblock),

    8     stretchNew(nblock,ndir+nshr),

    9     defgradNew(nblock,ndir+nshr+nshr),

    1     fieldNew(nblock,nfieldv),

    2     stressNew(nblock,ndir+nshr), stateNew(nblock,nstatev),

    3     enerInternNew(nblock), enerInelasNew(nblock)

c

c Documentation of extra arguments:

c  nElement: Array of internal element numbers

     dimension nElement(nblock)

c  nMatPoint: Integration point number

c  nLayer   : Layer number for composite shells and layered solids

c  nSecPoint: Section point number within the current layer

c

     character*80 cmname

c

     do km = 1, nblock

c

c        User coding ...

c

     end do



     return

     end

 

Regards,

Martin J. Gross

Fri, 01/11/2008 - 08:47 Permalink

Dear Gross,

I utilized the structure you suggested; however, I get an error in the log file like this:

vumat-edit.for(5): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: * ) <IDENTIFIER>

subroutine vumat (

------------------------------------------------------------------^

vumat-edit.for(7): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,

--------^

vumat-edit.for(7): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...

* jblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,

----------------------------------------------------------------------^

vumat-edit.for(8): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* stepTime, totalTime, dt, cmname, coordMp, charLength,

--------^

vumat-edit.for(8): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: %FILL <IDENTIFIER>

* stepTime, totalTime, dt, cmname, coordMp, charLength,

---------------------------------------------------------------------^

vumat-edit.for(9): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* props, density, strainInc, relSpinInc,

--------^

vumat-edit.for(9): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: %FILL <IDENTIFIER>

* props, density, strainInc, relSpinInc,

------------------------------------------------------^

vumat-edit.for(10): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* tempOld, stretchOld, defgradOld, fieldOld,

--------^

vumat-edit.for(10): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: %FILL <IDENTIFIER>

* tempOld, stretchOld, defgradOld, fieldOld,

----------------------------------------------------------^

vumat-edit.for(11): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* stressOld, stateOld, enerInternOld, enerInelasOld,

--------^

vumat-edit.for(11): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: %FILL <IDENTIFIER>

* stressOld, stateOld, enerInternOld, enerInelasOld,

------------------------------------------------------------------^

vumat-edit.for(12): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* tempNew, stretchNew, defgradNew, fieldNew,

--------^

vumat-edit.for(12): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: %FILL <IDENTIFIER>

* tempNew, stretchNew, defgradNew, fieldNew,

----------------------------------------------------------^

vumat-edit.for(14): error #5276: Unbalanced parentheses

* stressNew, stateNew, enerInternNew, enerInelasNew )

-------------------------------------------------------------------^

vumat-edit.for(14): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* stressNew, stateNew, enerInternNew, enerInelasNew )

--------^

vumat-edit.for(14): error #5082: Syntax error, found ')' when expecting one of: ( * , <END-OF-STATEMENT> ; [ / = =>

* stressNew, stateNew, enerInternNew, enerInelasNew )

-------------------------------------------------------------------^

vumat-edit.for(38): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>

parameter (

-----------------------------------------------------------^

vumat-edit.for(39): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

*i_umt_nblock = 1,

--------^

vumat-edit.for(39): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...

*i_umt_nblock = 1,

---------------------------------^

vumat-edit.for(40): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

*i_umt_npt = 2,

--------^

vumat-edit.for(40): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...

*i_umt_npt = 2,

------------------------------^

vumat-edit.for(41): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

* i_umt_layer = 3, 

...

It seems that all the  lines with "*" at the beginning of the line yield error. Do you know how I can overcome this problem?

Thanks,

Ozan

 

Sat, 09/12/2015 - 19:36 Permalink