Assignment title: Information
1. Use the second-order accurate central difference approximation and the first-order forward difference
approximation to evaluate cos2xx
be used. Compare this to the actual value of the derivative and compute the percent error to three decimal
places for each approximation, defined by
at 6x
to four decimal places. A step size of x = 0.2 is to
%Error = 100
Numerical value - Analytical value
Analytical value
Your percent error should include the proper sign (positive or negative). (12.5 points)
2. Consider the following two-dimensional convection-diffusion equation:
txxy
uuuu
u
22
22
Obtain an explicit finite difference equation using first-order forward time, first-order backwards in space
(for the convective term), and second-order central spatial differencing (for the diffusion terms). You do
not have to derive the difference approximations; simply use them. Remember to include all super- and
subscripts, as well as the "order" term including the lowest-order error term for each variable. (12.5 points)
3. Consider a fluid bounded by two parallel plates extended to infinity such that no end effects are
encountered. The walls and the fluid are initially at rest. The lower wall is suddenly accelerated in the
xdirection. The coordinate system is such that the lower wall coincides with the xz-plane to which the yaxis
is perpendicular. The spacing between the two plates is denoted by h.
The equation for this problem is
ty
uu
2
2
where is the kinematic viscosity of the fluid. It is required to compute the velocity profile ,uuyt
The problem has the following initial and boundary conditions
Initial Condition:
tuy
0,1.0ms for 0
uyh
0.0ms for 0
Assigned 4/23/2015
Boundary Condition:
tuy
0,1.0ms for 0
uyh
0.0ms for
The fluid has a kinematic viscosity of 0.000217 m2/s and h = 40 mm. Your solution should be run until
t = 1.08 seconds. Various time steps are to be used to investigate the numerical schemes and the effect of
the time step on stability and accuracy.
Write a two code to solve this problem for the following schemes and conditions.
a) FTCS Explicit with time steps 0.002 and 0.00233 sec
b) FTCS Implicit with time steps 0.002 and 0.01 sec
If j = 1 at the lower surface and a step size of y = 0.001 m is used, then j at the upper surface will be 41.
Note that n = 1 corresponds to t = 0.
For each case of each method, plot the velocity profile for four difference times on the same graph:
0.27 sec, 0.54 sec, 0.81sec and 1.08 sec. (You will have 4 plots in all, each with four curves.) Remember
to use proper plotting techniques, including title, axis labels, units, legend, and legibility. Submit your
plots in hardcopy, and a copy of your codes both in hardcopy and electronically on Canvas.
The file names for your codes should be:
firstname_lastname.ftcsexp.sp15.ext
firstname_lastname.ftcsimp.sp15.ext
where ext is the proper extension for the computer language you are using. MATLAB and other similar
software is not permitted for this assignment. (25 points)