Project 4 - Computational Methods | MCEN 3030, Study Guides, Projects, Research of Mechanical Engineering

Material Type: Project; Class: COMPUTATIONAL METHODS; Subject: Mechanical Engineering; University: University of Colorado - Boulder; Term: Unknown 1989;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 02/13/2009

koofers-user-9f4
koofers-user-9f4 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computational Project # 4
Due April 11
Write a program to solve
() ()
1tanh
2
dy
x
yx
dx =−
(
)
01,0 30yx
=
≤≤
using the following schemes:
i) Explicit Euler,
ii) Implicit Euler,
iii) Trapezoidal Method,
iv) Second order Runge-Kutta.
Do not use any build-in Matlab time integration routines. Try values 1, 3.5, 4.25x
Δ
=.
Plot the exact solution
()
()
cosh
1
x
yx= and the results of numerical integration for
different values
x
Δ for four different integration methods in separate sub-windows.
Explain the results in terms of stability and accuracy.
P.S. Bring your solution to class. Email your code to [email protected]. The
program that you send should be a working program. All the codes will be checked
whether they run or not. If they are erroneous, but run, points will be taken for the errors.
If the code does not run (it has some syntax errors), an additional 25% will be taken off.
The goal of this class is for you to be comfortable solving engineering problems. Please
take your time and learn how to trust the computer.

Partial preview of the text

Download Project 4 - Computational Methods | MCEN 3030 and more Study Guides, Projects, Research Mechanical Engineering in PDF only on Docsity!

Computational Project # 4

Due April 11

Write a program to solve

tanh 2

dy x y x dx

= − y ( 0 )= 1, 0 ≤ x ≤ 30

using the following schemes:

i) Explicit Euler, ii) Implicit Euler, iii) Trapezoidal Method, iv) Second order Runge-Kutta.

Do not use any build-in Matlab time integration routines. Try values Δ x = 1, 3.5, 4.25.

Plot the exact solution ( )

cosh( )

x

y x = and the results of numerical integration for

different values Δ x for four different integration methods in separate sub-windows.

Explain the results in terms of stability and accuracy.

P.S. Bring your solution to class. Email your code to [email protected]. The program that you send should be a working program. All the codes will be checked whether they run or not. If they are erroneous, but run, points will be taken for the errors. If the code does not run (it has some syntax errors), an additional 25% will be taken off. The goal of this class is for you to be comfortable solving engineering problems. Please take your time and learn how to trust the computer.