Question: This question considers a 1-D diffusion equation with spatially varying diffusion: ar du at with F(x, t) = -K(D)r' (6) and where K(x) is a

 This question considers a 1-D diffusion equation with spatially varying diffusion:

This question considers a 1-D diffusion equation with spatially varying diffusion: ar du at with F(x, t) = -K(D)r' (6) and where K(x) is a prescribed function. (a) Show that a discretisation of Eq. (6) using a forward difference approximation to the time derivative and a centred difference approximation to the space derivative may be written 7 uit! = u; + h (63+4 (45+1 u;) *;-(4 u;-1)], (7) where kj = (Lj), and 7 and h are the time and spatial steps. This method is called Forwards Time, Centred Space (FTCS). (b) For the general case of spatially varying K, determine a matrix formulation of the FTCS scheme Eq. (7) of the form u+1 = Mu", (8) where u" = (u, u,..., u)is a vector of dependent variable values at time step n. Assume Dirichlet boundary conditions w = a and u1 = b. Clearly show the form of the matrix M, and briefly explain how the boundary con- ditions are being imposed in the matrix formulation. (c) Assume that you are solving the problem in the general case with spatially varying K, using Eq. (7) on a spatial grid with L = 100 points, and using a time step 71. Your solution is stable and accurate. (1) You increase the resolution of your grid to L = 200 points. What time step T2 should you choose to ensure stability? (ii) You increase the resolution of your grid to L = 200 points, and you also halve all values of k(2). In this case, what time step 72 should you choose to ensure stability? (9) This question considers a 1-D diffusion equation with spatially varying diffusion: ar du at with F(x, t) = -K(D)r' (6) and where K(x) is a prescribed function. (a) Show that a discretisation of Eq. (6) using a forward difference approximation to the time derivative and a centred difference approximation to the space derivative may be written 7 uit! = u; + h (63+4 (45+1 u;) *;-(4 u;-1)], (7) where kj = (Lj), and 7 and h are the time and spatial steps. This method is called Forwards Time, Centred Space (FTCS). (b) For the general case of spatially varying K, determine a matrix formulation of the FTCS scheme Eq. (7) of the form u+1 = Mu", (8) where u" = (u, u,..., u)is a vector of dependent variable values at time step n. Assume Dirichlet boundary conditions w = a and u1 = b. Clearly show the form of the matrix M, and briefly explain how the boundary con- ditions are being imposed in the matrix formulation. (c) Assume that you are solving the problem in the general case with spatially varying K, using Eq. (7) on a spatial grid with L = 100 points, and using a time step 71. Your solution is stable and accurate. (1) You increase the resolution of your grid to L = 200 points. What time step T2 should you choose to ensure stability? (ii) You increase the resolution of your grid to L = 200 points, and you also halve all values of k(2). In this case, what time step 72 should you choose to ensure stability? (9)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!