70 lines
No EOL
2.1 KiB
Fortran
70 lines
No EOL
2.1 KiB
Fortran
subroutine uel(rhs,amatrx,svars,energy,ndofel,nrhs,nsvars,
|
|
1 props,nprops,coords,mcrd,nnode,u,du,v,a,jtype,time,
|
|
2 dtime,kstep,kinc,jelem,params,ndload,jdltyp,adlmag,
|
|
3 predef,npredf,lflags,mlvarx,ddlmag,mdload,pnewdt,
|
|
4 jprops,njprop,period)
|
|
c
|
|
include 'aba_param.inc'
|
|
parameter ( zero = 0.d0, half = 0.5d0, one = 1.d0 )
|
|
c
|
|
c This is a linear truss element for Abaqus/Standard
|
|
c general static analysis in 1D space (aligned to x-axis) only.
|
|
dimension rhs(mlvarx,*),amatrx(ndofel,ndofel),
|
|
1 svars(nsvars),energy(8),props(*),coords(mcrd,nnode),
|
|
2 u(ndofel),du(mlvarx,*),v(ndofel),a(ndofel),time(2),
|
|
3 params(3),jdltyp(mdload,*),adlmag(mdload,*),
|
|
4 ddlmag(mdload,*),predef(2,npredf,nnode),lflags(*),
|
|
5 jprops(*)
|
|
c
|
|
c assign section properties
|
|
area = props(1)
|
|
e = props(2)
|
|
anu = props(3)
|
|
rho = props(4)
|
|
c calculate stiffness and mass
|
|
alen = abs(coords(1,2)-coords(1,1))
|
|
ak = area*e/alen
|
|
am = half*area*rho*alen
|
|
c Initialize Arrays
|
|
rhs = zero
|
|
amatrx = zero
|
|
if (lflags(3).eq.1) then
|
|
C Stiffness and Force
|
|
C Get Stiffness Matrix
|
|
amatrx(1,1) = ak
|
|
amatrx(4,4) = ak
|
|
amatrx(1,4) = -ak
|
|
amatrx(4,1) = -ak
|
|
c Get Internal Contrib to Residual Force
|
|
rhs(1,1) = -ak*(u(1)-u(4))
|
|
rhs(4,1) = -ak*(u(4)-u(1))
|
|
c Get External Contrib to Residual Force
|
|
do kdload = 1, ndload
|
|
if (jdltyp(kdload,1).eq.1001) then
|
|
rhs(4,1) = rhs(4,1)+adlmag(kdload,1)
|
|
end if
|
|
end do
|
|
else if (lflags(3).eq.2) then
|
|
c Stiffness
|
|
amatrx(1,1) = ak
|
|
amatrx(4,4) = ak
|
|
amatrx(1,4) = -ak
|
|
amatrx(4,1) = -ak
|
|
else if (lflags(3).eq.4) then
|
|
c Mass
|
|
do k1 = 1, ndofel
|
|
amatrx(k1,k1) = am
|
|
end do
|
|
else if (lflags(3).eq.5) then
|
|
print *,'oops'
|
|
else if (lflags(3).eq.6) then
|
|
C Mass and Force
|
|
do k1 = 1, ndofel
|
|
amatrx(k1,k1) = am
|
|
end do
|
|
rhs(1,1) = -ak*(u(1)-u(4))
|
|
rhs(4,1) = -ak*(u(4)-u(1))
|
|
END IF
|
|
c
|
|
return
|
|
end |