Homework_1

Homework_1 - t = 1 Δ t = 05 Δ t = 025 and Δ t = 0125 3(a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 111 - Introduction to Computational Science Homework 1 Consider the ODE describing a falling object under the gravity force and the drag force: ± dv dt = g - c d m v 2 v (0) = 0 , (1) where g = 9 . 81 m.s - 2 , m = 75 kg and c d = . 25 kg.m - 1 . The exact solution is v ( t ) = r gm c d tanh ²r gc d m t ³ . 1. (a) Implement the Euler method to numerically solve (1). (b) Plot the numerical solution and the exact solution on the same graph. Take t final = 15 and a time step of Δ t = . 3. (c) Check the numerical accuracy of your implementation using Δ t = . 1, Δ t = . 05, Δ t = . 025 and Δ t = . 0125. 2. (a) Implement the RK2 method to numerically solve (1). (b) Plot the numerical solution and the exact solution on the same graph. Take t final = 15 and a time step of Δ t = . 3. (c) Check the numerical accuracy of your implementation using Δ
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t = . 1, Δ t = . 05, Δ t = . 025 and Δ t = . 0125. 3. (a) Implement the RK4 method to numerically solve (1). (b) Plot the numerical solution and the exact solution on the same graph. Take t final = 15 and a time step of Δ t = . 3. (c) Check the numerical accuracy of your implementation using Δ t = . 1, Δ t = . 05, Δ t = . 025 and Δ t = . 0125. You should turn in your codes, your plots (you should distinguish between the exact solution [solid line] and the numerical solution [open symbols]). You should also turn in three tables illustrating the accuracy of the method (see class notes). 1...
View Full Document

This note was uploaded on 12/29/2011 for the course CS 111 taught by Professor Staff during the Fall '08 term at UCSB.

Ask a homework question - tutors are online