You are on page 1of 2

ME 350 Homework 5 Winter 2017

Complete the following problems and upload your solutions to the D2L dropbox by 9:00 PM on
Friday, 3 March 2017.

1. (10 points) The Colebrook equation for the friction factor f in a round pipe is
 
1 ε/D 2.51
√ = −2log10 + √
f 3.7 Re f

where ε is the pipe roughness, D is the pipe diameter and Re is the Reynolds number. In
the most common application of this formula, we want to compute f when ε, D and Re are
known.
a. Write an m-file function that returns f when the values of ε/D and Re are given. Your
function should have two inputs, eD = ε/D and Re. Your function should return the
friction factor, f obtained by a root-finiding routine. fzero is recommended.
b. On log-log axes, create a plot of f as a function of Re for 3 × 103 ≤ Re ≤ 1 × 108 and
ε/D = 1 × 10−5 , 1 × 10−3 and 1 × 10−2 .
2. (10 points) Heat sinks are often attached to electronic devices to increase the cooling effi-
ciency and thereby lower the temperature of the device. One common configuration of these
heat sinks is an array of so-called pin fins, as depicted in the accompanying sketch. Given the
overall dimensions L, H, and W of the array, it is desirable to know the optimal spacing and
size of the fins. Adrian Bejan presents1 the formula for the optimal spacing (Sopt ) as
 1/3
Sopt 2 + Sopt /D H
= 2.75 Ra−1/4
D (1 + Sopt /D)2/3 D

where D is the diameter of the fins and Ra is the Rayleigh number, a dimensionless indicator
of the strength of the natural convection responsible for cooling the fins. Write a function
m-file to compute Sopt given D, H, and Ra. Use your function to plot Sopt for H/D = 20
over the range 300 ≤ Ra ≤ 10000.

L
W D

S
H
spacing detail

1 “Geometric optimization of cooling techniques” pp. 1–45 in Air Cooling Technology for Electronic Equipment,

S.J. Kim and J.S. Woo, eds., 1996, CRC Press


ME 350 Lab Exercise 9 Introduction to ODEs
Winter 2017
Download the odeEuler.m, demoEuler.m and demoEulerPlot.m files from
the class web site.
1 dy
2t − 1 + 5e−2t is the exact solution to

1. Determine whether y = =
4 dt
t − 2y with the initial condition y(0) = 1. Hint: Take the easy way by
evaluating the derivative and testing the initial condition.
1 1/3
2. Determine whether y = 64 − 12t2 is the exact solution to
2
dy t
= 2 y(0) = 2 (1)
dt y

3. Download the demoEuler.m file from the class web site and rename the
file as demoEuler2.m. Make the necessary modifications to demoEuler2.m
in order to find the numerical solution to Equation (1) for 0 ≤ t ≤ 2. Test
your solution with h = 0.2 and h = 0.05.
4. (a) Modify your demoEuler2 function so that it computes and returns
the global error
eh = ky − yexact k∞
where the subscript h reminds us that the error is a function of the
stepsize, h.
(b) Create another m-file, say eulerErrorPlot, that calls your modified
demoEuler2 function for a sequence of steps sizes, h = 0.2, 0.1, 0.05,
0.025, 0.0125, 0.00625, and stores the global error in a vector, say
errh. Create a log-log plot of errh as a function of h.

You might also like