Professional Documents
Culture Documents
M.tech Computationl Methods Numeical Methods
M.tech Computationl Methods Numeical Methods
Numerical Methods
Computational Methods
M. Tech. (Mechanical) All Branches
ME5011S SEM - I
Dept. of Mechanical Engineering
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Outline
Trapezoidal Rule,
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Engineers are required to draw conclusions @ a physical system from analysis of its
Mathematical Model.
DERIVATIVE.
INTEGRAL.
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Suppose, f (x) is a function of interest, and a is the point of interest at which the
derivative is desired,
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Suppose, f (x) is a function of interest, and defined over interval [a,b],
Unlike Explicit Integration, (i.e. based on formulae from Calculus), only the Values
of the function @ selected points are required.
Less Accurate, But FASTER..!!
e.g. Compute area of irregular piece of land,
Electrical charge of a capacitor,
Work done by moving a mass, etc.
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Magnetic Levitation :
Feedback
Control
Unit
Magnet
y is ball position.
u is current.
Gravitational Force mg
Optical
Sensor
mg
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Magnetic Levitation :
Feedback
Control
Unit
u(t) = u0
u
Magnet
h(y,u) = mg
y
Optical
Sensor
ME5011S SEM-I
Gravitational Force
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Magnetic Levitation :
Feedback
Control
Unit
Magnet
h(y,u) < mg
y
. Ball falls..!!
Optical
Sensor
h(y,u) > mg
mg
. Ball sticks to
electromagnet..!!
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
To make the ball levitate, a Control
Magnetic Levitation :
Magnet
current
u,
using
Feedback
Control System.
. , > 0.
Feedback Gain
y
Optical
Sensor
mg
to be estimated
NUMERICALLY!!!
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Introduction
Cost Estimation for Dam Construction.
Water Management :
y
Area can be calculated as :
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Numerical Differentiation
Let f (x) is a function of interest, having n continuous derivatives in the
neighbourhood of the point x = x0.
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
First Derivative
Suppose the data samples of the function f (x) are uniformly spaced. Let
h denote the Step-Size between successive values of independent
variable, x.
Taylor Series Expansion @ x = x0, and evaluate the results @ 2 points,
adjacent to x0 :
(I)
(II)
denotes the kth derivative of f (x) evaluated @ x = x0.
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
f (x)
x
x-1
ME5011S SEM-I
Computational Methods
x0
x1
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
f (x)
ME5011S SEM-I
Computational Methods
x
x-1
x0
x1
M. Tech. (Mech)
Numerical Methods
Uses only past and present data, and does not rely on further data samples
that may not be available in real time applications.
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
f (x)
Computational Methods
x-1
x0
x1
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
(III)
(IV)
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Extending the similar logic for Second Order Derivatives, by adding (I)
and (II) , cancelling
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Effects of Errors
2 parameters to the accuracy of numerical estimates of Derivatives :
1.Number of points, n.
2.Step size, h.
For the n point approximation of the kth derivative, the formula for
Truncation Error, (O) is of the order of :
ME5011S SEM-I
by
h!!
Computational Methods
M. Tech. (Mech)
Numerical Methods
Effects of Errors
BUT, Total Error = Truncation Error (O) + Round-Off Error (ER)
Suppose,
Ek : Total Error associated with approximating the kth derivative with the
n point formula :
: (O)
: (ER)
.!
.!!
Optimum size of h to
ME5011S SEM-I
Total Error.!!!
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Computational Methods
M. Tech. (Mech)
Numerical Methods
Numerical Integration
Let function f (x) be evaluated over an integral [a,b].
Split the interval [a,b] with set of discrete points {x0, x1, x2,..},
where x0 = a and xn = b.
ASSUMPTION : Points are equally spaced with a step size of h = (b a) / n.
APPROACH : To approximate f (x) by a Polynomial Pn (x) of degree n, and then
integrate Pn (x).
If the Polynomial used is Interpolating Polynomial :
Computational Methods
M. Tech. (Mech)
Numerical Methods
Numerical Integration
Interpolating Polynomial Newtons nth order Forward Difference Formula!!
(V)
ME5011S SEM-I
k f 0
f1 f 0
f2 2 f 1 + f 0
f3 3 f 2 + 3 f 1 f 0
f 4 4 f 3 + 6 f2 4 f 1 + f0
f5 5 f4 + 10 f3 10 f2 + 5 f1 + f0
f6 6 f5 + 15 f4 20 f3 + 15 f2 6 f1 + f0
Computational Methods
M. Tech. (Mech)
Numerical Methods
Trapezoidal Rule
Simplest Newton Cotes Integration Formula for n = 1..!!
Linear Interpolation!!!
Using x = x0 + h and dx = h.d, and Constants as well as Linear Terms in (V) :
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Trapezoidal Rule
f (x)
f1
(f0 + f1) / 2.
h
x
x0
ME5011S SEM-I
Computational Methods
x1
M. Tech. (Mech)
Numerical Methods
Trapezoidal Rule
Error in approximation
if h
Accuracy of Approximation
!!
with
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Trapezoidal Rule
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
Accuracy by using Higher Order Interpolating Polynomial :
Newton Cotes Integration Formula for n = 2..!!
Quadratic Polynomial over Interval [a,b]!!!
Using x = x0 + h and dx = h.d, and Constants as well as Quadratic Terms
in (V) :
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
f (x)
f2
f1
Quadratic Polynomial.
f0
2h
x
x0
ME5011S SEM-I
Computational Methods
x1
x2
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
Error in approximation
if h
Accuracy of Approximation
!!
with
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
Extending to Third Degree Polynomial :
Newton Cotes Integration Formula for n = 3..!!
Cubic Polynomial over Interval [a,b]!!!
Using x = x0 + h and dx = h.d, and Constants as well as Cubic Terms in
(V) :
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
Cubic Interpolation over each step and results summed up to give Composite
Piecewise Cubic Interpolation..!!
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Simpsons Rules
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
.(VI)
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
f (x)
f2
f1
Computational Methods
x1
x2
M. Tech. (Mech)
Numerical Methods
if h
Accuracy of Approximation
!!
with
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Convergence Rate
Let
Applying Midpoint Rule, Trapezoid Rule and Simpsons 1/3 Rule, using a = 0 and
b = 1 for different step sizes h, by varying number of step size n (i.e. h = (b-a) / n) :
ME5011S SEM-I
Midpoint
Trapezoid
Simpsons 1/3
1.0207471
0.9595174
1.0003371
1.0052029
0.9896588
1.0000216
1.0013016
0.9974006
1.0000014
16
1.0003256
0.9993493
1.0000001
32
1.0000815
0.9998373
1.0000000
64
1.0000203
0.9999593
1.0000000
128
1.0000051
0.9999897
1.0000000
256
1.0000011
0.9999974
0.9999996
512
1.0000006
0.9999995
1.0000004
1024
1.0000005
0.9999995.
1.0000004
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
A : Change in Enthalpy :
Clausius Clapeyron Eq. :
T (C)
P (bar)
50
0.1235
60
0.1994
70
0.3119
80
0.4739
90
0.7014
100
1.014
110
1.433
120
1.958
130
2.701
140
3.613
150
4.758
ME5011S SEM-I
NOMENCLATURE :
h : Change in Enthalpy bet. Liq & Gas phase
T : Temp. in Kelvin
vg : Sp. Vol. in Gaseous phase
vf : Sp. Vol. in Liquid phase
GIVEN DATA :
To evaluate enthalpy Change @ 100 C (i.e. 373.15 K)
For vg = 1.63 m3 / kg and vf = 0.00104 m3 / kg.
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
A : Change in Enthalpy :
OBJECTIVE : to evaluate
@ T = 100 C.
P (bar)
90
0.7014
100
1.014
110
1.433
[bar / C]
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
A : Change in Enthalpy :
OBJECTIVE : to evaluate
@ T = 100 C.
P (bar)
80
0.4739
90
0.7014
100
1.014
110
1.433
120
1.958
[bar / C]
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
A : Change in Enthalpy :
Clausius Clapeyron Eq. :
Substituting with vg = 1.63 m3 / kg and vf = 0.00104 m3 / kg.
Using Three-Point Central Difference :
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
B : Rocket Travel :
A rocket is launched from the ground. Its acceleration is measured every
5 seconds and is tabulated below. Find the velocity of the rocket after
40 seconds. Use Trapezoidal as well as Simpsons 1/3 rule. Compare the results.
T (sec)
10
15
20
25
30
35
40
(t)
(m/sec2)
40.00
45.25
48.50
51.25
54.35
59.48
60.50
63.30
68.70
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
B : Rocket Travel :
T (sec)
10
15
20
25
30
35
40
(t)
(m/sec2)
40.00
45.25
48.50
51.25
54.35
59.48
60.50
63.30
68.70
I. Trapezoidal Rule :
[m/sec]
ME5011S SEM-I
.[ANS]
Computational Methods
M. Tech. (Mech)
Numerical Methods
Applications
B : Rocket Travel :
T (sec)
10
15
20
25
30
35
40
(t)
(m/sec2)
40.00
45.25
48.50
51.25
54.35
59.48
60.50
63.30
68.70
[m/sec]
[m/sec]
ME5011S SEM-I
.[ANS]
.[ANS]
Computational Methods
Numerical Methods
Thank You !
ME5011S SEM-I
Computational Methods
M. Tech. (Mech)