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.

218 Appendix B. Numerical tools<br />

To obtain the spline coefficients a i , b i , c i , d i (i = 1, . . . , N − 1) we start from the fact<br />

that ϕ ′′ (x) is linear in [x i , x i+1 ]. Introducing the quantities<br />

and<br />

we can write the obvious identity<br />

h i ≡ x i+1 − x i (i = 1, . . . , N − 1) (B.7)<br />

σ i ≡ ϕ ′′ (x i ) (i = 1, . . . , N), (B.8)<br />

p ′′ x i+1 − x x − x i<br />

i (x) = σ i + σ i+1 (i = 1, . . . , N − 1). (B.9)<br />

h i<br />

h i<br />

Notice that x i+1 must be larger than x i in order to have h i > 0. Integrating eq. (B.9)<br />

twice with respect to x, gives for i = 1, . . . , N − 1<br />

p i (x) = σ i<br />

(x i+1 − x) 3<br />

6h i<br />

+ σ i+1<br />

(x − x i ) 3<br />

6h i<br />

+ A i (x − x i ) + B i (x i+1 − x), (B.10)<br />

where A i and B i are constants. These can be determined by introducing the expression<br />

(B.10) into eqs. (B.4), this gives the pair of eqs.<br />

σ i<br />

h 2 i<br />

6 + B ih i = f i and σ i+1<br />

h 2 i<br />

6 + A ih i = f i+1 . (B.11)<br />

Finally, solving for A i and B i and substituting the result in (B.10), we obtain<br />

p i (x) = σ i<br />

6<br />

[<br />

(xi+1 − x) 3<br />

]<br />

x i+1 − x<br />

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

h i h i<br />

[ (x − xi ) 3<br />

]<br />

x − x i<br />

− h i (x − x i ) + f i+1 .<br />

h i h i<br />

+ σ i+1<br />

6<br />

(B.12)<br />

To be able to use ϕ(x) to approximate f(x), we must find the second derivatives<br />

σ i (i = 1, . . . , N). To this end, we impose the conditions (B.5). Differentiating (B.12)<br />

gives<br />

p ′ i(x) = σ i<br />

6<br />

[<br />

− 3(x i+1 − x) 2 ]<br />

+ h i + σ i+1<br />

h i 6<br />

[ 3(x − xi ) 2<br />

h i<br />

− h i<br />

]<br />

+ δ i , (B.13)<br />

where<br />

Hence,<br />

δ i = y i+1 − y i<br />

h i<br />

. (B.14)<br />

p ′ h i<br />

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

6 + σ h i<br />

i+1<br />

3 + δ i, (B.15a)<br />

p ′ i(x i ) = −σ i<br />

h i<br />

3 − σ i+1<br />

h i<br />

6 + δ i (B.15b)

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

Saved successfully!

Ooh no, something went wrong!