You are on page 1of 78

CONTENTS

1.APPLICATIONS OF ONE-DIMENSIONAL PROBLEMS


1. PROGRAMMING CONSIDERATION
2. PROGRAMMING (MAPLE)
3. PROGRAM (FORTRAN)
1. Governing Equation
2. Finite Element Implementation
3. Programming Variables
4. Input File
5. Applications
4. ANSYS
1. Introduction to Ansys Workbench
1. DesignModeler
2. How To Sketch
3. Crash Examples (Structural Analysis)
2. Introduction To Ansys
3. Ansys Applications
1. BEAM3 Element Description (ANSYS)
2. BEAM3 Output Data
3. BEAM3 Assumptions and Restrictions
4. Shear Correction Factor
5. Time-Dependent Analysis
6. Buckling Analysis
7. Modal Analysis
8. Harmonic Analysis
9. Spectrum Analysis
10. Whirling of a shaft
PROGRAMMING CONSIDERATION
Model Equation
xB dw du
0   [a  cwu  wf ]dx  Q B w( x B )  Q A w( x A )
xA
dx dx

Natural Coordinates

1
 d dw  d du   dx
0
 a( x)
1 
   c( x) w( )u ( )  w( ) f ( x )
 dx d  dx d   d
d  Q B w(1)  Q A w( 1)


1
 1 dw  1 du  

 a( x) J
1  
 J
d 
  c ( x ) w( )u ( )  w( ) f ( x) Jd  Q B w(1)  Q A w(1)
d  
N
x   x j j ( )
j 1

Approximate Solution and Shape Functions


N
u ( )  u N ( )  u 
j 1
j j ( )

1
  1 d i  1 d i  
0
 a( x) J
1  
 J
d  d 
  c( x) w( )u ( )  f ( x) w( )  Jd  Q B w(1)  Q A w(1)

 N

 
1
 1 d i  1 d i   1

   f ( x)  Jd  Q  (1)


 a ( x )
 J   J   c ( x ) 
i i Jd u j 
d  d 
i 2 i
j 1
1     1

 Q1 i (1)
N

 K u
j 1
ij j  Fi  Qi

 Two-Node (Linear) Element


1 1 
 1 ( )  ,  2 ( ) 
2 2
 Three-Node (Quadratic) Element
1 1
 1 ( )    (1   ),  2 ( )  1   2 ,  3 ( )   (1   )
2 2

 Four-Node (Cubic) Element

9 1  1  9 1 
 1 ( )         1    ,  2 ( )  1       1    ,
16  3  3  16 3 

 3 ( ) 
9
1     1   1    ,  4 ( )   9 1     1    1   
16 3  16 3  3 
1. Static Problems
2. Time-Dependent Problems
3. Eigenvalue Problems

STRUCTURE of 1D FEM PROGRAM

Observe carefully HOW the elemental stiffness matrix and force


vector are computed and stored in arrays in STIFF subroutine
Applications with Maple
Programs
To demonstrate the programming for FEM, a
complete set of functions called procedures in
Maple is presented along with a main program in
Appendix D.
 
Maple has two different types; Classic Worksheet
Maple and Standard Maple.

There exist some differences between them. One


major difference is that the former stores all
executed variables and procedures into the
memory that are available to any open files while
the latter stores them in each file memory (not
available to other files).

The procedures (i.e., functions or subroutines) can


be run once to put them in the memory to use.
Alternatively, they can be stored in a library and
called anytime to use.

The provided programs are stored in three


separate files; function file, application file (main
program), and input file.
Creating a Library

> #define a new libname (mee480.lib)


to save procedures
savelibname:="c:/my/maplelib/mee480
.lib";

#first time, create the library


march('create',savelibname);

Error, (in march) there is already


an archive in
"c:/my/maplelib/mee480.lib"

>
#you can list the names of
procedures if you wish
listrep := r -> map2( op, 1, march(
'list', r ) ):
listrep(savelibname);
Saving procedures into a Library

>
#copy a matrix into another one
AtoB:=proc(A)
Matrix(A);
end proc:

#copy a vector into another one


XtoY:=proc(X)
Vector(X);
end proc:
savelib('AtoB','XtoY'):
Calling a Library

> #call library names to use


libname:={libname,"c:/my/maplelib/
mee480.lib"}[];
Example 1
Example 2
Example 3
Example 4
Example 4
Example 5
NEWFEM1D (Fortran) PROGRAM
Governing Equation
u  2 u   u   2   2u 
 m2 2   a   2 b 
m1
t t x  x  x  x 2   cu  f  0, 0  x  L
 
2   2u 
b 
x 2  x 2   Pu  0, 0  x  L
 

Finite Element Implementation


 Temporal Types of Problems
 steady state problems
 first-order time dependent problems
 second-order time dependent problems
 first-order eigenvalue problems
 second-order eigenvalue problems

 Spatial Types of Problems


 second order problems
 fourth order problems
 2D structural problems

 Shape Functions
 linear shape function
 quadratic shape function
 cubic shape function

 Boundary Conditions
 essential boundary conditions
 natural boundary conditions
 mixed boundary conditions
 constraint boundary conditions

 Matrix Solver
 full matrix solver
 compressed matrix solver
 symmetric banded matrix solver
 nonsymmetric banded matrix solver
 general eigenvalue solver
Programming Variables
ielem indicator for the type of finite element:
1. 2-node element for second-order problems
2. 3-node element for second-order problems
3. 4-node element for second-order problems
4. 2-node element for fourth-order problems
5. 2-node element for beam structural problems
6. 2-node element for truss structural problems

item item=0, static (not time-dependent) analysis


1. first-order time derivatives
2. second-order time derivatives involved
3. eigenvalue problem for first-order in time
4. eigenvalue problem for second-order in time
5. buckling problems [10/26/94] must be used only with ielem=4
for=3,4,5, it outputs [K] & [M] for eigen solver
icont.....indicator for continuity of the data (0, no;1, yes)
icood .. flag for generation of coordinates +/-
localx .. flag for local x-coordinates to use when localx > 0 or global when
localx = 0 in expression of a(x),b(x),c(x) and f(x) in the differential
equation
nprint .. indicator for print (nprnt=n) or noprnt (nprnt=0) of the element
matrices and global matrices
ifmt .... indicator for print format. 0 for scientific format and 1 for floating-
point format
aL........length of the domain
x0 ...... starting coordinate for domain

ax0,ax1,ax2
bx0,bx1,bx2....coefficients in the differential equation(see stiff)
cx0,cx1,cx2 (depending on LOCAlX, they are evaluated in local or
global)
fx0,fx1,fx2 when ielem=5, f(x) is for beam transverse load, NOT for
axially distributed load
Tcoeff,Tchange used with ielem=1,5,6 only
coef(i,j).array for storing ax0,ax1,ax2,
...,fx0,fx1,fx2,Tcoeff(=),Tchange(=T), ax0=coef(i,1),ax1=coef(i,2),
etc. for i-the element. This is used when icont = 0 (not continuous data)
Programming Variables (contd)

dt........time increment for time-dependent problems


maxtim.....number of time steps (in the transient analysis)
alpha,beta,
a1,a2,a3,a4..parameters in the time approximation schemes
glx() ... array of global coordinates, x[,y]
elx.......element coordinates to transfer to 'stif'
gstif.....global (that is, assembled) coefficient matrix in banded form (neq x
hbw)
gmass ... glocal mass matrix for time-dependent and eigenvalue problems
gf........columm vector of the global forces before going to the subroutine
'solve', and contains the solution when comes out of the subroutine
'solve'
gf0 .... colum vectors for initial conditions on ui and its
gf1,gf2 derivatives (gf1=d(u)/dt,gf2=dd(u)/dtt)
elf.......element force vector
nebc......number of specified primary degrees of freedom
iebc......colum of specified primary degrees of freedom
vebc......colum of specified values of the entris in iebc
nnbc.......number of specified secondary degrees of freedom OR flag:
when eigenproblem, if this is positive, the eigenvalues are sorted in
ascending order.
inbc.......colum of specified secondary degrees of freedom
Vnbc…..collum of specified values of the entries in inbc
nconv ....number of convection type problem
iconv() ..node numbers for nconv
vconv(,2) values of conv bcs with hconv and tinf
nconst ...number of constraint conditions
ipconst() vector to store the number of positions in each group
iconst() vector to store the position numbers for constrain conditions
vconst()..vector to store the coefficients of constraint relations
Programming Variables (cont’d)
nstress...number of points in each element to compute derivatives
which are related to internal loadings (must be nstress <= neq)
nplot .. number of nodes to get plotting data in time-dependent
problem For steady-state second-order problems, it will write
position and primary variables into the plot file.
iplot(i)..equation numbers where to get plotting data for transient case
for steady state case, not used
nrow .... row-dimension of 'gstif' in dimension statement
ncol .... colum-dimension'gstif' in dimension statement
npe.......number of nodes per element
ndf.......number of degrees of freedom per node
nem.......number of elements in the mesh
nnm.......number of nodes in finite element mesh
neq..... total degrees of freedom in the finite element model
nhbw......half band width ofthe global coefficient matrix
ngp.......number of gauss points used in theintegration
nn........number of total degrees of freedom in the element
irel .... scale factor of displacements to coord. to plot deformed shape
only in structural shape
matsym .. flag for type of global matrix used for solution and internally
used.
0 full matrix
1. compressed full matrix without EBC's
2. full matrix
3. non-symmetric banded matrix
4. symmetric banded matrix

nod(i,j) global node number correspondingto thej-th node of the i-th


element (connectivity matrix)
FIlES
*.out......general output file
*.vec......generate eigenvectors to plot mode shapes
*.eig.......eigenvalues are stored for plot
** note for eigenproblems, if nplot > 0, they are sorted.
*.dat.......time dependent responses at positions specified by nplot and iplot()
for plot for steady state, position and primary values for plot
*.bnd…...stores displacements, and its derivatives for plot in bending
*.shp……original shape of the structure for plot
INPUT FILE
title for informational purpose
24010010 item,ieLem,icont,localx,icood,irel,nprint,ifmt
23 nem,nnm
2 nebc
12 (IEBC(I),I=1,NEBC)
2*0 (VEBC(I),I=1,NEBC)
1 nnbc
5 (INBC(I),I=1,NNBC)
-100 (VNBC(I),I=1,NNBC)
0 nconv
3 iconv()
10 vconv()
00 nconst,ipconst()
3 iconst()
120 vconst(,ndf)
32 nstress ,nplot
34 iplot()
0.5 .125 .05 20 ,,t,maxtime
0 0.1 0.2 0.3 0.4 0.5 (gf0(i),i=1,neq)
6*0 (gf1(i),i=1,neq)
0 0 0 3e6 0 0 0 0 0 -10 0 0 0 0 1 a0,a1,a2, b0,b1,b2, c0,c1,c2, f0,f1,f2, alpha,dT, c1 (or
c2)
0 0 0 3e6 0 0 0 0 0 0 0 0 0 0 1 a0,a1,a2, b0,b1,b2, c0,c1,c2, f0,f1,f2, alpha,dT, c1 (or
c2)
1 1 2 NOD for element 1
2 2 3 NOD for element 2
1 0 0 x1,y1
2 6 0 x2,y2
3 10 0 x3,y3
Application Ex.6.2.1
Solve the following differential equation with two linear elements

d 2u du
 2  u  x2  0 0  x  1, u (0)  0, 1
dx dx x 1

Input Data

Example
0 1 1 0 1 1 0 0 item,ieLem,icont,localx,icood,irel,nprint,ifmt
2 3 nem,nnm
1 nebc
1 (IEBC(I),I=1,NEBC)
0 (VEBC(I),I=1,NEBC)
1 nnbc
3 (INBC(I),I=1,NNBC)
1 (VNBC(I),I=1,NNBC)
0 nconv
3 iconv()
0 vconv()
0 nconst,ipconst()
0 iconst()
1 2 0 vconst(ndf)
0 0 nstress,nplot
3 4 iplot()
0.5 0.125 0.05 20 a,b,Dt,maxtime
0 0.1 0.2 0.3 0.4 0.5 (gf0(i),i=1,neq)
6*0 (gf1(i),i=1,neq)
1 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 a0,a1,a2, b0,b1,b2,
c0,c1,c2, f0,f1,f2, alpha,dT, c1 (or c2) (continuing the previous line)
1 0 L and x0
Output Data

Example
item(0:static,1,2:march,3,4:eigen)....= 0
eLement type(1,2,3,6: 2nd, 4,5: 4th)..= 1
icont(0:discont.a(x),.., 1: cont).....= 1
icood(0: input coords. 1: auto).......= 1
localx(0:global, 1:local) ............= 0
nprint ...............................= 0
nebc ................................= 0
nnbc ................................= 1
nconv ................................= 0
nconst ...............................= 0
no of equations ......................= 3
no. of eLements in mesh...............= 2
no of nodes in the mesh................= 3
no of deg. of freedom per node.....= 1
nhbw(half band width).................= 2
matsym(0,2:full,1:comp.F,3:nons,4:sym)= 3

specified essential.10000E+01
ax0,ax1,ax2: boundary conditions:
.00000E+00 .00000E+00
1
bx0,bx1,bx2: .00000E+00 .00000E+00 .00000E+00
values of specified
cx0,cx1,cx2: essential boundary
-.10000E+01 conditions:
.00000E+00 .00000E+00
.00000E+00
fx0,fx1,fx2: .00000E+00 .00000E+00 -.10000E+01
specified nonzero natural
Tcoeff,Tchange, boundary conditions:
c0: .00000E+00 .00000E+00. 10000E+01
c0 3 : .00000E+00
values of specified natural boundary conditions:
.10000E+01
FEM mesh follow:
.00000 .50000 1.00000
1 1 2
2 2 3
solution of primary variables:
1 .00000E+00
2 .60751E+00
3.11392E+01
solution of external forces:
1 -.12552E+01
2 .00000E+00
3 .10000E+01
Application Ex.6.2.2
Solve the following differential equation with two finite elements   1 u   0

d 2u  du 
 2  u  x2  0 0  x  1, u (0)  0,    (u  u  ) 0
dx  dx  x 1
Application Ex.6.2.3
For no heat generation in the body f = 0, conduction coefficient k = 25 W/m2-
oC, the heat flux at r = 0 Q0 = -150 W/m2, and T = 50oC at r = 200, find the
temperatures at 10, 20, 40, 80, 140, and 200m. Use linear and quadratic
elements
1   T 
  rk  f
r r  r 
Application Ex.6.2.4
Find the displacements and the reactions of the following composite structure
that is axially loaded as shown below. Given a = 20 in and P = 50 kips
Rigid bar

1 in.
a

P
12 in

P
Steel with 1.5
in diameter Aluminum
and E = 30M with 1.0 in
psi diameter and E
= 10M psi
Application Ex.6.2.5
First determine the critical time step from the eigenvalue analysis of the
following differential equation with one finite element and the solve it with 
= 0 and t = 0.7 and 0.5
u  2 u x2 u
 1 0  x  1, u ( x,0)  , u (0, t )  0, (1, t )  0
t x 2 10 x
Application Ex.6.2.6
Solve the following cantilever beam problem with one finite element. The
bending rigidity EI = 105 lbf-in2, L = 12 inch, and P = 100 lbf
P

L
Application Ex.6.2.7
Solve the following differential equation with one finite element. Use  = 0.5, 
= 0.25, and t = 0.05
 2u  4u x2 u
 0 0  x  1, u ( x,0)  , u ( x,0)  0, u (0, t )  0, (0, t )  0
t 2 x 4 10 x
Application Ex.6.2.8
Find the eigenvalues and the associated mode shapes of the equation in
Example 6.2-7 with three finite elements. Plot the mode shapes
Application Ex.6.2.9
Solve the following problem with two elements. Use a = 8 inch, L = 12 inch, k
= 100 lb/ft2, EI = 106 lbf-in2 and P = 150 lb
P
a

L
Application Ex.6.2.10
Two connected bars are fixed at both ends. When only the first bar is subjected to
a force P and the temperature change T, find the displacement at the joint of the
bars and the stresses in the bars. Use a = b = c = 4 inch, P = 100 lb, T = 50oC,
1 = 0.001 in/in-oC, E1 = 106 psi, E2 = 105 psi, A1 = 1 in2, and A2 = 1/4 in2

a b c

P
member 1 member 2
Application Ex.6.2.11
In the Example 6.2-10 how much force P must be exerted in order not to
move the point where P is applied?
Application Ex.6.1.12
A uniformly distributed load f(x) = 200 kN/m is acting on a 500 mm rigid bar at
temperature 85oC which sits on three members shown below. The member 1
and 3 are made of steel rod with 40 mm diameter and have the material
properties Est = 200 GPa and st = 12 x 10-6 /oC, while the member 2 is
made of aluminum rod with 60 mm diameter and has Eal = 70 Gpa and al =
23 x 10-6 /oC. When no load was applied, the temperature was 25oC. Find
the forces acting on the members. The length of members is h = 250 mm.
f(x)

member 1 member 2 member 3


h
Application Ex.6.1.13
A beam-bar structure shown below is subjected to the following loadings. Find
the reaction forces and moments at supports and determine the internal
loadings at point G. Given are a = 3 ft, b = 2 ft, c = 5 ft, d = 3 ft, f0 = 250 lbf/ft,
and P = 1500 lb. The bars have 1 inch diameters and E = 106 psi and the beam
has E = 3 x 106 psi and Iyy = 1/24 in4.

P
d

f0

a b c
Application Ex.6.2.14
Determine the reaction forces at the support A and the internal loadings at point
C. Given are P = 300 lbf/ft, a = 4 ft, and b = 6 ft
P

B
A C

a b
ANSYS
Brief Introduction To Ansys
ANSYS (V11.0) SCREEN
Ex.6.3.2.1 [Ceqns]
Find the displacements and the reactions of the following composite structure
that is axially loaded as shown below. Given a = 20 in and P = 50 kips
Rigid bar

1 in.
a

P
16 in

P
Steel with 1.5
in diameter Aluminum
and E = 30M with 1.0 in
psi diameter and E
= 10M psi
Ex.6.3.2-2 [MBC]
Find the displacements and the reactions of the following composite structure
that is axially loaded as shown below. Given a = 20 in, b = 8 in, c = 4 in, k =
1010 lb/in, and P = 100 kips
a b c

Spring
P constant k

Aluminum
with 4.0 in and Steel with 2 in
2 in diameters diameter and E
and E = 10M = 30M psi
psi
Ex.6.3.2-3 [Distributed Load]
Find the displacements and the reactions of the following beam that is loaded as
shown below. Given a = 4 in, b = 6 in, k = 104 lb-in, P = 1000 lbf/in, E = 106 psi, and
the cross-section of h = 2 in and w = 3/2 in

a b
Spring
constant k

EI
Ex.6.3.2-4 [Truss]
Find the displacements and the reactions of the following truss structure that is
loaded as shown below. Given a = 8 in, b = 10 in, Px = -100 kips, and Py = 50 kips.
All members are made of Aluminum bar with E = 10 x 106 psi and cross-sectional
area of 2 in2. Py

b
Px

a
Ex.6.3.2-6 [pipe flow with friction]
Ex.6.3.2-7 [pipe flow with head loss]
Ex.6.3.2-9 [Transient Analysis]
Consider the one-dimensional heat transfer problem with fixed temperature at
one end and insulated at the other
T  2T
 in 0 < x < 1
t x 2
T
with boundary conditions T(0,t) = 0 and (1, t )  0 and initial condition T(x,0) = 1
x
Ex.6.3.2-10 [Buckling]
Consider the following buckling problem, where the beam is fixed in y-direction
while compressed in x-direction. Determine the critical load. The beam is 200 in.
long and has cross sectional area and height of 0.25 in2 and 0.5 in respectively.
Material properties is E = 30 x 106 psi and the compressive load is 1 lb. Use 10
BEAM3 elements x

4 y 2 y
EI 4  P 2  0
x x

y
Modal Analysis
Harmonic Analysis
Spectrum Analysis
Ex. 6.3.2-11 (Modal Analysis)
Determine the natural frequencies of the mass-spring-damper sytem below
and the forced vibration response. Two masses of 0.5 kg are connected by
spring-dampers that have k = 200 N/m and c = 0.1 kg/s. The forcing
function has magnitude F1 = 200 N. For a range of frequency, perform the
harmonic analysis.
Harmonic Analysis
Spectrum Analysis
Ex. 6.3.2-12
A simply supported beam of length l, mass per unit length m, and section
properties shown in Problem Specifications is subjected to a vertical motion
of both supports. The motion is defined n terms of a seismic displacement
response spectrum. Determine the fundamental displacement 6 and the
corresponding maximum bending stress. E = 30 x 106 psi, m = 0.2 lbm/in, I =
1000/3 in4, A = 273.9726 in2, l = 240 in, and h = 14 in.
Whirling
Ex. 6.3.2-14 [Whirling]
On a 2 in diameter shaft two disks, W1 = 80 lbf and W2 = 120 lbf, are
attached at the distances a = 30 in, b = 40 in, and c = 20 in. The shaft can be
assumed simply supported at both ends. Determine the critical speeds of the
shaft system. Compare the results with theoretical results. E = 30 x 106 psi.
For your information, the equation for the critical speed for a shaft on two
supports is given.
W2
W1

a b c

You might also like