As an example of the coding of user subroutine UCURE, consider a special case of the
Kamal model with one term and
,
,
, and
. In this case the Kamal equation has the form
where
denotes the degree of cure,
is a parameter,
is the activation energy,
is the universal gas constant, and
is the absolute zero temperature. The derivatives of the degree of cure
rate with respect to temperature and with respect to degree of cure are given by the
following relations:
and
The user subroutine is coded as follows:
SUBROUTINE UCURE(
* DOC, DOCRATEARRAY, NOEL, NPT, LAYER, KSPT, KSTEP, KINC, JPROC,
* CMNAME, NSTATV, STATEVOLD, STATEV,
* COORDS, TIME, DTIME, PNEWDT, TEMP, DTEMP, NFIELD, PREDEF,
* DPRED, NPROPS, PROPS, NIARRAY, I_ARRAY, NRARRAY, R_ARRAY, NCARRAY, C_ARRAY )
C
INCLUDE 'ABA_PARAM.INC'
INCLUDE 'ABA_PHCON_PARAM.INC'
C
PARAMETER (SMALL=1.D-6, ZERO=0.0D0, HALF=0.5D0, ONE=1.0D0)
DIMENSION
* DOCRATEARRAY(*),
* STATEVOLD(*),
* STATEV(*),
* COORDS(*),
* TIME(*),
* PREDEF(*),
* DPRED(*),
* PROPS(*),
* I_ARRAY(*),
* R_ARRAY(*)
C
CHARACTER*80 C_ARRAY(*),CMNAME
C
c Initialize variables
c
jError = 0
R = zero
tempZero = zero
alphaDot = zero
dAlphaDotDT = zero
dAlphaDotdAlpha = zero
C
C ... Read absolute zero temperature and universal gas constant
C
call getphysicalconstant(j_phcon_Abs0, tempZero, jError)
if (jError.ne.0) tempZero = zero
call getphysicalconstant(j_phcon_UnivGas, R, jError)
if (jError.ne.0) R = one
C
C ... Read material properties
C
Zi = props(1)
Ei = props(2)
Ei = Ei/R
C
tempDiff = max(zero,temp-tempZero)
test = half - sign(half,tempDiff-small)
C
C ... Compute the degree of cure rate and its derivatives
C
arrhenius = (one-test)*Zi*exp(-Ei/(test + tempDiff))
alphaDot = arrhenius*(one-doc)
dAlphaDotDT = alphaDot*Ei/(test + tempDiff)**2
dAlphaDotdAlpha = -arrhenius
C
DOCRATEARRAY(1) = alphaDot
DOCRATEARRAY(2) = dAlphaDotdAlpha
DOCRATEARRAY(3) = dAlphaDotDT
c
RETURN
END