Sie sind auf Seite 1von 3

Numerical methods in dierential equations 5 (12.12.2011) Exercise 1.

Use the forward-dierence method to approximate the solutions to the following parabolic partial-dierential equations. a) u 2 u 2 = 0, 0 < x < 2, 0 < t; t t u(0, t) = u(2, t) = 0, 0 < t, u(x, 0) = sin(2x), 0 x 2. Use h = 0.1 and k = 0.01 and compare your answers at t = 0.5 to the actual solution 2 u(x, t) = e4 t sin(2x). Then use h = 0.1 and k = 0.005, and compare the answers. b) u 2 u 2 = 0, 0 < x < 2, 0 < t; t t u(0, t) = u(2, t) = 0, 0 < t, u(x, 0) = x(2 x), 0 x 2. Use h = 0.1 and choose an appropriate value for k. Find rst ve terms of the Fourier-series solution and compare your answers to that approximate solution at t = 0.5. 4 2u u 2 2 = 0, 0 < x < 4, 0 < t; t t u(0, t) = u(4, t) = 0, 0 < t, u(x, 0) = sin x(1 + 2 cos x), 0 x 4. 4 4 c) Use h = 0.2 and k = 0.04. Compare your answers to the actual solution u(x, t) = et sin x + et/4 sin x at t = 0.4. 2 4 d) u 1 2u 2 2 = 0, 0 < x < 1, 0 < t; t t u(0, t) = u(1, t) = 0, 0 < t, 1 u(x, 0) = cos (x ), 0 x 1. 2

Use h = 0.1 and k = 0.04. Compare your answers to the actual solution u(x, t) = et cos (x 1 ) at t = 0.4. 2 Exercise 2. Repeat Exercise 1, using the backward-dierence algorithm. Exercise 3. Repeat Exercise 1, using the Crank-Nicolson algorithm. Exercise 4. Modify the Crank-Nicolson and backward-dierence algorithms to include the parabolic partial dierential equation u 2 u 2 = F (x), 0 < x < l, 0 < t; t t u(0, t) = u(l, t) = 0, 0 < t, u(x, 0) = f (x), 0 x l.

and use them to approximate the solution to u 2 u 2 = 2, 0 < x < 1, 0 < t; t t u(0, t) = u(1, t) = 0, 0 < t, u(x, 0) = sin(x) + x(1 x), 0 x 1. with h = 0.1 and k = 0.01. Compare your answers to the actual solution u(x, t) = 2 e t sin x + x(1 x) at t = 0.25. Exercise 5. Change Crank-Nicolson and backward-dierence algorithms to accommodate the partial-dierential equation a) u 2u 2 2 = 0, 0 < x < l, 0 < t; t t u(0, t) = (t), u(l, t) = (t), 0 < t,

u(x, 0) = f (x), 0 x l. where f (0) = (0), f (l) = (0). Exercise 6. The temperature u(x, t) in a long thin rod of constant cross section and homogeneous conducting material is governed by the one-dimensional heat equation. If heat is generated in the material, for example, by resistance to current or nuclear reaction, the heat equation becomes 2 u Kr u + = K , 0 < x < l, 0 < t, 2 x C t where l is the length, the density, C the specic heat, and K the thermal diusivity of the rod. The function r = r(x, t, u) represents the heat generated per unit volume. Suppose that l = 1.5 cm, K = 1.04 cal/cm deg sec, = 10.6 g/cm3 , C = 0.056 cal/gdeg and r(x, t, u) = 5.0 cal/sec seccm3 . If the ends of the rod are kept at 0 C, then u(0, t) = u(l, t) = 0, t > 0. Suppose the initial temperature distribution is given by u(x, 0) = sin x , 0 x l. l

Use the results of Exercise 4 to approximate the temperature distribution with h = 0.15 and k = 0.0225. Also use a modied forward-dierence method to approximate the distribution.

Exercise 7. In analyzing the stress-strain relationships and material properties of a cylinder alternately subjected to heating and cooling, one considers the equation 1 T 1 T 1 2T + = , < r < 1, 0 < T, 2 r r r 4K t 2 where T = T (r, t) is the temperature, r is the radial distance from the center of the cylinder, t is time, and K is a diusivity coecient. a) Find approximations to T (r, 10) for a cylinder with outside radius one, given the initial and boundary conditions: T (1, t) = 100 + 40t, 0 t 10, 1 T ( , t) = t, 0 t 10, 2 T (r, 0) = 200(r 0.5), 0.5 r 1. Use a modication of the backward-dierence method with K = 0.1, k = 0.5, and h = r = 0.1. b) Using the temperature distribution of part (a), calculate the strain by approximating the integral
1

I=
0.5

T (r, t)rdr,

where = 10.7 and t = 10, by the Composite Trapezoidal method. Exercise 8. The equation describing one-dimensional, single-phase, slightly compressible ow in a producing petroleum reservoir is given, for 0 < x < 1000, and 0 < t, by 2p C p (x, t) = (x, t) K t x2 0, 1000, if x = 500 if x = 500

where it has been assumed that the porous medium and the reservoir are homogeneous, that the liquid is ideal, and that gravtational eects are negligible. The symbols are dened as x representing distance (in feet), t the time (in days), p the pressure (in pounds per square inch), the dimensionless constant porosity of the medium, the viscosity (in centipoise), K the permeability of the medium (in millidarcies), and C the compressibility (in [pounds per square inch]1 ). Assume that = C/K = 0.00004 days/ft2 , and that the following conditions hold: p(x, 0) = 2.5 107 , 0 x 1000, p 1 p (0, t) = (1000, t) = 0, 0 < t. K x x Find the pressure p at t = 5 using an appropriately modied Crank-Nicolson method with k = t = 0.5 and h = x = 100.

Das könnte Ihnen auch gefallen