Professional Documents
Culture Documents
1 Introduction
1.1 About this paper
The present paper introduces to an implementation of a new element module to the finite element
program FEAP, Finite Element Analysis Program. Introductory the implementation process regards
a simple plane bilinear elastic element.
The intension of this paper is to help remembering the necessary steps to do if other elements or
material models need to be incorporated in FEAP. Furthermore, this paper is useful to illustrate the
basic ideas in the finite element method.
Table 2.1 shows the relevant subroutines for a static or dynamic analysis using the linear elastic
solid element solid2d.f in the standard FEAP routine. The calling sequence is:
pcontr.f è pmacr3.f è bfgs.f (iterat) è formfe.f (isw = 6) è pform.f è elmlib.f è elmtxx.f
(solid2d.f)
r.pedersen@citg.tudelft.nl 1
Adding elements into FEAP January 2004
elmlib.f
solid2d.f
inpt2d.f cktris.f ckisop.f pltri3.f pltri6.f sld2d1.f surf2d.f therm2.f mass2d.f n4d2.f
Table 1.2 Diagram of the respective routines for the element solid2d.f.
For a general view of the process, some features in the subroutines are excluded. This means that
triangular elements, body forces, thermal effects etc. are not considered. For that reason is it possi-
ble to modify some of the routines and dispense with other subroutines. The routines marked with
blue are necessary to use the elastic element. Furthermore, the subroutine therm2d.f calls other sub-
routines, which are not pictured.
The program file (Feap71.f) itself is placed in the folder main, exiting in the folder ver7j. In this
folder there is also a file called makefile. The text in this file is written here:
include ../../makefile.in
SOURCES = $(FSOURCE)*.$(FEXT)
This type of file is also a necessity in the library with the new code. Additional a file called go with
following text has to be included in the new library:
cd ../..
make ropecode
If the go command is applied then the new files and changes are coupled with standard FEAP:
r.pedersen@citg.tudelft.nl 2
Adding elements into FEAP January 2004
mech043 /usr3/pedersen/feap_new/ver7j/rope/ropecode> go
If a file from the source code is moved into, the new library without changing the name of the file
FEAP will overwrite the oldest version. Generally, one should be careful about both changing the
names of the files and changing something in the code. You have to be sure you know all the sub-
routines that are calling the specific file. See table 2.1.
Ex:
call xxx(eps,d,ud, sig,dd, isw) or call xxx(eps,hr(np(25),ud, sig,dd, isw) will have the same effect.
E = d(21)
Alfa=d(203)
Then it is possible to get the necessary values from the material array. The uconst.f file calls another
file that is able to read specific data from the input file using UCON BINE and endbine, which are
user-defined names. The file reads the data between the two lines and store the values for alfa, beta
and gamma in the ud(*) array by using uconst.f.
MATEerial,1
USER 01
ELAStic 2100 0.3
QUADrature data 2 2
Density data 2
UCON BINE
alpha,4
beta,2000
gamma,30000
endBine
END
You have to be careful about changing the sflag and the value for e1 in the inpt2d.f file after
uconst.f is called. Otherwise, FEAP ignores the standard data and reads only the user defined prop-
erties.
r.pedersen@citg.tudelft.nl 3
Adding elements into FEAP January 2004
The other routine to be edited is the umodel.f file, which will be called when the stresses need to be
computed for residual and tangent operations etc. For plane 2D solid elements, the routine that is
calling umodel.f is modlsd.f. By means of this file, it is possible to add new constitutive models
into FEAP. In the user-element, elmt01.f the umodel.f calls the same routines as modlsd.f except
from umodel.f itself. If you want to make modifications e.g. change something in the elastic consti-
tutive model, it is possible here. You can always run the standard elastic routine by typing solid
instead of user 01 in the input file.
o Edit uconst.f to set the material identifier number umat that correspond to the user
model type requested in the input file (user 01 in the case above).
o Edit the uconst.f so that it reads in the data and passes it to ud(*) e.g. calling another
user defined subroutine.
o Edit umodel.f so that it responds to the respective isw switches.
Ualloc takes 4 arguments. The first is the numerical location of the user array in the list in ualloc.f,
the second is the name of the array, the third is the desired length of the array, and the forth is the
precision of the array ( 1 for integer and 2 for double precision real). After the call to ualloc the
pointer array up( ) will contain the correct pointers into the blank common.
Access of information in each of the arrays is performed using a pointer which are the include files
pointer.h and upointer.h for palloc and ualloc, respectively. As an example for the use of the above
allocation method, consider the array d with the material properties. When it is necessary to call the
subroutine inpt2d.f it is possible to write inpt2d(d,tdof,nen,1) but another possibility is to write
inpt2d(hr(np(25)),tdof,nen,1). The file, ualloc.f in the user directory that allows one to define named
arrays for dynamic allocation out of FEAP's blank common memory management system. To set
up a user allocatable array one merely needs to edit the file ualloc.f to include the new array name
and update the number of user allocatable arrays.
For instance to add the user allocatable arrays 'GDATA’ to the program one needs to edit the file
ualloc.f as follows:
o Edit the parameter statement so that list = 2 (two user arrays are being defined)
o Edit the data list for names and add 'GDATA’
r.pedersen@citg.tudelft.nl 4
Adding elements into FEAP January 2004
o Not required but recommended, provide a description of the array in the comment
list.
To use the arrays that have been compiled into the program one uses the ualloc( ) logical function to
allocate memory, resize memory, or delete memory. This also involves the use of common blocks
comblk.h and upointer.h. To use the ualloc call you must specify both the name of the array and its
numerical location in the list. Specifically:
This allocation technique is used in the part about post processing utilities in FEAP. Another possi-
bility to access the data in the arrays from an arbitrary subroutine is to define the array as a common
block.
ul(ndf,nen)
sld2d1.f
strn2d.f
resid2d.f
modlsd.f
eps(9,3) sig(9,9)
In case of plane stress (stype.eq.1), it is assumed that all loads applied to the plate act in the mid-
plane direction, and are symmetric with respect to the midplane. All support conditions are symmet-
ric about the midplane and the in-plane displacements, strains and stresses can be taken to be uni-
r.pedersen@citg.tudelft.nl 5
Adding elements into FEAP January 2004
form through the thickness. The transverse displacement component is generally nonzero because
of Poisson’s ratio effects, and depends on z. However, this displacement does not appear in the gov-
erning equations. Consequently the dependence on z disappears and all components in the govern-
ing equations become functions of x and y only.
The finite element method is a numerical procedure for analysing structures and continua. Usually
the problem is too complicated to be solved satisfactorily by classical analytical methods in the the-
ory of elasticity. Besides solving differential equations for complex geometries, the finite element
method has a structured procedure that is easy to implement in a computational framework.
The basic finite element concepts are to discretizise the domain, and model a structure as an assem-
blage of small elements. Each element is of simple geometry and therefore is much easier to analyse
than the actual structure. As degrees of freedom, finite elements use nodal values of the field. De-
grees of freedom is independent quantities used to define a configuration of the domain that does
not violates the compatibility condition and boundary conditions.
Another crucial step is to transform the differential equations, equation of motion (IVP), and equi-
librium equation (BVP) from the strong form into a weak format. This is done by variational meth-
ods
r.pedersen@citg.tudelft.nl 6
Adding elements into FEAP January 2004
sions of the element stiffness matrix and consistent nodal force vector can no longer be carried out
in closed form. These difficulties can be overcome through the concepts of isoparametric elements
and numerical quadrature, respectively. The isoparametric formulation makes it possible to generate
elements that are nonrectangular and have curved sides. In formulating these elements, natural co-
ordinates are used. Displacements are then expressed in natural coordinates, but are differentiated
with respect to the global coordinates to get the strains. Therefore, a transformation matrix, called
Jacobian matrix, is needed. The key idea is to use the shape functions to represent both the element
geometry and the problem unknowns, which in structural mechanics are displacements. Hence the
name isoparametric element (“iso” means equal), often abbreviated to iso-P element.
We shall assume that the same interpolation functions are used for both displacement components.
This is the so-called element isotropy condition, which is studied and justified in advanced FEM
courses. It is continuous over domain and it satisfies exactly any displacement boundary condition.
The minimum conditions on the shape functions are that it must take the value one at its own node
and zero at all others, so that the interpolation is correct at the nodes. If the shape functions for the
displacements are of higher degree than the shape functions for the geometry, the element is called
sub-parametric. If the shape function for the geometry is of higher degree then the elements are
called super-parametric.
Isoparametric coordinates in a plane are shown in figure 2.3. The coordinates vary from -1 on one
side to +1 at the other, taking the value zero on the medians.
Figure 2.2 Four-node plane isoparametric element in xy space (left). Plane isoparametric element in ξη space.
The axes in the natural space need not to be parallel to the axes in global space and the axes in the
natural system need not to be orthogonal.
r.pedersen@citg.tudelft.nl 7
Adding elements into FEAP January 2004
For quadrilateral elements with four nodes shape functions are bilinear along each direction. In the
local reference system, they take the following form.
The numbering of nodes is referred to the order shown in figure 2.2. Because the isoparametric
elements are geometrically isotropic, the numerical values of coefficients in the stiffness matrix do
not depend on how the nodes are labeled. However, the cyclic order must be maintained and run
counter-clockwise if the Jacobian is not to become negative. This is examined in the check routine
ckisop.f. If the Jacobian becomes negative, the diagonal coefficients of the stiffness matrix would
be negative. The shape functions vary linearly on quadrilateral coordinate lines ξ = const. and,
η = const. . The shape functions can be established by any of the usual methods, formal substitution,
Lagrange’s interpolation formula, or inspection and trial.
The subroutine shp2d.f computes the shape functions, the derivatives and determines the transfor-
mation matrix, Jacobian.
r.pedersen@citg.tudelft.nl 8
Adding elements into FEAP January 2004
do i = 1,4
shp(3,i) = (0.5d0+s(i)*ss(1))*(0.5d0+t(i)*ss(2)) è The shape function for a bilinear element.
∂N
shp(1,i) = s(i)*(0.5d0+t(i)*ss(2)) è The first derivative.
∂ξ
∂N
shp(2,i) = t(i)*(0.5d0+s(i)*ss(1)) è The second derivative.
∂η
enddo
do i = 1,max(3,ndm)
do j = 1,2
xs(i,j) = 0.0d0
do k = 1,nel
xs(i,j) = xs(i,j) + xl(i,k)*shp(j,k) è Form the elements in the Jacobian matrix
x, ξ y ,ξ ∑ N i ,ξ xi ∑N yi
[J ] = =
i ,ξ
y ,η ∑ N i ,η xi ∑N
end do
y, ξ i ,η y i
end do
end do
1 J 22 − J 12
[J ]−1 =
det ( J ) − J 21 J 11
sx(1,2) =-xs(1,2)*temp
sx(2,1) =-xs(2,1)*temp
do i = 1,nel
temp = shp(1,i)*sx(1,1)+shp(2,i)*sx(2,1) è Form the global derivatives. Used to form the B matrix
shp(2,i) = shp(1,i)*sx(1,2)+shp(2,i)*sx(2,2)
∂N ∂N ∂η ∂N ∂ξ
shp(1,i) = temp = +
∂x ∂η ∂x ∂ξ ∂x
enddo
∂N ∂N ∂η ∂N ∂ξ
= +
∂y ∂η ∂y ∂ξ ∂y
r.pedersen@citg.tudelft.nl 9
Adding elements into FEAP January 2004
Completeness Checks
The sum of the shape functions must be unity. This is also called the unit sum condition. It can be
easily verified by hand for simple elements. It is necessary to check if the correct geometry of the
quadrilateral is preserved by the mapping from the natural reference state to the global. The com-
mon side 1-2 in figure 2.4 must remain a straight line to preclude interelement gaps or interpenetra-
tion. This is equivalent to the question of interelement displacement compatibility, which is posed
as item (C). The statement “the displacement along a side must be uniquely determined by nodal
displacements on that side” translates to “the coordinates of a side must be uniquely determined by
nodal coordinates on that side.”
The idea is to develop the shape functions in a way that the solution of the weak format of the gov-
erning equations converges to the exact solution. There are three basic convergence requirements:
This means if the shape function is not continuous on the element boundary then the derivatives are
delta functions and it is not possible to make sense out of the quantities that would appear in the
stiffness matrix. But 1 and 2 guarantee that jumps only can appear in the derivatives of the shape
functions. Finite elements are called compatible if there is Cm continuity in the element and Cm-1
continuity across the elements in case of the stiffness integrand involves derivatives of order m.
The uses of elements that violate this property are called incompatible.
r.pedersen@citg.tudelft.nl 10
Adding elements into FEAP January 2004
Kinematics strn2d.f
Because the deformation method is used, the prescribed displacements are used directly to deter-
mine the strains. Only infinitesimal strains are considered.
Subroutine strn2d(d,xl,ul,u0,tl,shp,ndf,ndm,nel,xx,yy,ta,eps)
c Inputs:
c Outputs:
c-----[--.----+----.----+----.-----------------------------------------]
implicit none
do j = 1,6
eps(j,1) = 0.0d0
eps(j,3) = 0.0d0
end do
xx = 0.0d0
yy = 0.0d0
ta = -d(9)
∂
0
ε xx ∂x
∂ u
eps(1,1) = eps(1,1) + shp(1,j)*(ul(1,j,1) - u0(1,j))
ε xx = 0 ∂y u
γ xy
∂ ∂
∂x ∂y
eps(2,1) = eps(2,1) + shp(2,j)*(ul(2,j,1) - u0(2,j))
eps(3,1) = eps(3,1) + shp(3,j)*(ul(1,j,1) - u0(1,j))
eps(4,1) = eps(4,1) + shp(2,j)*(ul(1,j,1) - u0(1,j)) è u0 is the initially strain, which is defined in solid2d.f
& + shp(1,j)*(ul(2,j,1) - u0(2,j))
if(stype.eq.3) then
eps(3,1) = eps(3,1)/xx
eps(3,2) = eps(3,2)/xx
eps(3,3) = eps(3,3)/xx
else
eps(3,1) = 0.0d0 è The strain out of plane is set to zero
eps(3,2) = 0.0d0
eps(3,3) = 0.0d0
endif
end
r.pedersen@citg.tudelft.nl 11
Adding elements into FEAP January 2004
Stress modlsd.f
Material is linearly elastic, obeying Hooke’s law, and that displacements and strains are infinitesi-
mal. The subroutine dmat2d.f constructs the material moduli. The routine sld2d1.f calls the routine
modlsd.f, which again calls the routine estrsd.f where the constitutive relation for an elastic material
is placed. As explain previously, it is also possible to develop a user defined material model and add
it to FEAP. Then the routine modlsd.f is calling the file umodel.f.
Subroutine estrsd(d,ta,eps,sig,dd,dr)
c * * F E A P * * A Finite Element Analysis Program
implicit none
save
c Stress:
end
With a linear stress-strain, relationship is it possible to write the general stress-strain expression as
follow σ ij = Cijkl ε ij , which is the generalized Hooke’s law. C contains the elastic coefficients. If the
elements in C are constant throughout, the continuum is called homogeneous. C is assumed to sat-
isfy the properties:
o Symmetry
§ Major symmetry Cijkl = C klij
§ Minor symmetries Cijkl = C jikl , Cijkl = Cijlk
o Positive-definiteness
Because of the major symmetry the stiffness matrix become symmetric and because of the first mi-
nor symmetry, Cauchy stress tensor is symmetric. In the basic continuum, mechanics the symmetry
of the stress tensor is due to the balance of angular momentum. The positive definiteness of the
elastic tensor combined with suitable boundary conditions on the displacements make the stiffness
matrix positive definiteness. These are important properties, which result in a non-singular matrix
and this influence the type of a necessary solver.
r.pedersen@citg.tudelft.nl 12
Adding elements into FEAP January 2004
Because of the symmetry of the elastic tensor, the numbers of material constants are reduced from
81 to 54. In a similar fashion, we can make use of the symmetry of the strain tensor. This further
reduces the number of material constants to 36. These coefficients are not all independent. By strain
energy considerations, the numbers of coefficients are further reduced to 21. The most general ani-
sotropic linear elastic material therefore has 21 material constants. If the material is isotropic, i.e.,
that the elastic constants are the same in all directions and therefore independent on the choice of
the reference system, the 21 coefficients is reduced to two constants.
The stress-strain relation then reduce to
σ xx = λJ 1 + 2 µε xx
σ yy = λJ 1 + 2 µε yy
σ zz = λJ 1 + 2 µε zz
τ xy = µγ xy
τ yz = µγ yz
τ zx = µγ zx
These coefficients arise from a mathematical treatment of the general linear relation. In experimen-
tal work, Lamé’s constant is rarely used because it has no physical significance. Unlike the shear
modulus, has physical significance and can be measured. The above equations give a relation be-
tween Lamé’s constant, the shear modulus and Poisson’s ratio and Young’s modulus. There exist a
fifth elastic constant, which is called the bulk modulus, K, and is the ratio between of the applied
hydrostatic pressure and the volume dilatation.
E
K=
3(1 − 2ν )
r.pedersen@citg.tudelft.nl 13
Adding elements into FEAP January 2004
σ xx =
E
(1 + ν )(1 − 2ν )
[ ]
(1 −ν )ε xx +ν (ε yy + ε zz )
σ yy =
E
(1 +ν )(1 − 2ν )
[ ]
(1 −ν )ε yy +ν (ε xx + ε zz )
σ zz =
E
(1 + ν )(1 − 2ν )
[ ]
(1 −ν )ε zz +ν (ε xx + ε yy )
E
τ xy = γ xy
2(1 + ν )
E
τ yz = γ yz
2(1 + ν )
E
τ zx = γ zx
2(1 + ν )
[
ε xx = σ xx −ν (σ yy + σ zz )
1
E
]
[
ε yy = σ yy −ν (σ xx + σ zz )
1
E
]
[
ε zz = σ zz −ν (σ yy + σ xx )
1
E
]
2(1 + ν )
γ xy = τ xy
E
2(1 + ν )
γ yz = τ yz
E
2(1 + ν )
γ zx = τ zx
E
In case of plane strain, the strain in plane, i.e. in the x and y direction are functions of x and y
alone, and the strain in the z direction is equal zero. This is true for thick bodies in the z direction.
σ xx = λJ 1 + 2 µε xx
σ yy = λJ 1 + 2 µε yy
σ zz = λJ 1
τ xy = µγ xy
τ yz = 0
τ zx = 0
r.pedersen@citg.tudelft.nl 14
Adding elements into FEAP January 2004
In case of plane stress, the stress out of the plane is assume to be zero. This is true in those cases
where the body thickness is small relative to its lateral dimensions.
σ xx = λJ 1 + 2 µε xx
σ yy = λJ1 + 2 µε yy
τ xy = µγ xy
τ yz = 0
τ zx = 0
σ zz = λJ1 + 2 µε zz = 0
λ
ε zz = − (ε xx + ε yy )
λ + 2µ
2µ
J1 = (ε xx + ε yy )
λ + 2µ
2λµ
σ xx = (ε xx + ε yy ) + 2µε xx
λ + 2µ
2λµ
σ yy = (ε xx + ε yy ) + 2µε yy
λ + 2µ
r.pedersen@citg.tudelft.nl 15
Adding elements into FEAP January 2004
In FEAP the weights and the location of the integration point within the elements are computed in
the subroutine int2d.f . The connection with the other routines is shown in table 1.2.
c 5 pt. integration
if(l.eq.0) then
lint = 5
g = sqrt(0.6d0)
do i = 1,4
sg(1,i) = g*lr(i)
sg(2,i) = g*lz(i)
sg(3,i) = 5.d0/9.d0
end do
sg(1,5) = 0.0d0
sg(2,5) = 0.0d0
sg(3,5) = 16.d0/9.d0
c 1x1 integration
elseif(l.eq.1) then
sg(1,1) = 0.d0
sg(2,1) = 0.d0
if(nel.eq.3) sg(2,1) = -1./3.0d0
sg(3,1) = 4.d0
elseif(l.eq.2) then
g = 1.d0/sqrt(3.d0)
do i = 1,4
sg(1,i) = g*lr(i)
sg(2,i) = g*lz(i)
sg(3,i) = 1.d0
end do
c 3x3 integration
elseif(l.eq.3) then
g = sqrt(0.6d0)
h = 1.d0/81.d0
do i = 1,9
sg(1,i) = g*lr(i)
r.pedersen@citg.tudelft.nl 16
Adding elements into FEAP January 2004
sg(2,i) = g*lz(i)
sg(3,i) = h*lw(i)
end do
c 4x4 integration
elseif(l.eq.4) then
g = sqrt(4.8d0)
h = sqrt(30.0d0)/36.0d0
ss(1) = sqrt((3.d0+g)/7.d0)
ss(4) = - ss(1)
ss(2) = sqrt((3.d0-g)/7.d0)
ss(3) = -ss(2)
ww(1) = 0.5d0 - h
ww(2) = 0.5d0 + h
ww(3) = 0.5d0 + h
ww(4) = 0.5d0 - h
i=0
do j = 1,4
do k = 1,4
i=i+1
sg(1,i) = ss(k)
sg(2,i) = ss(j)
sg(3,i) = ww(j)*ww(k)
end do
end do
c 5x5 integration
elseif(l.eq.5) then
g = sqrt(1120.d0)
ss(1) = sqrt((70.d0 + g)/126.d0)
ss(2) = sqrt((70.d0 - g)/126.d0)
ss(3) = 0.0d0
ss(4) = -ss(2)
ss(5) = -ss(1)
i=0
do j = 1,5
do k = 1,5
i=i+1
sg(1,i) = ss(k)
sg(2,i) = ss(j)
sg(3,i) = ww(j)*ww(k)
end do
end do
endif
end
r.pedersen@citg.tudelft.nl 17
Adding elements into FEAP January 2004
For numerically integrated elements, full integration is defined as a quadrature rule sufficient to
provide the exact integrals of all entries in the element stiffness matrix.
2 2
n
1 1 1
k11 = EA∑ B i B i wi = x − wi = 0 − ⋅ 2 =
T
i =1 2 2 2
1
0
-1
2 2
k_1 := EA 0 0 0
-1 1
0
2 2
r.pedersen@citg.tudelft.nl 18
Adding elements into FEAP January 2004
2 2 2 2
n
1 1 1 1 1 1 7
k11 = EA∑ B B i wi = x − w1 + x − w1 = − 1+ − − 1 = 1.6667 =
T
i
i =1 2 2 3 2 3 2 6
k_2 := EA
3 1 3 1
3 1
2 2 2 − 3 2 − − 3
3 1 3 2 3 2
3 − 2 + − 3 − 2 , − + ,
3 3
3 1 3 1 3 1 3 1
3 − 2 3 + 2 + − 3 − 2 − 3 + 2
3 1 3 1 3 1 3 1
2 3 − 2 3 2 − 3 − 2 3 8 2 3
3
+ 2 3 −
2 3
+
2
− + , ,− +
3 3 3 3 3
3 1 3 1 3 1 3 1
3 − 2 3 + 2 + − 3 − 2 − 3 + 2 ,
3 1 3 1
2 3 + 2 3 − + 2 2
3 2 + 3 2 , 3 1 3 1
− + + − +
3 3 3 2 3 2
Because the coefficients in the B matrix are linear, the elements in the integrand are quadratic. Two
integration points are therefore minimum to obtain an exact solution.
r.pedersen@citg.tudelft.nl 19
Adding elements into FEAP January 2004
2 2
n 3 1 5 3 1 5
2
1 8 7
k11 = EA∑ B B i wi ==
− + − − + 0 − = 1.6667 =
T
i
i =1 5 2 9 5 2 9 2 9 6
k_3 := EA
2 2
5 − 1 + 15 1
5 − −
15
2
+
5 2 5 2
+ ,
9 9 9
1 15
15 2 − −
1 15
2 − + 15
5
−
5
+
2 2
,
9 9
1 15 15 1 1 15 15 1
5 − + + 5 − − − +
2 5 5 2 2 2
+
2 5 5
−
9 9 9
1 15
15 2 − −
1 15
15
2 − +
− 2 5 2 5 8
+ , ,
9 9 3
15 1 15 1
2 15 + 2 15 − +
− 5 2
+ 5 2
9 9
5 − 1 + 15 15 + 1 5 − 1 − 15 − 15 + 1
2 5 5 2 2 5 2 2
+
5
− ,
9 9 9
2 2
15 1 15 1 15 1 15 1
2 15 + 2 15 − + 5 + 5 − +
5 2 + 5 2 , 5 2 + 5 2 2
− +
9 9 9 9 9
r.pedersen@citg.tudelft.nl 20
Adding elements into FEAP January 2004
As expected, we end up with the same stiffness matrix as for a two-point integration.
Isoparametric formulation
Natural coordinates
ξ1 := -1 ξ2 := 0 ξ3 := 1
Global coordinates
L
xx1 := 0 xx3 := L xx2 :=
2
The shape functions are derived in the same way as shown above but now expressed in natural co-
ordinates.
Transformation between natural and global coordinates is the shape functions expressed in natural
coordinates multiplied by the nodal coordinates in the global reference system.
( −1 − ξ ) ( 1 − ξ ) L ( −1 − ξ ) ξ L
X := − −
2 2
L
For ξ = 0 the global coordinates is etc.
2
The Jacobian is the shape functions differentiated with respect to natural coordinates multiplied
with the global coordinates.
J := ξ + L − ξ L
1
2
r.pedersen@citg.tudelft.nl 21
Adding elements into FEAP January 2004
ξ − 1
2
ξ − 1 ξ + 1
2 ξ − ξ
1
2 2 2 2
−
1 ξ + 1 L − ξ L ξ + 1 L − ξ L
ξ + 2 L − ξ L
2 2
2 ξ − ξ 2 ξ + ξ
1 1
2 4 ξ2 2
BB := − −
1 ξ + 1 L − ξ L ξ + 1 L − ξ L
ξ + 2 L − ξ L 2 2
2
1 1
2 ξ + ξ ξ +
1 1
ξ − 2 ξ + 2
2 2
−
1
ξ + L − ξ L ξ + 1 L − ξ L ξ + 1 L − ξ L
2 2 2
2.333333332 −
2.666666667 0.3333333339
L L L
2.666666667 5.333333333 2.666666668
ke := EA − −
L L L
0.3333333339 2.666666668 2.333333333
−
L L L
It is clear if the mid node is placed in the physical mid of the element, Jacobian is constant L/2.
Because one has to transform the strain-displacement matrix into the global domain, B is simply the
derivatives of the shape functions expressed in natural coordinates and then divided by Jacobian.
In case that the mid node is not placed in the middle of the element, Jacobian is no longer constant
and the analytical solution is not possible, because the natural coordinate is present in both numera-
tor and denominator when integrating the above matrix BB.
For example, if the mid node is placed in L/4 the formulas are changed
ξ1 := -1 ξ2 := 0 ξ3 := 1
L
xx1 := 0 xx2 := xx3 := L
4
( −1 − ξ ) ( 1 − ξ ) L ( −1 − ξ ) ξ L
X := − −
4 2
r.pedersen@citg.tudelft.nl 22
Adding elements into FEAP January 2004
ξL
+ ξ + L
1
J := −
2 2
ξ − 1
2
ξ − 1 ξ + 1
2 ξ − ξ
1
2 2 2
− 2
ξ L 1 ξL ξL 1
+ ξ + L
1
− 2 + ξ + 2 L − − + ξ + L
2 2 2 2
1
2
ξ − 1 ξ + 1 ξ + 1
2 ξ ξ +
BB := 2 2 2
− 2
ξ L ξL ξL 1
+ ξ + L + ξ + L + ξ + L
1 1
− − −
2 2 2 2 2 2
2 ξ − ξ 2 ξ ξ +
1 1
4 ξ2
2 2
− −
− ξ L + ξ + 1 L ξL ξL 1
+ ξ + L
1
− − + ξ + L
2 2 2 2 2 2
5.499999997 −
6.000000001 0.5000000007
L L L
6.000000001 8.000000000 2.000000001
ke := EA − −
L L L
0.5000000007 2.000000001 1.500000000
−
L L L
This indicates that the element has become stiffer in the end where the two nodes are placed.
For numerically integrated elements, full integration is defined as a quadrature rule sufficient to
provide the exact integrals of all terms in the stiffness matrix if the element is undistorted. Use of
full integration is the only sure way to avoid pitfalls as mesh instabilities. Instabilities might appear
when reduced (less quadrature rule than full integration) integration is used. Instability may also be
called a zero-energy mode, which refers to a nodal displacement vector that is not a rigid body
mode but still produces zero strain energy. It is possible to determine the instability modes by using
a eigen-value analysis of the element without any constraints. The first of three eigenvalues are zero
due to the rigid body modes and the rest of the zero valued eigen-values are due the instability
modes.
Another term is selective integration, which means than different quadrature rule is used depending
on the integrand. It is well known that the bilinear element in pure bending acts stiffer because of
the spurious shear stresses in the element that are only zero in the middle of the element. Therefore,
if one wants the exact shear stresses a one-point integration is necessary. However, to get the exact
normal stresses a two-point integration is used.
r.pedersen@citg.tudelft.nl 23
Adding elements into FEAP January 2004
Post-processing
For generation of a contour plot of stresses it is necessary to extrapolate or interpolate the stresses
from Gauss points to nodal points.
Imagine that stresses have been computed at the four Gauss points of a plane element shown in the
next figure. One now wants to extrapolate or interpolate these stress values to other points in the
element. In the figure, coordinate r is proportional to ξ and s is proportional to η .
1 1
Point 3 is located at (ξ ,η ) = , and (s, r ) = (1,1) . Therefore the proportional factor is 3.
3 3
r = 3ξ
s = 3η
Stresses at any point P in the element are found by the usual shape functions derived above. Instead
of using the patent reference system, the shape functions are expressed in s and r coordinates.
4
σ p = ∑ N iσ i
i =1
Ni =
1
(1 ± r )(1 ± s )
4
When examining finite element stress output it is not expected that stresses in adjacent elements
will be the same along the common edge and that the stresses at nodes will be the same in all the
elements that share the node or that the stress boundary conditions will be exactly satisfied. s
In standard FEAP, it is possible to get the stresses at the integration point level as a function of the
time steps. However, in many cases it is preferable to have the stresses and the corresponding
strains. It might also be useful to select a specific range of integration points where stresses and
strains are plotted for different time steps e.g. in a wave propagation problem.
Therefore, it is necessary to define new arrays where the stresses and strains are stored for each in-
tegration point and for every time step.
The arrays have to be defined in the subroutine pcontr.f .
if (up(1).eq.0) then
r.pedersen@citg.tudelft.nl 24
Adding elements into FEAP January 2004
The array for the stresses is named SINP and has the dimension (numel*9,9), which is the number
of elements used, multiplied with the highest possible number of integration points per element and
one can store up till 9 different values for each integration point. Now FEAP reserves memory
space for the defined arrays and they are given a pointer with a specific number.
The pointer for the user array gets the number 1. Therefore if data from the array is need in a spe-
cific subroutine, it is possible to type hr(up(1)) to access the data from anywhere in FEAP.
The stresses are computed in subroutine estrsd.f as shown above. In this routine, one simply adds
selected stress values (or all of them) to the user-defined array SINP.
If the post-processing program Tecplot is used, it is necessary to create a user macro, where one
makes the file readable for Tecplot. An example of a user macro is shown below.
subroutine umacr1(lct,ctl,prt)
implicit none
write(*,*) ''
write(*,*) 'pmacr=>umaclib=>umacr1=>tecplt'
write(*,*) ''
if(pcomp(uct,'mac1',4)) then
end
r.pedersen@citg.tudelft.nl 25
Adding elements into FEAP January 2004
References
[1] FEAP, A Finite Element Analysis Program. Version 7.1, Programmer Manual. Robert
L. Taylor.
r.pedersen@citg.tudelft.nl 26