From: sparge@globalnet.co.uk (Andy Spragg) Subject: Re: question on the numerical diffusion equation Date: Tue, 28 Sep 1999 23:46:58 GMT Newsgroups: sci.math.num-analysis,sci.math,sci.physics On Tue, 28 Sep 1999 22:10:57 GMT, psalzman@landau.ucdavis.edu wrote: >when differencing the diffusion equation: Snip >question 1 >---------- >is there a reason to go with crank nicholson over the implicit scheme? is >it more accurate? Formally, yes; its O(dx^2) rather than O(dx). It may give you oscillatory solutions when the implicit scheme wouldn't - paradoxically, this is good news (at least it is if you aspire to accuracy), and tells you that your chosen timestep is too big. The implicit scheme would give no such indication. As Orszag and Israeli said in 1974 IIRC "Any degree of freedom that is stablised by being treated implicitly is also treated inaccurately unless it is also stable when treated explicitly" (or something like that). I did notice you had a source term in your equation. What is meant by "the diffusion equation" is usually source-term-free. The presence of a source term may alter things considerably. >question 2 >---------- >do i gain anything by bumping the time derivative to higher order? for >instance, the 5 point symmetric scheme: > > f^{`} = \frac{ 8f_1 - f_2 - 8f_{-1} + f_{-2} }{ 12\Delta t } You gain the inconvenience of having to specify initial conditions at more than one time level, three more in the case you quote above. How do you do that? Some arbitrary guesswork or other, and bang goes your formally higher accuracy. There are meteorological-originating algorithms that do stuff like this (Adams-Bashforth?), don't know how they solve the problem. HTH, Andy