You are on page 1of 15

FE Analysis with Excel-VBA

An Introduction to FE Analysis with Excel-VBA

Keiji YANASE
Department of Mechanical Engineering, Fukuoka University, Fukuoka, Japan
Institute of Materials Science and Technology, Fukuoka University, Fukuoka, Japan
Email: kyanase@fukuoka-u.ac.jp; Tel.:+81-092-871-6631

Abstract: Aimed primarily for educational use, an effective platform for 2-dimensional FE stress analysis
was developed by making use of the Excel-VBA program. With the undergraduate students as the target
group, the educational emphasis was placed on the practical application of linear elasticity and the proper
use of the FE method. As a part of the project, the students were requested to solve a stress concentration
problem by conducting mesh convergence study using Excel-VBA functionality. They generated the mesh
manually by drawing the figures on the grid-paper. This time consuming experience is usually sufficiently
memorable to provide the student with the sense of the required mesh size for proper FE analysis. In
addition, the use of tabular data in Excel allows the students to easily conduct the FE analysis. Further, the
reports by students clearly manifest that the reliability of the FE method is highly dependent on the
experience and the theoretical knowledge of the engineer. In sum, Excel-VBA is a highly efficient tool for
introducing the FE method and can motivate the students to study this subject further.

Keywords: Finite element method, Excel-VBA, 2D stress analysis, stress concentration, mesh convergence.

Submitted to Computer Applications in Engineering Education

1. Introduction

Finite element (FE) method is a powerful and versatile tool, allowing engineers to solve a wide variety
of problems they encounter in practice. The rapid development of commercial FE software and the
availability of fast processors have enabled engineers to carry out complex FE analyses on a standard
desktop or laptop computer. Due to these advantages, subjects that involve FE method have been
incorporated into the mechanical engineering curriculum in many universities. Despite the apparent
consensus on the inclusion of FE in a mechanical engineering course, the development of FE teaching
methods remains a challenge for engineering educators. Though FE methods have been in use for almost
half a century and have been discussed in countless research papers, their teaching has not received
sufficient attention [1].
When FE method was first appeared in the 1960s, it was introduced into the engineering course at the
graduate level. Because of the complexity of the FE method and complex pre- and post-processing in the
FEM programs, only those educated at the masters or doctoral level typically performed FE analyses. As
the method and computer technology matured over the decades, FE method is now being introduced even
at the undergraduate level in engineering [2]. Concerning the undergraduate students, most courses
combine FE theory in classroom lectures with computer laboratory sessions using the commercial software.
Since FE solutions are numerically based, some educators emphasize the behavior of FE solutions and

1
FE Analysis with Excel-VBA

their accuracy/quality [1]. Some have added relevant physical laboratory experiments to verify the results
obtained from FE analysis (cf. [3]). It is also common to use mathematical language and spreadsheet tools
in the teaching of FE methods. For instance, Teh and Morgan [4] used Excel spreadsheets to demonstrate
FE theory and the process of obtaining solutions.
It is no doubt that use of advanced modeling software is appropriate for actual application. However,
it is not appropriate for a very introductory educational context on FE analysis. After his implementations
of different educational approaches, the author recognized that a use of Excel-VBA is an effective means
to introduce FE method for undergraduate students. VBA, or Visual Basics for Applications, is the simple
programming language that can be used within Excel to develop macros and complex programs. For
instance, even if a student does not know anything about Excel, he/she can perform FE analysis by running
macros. Further, Excel is an ideal platform for providing visualization for data processing, implementation
of boundary conditions and influence of the mesh pattern on solution convergence [5][6]. This paper
presents a part of a course module aimed at educating the junior students on the fundamentals of the FE
method and its practical implementation. First, the outline of an undergraduate course is introduced. Then,
after presenting the preliminary assignments related to FE method, FE analysis with Excel-VBA is
presented. The educational emphasis is put on the practical application of linear elasticity and the proper
use of the FE method. In an assignment, the students were instructed to solve a stress concentration
problem by conducting mesh convergence study with Excel-VBA. The manual mesh generations were
conducted by drawing the figures on the grid-papers. This memorable experience allows the students to
appreciate the importance of correct mesh size selection. It is further noted that, owing to the use of Excel
spreadsheets, the students can easily conduct the FE analysis. Further, the reports by students clearly
manifest that the reliability of the FE method is highly dependent on the experience and the theoretical
knowledge of the engineer. In sum, Excel-VBA is an effective tool for introducing the FE method and can
motivate the students to study this subject further.

2. Outline of Undergraduate Course

In essence, elasticity is an elegant and fascinating subject pertaining to the determination of the stress,
strain and displacement in an elastic solid under the influence of external forces. Mechanical engineers
use elasticity in analysis and design of machine elements [7]. Correspondingly, at the Department of
Mechanical Engineering, Fukuoka University, junior students can take a selective undergraduate course
“Solid Mechanics II (linear elasticity)” (90 minutes × 15 lectures). In the first series of 12 lectures, these
students learn the following fundamentals of linear elasticity:

 Displacement-strain relationship
 Stress and equilibrium equation
 Constitutive equation and Navier’s equation
 Energy principles
 Plain stress and plain strain problems

Upon completion of the lectures on those fundamentals, the FE method is introduced and discussed
in the final three lectures. To introduce the FE method by taking advantage of fundamental knowledge on

2
FE Analysis with Excel-VBA

linear elasticity the students gained in those 12 lectures, the mathematical derivations and the related
assignments are carefully provided.

3. Principle of Minimum Potential Energy

The principle of minimum potential energy plays an important role to solve the elastostatic problems
with FE method. Therefore, it is briefly reviewed for completeness in this section. The potential energy,
Π , is defined as:

Π = U −W (1)

where U is the strain energy stored in a system and W is the external virtual work. The minimization
of potential energy with respect to the displacement, u , render the solution, thus the following equation
must be satisfied:

∂Π (u )
= 0 (2)
∂u

For instance, concerning Figure 1, the potential energy is rendered as:

1 2
Π (u ) = ku − Fu (3)
2

where k is the spring constant, F is the applied external force and u is the displacement or the
deformation of spring. The principle of minimum potential energy leads to:

∂Π (u )
= 0 = ku − F → F = ku (4)
∂u

Accordingly, Hooke’s law or the force equilibrium can be recovered.

Spring constant = k

F, u

Figure 1. 1D spring problem.

The conventional FE method is based on the displacement formulation. In other words, one needs to
construct and solve a system equation by considering the nodal displacements. Further, in the FE method,
one needs to be familiar with the concept of node and element, in conjunction with the matrix equation.

Example Problem 1
A problem (Figure 2) was carefully prepared to ensure that the students understand the following:

3
FE Analysis with Excel-VBA

 Calculation of bar deformations based on nodal displacements


 Use of 1D constitutive equation
 Use of the principle of minimum potential energy
 Construction of system equation
 Set-up for boundary condition (i.e., treatment of prescribed force and displacement)
 Process of solving the system equation

3
y

x
(1) L
E, A (3) E, A

Prescribed force Element number


(2)
P 2
1 E, A Node number

Figure 2. 2D truss problem.

By using the principle of minimum potential energy in conjunction with the linear superposition, the
system equation can be expressed as:

 1.3536 0.3536 −1 0 −0.3536 −0.3536   u1x = ?   F1(1)


x + F1 x
(2)
  F1x = − P 
 0.3536    (1) (2)   F =? 
 0.3536 0 0 −0.3536 −0.3536   u1 y = 0   F1 y + F1 y   1y 
EA  −1 0 1 0 0 0   u2 x = 0   F (2) (3) 
x + F2 x
 F2 x = ? 
 =   = 2(2)    (5)
L  0 0 0 1 0 −1  u2 y = 0   F2 y + F2 y 
(3)
 F2 y = ? 
 −0.3536 −0.3536 0 0 0.3536 0.3536   u3 x = 0   F (1) + F (3)   F =? 
    3(1)
x 3x
  3x 
 −0.3536 −0.3536 0 −1 0.3536 1.3536   u3 y = ?   3 y +   F3 y = P 
(3)
F F3y 

where E is Young’s modulus, A is the cross section and L is the length of bar. In Eq. (5), the equilibrium
of nodal force (e.g., F1(1)
x + F1 x
(2)
F1x ) is emphasized. Based on Eq. (5), the unknown nodal displacements
=
should first be obtained as:
PL PL
u1x =
− 0.5858 ; u3 y =
0.5858 (6)
EA EA

Next, by substituting Eq. (6) into Eq. (5), the nodal forces are rendered as:

4
FE Analysis with Excel-VBA

 F1x   −P 
F   −0.4142 P 
 1y   
 F2 x   0.5858 P 
  =   (7)
 F2 y   −0.5858 P 
 F3 x   0.4142 P 
   
 F3 y   P 

Based on Eq. (7), the force equilibrium is maintained as:


F1x + F2=
x + F3 x 0 ; F1 y + F2=
y + F3 y 0 (8)

Verifying the plausibility of solution is very important to prevent a fatal problem in practical engineering
and the educators should advocate this as a good practice. In this problem, through the manipulation of
matrix equations, it is expected that students learn the essence of the FE method.

Example Problem 2
After gaining familiarity with the matrix equation (cf. Eq. (5)), 2-dimensional FE method was
introduced with three-node triangular element (Figure 3). The three-node triangular element is one of the
simplest, yet the most versatile, finite elements in two dimensions. One can easily represent almost any
geometry with triangular elements and, without too much trouble, construct meshes that comprise of a
greater number of elements in an area of high gradients (e.g., stress concentration). A disadvantage of the
three-node triangle is that it is a relatively inaccurate element, and is thus not recommended for
production analysis with FE software. However, the simplicity of the element makes it an ideal teaching
vehicle [8]. Correspondingly, a problem (Figure 4) was carefully prepared to allow the students to
understand the following:

 Calculation of displacement-strain relationship (i.e., B matrix)


 Use of 2D constitutive equation (i.e., D matrix)
 Use of the principle of minimum potential energy
 Calculation of element stiffness matrix
 Construction of system equation with consideration for connectivity of nodes
 Set-up for boundary condition (i.e., treatment of prescribed force and displacement)
 Process of solving a system equation

( x3( e ) , y3( e ) )
3

2
( x2( e ) , y2( e ) )

1
( x , y1( e ) )
(e)
1

Figure 3. Three-node triangular element (node number is defined in the counter-clockwise direction).
5
FE Analysis with Excel-VBA

Prescribed displacement Prescribed force


δ δ P P
Node number Node number
4 5 4 5

Element number Element number


(2) (2)

4L

4L
y (1) (3) y (1) (3)

1 x 2 3 1 x 2 3

2L 2L 2L 2L

(a) Problem with prescribed displacement (b) Problem with prescribed force

Figure 4. 2D plain stress problems with three-node triangle elements.

In Figure 4(a), the displacement is prescribed at the node 4 and 5, and the students need to calculate the
strain for the respective element. Accordingly, in this problem, the use of shape function, N i , to calculate
the displacement-strain relationship plays an important role, and the understanding of shape function and
B matrix is required. Here, the displacement-strain relationship in an element is rendered as:

(e)
  u1x 
(e)
 ∂N1 ∂N 2 ∂N 3
 0 0 0  u 
 ∂x ∂x ∂x   1y 
(e)
ε xx 
   ∂N1 ∂N 2 ∂N 3   u2 x 
ε yy  =
 0 0 0  u  or ε ( e ) B ( e ) u ( e ) (9)
 ∂y ∂y ∂y   2y    
γ xy 
   ∂N1 ∂N1 ∂N 2 ∂N 2 ∂N 3 ∂N 3   u3 x 
   
 ∂y ∂x ∂y ∂x ∂y ∂x   u3 y 
where [8]:

N=
(e)
1 ( x, y )
1
2 A( e )
{ x2(e) y3(e) − x3(e) y2(e) + ( y2(e) − y3(e) ) x + ( x3(e) − x2(e) ) y }
N=
(e)
2 ( x, y )
1
2 A( e )
{ x3(e) y1(e) − x1(e) y3(e) + ( y3(e) − y1(e) ) x + ( x1(e) − x3(e) ) y } (10)

N=
(e)
3 ( x, y )
1
2 A( e )
{ x1(e) y2(e) − x2(e) y1(e) + ( y1(e) − y2(e) ) x + ( x2(e) − x1(e) ) y }
A(=
e) 1
2
{ ( x2( e ) y3( e ) − x3( e ) y2( e ) ) − ( x1( e ) y3( e ) − x3( e ) y1( e ) ) − ( x1( e ) y2( e ) − x2( e ) y1( e ) )} (11)

By using Eq. (9), the strains are calculated as:

(1) (2) (3)


ε xx  0  ε xx  0  ε xx  0
  δ     δ     δ  
=ε yy  = 1 ; ε yy  = 1 ; ε yy  1 (12)
4L   4L   4L  
γ xy  0  γ xy  0  γ xy  0 
     

By considering the engineering strain for ε yy , the plausibility of Eq. (12) can be easily verified by the
6
FE Analysis with Excel-VBA

students, using the following expression:


Elongation δ
=ε yy = (13)
Initial length 4L

In Figure 4(b), by considering the prescribed force, the unknown nodal forces need to be calculated.
By using B- and D-matrix, the element stiffness matrix, k ( e ) , is rendered as:

k (e) = B ( e )T D ( e ) B ( e ) t ( e ) A( e ) (14)
   

where, t ( e ) is the thickness and A( e ) is the area of element (Eq. (11)). For the plain stress condition, the
stress-strain relationship is rendered as:

(e) (e)
σ xx  1 ν  ε xx 
(e)
0
  E    
=σ yy  = ν 1 0  ε yy  or σ ( e ) D ( e )ε ( e ) (15)
1 −ν 2    
   0 0 (1 −ν ) / 2  γ xy 
σ xy 

It is noted that a derivation for Eq. (14) was discussed in a lecture by using the principle of minimum
potential energy. After calculating the element stiffness matrices and their assemblage with consideration
for connectivity of nodes, the system equation is rendered as:

 1.125 0.25 −1 −0.25 0 0 −0.1250 0  0 u1(1)x 0   F1(1)


x

 0.25 −0.5 −0.25 −0.25  u (1)  
F (1) 
 0.75 0 0 0  0 1y 0   1y 
 −1 0 2.25 0 −1 0 −0.125 0.25 −0.125 −0.25  u2 x = u2 x = u2 x 
(1) (2) (3)  F2 x + F2 x + F2 x 
(1) (2) (3)

    (1) 
 −0.25 −0.5 0 1.5 0.25 −0.5 0.25 −0.25 −0.25 −0.25  u2(1)y = u2(2)y = u2(3)y   F2 y + F2 y + F2 y 
(2) (3)

 0 −1 0.25 1.125 −0.25 −0.125   (3)   (3) 


Et 
0 0 0 0

u3 x
 = 
F3 x
 (16)
 0 0 0 −0.5 −0.25 0.75 0 0 0.25 −0.25   (3)
u3 y   (3)
F3 y 
 −0.125 −0.25 −0.125    
 0.25 0 0 0.6875 −0.125 −0.4375 0.125   u4(1)x = u4(2)x   F 4
(1)
x + F4
(2)
x 
 0 −0.25 0.25 −0.25 0 0 −0.125 0.625 −0.125 −0.125  u4 y = u4 y
(1) (2)   F4 y + F4 y
(1) (2) 
     
 0 0 −0.125 −0.25 −0.125 0.25 −0.4375 −0.125 0.6875 0.125   u5 x = u5 x
(2) (3)
  F5 x + F5 x
(2) (3)

 0
 0 −0.25 −0.25 0 −0.25 0.125 −0.125 0.125 0.625   u5(2)y = u5(3)y   F (2) + F (3) 
 5 y 5 y 

By imposing the boundary conditions, Eq. (16) becomes:

 1.125 0.25 −1 −0.25 0 0 −0.1250 0 0 0   u1x = 0   F1x = ? 


 0.25  u = 0  F =?
 0.75 0 −0.5 0 0 −0.25 −0.25 0 0   1y   1y 
 −1 0 2.25 0 −1 0 −0.125 0.25 =
−0.125 −0.25   u2 x 0=  F2 x ? 
    
 −0.25 −0.5 0 1.5 0.25 −0.5 0.25 −0.25 −0.25 =
−0.25  u2 y 0=   F2 y ? 
 0 0 −1 0.25 1.125 −0.25 0 0 −0.125 0   u3 x 0=
=  F ?
Et    =  3x  (17)
 0 0 0 −0.5 −0.25 0.75 0 0 0.25 =
−0.25 
 3yu 0=  F3y ?
 −0.125 −0.25 −0.125 =   0=  
 0.25 0 0 0.6875 −0.125 −0.4375 0.125 u
  4x   F4 x ? 
 0 −0.25 0.25 −0.25 0 0 =
−0.125 0.625 −0.125 −0.125   u4 y ?=  F4 y P 
    
 0 0 −0.125 =
−0.25 −0.125 0.25 −0.4375 −0.125 0.6875 0.125   5x
u 0=  F5 x ? 
 0 −0.25 −0.25 −0.25 0.125 −0.125 0.125 = 
 u5 y ?=   
 0 0 0.625    F5 y P 

In the author’s opinion, the use of three elements is sufficient for understanding the solution process
and it is upper bound for conducting the manual calculation, as shown by Eq. (16). Since Eq. (16)
corresponds to Eq. (5), the students can sense a certain analogy and can solve the problem by taking
7
FE Analysis with Excel-VBA

advantage of familiarity with Eq. (5). The unknown displacements need to be calculated as follows:
P
u=
4y u=
5y 2.0 (18)
Et

By substituting Eq. (18) into Eq. (16), the nodal forces can be calculated as:

F1 y =
Et (−0.25u4 y ) =
− 0.5 P
F2 y =
Et (−0.25u4 y − 0.25u5 y ) =
−P (19)
F3 y =
Et (−0.25u5 y ) =
− 0.5 P

The plausibility of this solution can be verified via the following force equilibrium:

F1 y + F2 y + F3 y + 2 P =
0 (20)

Further, one can easily show that FE method can reproduce the following correlation for the respective
element:
Applied force P
σ (e) D(e) B(e)u (e)
= ↔ σ= = (21)
   
yy
Corss section 2 Lt

Eq. (21) can serve as a measure for ensuring that the students have a good grasp of fundamental FE
method and mechanics of materials. Through the discussion with the students, the author recognized that
a simple problem with simple geometry (cf. Figure 4) can suffice for conveying the fundamentals of the
FE method and demonstrating the applicability of linear elasticity. In teaching the FE method, the essence
of linear elasticity was incorporated as much as possible to emphasize the link between theory and practice.

8
FE Analysis with Excel-VBA

4. FE analysis with Excel-VBA

W = 200 mm

5 kN 10 kN 10 kN

22 19 16

(23) (22)

(24) (21)

21 18 15

(25) (20)

2W = 400 mm
(26) (19)

20
17 14

(17)
(18) (15)
11
(16)
10
(10) (14)

(9) 9
(8) (7) 13
5
4 (13)
(6)

3
Radius of hole (5) 8 (12)
a = 100 mm 2 (3)
(4) 6 (2)
(11)
(1) 7 12
1
o

Figure 5. An example of coarse quarter model for FE analysis (22 nodes and 26 elements).

After allowing the students to gain familiarity with the FE method through manual calculations, they
were given an FE analysis project, focusing on the solution process of the FE method. The machine and
structural components have various geometrical discontinuities (e.g., hole, keyway and groove) that
trigger the stress concentration and they can serve as the crack initiation sites. The crack initiation and
growth is a major concern for the reliability of the machine and its structural components (cf. [9-11]).
Therefore, understanding and identifying stress concentration sites is very important for engineers.
Correspondingly, in this project, the calculation of the stress concentration factor (SCF) of a finite plate
with a circular hole was assigned. Figure 5 shows a coarse quarter model (22 nodes and 26 elements) with
a hole of a radius a = 100 mm and a plate width W = 200 mm. The students utilized the quarter model for
efficient analysis, whereby different values of a / w were assigned to individual students, as this ensured
that each student needed to find the SCF specific to his/her assignment (Figure 6). Further, the students
were requested to use three different types of mesh pattern (coarse, intermediate and fine mesh) to know
the influence of mesh pattern on solution convergence.

9
FE Analysis with Excel-VBA

3
Howland [12][13]
2.9 Least square fit

2.8

Stress concentration factor, Kt


2.7
Kt = 3 - 3.0155(a/W) + 3.289(a/W)2 - 1.274(a/W)3
2.6

2.5

2.4

2.3

2.2

2.1

2
0 0.2 0.4 0.6 0.8 1
a/W
Figure 6. Relationship between Kt and a/W [12][13].

For this project, an effective platform for 2-dimensional FE stress analysis was developed by making
use of Excel-VBA program. The non-commercial Excel-VBA macro has been developed by the author and
it can be easily customized for the specific purposes. As shown in Figure 7, Excel is an ideal platform for
providing visualization for data processing, implementation of boundary conditions and influence of the
mesh pattern on solution convergence [5][6]. By using the Excel-VBA functionality, FE analysis can be
conducted as follows:

Step-1) Draw a figure on the grid-paper and define the nodal points and elements.
(i.e., manual mesh generation with hand drawing)

Step-2) Input the coordinates and set the boundary conditions for each nodal point (Figure 7(a)).

Step-3) Input three nodal points to construct the respective elements (Figure 7(a)).

Step-4) Push “Start Analysis” button (Excel macro) to execute FE analysis (Figure 7(a)).

Step-5) By checking the nodal solution, compute the SCF based on the maximum value of σ yy
displayed in the Excel output sheet (Figure 7(b)).

10
FE Analysis with Excel-VBA

(a) Excel manual input sheet

(b) Excel automatic output sheet

Figure 7. Excel sheets for FE stress analysis (cf. Figure 4).

In ordinary engineering problems, both strains and stresses tend to be continuous within a single
material. On the other hand, the solutions yielded by FE analysis result in discontinuities in both strains
and stresses between adjacent elements. Thus, direct calculation of these quantities would produce
unrealistic solutions. Accordingly, averaging of element strains and stresses, which are constant in the

11
FE Analysis with Excel-VBA

triangular elements, is performed at each node (resulting in a nodal solution). This nodal solution can
yield improved results at most points [14], and it is easy for the students to identify the location for the
maximum stress. As expected, the preparation of geometry data is the most time-consuming part for the
students. On the other hand, FE analysis can be very effectively executed and the computation time (CPU)
is usually a few seconds.
If a student input a wrong data in Excel, this would prompt a default error message. In such cases,
further calculation cannot be executed until the problem is resolved. Thus, to assist the students in
mitigating these issues, meaningful error messages were created with VBA that would correspond to the
issue that has caused the problem (Figure 8).

Figure 8. Examples of specific and informative error messages.

30
Error of stress concentration factor, SCFerr (%)

20

10

-10

-20

-30

-40

-50

-60
Results by undergraduate students (a/W = 0.125 ~ 0.889)
Results by an instructor (a/W = 0.5)
-70
0 50 100 150 200 250
Number of elements
Figure 9. Results of the mesh convergence study.

Figure 9 shows the results of mesh convergence study. The error of SCF is defined as:

K tFEM − K t
=
SCFerr × 100 (%) (22)
Kt
where K tFEM is the solution obtained with FE analysis and K t is given in Figure 6. As shown, the results
clearly demonstrate that the reliability of the FE method is highly dependent on the experience and the
theoretical knowledge of the engineer (i.e., instructor v.s. students). Namely, better convergence and
accuracy of the instructor in Figure 9 is achieved by arranging more elements of appropriate shape near

12
FE Analysis with Excel-VBA

the edge of hole. The importance of experience in FE analysis is apparent and the effect of instructor’s
advice on mesh generation is highlighted in Figure 10. In particular, a significant improvement in “Student
A” performance can be recognized. Though the three-node triangular element is used, a good convergence
is achieved with a relatively small number of elements (approximately 150) for the stress concentration
problem. According to the author’s experience, it takes about 1.5 hour to generate 150 elements and input
the geometry data in Excel. New users tend to believe that any results that look good are probably right.
Therefore, a person eager to use newly acquired software skills and lacking a good grasp of fundamental
FE theory and mechanics of materials is the most dangerous user [15]. Correspondingly, the mesh
convergence study is essential to recognize the danger of FE analysis if it is conducted once with coarse
mesh (e.g., the stresses can be significantly underestimated, cf. Figure 9). Drawing some figures on the
grid-paper for mesh generation is rather bothersome; however, such a memorable experience can certainly
instill in the students the importance of mesh size in FE analysis.
Unfortunately, some students could not obtain accurate results with good convergence, as shown in
Figure 9. Inaccurate results reported by the students are due to the insufficient number of elements near
the edge of the hole, extensive use of highly distorted elements and improper arrangements of nodal points
(Figure 11). Though such problems never occur if one uses sophisticated commercial FE software, the
students can learn the essentials of the FE method by using a relatively crude Excel-VBA. Though some
students failed to attain the envisaged benefits of this project, it is still expected that each student learned
the essence of the FE method. Further, it is clear that the advanced topics, such as the employment of
higher-order element, the frame analysis and the analysis with stress contour plot (i.e., detection of hot
spot) can be taught with added effort by taking advantage of Excel-VBA functionality.

30
Error of stress concentration factor, SCFerr (%)

20

10

0
"Student B" after instructor′s advice

-10

"Student A" after instructor′s advice


-20

-30

-40 "Student A" before instructor′s advice

-50

-60

-70
0 50 100 150 200 250
Number of elements

Figure 10. Effect of instructor’s advice on mesh generation for FE analysis.

13
FE Analysis with Excel-VBA

Improper node

Elements are highly distorted Improper node

Figure 11. Typical errors made by students in FE mesh generation.

In practice, the commercial FE software are now all very appealing and they provide the good support
for teaching and training. However, concerning its introduction in the lecture, additional effort and time
must be devoted to teach the procedures in using the software. Compared to the commercial software,
Excel-VBA is rather crude but it is efficient tool to introduce the FE analysis because the tutorial can be
finished within 30 minutes and the tabular data format is quite straightforward for data processing. Of
course, the choice of teaching tool (commercial software and non-commercial software) depends on the
educational or practical intent of course instructor. For instance, when dealing with the analysis for
complex geometry, the presented Excel-VBA is not suitable because of the lack of a sophisticated mesh
generation tool for arbitrary geometry.

5. Summary

Despite the apparent consensus on the inclusion of FE in a mechanical engineering course, the
development of FE teaching methods remains a challenge for engineering educators. Correspondingly, by
considering the link between theory and practice, the fundamentals of the FE method were introduced to
the junior students at the Department of Mechanical Engineering, Fukuoka University. As an effective
platform for 2-dimensional FE stress analysis, Excel-VBA program was utilized. The findings confirmed
that Excel is an ideal platform for providing visualization for data processing and implementation of
boundary conditions. Still, the mesh convergence study, in conjunction with the manual mesh generation,
is essential for recognizing the importance of mesh size and fully appreciating the key properties of FE
analysis.

14
FE Analysis with Excel-VBA

References
[1] Kosasih P.B. Learning finite element methods by building applications, Int J Mech Eng Edu 2010; 38:
167-184.
[2] Zhunge Y. and Mills J.E. Teaching finite element modelling at the undergraduate level: a PBL
approach, Proceedings of Australian Association of Engineering Education 2009; 1-6.
[3] Yanase K. Education on strength of materials with simple experiment, Proceedings of the 4th Asian
Conference on Engineering Education 2014; 27-30.
[4] Teh K. and Morgan L. The application of Excel in teaching finite element analysis to final year
engineering students, Proceedings of the 2005 ASEE/A aeE 4th Global Colloquium on Engineering Education
2005; Paper 50.
[5] Yoshino M. and Amano K. Finite element analysis with Excel (in Japanese), Asakura Publishing Co., Ltd.
2006.
[6] Shirai Y. Introduction to finite element method with Excel and VBA (in Japanese), Souzo-Sya 2013.
[7] Sadd M.H. Elasticity (2nd edition), Academic Press 2009.
[8] Fish J. and Belytschko T. A first course in finite element, John Wiley & Sons, Ltd 2007.
[9] Yanase K. and Endo M. Analysis of the notch effect in fatigue, Journal of ASTM International 2012; 9(4):
1-13.
[10] Yanase K. Shojima K. and Ogata C. High-cycle fatigue threshold behaviors in notched plates, Int J
Damage Mech 2013; 22: 1006-1022.
[11] Shojima K. Weldle S. Okazaki S. Endo M. Eifler D. and Balle F. Notch effect on high cycle fatigue of
Ti-6Al-4V, Materials Science Forum 2013; 750: 232-235.
[12] Howland R.C.J. On the stresses in the neighbourhood of a circular hole in a strip under tension,
Philosophical Transactions of the Royal Society of London 1930; 229: 49-86.
[13] Murakami Y. Theory of Elasticity and stress concentration, Wiley, 2008.
[14] Zienkiewicz O.C. Taylor R.L. and Zhu J.Z. The finite element method: Its basis & fundamentals (6th edition),
Elsevier 2005.
[15] Ural A. A hands-on finite element modeling experience in a multidisciplinary project based freshman
course, Computer Application in Engineering Education 2010: 21(2); 294-299.

15

You might also like