Sie sind auf Seite 1von 2

Solving the heat equation

Charles Xie The Advanced Educational Modeling Laboratory The Concord Consortium, Concord, MA 01742
The heat conduction for heterogeneous media is modeled using the following partial differential equation:

T + (vT ) = [kT ] + q t

(1)

where k is the thermal conductivity, c is the specific heat capacity, is the density, v is the velocity field, and q is the internal heat generation. The heat equation has two parts: the diffusion part characterized by the conductivity field function and the advection part characterized by the velocity field function. The internal heat generation term can be thought of as an external force. The partial differential equation is discretized in both space and time domain in order to find approximate solutions. Sometimes, this numeric method is called the finite-difference timedomain (FDTD) method. An implicit FDTD method can be used to achieve better numeric stability:
n+ n+ Ti ,nj+,1 Ti ,nj ,k u in++1 j ,k Ti +1,1j ,k u in+1 j ,k Ti 1,1j ,k k 1, 1, + + t 2x i , j ,k ci , j ,k n+1 n+1 n +1 n +1 n +1 n +1 n +1 n +1 vi , j +1,k Ti , j +1,k vi , j 1,k Ti , j 1,k + wi , j ,k +1Ti , j ,k +1 wi , j ,k 1Ti , j ,k 1 2y 2z

n+ n+ Ti +1,1j ,k Ti ,nj+,1 Ti ,nj+,1 Ti 1,1j ,k 1 k k k i 1 / 2, j ,k k i +1 / 2, j ,k x x x

Ti ,nj++11,k Ti ,nj+,1 Ti ,nj+,1 Ti ,nj+11,k 1 k k + k i , j 1 / 2,k k i , j +1 / 2,k y y y + Ti ,nj+,1 Ti ,nj+,1 1 n Ti ,nj+,1 +1 Ti ,nj+,1 1 k k k k k i , j ,k 1 / 2 k i , j ,k +1 / 2 + qi , j ,k z z z ( 2)

where M>i0, N>j0, and L>k0, with M, N, and L representing the numbers of cubic voxels in x, y, and z directions, and x, y, and z are the lengths of the cubic voxels in the three directions, respectively. t is the time step. In theory, an implicit method is unconditionally stable, allowing any time step to be taken, and the simulation will not blow up1. Note that in Eq. (2) we also avoid directly calculating the spatial derivatives of the conductivity function, which would be

In practice, the advection part of the heat equation can cause numeric instability, especially when the velocity is high.

very large at the interfaces between two distinct kinds of media and therefore would cause numeric instability. Let:

i , j ,k = Aix, j ,k = Aiy j ,k = , Aiz, j ,k =

i , j , k ci , j , k
t k i 1 / 2, j ,k = = = k i 1, j ,k + k i , j ,k
2

(x )

k i , j 1 / 2,k

(y )

2(x ) k i , j 1,k + k i , j ,k
2

, Bix, j ,k = , Biy j ,k = , , Biz, j ,k =

k i +1 / 2, j ,k

(x )

= = =

k i , j ,k + k i +1, j ,k
2

k i , j ,k 1 / 2

(z )2

2(y ) k i , j ,k 1 + k i , j ,k 2(z )
2

k i , j +1 / 2,k

(y )2 (z )2

2(x ) k i , j ,k + k i , j +1,k
2

k i , j ,k +1 / 2

2(y ) k i , j ,k + k i , j ,k +1 2(z )
2

Cix, j ,k = Aix, j ,k + Ciy j ,k = Aiy j ,k + , , C


z i , j ,k

i , j ,k ci , j ,k uin+1 j ,k 1,
2x 1 i , j ,k ci , j ,k vin, +1,k j 2y

, Dix, j ,k = Bix, j ,k , Diy j ,k = Biy j ,k , , ,D


z i , j ,k

i , j ,k ci , j ,k u in++1 j ,k 1,
2x 1 i , j ,k ci , j ,k vin, ++1,k j 2y

=A

z i , j ,k

i , j ,k ci , j ,k win, +1k 1 j,
2z

=B

z i , j ,k

i , j ,k ci , j ,k win, +1k +1 j,
2z

(3)

Eq. (2) can be rewritten as:

Ti ,nj+,1 = k
n+ n+ i , j ,k Ti ,nj ,k + qin, j ,k + Cix, j ,k Ti 1,1j ,k + Dix, j ,k Ti +1,1j ,k + Ciy j ,k Ti ,nj+11,k + Diy j ,k Ti ,nj++11,k + Ciz, j ,k Ti ,nj+,1 1 + Diz, j ,k Ti ,nj+,1 +1 k k , ,

i , j ,k + Aix, j ,k + Bix, j ,k + Aiy j ,k + Biy j ,k + Aiz, j ,k + Biz, j ,k , ,

(4)
This is a very sparse matrix that can be solved efficiently using a relaxation method . Two boundary conditions can be used. The first kind is the Dirichilet boundary condition, which maintains the temperature at the boundary. The second kind is the Neumann boundary condition, which maintains the flux at the boundary.
2

http://en.wikipedia.org/wiki/Relaxation_method

Das könnte Ihnen auch gefallen