Obtaining specific results at increments in subroutine
Obtaining specific results at increments in subroutine
(OP)
Dear all,
I am using the UMESHMOTION subroutine, and I would like to use values at specific increments during the analysis. i.e.
U.17, where U.17 is the displacement in the 1-direction at increment 7.
I would really appreciate any input and help on this. Thanks.
I am using the UMESHMOTION subroutine, and I would like to use values at specific increments during the analysis. i.e.
U.17, where U.17 is the displacement in the 1-direction at increment 7.
I would really appreciate any input and help on this. Thanks.





RE: Obtaining specific results at increments in subroutine
To obtain node outputs (like displacement U) in UMESHMOTION subroutine you can use routine GETVRN.
Detail information how to use the routine are in Abaqus documentation:
Abaqus User Subroutines Reference Manual, 2.1.9 Obtaining node point information
UMESHMOTION subrotuine has KSTEP and KINC dummy arguments.
You can test them if You need to get displacement at specific increment.
Regards,
Bartosz
RE: Obtaining specific results at increments in subroutine
RE: Obtaining specific results at increments in subroutine
I have tried using the following code, but does not work
DOUBLE PRECISION U140
If(Kstep.EQ.1) then
CALL GETVRN(NODE,'U',ARRAY,JRCD,JGVBLOCK,LTRN)
NODE=40
open(UNIT=70,FILE='File.dat')
write(70,*) U140
endIf
Where am I going wrong with this?
Thanks.
RE: Obtaining specific results at increments in subroutine
1. You defined node id after GETVRN call. In this case Abaqus does not use id 40 but undefined numerical garbage.
2. You did not define "LTRN" variable. It has to be set to 0 or 1 depend in which coordinate system a output should be returned.
3. You never assigned output value to U140 variable.
It is also a good idea to test status after call (JRCD=0 – success, JRCD=1 - error).
Please take a look for followed code:
CODE
* lnodetype,alocal,ndim,time,dtime,pnewdt,
* kstep,kinc,kmeshsweep,jmatyp,jgvblock,lsmooth)
!
include 'aba_param.inc'
!
dimension ulocal(ndim),jelemlist(*)
dimension alocal(ndim,*),time(2)
dimension jmatyp(*),jgvblock(*)
dimension array(15)
! --------------------------------------------------------------------------
! user declaration block
parameter( iU1 = 1, ! x displacement
* iU2 = 2, ! y displacement
* iU3 = 3, ! z displacement
* iUR1 = 4, ! x rotation
* iUR2 = 5, ! y rotation
* iUR3 = 6) ! z rotation
parameter(iGlbCoordSys = 0, ! global coord. system
* iLocCoordSys = 1) ! local coord. system
! --------------------------------------------------------------------------
! user statement block
! set node id
iNodeId = 40
! call GETVRN routine
call getvrn(iNodeId, 'U', array, jrcd, jgvblock, iGlbCoordSys)
! if success save x-disp for node 40 into rU140 variable
if (jrcd = 0) then
rU140 = array(iU1)
end if
return
end
Regards,
Bartosz
RE: Obtaining specific results at increments in subroutine
RE: Obtaining specific results at increments in subroutine
It is normal behavior of FORTRAN language. All local variables inside any subroutine are destroyed after subroutine call. Variable's value is not save between subroutines calls.
Or in different word, variable "myVar" in one subroutine call is not the same variable as "myVar" in another call.
To save variable you need to define it with save attribute or initialize with data statement.
CODE
data rMyVar /0.0/ ! real variable initialize to 0.0
! set save attribute for variables
save iSaveVar_1,
* iSaveVar_2,
* rSaveVar
There is quite significant limitation save and data statement must not be use with any subroutine used with multiple CPUS analysis since the same subroutine will be call on different memory in parallel.
But if analysis is run with one domain it works correct.
In many abaqus subroutines you can find state variable array (svars) which can be use to save any user data between subroutine calls.
In this situation Abaqus will take care to pass information from one increment into another. But this is not true for UMESHMOTION subroutine.
You can also use WRITE statement to save data you need and READ statement to get them in next increment.
You can use MODULE to save variables.
But again it is ok for 1 CPU analysis, the same subroutine will fail with more than 1 CPU.
Please take a look for following chapters:
3.5.1 Parallel execution: overview
If you decide to use WRITE, READ statement:
3.7 FORTRAN unit numbers
Regards,
Bartosz
RE: Obtaining specific results at increments in subroutine