Yunus9696
Mechanical
- Apr 14, 2022
- 47
Hello everyone
I'm trying to use USDFLD subroutine to solve a simple problem of a bending beam in which I want to change the material based on tension/compression status of the elements.
I want to assign MATERIAL 1 to elements under tension and MATERIAL 2 to the elements under compression.
I use the code below but the whole model gets MATERIAL 2!
(However S33 has a contour from negative values to the positive ones in the model)
*****************************************************************************************
SUBROUTINE USDFLD(FIELD,STATEV,PNEWDT,DIRECT,T,CELENT,
1 TIME,DTIME,CMNAME,ORNAME,NFIELD,NSTATV,NOEL,NPT,LAYER,
2 KSPT,KSTEP,KINC,NDI,NSHR,COORD,JMAC,JMATYP,MATLAYO,
3 LACCFLA)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),
1 T(3,3),TIME(2)
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),
1 COORD(*)
CALL GETVRM('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,MATLAYO,
1 LACCFLA)
C
IF (S33 > 0) THEN
FIELD = 1
ELSE
FIELD = 2
END IF
RETURN
END
*******************************************************************************************
The other problem is that when I substitute variable key 'S' with other variables keys like 'MISES' or 'TRESC' as mentioned in the “Abaqus/Standard output variable identifiers,” Section 4.2.1 of the Abaqus Analysis User's Manual" (the job gets Aborted and it says invalid or unidentified variable used.
I don't know how can I use other Variable keys in my subroutine.
Thanks for your tips.
Best,
Yunus.
I'm trying to use USDFLD subroutine to solve a simple problem of a bending beam in which I want to change the material based on tension/compression status of the elements.
I want to assign MATERIAL 1 to elements under tension and MATERIAL 2 to the elements under compression.
I use the code below but the whole model gets MATERIAL 2!
(However S33 has a contour from negative values to the positive ones in the model)
*****************************************************************************************
SUBROUTINE USDFLD(FIELD,STATEV,PNEWDT,DIRECT,T,CELENT,
1 TIME,DTIME,CMNAME,ORNAME,NFIELD,NSTATV,NOEL,NPT,LAYER,
2 KSPT,KSTEP,KINC,NDI,NSHR,COORD,JMAC,JMATYP,MATLAYO,
3 LACCFLA)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),
1 T(3,3),TIME(2)
DIMENSION ARRAY(15),JARRAY(15),JMAC(*),JMATYP(*),
1 COORD(*)
CALL GETVRM('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,MATLAYO,
1 LACCFLA)
C
IF (S33 > 0) THEN
FIELD = 1
ELSE
FIELD = 2
END IF
RETURN
END
*******************************************************************************************
The other problem is that when I substitute variable key 'S' with other variables keys like 'MISES' or 'TRESC' as mentioned in the “Abaqus/Standard output variable identifiers,” Section 4.2.1 of the Abaqus Analysis User's Manual" (the job gets Aborted and it says invalid or unidentified variable used.
I don't know how can I use other Variable keys in my subroutine.
Thanks for your tips.
Best,
Yunus.