Assignment 2 PDF

Title Assignment 2
Author Sushant Giri
Course Num Meth & Mod for Chem Eng
Institution University of New Brunswick
Pages 2
File Size 277.8 KB
File Type PDF
Total Downloads 11
Total Views 167

Summary

Assignment 2...


Description

Numerical Methods ChE 3418

Department of Chemical Engineering University of New Brunswick

Assignment 2: Root solving Due: Friday January 26th 2018 4:30pm

Instructions: _______________________________________________________ This assignment must be completed using a programming software (MATLAB, Python or Maple). Comments inside your code are mandatory and will address how the program is to be executed. Your code (scripts & functions) needs to be deposited digitally in the D2L course drop box before the deadline. If your code does not compile, it is not worth any marks. In addition, a hard copy of the code, graphs and required material must be passed in the course drop box as well before the deadline. _______________________________________________________

Question 1 The friction factor in turbulent flow can be described by the Colebrook equation: 1 𝑓

= −2 𝑙𝑜𝑔

𝜀 2.51 + 3.7𝐷 𝑅𝑒 𝑓

Using the bisection method (by hand), obtain the friction factor of a twoinch inner diameter stainless steel pipe (ε = 0.000015 m). Use a Reynolds number of 75 000 and a tolerance (stopping criteria) of 2 %. State your final root and its corresponding true error (x ± x). Use the Moody diagram to choose a suitable initial interval. Question 2 𝑓 𝑥 = 2𝑥 ! − 𝑥 ! − 2 = 0 a)

Find the root of the following function using a built-in function. (In MATLAB, fzero for example)

b)

Using the Newton-Raphson technique (by hand), perform the first two iterations using an initial guess of 1.33 and calculate the approximate error εa.

c)

How come the first root found in b) is far from the solution found in a)?

d)

In the programming language of your choice, code the NewtonRaphson technique to solve the function above using and initial guess of 1.33 and stopping criteria of 2 %. State your final root and its corresponding approximate error. How many iterations were necessary?

e)

Repeat d) but with an initial guess of -2. Explain the difference in convergence found between the two initial guesses....


Similar Free PDFs