11.08.2013 Views

Untitled - Cdm.unimo.it

Untitled - Cdm.unimo.it

Untitled - Cdm.unimo.it

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.

Examples 269<br />

Then, we construct the polynomial p (k+1)<br />

n<br />

consider the set of equations<br />

(12.1.14)<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

p (k+1)<br />

n<br />

(θ (n,k+1)<br />

<br />

i ) = q (k)<br />

n + h d2<br />

dx<br />

p (k+1)<br />

<br />

n (−1) = q (k)<br />

n + h d2<br />

dx<br />

by discretizing the heat equation. Thus, we<br />

p(k+1)<br />

2 n<br />

p(k+1)<br />

2 n<br />

<br />

(θ (n,k+1)<br />

i ), 1 ≤ i ≤ n,<br />

+ h[ ˜w (n,k+1)<br />

0 ] −1 d<br />

dx p(k+1)<br />

<br />

n (−1).<br />

Equation (12.1.1) has been collocated at all the points θ (n,k+1)<br />

i , 0 ≤ i ≤ n, and for<br />

i = 0 we imposed the boundary cond<strong>it</strong>ion as suggested in (9.4.23). This choice will<br />

allow us to obtain a discrete counterpart of relation (12.1.6).<br />

Basically, we used the backward Euler method (see (10.6.5)). Hence, the scheme is<br />

implic<strong>it</strong> and p (k+1)<br />

n<br />

is recovered by solving a linear system. To determine the corre-<br />

sponding matrix, we first note that, by (12.1.12) and (12.1.13), one has<br />

(12.1.15)<br />

<br />

d<br />

dx p(k+1)<br />

<br />

n<br />

=<br />

(θ (n,k+1)<br />

i ) =<br />

2<br />

1 + γk+1<br />

n<br />

j=1<br />

˜d (1)<br />

n<br />

j=0<br />

p (k+1)<br />

n<br />

(θ (n,k+1)<br />

<br />

d<br />

j )<br />

dx ˜l (n,k+1)<br />

<br />

j<br />

ij p(k+1) n (θ (n,k+1)<br />

j ), 0 ≤ i ≤ n,<br />

(θ (n,k+1)<br />

i )<br />

where we use the notations of section 7.2. Therefore, the matrix takes the form<br />

In −<br />

4h<br />

(1 + γk+1) 2 ˜ D 2 n −<br />

2h<br />

˜w (n,k+1)<br />

0 (1 + γk+1)<br />

⎡<br />

⎢<br />

⎣<br />

˜d (1)<br />

00<br />

0<br />

·<br />

·<br />

·<br />

·<br />

·<br />

·<br />

d ˜(1) 0n<br />

0<br />

· ·<br />

· ·<br />

0 · · · 0<br />

where In is the (n + 1) × (n + 1) ident<strong>it</strong>y matrix and ˜ D 2 n is the second derivative<br />

matrix at the collocation points (see section 7.2).<br />

Once we obtain p (k+1)<br />

n , we can finally update the value of the free boundary location<br />

in (12.1.10) w<strong>it</strong>h the help of (12.1.15) for i = n.<br />

⎤<br />

⎥<br />

⎦ ,

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

Saved successfully!

Ooh no, something went wrong!