31 views

Uploaded by Micro Yuchen

- Sensitivity Direct
- CMME-1-Report.docx
- Quadratic Eqn
- Math Quadratic Equations Worksheet
- Seminar10 FEM CST
- Pro Gad Filt
- Quantitative Models(Chp10)
- wwwchcksoalanje
- eulreexample
- TCSS 343 HW5
- Linear Equation
- Albert Cohen - Multiple State Model
- Energy Systems HW9
- Theory of Equations exercise 1.pdf
- Finite Element An
- ch-2
- Chapter04 - Quadratic Equation
- Engineering Maths 2 July 2014
- math presentation
- Interpolasi Lagrange Contoh Kode

You are on page 1of 11

LAB REPORT

COMPUTATIONAL METHODS FOR MECHANICAL

ENGINEER

EME 3156

TRIMESTER 2 (2015/2016)

Experimen

t1

Date of

Experimen

t

17th December 2015

Student Name

Lee Chng Keat

Student ID

1122700207

Objectives:

1. Using excel to solve ODE initial value problems.

2. Using different method to solve the problem which is Euler method, Midpoint

3. Find out the method that gives the most accurate answer.

y = 1+(y/t)+(y/t)^2 , y(1) = 0, y(3) = ?

t

c +log

y(t) =

t tan

When t = 1, y = 0

1 = 1 tan (c + log 1)

c=0

3

0+ log

y(t) =

( 3 ) tan

y = 5.8741

7

6

5

4

3

2

1

0

Let h = 0.05 i=1

t1 = 1.05 y1 = 0.05 h = 0.05

f(t1,y1) = 1 + (y1/t1) + ( y1/t1)2

= 1.049887

y2 = 157587

When t=3

Error (h=0.05) = |5.8741-5.420458| = 0.453642

Error (h=0.1) = |5.8741-5.05988| = 0.81422

Error (h=0.2) = |5.8741-4.514277| = 1.359823

Error (h=0.5) = |5.8741-3.54973| = 2.32437

Error (h=1.0) = |5.8741-2.75| = 3.1241

7

6

5

4

3

Exact

h = 0.05

h = 0.1

h = 0.5

h = 0.2

h=1

Let h=0.05 i=1

t1 = 1.05, y1 =0.051249, h = 0.05

K1=f(t1,y1) = 1 + (y1/t1) + ( y1/t1)2

= 1.051191

tm = ti + h/2 = 1.05 + 0.05/2 = 1.075

ym = yi + (h/2)K1 = 0.051249 + (0.05/2)* 1.051191 = 0.077529

K2 = f(tm,ym) = 1 + (ym/tm) + ( ym/tm)2

= 1.077321

Y2 = y1 + hK2

= 0.105115

When t=3

Error (h=0.05) = |5.8741-5.864075| = 0.010025

Error (h=0.1) = |5.8741-5.836088| = 0.038012

Error (h=0.2) = |5.8741-5.738647| = 0.135453

Error (h=0.5) = |5.8741-5.287636| = 0.586464

Error (h=1.0) = |5.8741-4.524779|= 1.349321

7

6

5

4

Exact

h = 0.05

h = 0.1

h = 0.2

h = 0.5

h=1

Fourth order Runge-Kutta method equation: yi+1 = yi +

h

6 (K1+2K2+2K3+K4)

t1 = 1.05, y1 = 0.05127, h = 0.05

K1 = f(t1,y1) = 1 + (y1/t1) + ( y1/t1)2

= 1.051213

tm = ti + h/2 = 1.05 + 0.05/2 = 1.075

ym1 = yi + (h/2)*K1 = 0.05127 + (0.05/2)* 1.051213= 0.077551

K2 = f(tm,ym1) = 1 + (ym1/tm) + ( ym1/tm)2

= 1.077344

ym2 = yi + (h/2)*K2 = 0.05127+ (0.05/2)* 1.077344= 0.078204

K3 = f(tm,ym2) = 1 + (ym2/tm) + ( ym2/tm)2

= 1.07804

ti+1 = ti + h = 1.05 + 0.05 = 1.1

ym3 = yi + hK3 = 0.05127 + 0.05*1.07804 = 0.105172

K4 = f(ti+1,ym3) = 1 + (ym3/ti+1) + ( ym3/ti+1)2

= 1.104753

yi+1 = yi +

h

6 (K1+2K2+2K3+K4)

= 0.10516

When t=3

Error (h=0.05) = |5.8741-5.874099| = 0.000001

Error (h=0.1) = |5.8741-5.874083| = 0.000017

Error (h=0.2) = |5.8741-5.873839| = 0.000261

Error (h=0.5) = |5.8741-5.865642| = 0.008458

Error (h=1.0) = |5.8741-5.776963| = 0.097137

7

6

5

4

3

Exact

h = 0.05

h = 0.1

h = 0.2

h = 0.5

h=1

y i+1 = yi +

h

2 (K1+K2)

t1 = 1.05, y1 = 0.51247, h = 0.05

K1 = f(t1,y1) = 1 + (y1/t1) + ( y1/t1)2

= 1.051189

ti+1 = ti+1 + h = 1.05 + 0.05 = 1.1

P

P

= 1.103275

C

= 0.105109

When t=3

Error ( h=0.05) = |5.8741-5.861999| = 0.012101

Error (h=0.1) = |5.8741-5.827854| = 0.046246

Error (h=0.5) = |5.8741-5.149066| = 0.725034

Error (h=1.0) = |5.8741-4.238567| = 1.635533

7

6

5

4

3

2

1

0

Exact

h = 0.05

h = 0.1

h = 0.2

h = 0.5

h=1

When h=0.05, t=3:

Error (Euler) = |5.8741-5.420458| = 0.453642

Error (Midpoint) = |5.8741-5.864075| = 0.010025

Error (RK4) = |5.8741-5.874099| = 0.000001

Error (Predictor-Corrector) = |5.8741-5.861999| = 0.012101

7

6

5

4

3

Exact

Euler Method

Midpoint Method

Runge-Kutta Method

Exercise

Given:

dL

dt

dS

dt

Si+1 = Si + h(0.5 Si 0.001 Li Si)

h = 0.5

Number of

Species

3500

3000

2500

2000

1500

1000

500

0

0

Lion

Sheep

50

100

150

200

Time

h = 0.2

2000

1500

Lion

Number of 1000

Species

500

0

0

Sheep

50

Time

h = 0.05

1400

1200

1000

Number of Species

800

Lion

600

Sheep

400

200

0

0

50

100

150

200

Time

Discussions:

From the result shown in the table and graphs, we know that the smaller the value of step size

the lesser the percentage of error. The value in this case also will make the value to be much

more accurate by comparing to the exact value. All of the result we have calculated, h=0.05

will give the result which have the less error so we use h=0.05 for all method to compare with

method gives the lesser percentage of error and we find out it is Runge-Kutta Method (RK4).

For the exercise we have done for predator prey problem, we can see that the lions and sheep

growth in relation of time. The growth and death of this two species is vice versa to each

other. The lower step size value give a more accurate value because the number of species

against time did not deflect largely and maintain in a smooth curve.

Conclusions:

In a nut shell, we found that Runge-Kutta (RK4) method will give the best answer

which is accurate to the exact value which can be seen in the graph. This is because the other

method uses simpler calculation and lesser effort to gain the answer so the value we achieve

is less accurate to the exact method. In this lab, we have learn how to use excel to do the

calculation because in this kind of problem which required a lots of repeated steps in

calculation will cause a lot of human error without the aids of excel. We uses excel to get

lesser error as possible.

- Sensitivity DirectUploaded bygabriele
- CMME-1-Report.docxUploaded byMicro Yuchen
- Quadratic EqnUploaded bySolehah Abdul Rahim
- Math Quadratic Equations WorksheetUploaded bySchool Works M
- Seminar10 FEM CSTUploaded byAndrei Cioroianu
- Pro Gad FiltUploaded byMihai Ignat
- Quantitative Models(Chp10)Uploaded byRuchika Verma
- wwwchcksoalanjeUploaded bynurulselangor
- eulreexampleUploaded byKarhyl Sanchez
- TCSS 343 HW5Uploaded byyadeliezer397
- Linear EquationUploaded byGregg Albario
- Albert Cohen - Multiple State ModelUploaded bydavid kurniawan
- Energy Systems HW9Uploaded byAde Hidayat Chaniago
- Theory of Equations exercise 1.pdfUploaded byChai Usajai Usajai
- Finite Element AnUploaded byShreeshaBharadwaj
- ch-2Uploaded byItech Sws
- Chapter04 - Quadratic EquationUploaded byRahul Kartikey
- Engineering Maths 2 July 2014Uploaded byPrasad C M
- math presentationUploaded byapi-439307320
- Interpolasi Lagrange Contoh KodeUploaded bySion Halim
- WellingICAUploaded byJustin Uang
- Chap09[2] LS ModifUploaded byimnotactive
- Financial and Economic Analysis_July21 22 Oct19 20(2)Uploaded byvasiliki_bednar6567
- Math 7Uploaded byJoshua Bellotindos
- KnapsackUploaded byRohit Gupta
- KnapsackUploaded byMahendra Shetty
- paper1_BVW.pdfUploaded byMaiman Lato
- Equation Iteration and CalculationUploaded bySatrio Pradana
- 08 PF#8 GT LayoutUploaded byHendriik Viicarlo
- The Computer Journal 1966 Jarratt 304 7Uploaded bychikypuky

- 89799_Wind2016Uploaded byMicro Yuchen
- CMME4 20151V4.xlsxUploaded byMicro Yuchen
- CMME-2-Report.docxUploaded byMicro Yuchen
- 50843_CMME4 20151V8.xlsxUploaded byMicro Yuchen
- ce-1.docxUploaded byMicro Yuchen
- HT assigment.pdfUploaded byMicro Yuchen
- Examples Hydrostatic, Buoyancy and Rigid Body RotationUploaded byMicro Yuchen

- Prefunctions and Integral Equations via Laplace TransformsUploaded byTI Journals Publishing
- An Kit ShahUploaded byCarmelo R. Cartiere
- sectionA-firstorderUploaded byashikhmd4467
- Gottlieb Shu Tadmor.sireV 01Uploaded bymuchi0734
- CE5610_assign1_2013Uploaded byRK MEHTA
- Quadratic Equations and InequalitiesUploaded byckhowh_232845246
- PBA2Chapter4.BWUploaded byjosephtw
- OdeUploaded byEmilia Simona
- Appendix eUploaded byRJ Wakefield-Carl
- textUploaded byEzekiel T. Mostiero
- "Sin is Behovely" in Julian of Norwich's Revelations of Divine LoveUploaded byakimel
- HW 4.4 SolutionsUploaded byhlove1
- A Concise Lecture Note on Differential EquationsUploaded byElmer525
- Finite Difference MethodUploaded byMEET PATEL
- Quadratic EquationsUploaded byDoreen Ting
- 461-1698-1-PB.pdfUploaded bySirtumnusFauno
- Pengantar ke SILOGISME.pptUploaded byWildan Sabil
- k 060272324Uploaded byYudaRSyahbani
- worksheet 3.docxUploaded byMharaToot
- Topic3.2 3 LectureNotesUploaded byBenjamin Leung
- 1-Introduction to ODEUploaded byMuhammad Fawwaz
- CFD_QB.docx-newUploaded byJagan Raj
- PDE_Lecture_01_30_Sep.pdfUploaded bysanjay_dutta_5
- Syllabus for Differential Equations DEUploaded byRhamde Pillogo
- 1st Unit Test in Math 9Uploaded byMarlaFirmalino
- MetalógicaUploaded byCarlos Eduardo Correa Roque
- CFD (AE2402) Unit Question Bank (5 UNITS)Uploaded byKumaranCool
- Quine - Summary of 2 DogmasUploaded byMansoor Malik
- De Reference and learning guides in powerpointUploaded byMatthew Anthony Mallari
- Equation Solving Worksheet for EE 188Uploaded bySulman Shahzad