This preview shows pages 1–8. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 39/83 Semester 2, 2009 Page 1 of 8 THE UNIVERSITY OF SYDNEY FACULTIES OF ARTS, EDUCATION, ENGINEERING AND
* SCIENCE COSC 3011 .
SCIENTIFIC COMPUTING COSC 3911 
SCIENTIFIC COMPUTING (ADV) NOVEMBER 2009
Time allowed: TWOHOURS MARKS FOR QUESTIONS ARE AS INDICATED
TOTAL: 60 MARKS INSTRUCTIONS
o COSC 3011 students are to answer Questions 1, 2, 3, and 4 (3011) o COSC 3911 students are to answer Questions 1, 2, 3, and 5 (3911) o All answers should include explanations of reasoning 0 Where a question says to provide a brief explanation, write less than half a
page (excluding diagrams) o Page 2 of this booklet lists some formulae which may prove useful 39/83 ‘ I Semester 2, 2009 Page 2 of 8 Formulae 1. Forward time (FT) approximation to the time derivative of f (3:, t) af_f(x>t+T)—"f(xit) ‘
57_—~——7~———+0(T) 2. Centred time (CT) approximation to the time derivative of f (:13, t) ﬂ_f(x,t+T)—f(w,tT) 2
6% ~ 27' + 0(T ) 3. Centred space (CS) approximation to the spatial derivative of f (as, t) g: z f<z+h,t) ~f<x—h,t> 2
8x 2h + O<h ) 4. Centred space (CS) approximation to the second spatial derivative of f (:10, t)
82f __ hut) _ 21:03:?» + —— h)t) __ _ w 0 h2
8ch h2 + ( )
5. Taylor series expansion of f (t)
df 1 2612f 3
f(t+T)—f(t)+7'%+§7' )
6. Series approximation to — ln(1 — 3:) for < 1
1 l
— ln(1 — as) 2 at + 2—552 + 3133 + 0(5134)
6. Binomial approximation to (1 + :3)" for < l
—— l
(1 + m)“ = 1 + out; + 3W7~lx2 ~ 0(273)
7. Geometric sum
2 N 1 TN ‘1
SN=1+T+T +r3+...+7"" :2 1
T _ 39/83 Semester 2, 2009 Page 3 of 8 Question 1 (3011 & 3911) [Question 1 continues over the page] (a) Brieﬂy explain what is meant by the term local truncation error in the context of the numer—
ical solution of a 1—D Ordinary Differential Equation (ODE) gm
dt“ including brieﬂy explaining the notation 0(7'k). flw(t),tl, (1) (b) Dynamics problems of the form: ﬁzv and d—V—za (2) dt dt where r :2 r(t), v = V(t), and where a : a(r) is a given function, may be solved using the
Velocity—Verlet method: rn+1 = rn + TVn + %’T‘2&n . (3)
Vn+1 : Vn + %7' (an + an+1) ) (4) Where rm 2 r(tn), vn : V020, and tn 2 (n — 1)7".
Show that the VelocityVerlet scheme is exactly time reversible. (c) The ODE
dgu du
——— = —2d—   5
dt2 dt. “ ( )
is ‘stiff’ for d >> 1. An appropriate scheme to solve stiff problems is the ‘backwards Euler’ method, which in application to a system of ODEs
dx
—— = f t t 6 may be written:
X(t+7*) =X(t)+rf[x(t+r),t+r], (7) where 7' is the time step. (i) Apply the backwards Euler method to Eq. (5) to obtain a pair of implicit equations for
two dependent variables. (ii) Analytically solve the equations obtained in (c) (i) to obtain explicit forms suitable for
numerical solution of Eq. (5). (d) Runge—Kutta methods are a powerful class of methods for solving ODEs which match Taylor
series expansions to a given order. (i) Show that a Taylor series solution to the 1—D ODE Eq. (1) may be written as :c(t + 7') = 33(t) + Tf[:1:(t),t] + %T2 + + 0(T3). (8) 39/83 ‘ _ Semester 2, 2009 . Page 4 of 8 Question 1 (3011 & 3911) [Continued from previous page] (ii) By considering the two—variable Taylor series expansion 8
f(x + (555$ + 6t) 2 f(:E, t) + 65125;: + 623%; + O[(6a:)2] + O[(5t)2], (9)
with the choices 63: = T f and 5t 2 T, use Eq. (8) to derive a second order Runge~Kutta scheme. (15 marks) 39/83 Semester 2, 2009 Page 5 Of 8 Question 2 (3011 & 3911) The non—dimensional form of the 1—D timeindependent Schrodinger equation is ' “—— + VOW/J = EQ/J, (10) where 10 = 1/)(30) is the wave function, V(:13) is a prescribed potential, and E is the energy of the
quantum particle. (a) Consider a discretisation of the independent variable:
:01 : a31+ih with h 2 (mL —— rug/(L m l) where t: 1,2, ...,L, (11) with corresponding dependent variable values 2p) = Applying the centred difference approximation to the second derivative in (10) and assuming
Dirichlet boundary conditions $0 = 7/)(581 ~ 2 O and 1/1.” = 1/)(331; + = 0, (12) show that Eq. (10) may be formulated as a matrix eigenvalue problem: Aw = E¢ with ~ 7/) =(¢1,¢2,...,¢L)T and A = ——21—D + v. (13) In your answer, explicitly identify the matrices D and V. (b) Brieﬂy explain how the eigenvalue problem deﬁned by Eq. (13) may be solved using nor—
malised power iteration to obtain the eigenvector representing thesmallest energy wave func—
tion, for a given choice of the potential (c) For a particular choice of the potential V(a:), the exact solutions to Eq. (10) have energies
Ej =j2 where j=l,2,.... (14) Consider the application of over—relaxation to the matrix equation (13) for this potential with
the iteration scheme ¢lm+1l = cqplml with C = (1 — w)1+ wA‘l, (15) where I is the identity matrix, and where m enumerates iterations. (i) Determine the eigenvalues Xj (w) for the matrix C, and hence explain why the iteration
scheme (15) diverges for w > 2. (ii) Determine the optimal choice of w for this problem (for convergence to the wave func—
tion corresponding to E1), for a general choice of initial wave function. (15 marks) 39/83 ' Semester 2, 2009 Page 6 of 8 Question 3 (3011 & 3911) The linear advection equation is 80 = —c§g where c > O is constant. I (16) 57; 8:2:
This equation may be solved with the ‘leap—frog’ scheme: 1 CT ware—ail). 07> a} (a) Derive the leap—frog scheme by taking appropriate differencing of Eq. (16). What is the
order of this scheme? (b) Draw a stencil representing this scheme, and brieﬂy explain what is required to march this
scheme forward in time. (c) Apply von N eumann stability analysis to Eq. (17) and show that the ampliﬁcation factor is f=—ifsinkhj:x/1—f2sin2kh with f=%t, (18) and hence determine when the method is stable. (Note that you need to consider the cases
f > 1 and f S 1 separately.) (d) Brieﬂy explain whether the matrix approach to stability analysis introduced in the unit is
applicable in this case, and if not, why not? (6) Consider the choice 7 : h/c in the scheme (17). Given starting values a? and a; which are
exact for all j, does the scheme then provide an exact solution for n = 2, 3, ...? (15 marks) 39/83 Semester 2, 2009 Page 7 of 8 Answer Question 4 (3011) OR Question 5 (3911). Do NOT answer both questions. Question 4 (3011) The 2—D diffusion equation is 2 2
.8; = K, + where [‘5 > O is constant. ~ (19) This equation may be solved with the forward—time centred—space scheme with an equal spatial
grid spacing h in :1: and y, and with a time step 7': HT
32‘
(a) Brieﬂy explain how to implement the scheme (20) in a matrix formulation involving a vector T” of dependent variables at time tn, given that the problem involves two spatial dimensions.
(You are not required to identify the matrix involved.) (b) Apply von Neumann stability analysis to Eq. (17) by looking for trial solutions of the form 727:“: 53+ (streamer—weave; J?) <20) fl = '“(emjh + elkyjh), and show that the ampliﬁcation factor is
2
g: l+%(coskmh+coskyh—2). (21) Hence determine when the method is stable.
(c) The parabolic PDE (19) and the discretisation (20) may be used to solve the Laplace equation 82T 822/" _._ W = 0, 22 8532 + (93/2 ( )
a procedure called Jacobi relaxation. Brieﬂy explain the appropriate choice of 'r in that case,
and hence qualitatively explain why the total computation time for Jacobi relaxation scales as L4, where L is the number of spatial grid points in each dimension. (d) Jacobi relaxation may be represented by an iteration scheme with matrix formulation
Tn+1 : GTn, Where T" is a vector of dependent variable values at iteration n. Given that the spectral radius of the matrix G is 71.2 provide a quantitative estimate of the rate of convergence of the iteration, i.e. an estimate
of the number of iterations required to reduce unwanted terms in the sum resulting from iteration of Eq. (23) by a factor 10—1”.
(15 marks) 39/83 Semester 2, 2009 ' Page 8 of 8 Answer Question 4 (3011) OR Question 5 (3911). Do NOT answer both questions. Question 5 (3911) The discrete Fourier transform of of a 2—D function f (:12, y) is L L
fmn = Zijl exp —~ 1)(j — l) —— — 1)(l — 1)] (25) j=1 1:1 and the inverse transform is
1 L L N
fjl : E Z menexp [gitMm ~1)(jr— 1) + Egan — 1)(l — 1)], (26)
71121 n=1 where the function is given at discrete points (133 ,4”) with j = 1, 2, ..., L and l = l, 2, ..., L and
Where sz = f($j)yl)' (a) Show that fjl is periodic in both indices. (b) Describe briefly the consequences of the periodicity identiﬁed in (a) for numerical solution
of the Poisson equation using discrete Fourier transforms. (c) Show that the transforms deﬁned by Eqs. (25) and (26) are exact inverses. (d) Consider application of the discrete Fourier transform to the Poisson equation 52¢ (92¢
a? + Bil—2 = "*0" (27) using centred differences with equal grid spacing h in a: and y to approximate the derivatives.
Show that a discrete Fourier transform solution is provided by ~ _ 2
gm” — cos — 1)] + cos —1)]— 2' (28) (15 marks) ...
View Full
Document
 Three '11
 various

Click to edit the document details