Information Technology Reference
In-Depth Information
or, after dividing by %x and reordering,
C t q i
q iC1
x
c `C1
i
D c i
C tf i
:
(7.111)
To u se ( 7.111) as an updating formula for c `C1
i
to c ` -
values through a discrete version of Fick's law (7.109). Using midpoint differences,
we approximate (7.109)as
, we need to relate q i
and q iC1
D c i
c i1
x
D c iC1
c i
x
q i
iC1
;
:
Inserting this discrete Fick's law in (7.111), we arrive at the scheme
c i1
C tf `
i
C t
x 2
c `C1
i
D c i
2c i
C c iC1
:
(7.112)
This is exactly the same updating formula as in (7.91). That equation was derived
by discretizing the governing PDE by the finite difference method, whereas in the
present section we obtained the same scheme by discretizing the basic physical
expressions: (a) an integral statement of mass conservation and (b) Fick's law.
Continuous functions, and thereby PDEs, constituted the major tool of analysis
of physical problems when the fundamental laws of nature were formulated and
studied. If the laws of nature were discovered after the invention of computers, it
might have been possible that the derivations in the present section would be the
natural way to model nature, without any PDEs. Of course, from a mathematical
point of view, the derivations of (7.91)and(7.112) are mathematically equivalent.
It is just the need for discretizing integrals instead of derivatives only that makes a
difference in the reasoning.
7.4.7
Variable Coefficients
The heat conduction equation ( 7.82 ) allows for variable coefficients %.x/, c v .x/,and
k.x/. This is of particular relevance when we study heat conduction in a domain
made up of more than one material. We will now learn how to discretize ( 7.82 ).
The equation is to be fulfilled at any grid point .x i ;t ` /:
@t u .x t ;t ` / D @
k.x/ @ u
@x
%.x i /c v .x i / @
C f.x i ;t ` /:
(7.113)
@x
xDx i ;tDt `
The next step is to replace the derivatives by finite differences. For the time deriva-
tive, this procedure is the same as for the simplified, constant-coefficient heat
conduction equation (7.86), which we treated in Sect. 7.4.1 . The only new chal-
lenge is the space-derivative term. The idea is to discretize the term in two steps.
First we look at the outer first-order derivative
 
Search WWH ::




Custom Search