VUMAT can be implemented to a model which has more than one user custom materials, using cmname variable to identify the materials.
Here is the method. [ Following snippets are not in the right Fortran format.]
Assuming that the subroutine file is vumat.for, it’s content can be as following codes:
subroutine vumat( 1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, 2 stepTime, totalTime, dt, cmname, coordMp, charLength, 3 props, density, strainInc, relSpinInc, 4 tempOld, stretchOld, defgradOld, fieldOld, 5 stressOld, stateOld, enerInternOld, enerInelasOld, 6 tempNew,stretchNew,defgradNew,fieldNew, 7 stressNew, stateNew, enerInternNew, enerInelasNew) include 'vaba_param.inc' dimension props(nprops), density(nblock), 1 coordMp(nblock,*), 2 charLength(*), strainInc(nblock,ndir+nshr), 3 relSpinInc(nblock,nshr), tempOld(nblock), 4 stretchOld(nblock,ndir+nshr), defgradOld(nblock,ndir+nshr+nshr), 5 fieldOld(nblock,nfieldv), stressOld(nblock,ndir+nshr), 6 stateOld(nblock,nstatev), enerInternOld(nblock), 7 enerInelasOld(nblock), tempNew(*), 8 stretchNew(nblock,ndir+nshr), defgradNew(nblock,ndir+nshr+nshr), 9 fieldNew(nblock,nfieldv), stressNew(nblock,ndir+nshr), 1 stateNew(nblock,nstatev), 2 enerInternNew(nblock), enerInelasNew(nblock) character*80 cmname do i = 1, nblock c c user customized codes c end do return end cccc VUMAT ends
Replacing
c c user customized codes c
with
if (cmname(1:4) .eq. 'MAT1') then call vumat_MAT1( 1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, 2 stepTime, totalTime, dt, cmname, coordMp, charLength, 3 props, density, strainInc, relSpinInc, 4 tempOld, stretchOld, defgradOld, fieldOld, 5 stressOld, stateOld, enerInternOld, enerInelasOld, 6 tempNew,stretchNew,defgradNew,fieldNew, 7 stressNew, stateNew, enerInternNew, enerInelasNew) elseif (cmname(1:4) .eq. 'MAT2') then call vumat_MAT2( 1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, 2 stepTime, totalTime, dt, cmname, coordMp, charLength, 3 props, density, strainInc, relSpinInc, 4 tempOld, stretchOld, defgradOld, fieldOld, 5 stressOld, stateOld, enerInternOld, enerInelasOld, 6 tempNew,stretchNew,defgradNew,fieldNew, 7 stressNew, stateNew, enerInternNew, enerInelasNew) endif
will make it a 2 materials VUMAT, where vumat_MAT1 and vumat_MAT2 have the same structure as the first snippet here. And they can be wrote just after the last line of the first snippet in the same file.©
本文发表于水景一页。永久链接:<https://cnzhx.net/fe/2015/02/11/2-materials-in-1-vumat/>。转载请保留此信息及相应链接。