You are on page 1of 38

INTRODUCTION

OBE requirements and Open-Ended Lab


Performance Criteria Matrix for
ECS555: Numerical Analysis & Finite Element Method
(Course that contain Theory and Laboratory Activities) : OVERALL
RUBRICS

Domain PO Weak Below Average Satisfactory Good Excellent


(E, F, D) (D+, C-) (C, C+) (B-, B, B+) (A-, A, A+)

Able to
Able to apply,
illustrate, Able to Able to solve,
develop, Able to evaluate
outline, identify describe and calculate and
synthesize and problem, construct
and produce basic analyse
PO2 demonstrate concept for engineering and
adopt the computer program
numerical and complete the
some of the some of the mathematical
methods in given problems.
engineering given problems. problems.
finding solutions.
problems.
COGNITIVE Able to Able to adapt a
Able to execute
recognize and Able to given design
and complete
demonstrate the understand the Able to solve concept and
with confidence
various various and analyse perform various
various technical
PO5 techniques of techniques of engineering and
requirements of
technical
numerical the numerical mathematical requirements of
the different civil
analysis and analysis and problems the different civil
engineering
FEM problems FEM engineering
disciplines
only disciplines
Able to analyse Able to
Able to
numerical or synthesize
recognize and Able to build
Finite element engineering
Able to apply the numerical or Finite
problem using problems using
PSYCHOMOTOR PO4 recognize the software
computer the computer
element model,
problem programme run the analysis
software under programme
under constant and evaluate data.
guided without
supervision.
supervision. supervision.
Degree of Open-Ended Lab (OEL)

DEGREE
WAYS & LAB
LEVEL PREAMBLE PROBLEM ANSWERS OF OPEN-
MEANS ACTIVITIES
ENDED

O Given Given Given Given Traditional 0%


Partially
1 Given Given Given Open 33%
open
Partially
2 Given Given Open Open 66%
open
Fully
3 Given Open Open Open 100%
open
GRADING SYSTEM (EMBEDDED LAB)

Coursework For Lab Component (CO2-PO4)

Lab Test* : 15%


Project : 10%
* may include graded assignments
ENGINEERING LAB ACTIVITIES
WEEK TOPIC EA Level Degree of
Open-
Ended
1 Briefing on Lab Syllabus, OBE -
Requirements, Open-Ended Lab.
Introduction to Numerical Analysis software
TOPIC 1: Matrices and Equations, solving
1
using Excel Commands

2 Determination of Roots of Equations using 2


Closed Methods, including graphical
plots
3 TOPIC 2: Numerical Solution of 2
Simultaneous Equations using Excel
Commands and Solver
4 TOPIC 3: Optimisation using Excel solver 2
5 /contd. 3
Curve Fitting (Regression)
6 TOPIC 4: Integration using Graph Plots 3
TOPIC 5: ODE Euler and Modified Euler
Method (Formulation and Tabulation of
Process)
7 Introduction to Finite Element Analysis (FEA) 1
Software.
Modelling: Idealisation and assignment of
attributes: material type, element types,
loading and support.

8 Application of line elements : 2-D bar and 2


beam elements for truss and framework
systems)

9 TEST -
10 Practical applications of 2-D line elements for 3
beams and frame systems

11 FEA using 2-D Plane stress elements 2

12 FEA PROJECT 3

13 FEA PROJECT (Continue) 3

14 FEA PROJECT PRESENTATION -


Introduction to Numerical Analysis
software using Excel
Check your EXCEL is installed with
Analysis ToolPak / Solver
CHECK THAT YOU
SHOULD HAVE THIS
SOLVER IN YOUR
EXCEL PROGRAMME
TOPIC 1

DETERMINATION OF
ROOTS OF EQUATION
USING EXCEL
PROGRAMME
1) Using graphical method
Need to plot graph of x (ie. x axis data)
and f(x) (~ y axis data)
From plot, determine the root (at x) from
which f(x) equals zero
4000.0000

3500.0000 7.0
6.0
3000.0000 5.0
4.0
2500.0000 3.0
2.0
2000.0000 1.0
0.0 f(x)
f(x)
1500.0000
-1.0 0.5 0.75 1 1.25 1.5 1.75
-2.0
-3.0
1000.0000
-4.0
-5.0
500.0000 -6.0
-7.0
0.0000
0 1 2 3 4 5
-500.0000 ENLARGE SCALE TO CHECK
POINT OF INTERSECTION
Example: Find the root of f(x) = 2x5 - 3x2 - 5

At A8, insert :
= A7 + 0.5
Copy the cell formula
and paste to B9: B16

Root is really close to


f(x) = 0

The graph can be plotted using Insert menu and selecting Scatter Charts
The root is somewhere between 0 and 2.
Enlarge the plot to see more details.
7.0
Click here
6.0 f(x)
to open 5.0
the panel
4.0
3.0 Minor unit
2.0
1.0
0.0
-1.0 0.5 0.75 1 1.25 1.5 1.75
-2.0
-3.0
-4.0 Major unit
-5.0 between 0.75
-6.0
to 1.0 = 0.25
-7.0

1) Click at the numbers on the


respective axis to see this panel
2) Reduce the minimum and maximum
values, and insert the major and
minor values accordingly;
e.g. Minimum : 0.5
Maximum : 1.75 Panel to edit
Major unit : 0.25 (= step size) data input
Minor unit : 0.1
EXERCISE

Problem 5.3(a):
Determine the real root of

f(x) = - 25 + 82x 90x2 + 44x3 8x4 + 0.7x5


2) Using Closed or Bracketing
Method : Bisection Method
( ) Guess Xl and Xu
>0 <0
Xl ------- Xu Determine Xr = (Xl+Xu)/2

Determine f(Xl)*f(Xr)
(Substitute Xl and Xr into the function,i.e. equation)

> 0, Xl = Xr < 0, Xu = Xr
& Ea > Es Check f(Xl)* f(Xr)
& Ea < Es
USING IF FUNCTION
This is a concept of branching in a
programming language (if-then-else)
It require 3 arguments:
1 logical expression,
2 numerical expressions
If logical function is true, the first numerical
expression is evaluated,
If false, the second numerical expression is
evaluated.
Example
Say, cell B5 contains a formula
=IF(C1>100,50,C1/2)

That is: if value in C1 exceeds 100, the


value 50 will appear in cell B5.
Otherwise, the quantity C1/2 will appear
in the cell.
It can also use labels (or strings) for the
last two operands:
=IF(C1>100, Too Big, OK)
NESTED IF FUNCTIONS
The function can be nested (one within another).
Nesting can be up to 8 deep (i.e. up to 7 IF
functions can appear as arguments in 1 IF
function. NESTED IF FUNCTION

=IF(A3<0, Ice,IF(A3<100, Water, Steam))


i.e. if temperature <0, identified as Ice
=0<100oC, identified as Water
> =100oC, identified as Steam
BISECTION METHOD USING EXCEL

Using IF functions
1. To check when f(Xl)*(f(Xr) < 0 or >0
2. To decide next iteration value for Xl = Xr
or Xu = Xr
3. To decide if Ea > Es (continue) OR
Ea < = Es (stop)
4. To state iteration number if the process has
to be repeated according to requirement in
3. above
1) CREATE A TABLE:
Insert all the headings for the Table
2) Define initial guesses of lower and upper roots, xl and xu, respectively
(e.g. at cells C6 and C7, respectively)
3) Define the stopping criterion Es (%)

4) For cell B10: insert = C6, i.e. it will always consider any changes of Xl
directly. Similarly in cell C10, insert = C7 for Xu
5) For respective columns of the table, insert the appropriate commands:
Cell D10 = (B10+C10)/2
Cell E10 = 2*B10^5 3*B10^2 5
Cell F10 = 2*D10^5 3*D10^2 - 5
Contd/-
Cell G10: = E10* F10
Cell H10: To check paired f(Xl)* f(Xr) less or greater than 0
=IF(G10<0, Xu = Xr, Xl = Xr)
OR =IF(G10<0, Xu = Xr, IF(G10>0, Xl = Xr))

NESTED IF FUNCTION
Cell I10 : Determine Ea = {[Xr new Xr old] / Xr new} x 100
= (ABS(D11-D10)) / D11* 100

Cell J10 : Determine if Ea is less than Es; stop iteration. Otherwise, continue.
= IF(I10>$H$6,Continue,Stop)
where Cell H6 contains value of Es

6) Copy cells D10:J10 and paste to D11:J13


7) Cells B11, C11: This is to check what are the new values of Xl and Xu,
respectively.
Cell B11: =IF(G10>0,D10, B10)
Cell C11: =IF(G10<0,D10, C10)
8) Cell A11: To include iteration number,
= IF(I11>$H$6, A10+1,A10+1)
9) Copy cells A11:C11 and paste to A12:C13
EXERCISE

Problem 5.3 (b) :

Use Bi-section method to


determine the root, s = 10%,
and initial guesses as xl= 0.5,
xu = 1.0
TOPIC 2

SOLVING SIMULTANEOUS
LINEAR EQUATIONS
1. Using Matrix Functions

Suppose we have n simultaneous linear equations in n unknowns :


a11 x1 + a12 x2 + . a1n xn = b1
a21 x1 + a22 x2 + . a2n xn = b2

an1 x1 + an2 x2 + .ann xn = bn

OR in general, aij where i represents the equation number (i.e. row number)
and j represents the number of unknown quantity (i.e. column number)
The system of the equations can be presented as a matrix, which is a two-
dimensional array of numbers:

a11 a12 .... a1n x1 b1


a 21 a 22 .... a 2n x2 b2
Matrix A Vector X Vector B
.... .... .... .... .. ..
a n1 a n2 .... a nn xn bn
SOME MATRIX FUNCTIONS
IN EXCEL
Matrix algebra applications include solving
systems of simultaneous linear algebraic
equations in several variables and rotation
of coordinate systems.
Limited in EXCEL (unlike MATLAB,
MATHCAD or MATHEMATICA)
MINVERSE
Gives the inverse matrix for the matrix stored in
an array (i.e. a cell range, e.g. A1:C3)
e.g. {1,2,3; 4,5,6;7,8,9}
MINVERSE(array)
MMULT
Gives the matrix product of two arrays; result is
an array with the same number of rows as
array1 and the same number of columns as
array 2
MMULT(array1,array2)
=MINVERSE(B16:C17) Highlight the
range of cells to
locate the
solution, type the
command at the
formula bar **

**
2. Using SOLVER ~ available in Data menu
This Excel feature can be used to solve both
linear or nonlinear equations.
Suppose the equations are presented as :
a11 x1 + a12 x2 + . a1n xn = b1 f1 (x1, x2, xn) = 0
a21 x1 + a22 x2 + . a2n xn = b2 f2 (x1, x2, xn) = 0

an1 x1 + an2 x2 + .ann xn = b3 f3 (x1, x2, xn) = 0

To do this, we force the function: y = f12 + f22 +.+ fn2 to zero.


Here, needs to define a Target function consisting of squares of the
individual equations
Procedures:
1. Enter an initial guess for each independent
variable (x1, x2,xn) in a separate cell on
the worksheet. Easier to be equal to 1
2. Enter the equations for f1, f2,fn and y in
separate cells, expressed as Excel
formulas. Within the formulas, express the
unknowns x1, x2, xn containing the cell of
the initial guess.
3. Select Solver from the Data Drop Menu.
Guess each value = 1.0
4. In the Solver Parameters dialog box, enter:
i) the cell box no. containing the formula for y
(in this case, C16) in the Set Objective:
location
ii) Input 0 at the Value of:
iii) Input the cell range at By changing
Variable Cells: (eg. cells C8 to C10
$C$8:$C$10
5. Click Solve
6. Select Keep Solver Solution when the Solver
Results dialog box appears.
ANSWER
=B9 (($B$9/$B$8) * B8)

=E18/D18

=(E17-(D17*E20))/C17

=(E16-(D16*E20)-(C16*E21))/B16

You might also like