C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke,...

8
COMPUTATION AND SIMULATION EE317 2008-2009 ASSIGNMENT TWO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh

Transcript of C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke,...

Page 1: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

COMPUTATION AND SIMULATION EE317 2008-2009ASSIGNMENT TWO

By:

Shimiao Cheng,

Femi Adeleke,

Hanieh Alirezaeeabyaneh

Page 2: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

SOME EXAMPLES OF THE USE OF NUMERICAL SOLVERS FOR REAL-LIFE ENGINEERING/PHYSICS ODE PROBLEMS

Mathematical models when simulating thebehavior of physical, chemical, and biologicalsystems often include one or more ordinarydifferential equations (ODES) and these equationsare usually solved numerically. You have already seen acceleration a=x''

(second order derivative) and v=x′ (first order derivative) in the high school.

First order Ordinary Differential Equations. In engineering applications, a first order ODE usually appears in the context of an initial value problem.

Page 3: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

y(x0) = y0, d/dx y(x) = f(x, y(x)). The function fmight be a linear or non-linear function of theindependent variable x and the dependentparameter y. Euler Method , The simplest approach to solvingthis type of equation numerically is based on finitedifference approximations to the derivative. Ingeneral, yn+1 = yn + hf(xn,yn)Effectively, we are approximating the curve y(x) bya polygon, whose first side is tangent to the curve

atx0 .

Page 4: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

Runge -Kutta Method, This method uses theestimate yn+1 = yn +1/6(A1 + 2A2 + 2A3 + A4)where the auxiliary estimates are given by

A1 = f(xn, yn) A2 = f(xn +h/2,yn +h/2 A1) A3 = f(xn +h/2, yn +h/2 A2) A4 = f(xn + h, yn + hA3)

Page 5: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

PRESENT THE RESULTS OF YOUR EFFORTS TO NUMERICALLY SOLVE (IN MATLAB) THE ORDINARY DIFFERENTIAL EQUATION

dy/dx= x + y, with y(0) = 0 in the range (0; 10). Note

that the exact solution is y(x) = ex-x-1.

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

2

2.5x 10

4

x

func

tion

valu

e

Exact

Runge-Kutta method

0 1 2 3 4 5 6 7 8 9 10-5.6

-5.5

-5.4

-5.3

-5.2

-5.1

-5

-4.9

-4.8

-4.7

-4.6Relative error of Runge-Kutta method

x

log1

0 re

l err

or

Runge-Kutta method

Page 6: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

A PROJECTILE IS FIRED FROM THE ORIGIN (0; 0) AT ANGLE Μ TO THE X-DIRECTION WITH INITIALVELOCITY V0.

0 200 400 600 800 1000 1200 1400 1600 1800 20000

50

100

150

200

250

300

350

400

450

500

Page 7: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

FINALLY, RESPOND (BRIEFLY) TO MR. O MEARA’S COMMENTS According to what David O’meara said, we will

completely agree with him about the level of education in schools that has not met the objectives of student for their third level education.

Because of this, the department of education need carefully choosing the teaching material which has to to meet the needs of the society .

Another improvement which can be done is to have a better quality service in each guidance consular department. They play a major role in influencing student to pick the right field in college.

Page 8: C OMPUTATION AND S IMULATION EE317 2008-2009 A SSIGNMENT T WO By: Shimiao Cheng, Femi Adeleke, Hanieh Alirezaeeabyaneh.

Thank you &

Questions