0% found this document useful (0 votes)
10 views8 pages

SUB1

Uploaded by

rezam.dashtbani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

SUB1

Uploaded by

rezam.dashtbani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Abaqus User Subroutines Tutorial

Introduction
This document provides an overview and example code for various Abaqus
user subroutines: DFLOW, DFLUX, DISP, DLOAD, HARDINI, HETVAL, MPC, ORIENT,
RSURFU, SDVINI, SIGINI, UAMP, UANISOHYPER_INV, UANISOHYPER_STRAIN, UCOHESIVEOFFSET,
UCORR, UCREEPNETWORK, and UMAT. Each subroutine is briefly explained, and an
example is provided.

DFLOW
The DFLOW subroutine is used to define the flow rate of a fluid in coupled pore
fluid diffusion-stress analysis.
1 subroutine dflow(
2 & fvalue , kappa , time , dtime , temp , dtemp , predef , dpred , cmname ,
3 & coord , drot , jstep , kstep , kinc , jinc )
4 c
5 include 'ABA_PARAM.INC'
6 c
7 character *80 cmname
8 dimension time (2), predef (*), dpred (*), coord (*), drot (3,3)
9 c
10 fvalue = kappa * (temp - predef (1))
11 c
12 return
13 end
14

DFLUX
The DFLUX subroutine is used to define nonuniform distributed fluxes.
1 subroutine dflux(
2 & fl , kstep , kinc , time , noel , npt , coord , jtype , variable ,
3 & jdltyp , sname )
4 c
5 include 'ABA_PARAM.INC'
6 c
7 character *80 sname

1
8 dimension time (2), coord (3)
9 c
10 fl = coord (1) * coord (2)
11 c
12 return
13 end
14

DISP
The DISP subroutine allows the specification of prescribed boundary conditions.
1 subroutine disp(
2 & u, v, a, jtype , kstep , kinc , time , noel , npt , nblock , k, l )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension u(3), v(3), a(3), time (2)
7 c
8 u(1) = 0.1 * time (2)
9 c
10 return
11 end
12

DLOAD
The DLOAD subroutine defines nonuniform distributed loads.
1 subroutine dload(
2 & p, coord , jdltyp , time , noel , npt , kstep , kinc , sname )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 character *80 sname
7 dimension coord (3), time (2)
8 c
9 p = coord (1) * time (2)
10 c
11 return
12 end
13

HARDINI
The HARDINI subroutine initializes hardening variables.
1 subroutine hardini(
2 & statev , coords , nstatev , props , nprops )
3 c

2
4 include 'ABA_PARAM.INC'
5 c
6 dimension statev(nstatev), coords (3), props(nprops)
7 c
8 statev (1) = 0.0
9 c
10 return
11 end
12

HETVAL
The HETVAL subroutine defines spatially varying material properties.
1 subroutine hetval(
2 & prop , coord , nprop , j )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension prop(nprop), coord (3)
7 c
8 prop (1) = coord (1) * 1000.0
9 c
10 return
11 end
12

MPC
The MPC subroutine is used to define multipoint constraints.
1 subroutine mpc(
2 & ampc , lmpc , jtype , kstep , kinc , time , noel , npt , coord , j,
ctype )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 character *3 ctype
7 dimension ampc (2,2), time (2), coord (3)
8 c
9 ampc (1,1) = 1.0
10 ampc (2,2) = -1.0
11 c
12 return
13 end
14

ORIENT
The ORIENT subroutine defines orientation angles for material directions.

3
1 subroutine orient(
2 & r, theta , phi , psi , kstep , kinc , time , noel , npt , coord )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension r(3,3), coord (3), time (2)
7 c
8 r(1,1) = cos(theta)
9 r(1,2) = -sin(theta)
10 r(2,1) = sin(theta)
11 r(2,2) = cos(theta)
12 c
13 return
14 end
15

RSURFU
The RSURFU subroutine is used for user-defined surface interaction properties.
1 subroutine rsurfu(
2 & u_value , u_slope , u_k , statev , coords , time , dt , props )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension u_value (3), u_slope (3), u_k (3), statev (10) , coords (3), time
(2), props (10)
7 c
8 u_value (1) = props (1) * coords (1)
9 u_slope (1) = props (2) * coords (2)
10 u_k (1) = props (3) * coords (3)
11 c
12 return
13 end
14

SDVINI
The SDVINI subroutine initializes solution-dependent state variables.
1 subroutine sdvini(
2 & statev , coords , nstatev , props , nprops )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension statev(nstatev), coords (3), props(nprops)
7 c
8 statev (1) = coords (1) * 0.01
9 c
10 return
11 end
12

4
SIGINI
The SIGINI subroutine defines the initial stress state.
1 subroutine sigini(
2 & stress , coords , nstress , time )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension stress(nstress), coords (3), time (2)
7 c
8 stress (1) = coords (1) * 10.0
9 c
10 return
11 end
12

UAMP
The UAMP subroutine defines user-defined amplitude curves.
1 subroutine uamp(
2 & amp , time , tname )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 character *80 tname
7 dimension time (2)
8 c
9 amp = sin(time (2))
10 c
11 return
12 end
13

UANISOHYPER_INV
The UANISOHYPER_INV subroutine defines anisotropic hyperelastic material be-
havior in terms of invariants.
1 subroutine uanisohyper_inv (
2 & stress , statev , dstrain , time , dtime , temp , dtemp , predef ,
dpred ,
3 & cmname , props , nprops , coord , drot , pnewdt , kstep , kinc )
4 c
5 include 'ABA_PARAM.INC'
6 c
7 character *80 cmname
8 dimension stress (6), statev (10) , dstrain (6), time (2), predef (1),
9 & dpred (1), props(nprops), coord (3), drot (3,3)
10 c
11 real(kind =8) :: J, I1 , I2 , I4 , I5

5
12 c
13 J = exp(dstrain (1) + dstrain (2) + dstrain (3))
14 I1 = dstrain (1) + dstrain (2) + dstrain (3)
15 I2 = dstrain (1)*dstrain (2) + dstrain (2)*dstrain (3) + dstrain (3)*
dstrain (1)
16 I4 = dstrain (4) **2 + dstrain (5) **2 + dstrain (6) **2
17 I5 = dstrain (4)*dstrain (5) + dstrain (5)*dstrain (6) + dstrain (6)*
dstrain (4)
18 c
19 stress (1) = props (1) * (I1 - 3) + props (2) * (J - 1)
20 stress (2) = props (1) * (I2 - 3) + props (2) * (J - 1)
21 stress (3) = props (1) * (I4 - 1) + props (2) * (J - 1)
22 c
23 return
24 end
25

UANISOHYPER_STRAIN
The UANISOHYPER_STRAIN subroutine defines anisotropic hyperelastic material
behavior in terms of strain.
1 subroutine uanisohyper_strain (
2 & stress , statev , dstrain , time , dtime , temp , dtemp , predef ,
dpred ,
3 & cmname , props , nprops , coord , drot , pnewdt , kstep , kinc )
4 c
5 include 'ABA_PARAM.INC'
6 c
7 character *80 cmname
8 dimension stress (6), statev (10) , dstrain (6), time (2), predef (1),
9 & dpred (1), props(nprops), coord (3), drot (3,3)
10 c
11 real(kind =8) :: E1 , E2 , E3
12 c
13 E1 = dstrain (1)
14 E2 = dstrain (2)
15 E3 = dstrain (3)
16 c
17 stress (1) = props (1) * E1
18 stress (2) = props (1) * E2
19 stress (3) = props (1) * E3
20 c
21 return
22 end
23

UCOHESIVEOFFSET
The UCOHESIVEOFFSET subroutine defines cohesive element behavior offsets.
1 subroutine ucohesiveoffset (

6
2 & traction , normal , tangential , crack_opening , props , nprops )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension traction (3), normal (3), tangential (3), crack_opening (3),
7 & props(nprops)
8 c
9 traction (1) = props (1) * crack_opening (1)
10 traction (2) = props (2) * crack_opening (2)
11 traction (3) = props (3) * crack_opening (3)
12 c
13 return
14 end
15

UCORR
The UCORR subroutine defines user-defined correlations.
1 subroutine ucorr(
2 & corr , statev , dstatev , coord , time , dt , props , nprops )
3 c
4 include 'ABA_PARAM.INC'
5 c
6 dimension corr (10) , statev (10) , dstatev (10) , coord (3), time (2),
7 & props(nprops)
8 c
9 corr (1) = statev (1) * coord (1)
10 corr (2) = statev (2) * coord (2)
11 corr (3) = statev (3) * coord (3)
12 c
13 return
14 end
15

UCREEPNETWORK
The UCREEPNETWORK subroutine defines creep behavior using a network model.
1 subroutine ucreepnetwork(
2 & creepstrain , statev , dstatev , stress , strain , time , dt , temp ,
3 & dtemp , predef , dpred , cmname , props , nprops , coord , drot ,
pnewdt ,
4 & kstep , kinc )
5 c
6 include 'ABA_PARAM.INC'
7 c
8 character *80 cmname
9 dimension creepstrain (6), statev (10) , dstatev (10) , stress (6), strain
(6),
10 & time (2), predef (1), dpred (1), props(nprops), coord (3), drot
(3,3)

7
11 c
12 real(kind =8) :: effective_stress , creep_rate
13 c
14 effective_stress = sqrt (( stress (1) **2 + stress (2) **2 + stress (3) **2)
/ 3.0)
15 creep_rate = props (1) * effective_stress ** props (2) * exp(-props (3)/
temp)
16 c
17 creepstrain (1) = creep_rate * dt
18 creepstrain (2) = creep_rate * dt
19 creepstrain (3) = creep_rate * dt
20 c
21 return
22 end
23

UMAT
The UMAT subroutine defines user-defined material behavior.
1 subroutine umat(
2 & stress , statev , ddsdde , sse , spd , scd , rpl , ddsddt , drplde ,
3 & drpldt , stran , dstran , time , dtime , temp , dtemp , predef , dpred ,
4 & cmname , ndi , nshr , ntens , nstatv , props , nprops , coord , drot ,
pnewdt ,
5 & celent , dfgrd0 , dfgrd1 , noel , npt , layer , kspt , kstep , kinc )
6 c
7 include 'ABA_PARAM.INC'
8 c
9 character *80 cmname
10 dimension stress(ntens), statev(nstatv), ddsdde(ntens ,ntens), stran(
ntens),
11 & dstran(ntens), time (2), predef (1), dpred (1), props(nprops),
coord (3),
12 & drot (3,3), dfgrd0 (3,3), dfgrd1 (3,3)
13 c
14 real(kind =8) :: E, nu , lambda , mu , trace_strain
15 c
16 E = props (1)
17 nu = props (2)
18 lambda = (E*nu) / ((1+ nu)*(1 -2*nu))
19 mu = E / (2*(1+ nu))
20 c
21 trace_strain = dstran (1) + dstran (2) + dstran (3)
22 c
23 stress (1) = lambda*trace_strain + 2*mu*dstran (1)
24 stress (2) = lambda*trace_strain + 2*mu*dstran (2)
25 stress (3) = lambda*trace_strain + 2*mu*dstran (3)
26 stress (4) = mu * dstran (4)
27 stress (5) = mu * dstran (5)
28 stress (6) = mu * dstran (6)
29 c
30 return
31 end
32

You might also like