Eso208 Tutorial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Tutorial 6

1. The mass of a radioactive substance is measured at 2-day intervals till 8 days. Unfortunately, the
reading could not be taken at 6 days due to equipment malfunction. The following table shows the
other readings:
Time (d) Mass (g)
0 1.0000
2 0.7937
4 0.6300
8 0.3968

(a) Estimate the mass at 6 days using cubic spline


(b) Using the table and the value obtained in (a), estimate the half-life of the substance using least
squares regression after linearising the exponential decay equation.

2. The velocity of an object, travelling along a straight line, was measured at various times as follows:

Time (min) 0 1 2 3 4 5 6 7 8 9 10
Velocity 0.00 0.65 1.72 3.48 6.39 11.18 19.09 32.12 53.60 89.02 147.41
(cm/min)

Estimate the acceleration at 5 minutes using (i) forward difference, O(h2), with h=1 min,
(ii) backward difference, O(h2), with h=1 min, and (iii) central difference O(h2) with h=1, 2, and 4
min. Use Richardson extrapolation to obtain an O(h6) estimate from the three central difference
estimates.
Tutorial 7

1. The velocity of an object, travelling along a straight line, was measured at various times as follows:

Time 0 1 2 3 4 5 6 7 8 9 10 11 12
(min)
Velocity 0.00 0.65 1.72 3.48 6.39 11.18 19.09 32.12 53.60 89.02 147.41 243.69 402.43
(cm/min)

Estimate the distance travelled in 12 minutes using (i) Simpson’s 1/3 rule, (ii) Simpson’s 3/8 rule,
and (iii) Romberg integration, applied to Trapezoidal rule estimates with h=1, 2, and 4.

𝑟𝑟
2. The flow rate through a circular pipe is given by 𝑄𝑄 = ∫0 0 2𝜋𝜋𝜋𝜋 𝑣𝑣 𝑑𝑑𝑑𝑑, where v is the velocity at a
distance of r from the centre of pipe and r0 is the radius of the pipe. If the velocity is approximated by
𝑟𝑟 1/7
𝑣𝑣 = 2 �1 − � (in m/s), and the pipe radius is 12 cm, compute Q using Gauss-Legendre
𝑟𝑟0
quadrature with 2, 3, and 4 Gauss points. Perform an error analysis for the results, using the true value
of the flow rate as 0.07389025921170497 m3/s.
Tutorial 8

1. Solve the differential equation dy/dt = −100 y + 99 e−t with the initial condition y(0)=2 using,
(a) Euler’s forward (explicit) method, and (b) Euler backward (implicit) method, to obtain the
value of y at t=0.1. Use time steps of 0.01, 0.02 and 0.025. Find the analytical solution and
compare the errors for these time steps.

2. The amount of lowering of water level, s, in a well at a time t, due to pumping from
groundwater is governed by an equation of the form s=C W(u), where C is a constant
(proportional to the discharge), W is called the Well Function, and u is inversely proportional
to t. The well function is given by the equation dW(u)/du = −Exp(−u)/u. If the value of W(1) is
0.21938393, find the value of W(0.5) using (a) Romberg integration algorithm with accuracy
O(h6) (b) Modified Euler with h= −0.5 (c) Heun’s method with h= −0.25 and (d) Fourth-order
Runge-Kutta method with h= −0.25. Perform an error analysis using the true value of W(0.5)
as 0.55977359.
Tutorial 9

1. Solve the differential equation dy/dx = x2y − 2y with y(0)=1 over the interval x=0 to 0.5, using
(a) Heun’s method without iteration with h=0.25 and 0.125, (b) Heun’s method with iteration (with
h=0.25 and stopping error criterion of 1%), and (c) 4th order Runge-Kutta method with h=0.125 and
0.25. Obtain the exact value of y at x=0.5 and perform an error analysis.

2. Solve the differential equation dy/dx = 10 sin(πx) with the initial condition y(0)=0 and step length of
0.2 using (a) the 4th order R-K method, (b) the Milne’s method and (c) 4th order Adams method to
obtain the value of y at t=0.2, 0.4, 0.6, 0.8 and 1.0. (For the multi-step methods use the values obtained
from the R-K method for start-up)
Tutorial 10
1. Solve the differential equation d2y/dx2 − dy/dx −2y + 2x = 3 with the boundary conditions y(0)=0
and y(0.5)=0.6967 using (a) the shooting method and (b) the direct method (use ∆x=0.25 for both).

2. For a plate of size Lx=2 cm and Ly=4 cm, with the boundary conditions as T=0 for y=0 and y=4;
T=100 for x=2; and insulated boundary at x=0, find the steady state temperature at the centre using the
Finite Difference Method (use ∆x=1 cm and ∆y=1 cm).

3. Toxic pollutant transport in a river is governed by the following equation:

𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕 𝜕𝜕2 𝑐𝑐 𝜕𝜕𝜕𝜕


+ 𝑣𝑣 − 𝐷𝐷 2 + 𝑘𝑘𝑘𝑘 = 0; 0 ≤ 𝑥𝑥 ≤ 1; 𝑐𝑐 (0, 𝑡𝑡) = 𝑐𝑐0 ; � = 0; 𝑐𝑐 (𝑥𝑥, 0) = 𝑥𝑥 2 𝑒𝑒 −𝑥𝑥
𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕 𝜕𝜕𝑥𝑥 𝜕𝜕𝜕𝜕 (1,𝑡𝑡)

Set-up the matrix equations for the solution of the above equation in terms of Courant Number (or
CFL number) and Grid Peclet Number for general ∆x and ∆t :

𝑣𝑣∆𝑡𝑡
Courant or CFL No. 𝐶𝐶 =
∆𝑥𝑥
𝑣𝑣∆𝑥𝑥
Grid Peclet No. 𝑃𝑃𝑒𝑒 =
𝐷𝐷

You might also like