Assignment 05 (1)
Assignment 05 (1)
C 206 (En
ngineerin
ng Compu
utation Sesssional)
Assiignment #
I
Instructor: Dr. Tanvir Ahmed
mally stratified as in th
Q1. A laake is therm he following
g table:
T, ° C 22
2.8 22.88 22.8 20.6 13.9 111.7 11.11 11.1
Deepth, m 0 2.3 4.9 9.1 13.7 1
18.3 22.99 27.2
As depiccted in the figure, thee lake can be b idealized d as two zoones separaated by a sttrong
temperaature gradieent or therm mocline. Th he depth of o this thermmocline can n be defineed as
the infleection pointt of the tem
mperature-d depth curvee – that is, th he point at which d2T/dz
T 2
= 0.
(a) Perfoorm a splinne interpolaation on thee temperatu ure profile and plot itt along with h the
measureed points
(b) Use numerical
n differentiat
d tion to commpute dT/d dz and d2T/ /dz2 for eveery 1 m inteerval
along thhe depth. Loocate the deepth of therrmocline. Use U interpollations wheere necessarry.
(c) Compute the heeat flux at th his depth (ii.e. at the th
hermocline) if the heatt flux is deffined
by , J = -k(dT/dz)
- whhere, k = 0.002 cal/(s.cm
m.°C).
(d) Prov vide a plot of T, dT/dz and d2T/dz T 2 vs. the
t depth of the lakee and show w the
location of the therrmocline (use subplot)
Q2. Write a MATLAB code (as an m-file function) to calculate area based on Simpson’s
1/3 rule. It will take a vector containing an odd number of points with unequal intervals
and calculate the integral.
Q3. During a survey you are required to compute the area of the field shown in the
following figure. Use Simpson’s rule (the code developed in Q2.) and trapezoidal rule
to determine the area.
Q4. A fully developed flow moving through a 40-cm diameter pipe has the following
velocity profile:
r (cm) 0 2.5 5 7.5 10 12.5 15 17.5 20
v (m/s) 0.914 0.890 0.847 0.795 0.719 0.543 0.427 0.204 0
R
Find the volume flow rate Q using the relationship Q = ∫ 2πrvdr where r is the radial
0
axis of the pipe, R is the radius of the pipe and v is the velocity.
(a) Fit the velocity data to a parabola and use that to solve for Q analytically. Consider
this as the true/exact solution. Plot the velocity profile (both measured data and fitted
parabola)
(b) Find Q by evaluating the integral using Simpson’s 1/3 rule
(c) Find Q by evaluating the integral using Trapezoidal rule
(d) Find the true percentage of error comparing the results in (b) and (c) with (a)