Civil Engineering Reference
In-Depth Information
elements_1: DO iel=1,nels
num=g_num(:,iel); CALL num_to_g(num,nf,g); g_g(:,iel)=g
CALL fkdiag(kdiag,g)
END DO elements_1
DO i=2,neq; kdiag(i)=kdiag(i)+kdiag(i-1); END DO; ALLOCATE(kv(kdiag(neq)))
WRITE(11,'(2(A,I5))')
&
" There are",neq," equations and the skyline storage is",kdiag(neq)
!-----------------------global stiffness matrix assembly------------------
kv=zero
elements_2: DO iel=1,nels
num=g_num(:,iel); coord=TRANSPOSE(g_coord(:,num))
CALL rigid_jointed(km,prop,gamma,etype,iel,coord); g=g_g(:,iel)
CALL fsparv(kv,km,g,kdiag)
END DO elements_2
!-----------------------read loads and/or displacements-------------------
loads=zero; READ(10,*)loaded_nodes,(k,loads(nf(:,k)),i=1,loaded_nodes)
READ(10,*)fixed_freedoms
IF(fixed_freedoms/=0)THEN
ALLOCATE(node(fixed_freedoms),no(fixed_freedoms),
&
sense(fixed_freedoms),value(fixed_freedoms))
READ(10,*)(node(i),sense(i),value(i),i=1,fixed_freedoms)
DO i=1,fixed_freedoms; no(i)=nf(sense(i),node(i)); END DO
kv(kdiag(no))=kv(kdiag(no))+penalty; loads(no)=kv(kdiag(no))*value
END IF
!-----------------------equation solution --------------------------------
CALL sparin(kv,kdiag); CALL spabac(kv,loads,kdiag); loads(0)=zero
WRITE(11,'(/A)') " Node Displacements and Rotation(s)"
DO k=1,nn; WRITE(11,'(I5,6E12.4)')k,loads(nf(:,k)); END DO
!-----------------------retrieve element end actions----------------------
WRITE(11,'(/A)')" Element Actions"
elements_3: DO iel=1,nels
num=g_num(:,iel); coord=TRANSPOSE(g_coord(:,num))
CALL rigid_jointed(km,prop,gamma,etype,iel,coord); g=g_g(:,iel)
eld=loads(g); action=MATMUL(km,eld)
IF(ndim<3)THEN; WRITE(11,'(I5,6E12.4)')iel,action; ELSE
WRITE(11,'(I5,6E12.4)')iel,
action(1: 6)
WRITE(11,'(A,6E12.4)')"
",action(7:12)
END IF
END DO elements_3
STOP
END PROGRAM p44
New dynamic real arrays:
gamma rotation of element about local axis
The first three programs in this chapter were concerned only with 1D elements which
could sustain either axial loads (rod elements) or transverse loading and moments (beam
elements). It is much more common to encounter structures made up of members arbitrarily
inclined and attached to one another. Loading of such structures results in displacements due
to both axial and bending effects, although the former is often ignored in many approximate
methods. The beam-rod element stiffness matrix used by this program is formed by super-
posing the beam and rod stiffness matrices described in earlier programs in this chapter. The
program described in this section can analyse two- or three-dimensional framed structures,
with the element stiffness matrix formed by the library subroutine rigid jointed .
Search WWH ::




Custom Search