Download The draft users manual (pdf

Transcript
CHAPTER 2. NUMERICAL METHODS
15
and non-dimensionalised by
1
ai = ci + si ,
2
1
bi = ci − si .
2
(2.13)
The following positivity condition for the FTCS scheme follows from the general condition in Appendix B.2.2.
|ci | ≤ 2si ,
i = 2, . . . , N
1
s 2 ≤ 1 + c2
2
1
si + si+1 ≤ 1 + (ci − ci+1 ), i = 2, . . . , N − 1
2
1
sN ≤ 1 − cN
2
(2.14)
(2.15)
(2.16)
(2.17)
The first condition can be restated as P cell ≤ 2.
With constant coefficients, the positivity conditions reduce to
|c| ≤ 2s ≤ 1,
(2.18)
which is stronger than the stability condition
c2 ≤ 2s ≤ 1.
(2.19)
The numerical “diffusion” is negative,
1
Knum = − w2 ∆t
2
(2.20)
which is negligible if c2 2s.
This method is implemented in the toolbox as the function ftcs.
The Lax-Wendroff Scheme
An alternative is the Lax-Wendroff scheme as analysed for instance in Vreugdenhil (1993).
The scheme compensates for the negative numerical “diffusion” in FTCS. The diffusive
flux is still given by equation (2.11) but the convective flux is modified
Ficonv = wi
ϕi−1 + ϕi 1 2 ∆t
− wi
(ϕi−1 − ϕi ).
2
2 ∆z
(2.21)
In the notation of equation (2.8) the Lax-Wendroff method is given by
1
∆t
Ki
αi = wi (1 + wi
)+
,
2
∆z
∆z
1
∆t
Ki
βi = wi (1 − wi
)−
,
2
∆z
∆z
(2.22)