02.05.2014 Views

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

B.1. Cubic spline interpolation 219<br />

and, similarly,<br />

p ′ h i+1 h i+1<br />

i+1(x i+1 ) = −σ i+1 − σ i+2<br />

3 6<br />

Replacing (B.15a) and (B.15c) in (B.5), we obtain<br />

+ δ i+1 . (B.15c)<br />

h i σ i + 2(h i + h i+1 )σ i+1 + h i+1 σ i+2 = 6 (δ i+1 − δ i ) (i = 1, . . . , N − 2). (B.16)<br />

The system (B.16) is linear in the N unknowns σ i (i = 1, . . . , N). However, since<br />

it contains only N − 2 equations, it is underdetermined. This means that we need<br />

either to add two additional (independent) equations or to fix arbitrarily two of the N<br />

unknowns. The usual practice is to adopt endpoint strategies that introduce constraints<br />

on the behaviour of ϕ(x) near x 1 and x N . An endpoint strategy fixes the values of σ 1<br />

and σ N , yielding an (N − 2) × (N − 2) system in the variables σ i (i = 2, . . . , N − 1).<br />

The resulting system is, in matrix form,<br />

⎛<br />

⎞ ⎛ ⎞ ⎛ ⎞<br />

H 2 h 2 0 · · · 0 0 0 σ 2 D 2<br />

h 2 H 3 h 3 · · · 0 0 0<br />

σ 3<br />

D 3<br />

0 h 3 H 4 · · · 0 0 0<br />

σ 4<br />

D 4<br />

. . .<br />

.. . .<br />

. .<br />

.<br />

=<br />

.<br />

, (B.17)<br />

0 0 0 · · · H N−3 h N−3 0<br />

σ N−3<br />

D N−3<br />

⎜<br />

⎝ 0 0 0 · · · h N−3 H N−2 h ⎟ ⎜<br />

N−2 ⎠ ⎝ σ ⎟ ⎜<br />

N−2 ⎠ ⎝ D ⎟ N−2 ⎠<br />

0 0 0 · · · 0 h N−2 H N−1 σ N−1 D N−1<br />

where<br />

and<br />

H i = 2(h i−1 + h i ) (i = 2, . . . , N − 1) (B.18)<br />

D 2 = 6(δ 2 − δ 1 ) − h 1 σ 1<br />

D i = 6(δ i − δ i−1 ) (i = 3, . . . , N − 2) (B.19)<br />

D N−1 = 6(δ N−1 − δ N−2 ) − h N−1 σ N .<br />

(σ 1 and σ N are removed from the first and last equations, respectively). The matrix<br />

of coefficients is symmetric, tridiagonal and diagonally dominant (the larger coefficients<br />

are in the diagonal), so that the system (B.17) can be easily (and accurately) solved<br />

by Gauss elimination. The spline coefficients a i , b i , c i , d i (i = 1, . . . , N − 1) —see eq.<br />

(B.3)— can then be obtained by expanding the expressions (B.12):<br />

a i = 1<br />

6h i<br />

[<br />

σi x 3 i+1 − σ i+1x 3 i + 6 (f ix i+1 − f i+1 x i ) ] + h i<br />

6 (σ i+1x i − σ i x i+1 ),<br />

b i = 1<br />

2h i<br />

[<br />

σi+1 x 2 i − σ i x 2 i+1 + 2 (f i+1 − f i ) ] + h i<br />

6 (σ i − σ i+1 ),<br />

c i = 1<br />

2h i<br />

(σ i x i+1 − σ i+1 x i ),<br />

d i = 1<br />

6h i<br />

(σ i+1 − σ i ).<br />

(B.20)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!