Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abaqus USDFL

Status
Not open for further replies.

surotm

Structural
Joined
Mar 19, 2011
Messages
6
Location
MY
Dear all,
I have a problem. I want to create a rather simple script (USDFL) that changes material properties (such as Young's modulus) in the whole part after detecting an alarm, for instance, reaching a certain level of strain in a single FE. The problem is when I use scripts I found online, the change occurs only in a single material point (single FE), not in the entire part (all FEs). Can you help?

###
UBROUTINE 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(*)
C
C Absolute value of current strain:
CALL GETVRM('E',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
MATLAYO,LACCFLA)
EPS = ABS( ARRAY(1) )
C Maximum value of strain up to this point in time:
CALL GETVRM('SDV',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,
MATLAYO,LACCFLA)
EPSMAX = ARRAY(1)
C Use the maximum strain as a field variable
FIELD(1) = MAX( EPS , EPSMAX )
C Store the maximum strain as a solution dependent state
C variable
STATEV(1) = FIELD(1)
C If error, write comment to .DAT file:
IF(JRCD.NE.0)THEN
WRITE(6,*) 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ',
1 NOEL,'INTEGRATION POINT NUMBER ',NPT
ENDIF
C
RETURN

END
 
This subroutine only calculates the maximum strain and stores it as a solution-dependent state variable. How do you realize the second part - changing material properties ? Can you share the input file or at least part of it ?
 
Sure, below you can find the inp and for files.

### INP ###
*Heading
** Job name: Job-2 Model name: Model-1
** Generated by: Abaqus/CAE 2020.HF11
*Preprint, echo=NO, model=NO, history=NO, contact=NO
**
** PARTS
**
*Part, name=Part-1
*Node
1, 0., 0., 0.
2, 0.0166666675, 0., 0.
3, 0.0333333351, 0., 0.
4, 0.0500000007, 0., 0.
5, 0.0666666701, 0., 0.
6, 0.0833333358, 0., 0.
7, 0.100000001, 0., 0.
*Element, type=B31
1, 1, 2
2, 2, 3
3, 3, 4
4, 4, 5
5, 5, 6
6, 6, 7
*Nset, nset=Set-1, generate
1, 7, 1
*Elset, elset=Set-1, generate
1, 6, 1
*Nset, nset=Set-3, generate
1, 7, 1
*Elset, elset=Set-3, generate
1, 6, 1
** Section: Section-1 Profile: Profile-1
*Beam Section, elset=Set-1, material=Material-1, temperature=GRADIENTS, section=RECT
0.01, 0.01
0.,0.,-1.
*End Part
**
**
** ASSEMBLY
**
*Assembly, name=Assembly
**
*Instance, name=Part-1-1, part=Part-1
*End Instance
**
*Nset, nset=Set-1, instance=Part-1-1
1,
*Nset, nset=Set-2, instance=Part-1-1
7,
*End Assembly
**
** MATERIALS
**
*Material, name=Material-1
*Depvar
1,
*Elastic, dependencies=1
2e+11, 0.3, , 0.
1e+11, 0.3, , 1.
*User Defined Field
**
** BOUNDARY CONDITIONS
**
** Name: BC-1 Type: Displacement/Rotation
*Boundary
Set-1, 1, 1
Set-1, 2, 2
Set-1, 3, 3
Set-1, 4, 4
Set-1, 5, 5
Set-1, 6, 6
** ----------------------------------------------------------------
**
** STEP: Step-1
**
*Step, name=Step-1, nlgeom=YES, inc=1000
*Static
0.1, 1., 1e-05, 0.1
**
** LOADS
**
** Name: Load-1 Type: Concentrated force
*Cload
Set-2, 2, -1000.
Set-2, 3, 0.
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT
*End Step

### FOR ###
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,LACCFLA)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME,ORNAME
CHARACTER*3 FLGRAY(15)
DIMENSION FIELD(NFIELD),STATEV(NSTATV),DIRECT(3,3),T(3,3),TIME(2),
* coord(*),jmac(*),jmtyp(*)
DIMENSION ARRAY(15),JARRAY(15)

PARAMETER (ONE=1.0D0)

CALL GETVRM('S',ARRAY,JARRAY,FLGRAY,JRCD,JMAC,JMATYP,MATLAYO,LACCFLA)
S11 = ARRAY(1)

Alarm=250000000.0D

FIELD(1)=0

CHECK=(S11/Alarm)

IF (CHECK > 1.0D) THEN
FIELD(1)=1
statev(1)=CHECK
END IF

RETURN
END



 
It looks fine. Did you check the outputs used by this subroutine - SDV and maximum strain to make sure that everything works correctly on that side ? How do you know that only one element is affected ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top