Solutions to select exercises

Solutions to select exercises

C H A P T E R 16 Solutions to select exercises Solution to Exercise 2.2 We will only show this for the first term; the approach is the same for the o...

48KB Sizes 0 Downloads 79 Views

C H A P T E R

16 Solutions to select exercises Solution to Exercise 2.2 We will only show this for the first term; the approach is the same for the other two. We start by expanding the   brackets and take one term at a time: For the first term, the one multiplying f t n−1 , ψ n−1 , we have   t − t n+1 (t − t n )   . (16.1) t n−1 − t n+1 t n−1 − t n The denominator is simply (−2t) (−t) = 2t 2 . Focusing on the numerator, we have to expand the multiplication with the brackets which results in t 2 − ttn+1 − tn t + tn tn+1 ,

(16.2)

where we have moved the superscript to subscript to make the powers easier to follow in the next step. Integrating (16.2) with respect to dt yields 

t 3 t 2 tn+1 t 2 tn − − − tn tn+1 t 3 2 2

tn+1 (16.3)

, tn

which results in 3 tn+1

3



3 2 tn3 tn+1 t 2 tn+1 tn tn+1 t3 2 − tn2 tn+1 . − + n − + n + tn tn+1 3 2 2 2 2

(16.4)

We now substitute tn+1 ≡ tn + t in to (16.4) and multiply out. We do not do that step here, but, needless to say, all the terms cancel except for t 3 t 3 t 3 − =− . 3 2 2 The final step is to now divide by 2t 2 , which yields −

t , 12

i.e., the coefficient in the text. Semi-Lagrangian Advection Methods and Their Applications in Geoscience https://doi.org/10.1016/B978-0-12-817222-3.00020-7

595

Copyright © 2020 Elsevier Inc. All rights reserved.

596

16. Solutions to select exercises

Solution to Exercise 3.14 Here we recall that the local truncation error is defined as   τL ≡ ψ t n+1 − ψin+1 , which implies that τL

= = − −

 ψ t

n+1



 − ψin

+ t

n − ψn ψi+1 i−1



2x

t 2

t 3 n   ψin + ψ + · · · − ψin ψin + tψin + 2 6 i  t x 2 n x 3 n n ψin + xψi,x ψi,xx + ψ + + ··· 2x 2 6 i,xxx x 2 n x 3 n n ψin + xψi,x ψi,xx + ψ − + ··· . 2 6 i,xxx

And as we have seen for the example, terms cancel, then there isthe term which  is the differential equation which cancels and the leading order terms are (x)2 , (t)2 . You would follow a similar procedure for the other exercises similar to this one. Solution to Exercise 6.4 As we know, the distance from the departure point if we have it located in the grid box i − p and i − p − 1 implies that α ≡ xi −

x . Therefore the distance from xp−3 is 3 − α. The distance to xp+2 is 2 + α, finally the distance to xp+3 is 3 + α. We will only show the term multiplying xp−3 in the centered approach, which is given by      x − xp−1

x − xp

x − xp+1

x − xp−2

    P4,1 (α) =  xp−3 − xp−2 xp−3 − xp−1 xp−3 − xp xp−3 − xp+1 (2 − α) (1 − α) α (1 + α) = (−1) (−2) (−3) (−4) α (1 + α) (1 − α) (2 − α) . = 24 You would follow the procedure above for the other three points substituting xp−2 , xp−1 , xp , and xP −1 in the denominator where we have xp−3 above, and in the numerator, you would form the differences but omitting each point in turn to obtain 5 factors for the five points. You would follow a similar derivation for the quintic interpolation polynomial as well.