Civil Engineering Reference
In-Depth Information
used extensively in the elastic-plastic analyses of solids described in later chapters of the
topic, notably Chapter 6.
Program 4.6 performs elastic stability analysis of axially loaded beams. As in
Program 4.3, an elastic foundation is optional. The program computes the lowest buckling
load by iteratively obtaining the smallest eigenvalue of the system based on its stiffness
and geometric properties.
The final program in the chapter, Program 4.7, describes a method for analysing rectan-
gular thin plates in bending. This could be considered to be the first “genuine” finite element
in the topic. The plate stiffness matrix is formed using numerical integration, anticipating
the solid mechanics applications of Chapter 5 and beyond.
In the interests of generality and portability, all programs in the topic assume that
thedataandresultsfilehavethegenericnames fe95.dat and fe95.res , respectively.
When running the programs, it is suggested that a small batch file or shell script is developed
by the user that copies the actual data file name to fe95.dat before execution. Similarly,
after the program has run, the generic results file fe95.res should be copied or moved
to the results file name required.
Program 4.1 One-dimensional analysis of axially loaded elastic rods using 2-node
rod elements.
PROGRAM p41
!-------------------------------------------------------------------------
! Program 4.1 One dimensional analysis of axially loaded elastic rods
! using 2-node rod elements.
!-------------------------------------------------------------------------
USE main; IMPLICIT NONE
INTEGER,PARAMETER::iwp=SELECTED_REAL_KIND(15)
INTEGER::fixed_freedoms,i,iel,k,loaded_nodes,ndof=2,nels,neq,nod=2,
&
nodof=1,nn,nprops=1,np_types,nr
REAL(iwp)::penalty=1.0e20_iwp,zero=0.0_iwp
!-----------------------dynamic arrays------------------------------------
INTEGER,ALLOCATABLE::etype(:),g(:),g_g(:,:),kdiag(:),nf(:,:),no(:),
&
node(:),num(:)
REAL(iwp),ALLOCATABLE::action(:),eld(:),ell(:),km(:,:),kv(:),loads(:),
&
prop(:,:),value(:)
!-----------------------input and initialisation--------------------------
OPEN(10,FILE='fe95.dat'); OPEN(11,FILE='fe95.res')
READ(10,*)nels,np_types; nn=nels+1
ALLOCATE(g(ndof),num(nod),nf(nodof,nn),etype(nels),ell(nels),eld(ndof), &
km(ndof,ndof),action(ndof),g_g(ndof,nels),prop(nprops,np_types))
READ(10,*)prop; etype=1; IF(np_types>1)READ(10,*)etype; READ(10,*)ell
nf=1; READ(10,*)nr,(k,nf(:,k),i=1,nr); CALL formnf(nf); neq=MAXVAL(nf)
ALLOCATE(kdiag(neq),loads(0:neq)); kdiag=0
!-----------------------loop the elements to find global arrays sizes-----
elements_1: DO iel=1,nels
num=(/iel,iel+1/); 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
Search WWH ::




Custom Search