pset_2 - 2.29: Numerical Fluid Mechanics Problem Set 2...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
2.29: Numerical Fluid Mechanics Problem Set 2 MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS 02139 2.29 NUMERICAL FLUID MECHANICS— SPRING 2007 Problem Set 2 Posted 02/25/07, due Thursday 4 p.m. 03/8/07, Focused on Lecture 4 to 7 Problem 2.1 (6% of final grade): Advance your programming skills and review root finding methods Review MATLAB help about: Function handle eval nargin varargin cell: as a data type switch: as flow control command fprintf lower Here we want to develop a script as a generalized one dimensional solver. Later you can use it for next problems. The function that you write should provide the maximum ease of use, as well as the maximum amount of flexibility and adjustment. To that end and to develop a user friendly program: The function should have default values for everything so that the user can run it with minimum number of inputs. The input function (to be solved) should be either a function handle or a string (like ‘3*x^3-5*x+1’). The program should have a nice command line output or plot displaying the gradual progress of solution. The user should be able to adjust/provide the below options, if necessary. Note that user should not need to memorize any order for them and option names should not be case sensitive: a) Method: Newton, Secant, Bi-Section, False-Position, Modified False- Position b) Initial guess: it can be two numbers for methods like Bi-Section c) Derivative of f (note that you can compute the derivative if user provides you with a string as solution equation) d) Absolute tolerance on x or f 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2.29: Numerical Fluid Mechanics
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course MECHANICAL 2.29 taught by Professor Henrikschmidt during the Spring '07 term at MIT.

Page1 / 5

pset_2 - 2.29: Numerical Fluid Mechanics Problem Set 2...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online