80
Chapter 1 Introduction to Heat Conduction and Mass Diffusion 1 Engineering Analysis of Heat Conduction Problems Heat transfer engineers investigate the rate of transport of thermal energy in engineering systems. Heat conduction is the primary thermal energy transport mechanism in solid systems. Energy is transported through solid materials when temperature gradients exist inside them. Energy moves from atom to atom by phononic as well as electronic interactions. This process is known as heat conduction. Let us consider a few selected examples of practical situations involving conduction heat transfer processes. A common processing method using in the metallurgical industry is continuous casting. Steel, copper and aluminum are routinely produced using this technology. The process is used to convert refined liquid metal into solidified ingot. Liquid metal is poured into a chilled reciprocating mold on one end and the (partially solidified) ingot is extracted on the other end. For the metal to freeze heat must be conducted through the solidified shell in contact with the mold and though the mold wall. Continuous casting engineers are interested in controlling the rate of solidification in order to avoid metallurgical defects or catastrophic breakouts. In the manufacture of jet engines, turbine disks are mill annealed by heating and main- taining them at a selected temperature and subsequent air cooling. The treatment leads to optimal metallurgical structure and properties in the finished component. Heat treating engineers are interested in controlling the rates of heating and cooling during heat treatment in order to optimize the resulting component properties. Thermal energy is internally generated in microelectronic devices by the electric current passing through them. The resulting heat must be dissipated to prevent malfunction of the device. Microelectronic engineers want to determine conduction heat transfer rates inside microelectronic packages in order to produce reliable designs. Metal components can be joined or heat treated using high density energy sources. Ap- propriate sources are laser and electron beams. As the beam impinges on the joint it produces 1

Mathematical Modeling of Heat Conduction & Diffusion

Embed Size (px)

Citation preview

Page 1: Mathematical Modeling of Heat Conduction & Diffusion

Chapter 1

Introduction to Heat Conduction andMass Diffusion

1 Engineering Analysis of Heat Conduction Problems

Heat transfer engineers investigate the rate of transport of thermal energy in engineeringsystems. Heat conduction is the primary thermal energy transport mechanism in solidsystems. Energy is transported through solid materials when temperature gradients existinside them. Energy moves from atom to atom by phononic as well as electronic interactions.This process is known as heat conduction. Let us consider a few selected examples of practicalsituations involving conduction heat transfer processes.

A common processing method using in the metallurgical industry is continuous casting.Steel, copper and aluminum are routinely produced using this technology. The process isused to convert refined liquid metal into solidified ingot. Liquid metal is poured into a chilledreciprocating mold on one end and the (partially solidified) ingot is extracted on the otherend. For the metal to freeze heat must be conducted through the solidified shell in contactwith the mold and though the mold wall. Continuous casting engineers are interested incontrolling the rate of solidification in order to avoid metallurgical defects or catastrophicbreakouts.

In the manufacture of jet engines, turbine disks are mill annealed by heating and main-taining them at a selected temperature and subsequent air cooling. The treatment leadsto optimal metallurgical structure and properties in the finished component. Heat treatingengineers are interested in controlling the rates of heating and cooling during heat treatmentin order to optimize the resulting component properties.

Thermal energy is internally generated in microelectronic devices by the electric currentpassing through them. The resulting heat must be dissipated to prevent malfunction of thedevice. Microelectronic engineers want to determine conduction heat transfer rates insidemicroelectronic packages in order to produce reliable designs.

Metal components can be joined or heat treated using high density energy sources. Ap-propriate sources are laser and electron beams. As the beam impinges on the joint it produces

1

mgdiaz
Cuadro de texto
Ernesto Gutierrez-Miravete/ Rensselaer Hartford University
Page 2: Mathematical Modeling of Heat Conduction & Diffusion

localized melting of the material. Heat dissipation by conduction into the surrounding mate-rial produces rapid solidification of the weld. Welding engineers are interested in controllingthe size and shape of the molten pool in order to obtain optimal properties in the finishedjoint.

Pressurized water nuclear reactors produce energy by radioactive disintegration of ce-ramic fissile material contained inside fuel rods. The generated energy is conducted throughthe cladding of the fuel pin and transferred onto a primary water circuit for subsequenttransfer onto a steam circuit. Nuclear engineers are interested in controlling the rate of con-duction heat transfer through the cladding in order to prevent its potentially catastrophicfailure.

Perishable foodstuffs can be preserved by freezing. The food is frozen by refrigeration atsufficiently low temperature. Since the freezing rate affects the desirable characteristics ofthe food, food engineers are interested in controlling the freezing process in order to obtainoptimal food characteristics such as flavor and nutritional value.

Another reason to undetake the study of conduction heat transfer is that the fundamentalnotion involved (energy conservation) has important analogues in other physical systems ofconsiderable interest. Specifically, the principle of mass conservation is used to formulateand solve problems in diffusional mass transfer and the principles of conservation of massand momentum are the foundation of fluid mechanics. Much of the intuition and insightacquired from a study of conduction heat transfer can be utilized to advantage when studyingdiffusion and fluid flow.

Furthermore, the mathematics of heat conduction has also important applications in thestudy of brownian motion, probability theory and in financial investment theory.

The mathematical fomulation of heat conduction problems is based on the principle ofconservation of energy which is the statement of the thermal energy balance inside a bodycontaining temperature gradients. This is now discussed in detail.

1.1 The Differential Thermal Energy Balance Equation

The energy conservation equation is a differential statement of the thermal energy balancein a body under study. The thermal energy content E (J) of a material body can changeonly if

• energy is removed/added through its bounding surface or

• energy is generated or absorbed within the body.

Consider a small volume element V inside a material undergoing heat conduction pro-cesses. The rate of change of thermal energy E per unit volume V (in J/m3s) at a pointinside the volume is

1

V

∂E

∂t=

∂H

∂t

2

Page 3: Mathematical Modeling of Heat Conduction & Diffusion

where enthalpy H of the material (in J/m3) is the amount of thermal energy per unit volumeE/V . From thermodynamics, the following relationship expresses the accumulated enthalpyin a material resulting from increasing its temperature from T1 to T2,

H =∫ T2

T1

ρCpdT

where ρ and Cp are, respectively the density (in kg/m3) and specific heat (in J/kgK) of thematerial. More complex H − T relationships are also possible.

Introducing the above H − T relationship, the rate of change of thermal energy thenbecomes

∂H

∂t= ρCp

∂T

∂t

Now, the net outflow of thermal energy through the bounding surface A of volume V isgiven by the divergence theorem as

−∫

Aq · ndA = −

∫V∇ · qdV

where q is the heat flux vector representing the amount of energy crossing through a unitboundary area per unit time (in J/m2s).

Finally, the rate of internal heat generation/absorption at a point in the body (J/m3s)is assumed given as g(r, t).

The thermal energy balance equation for the volume V is then

∫V

∂H

∂tdV =

∫V[−∇ · q + g(r, t)]dV

However, since the integrals are equal the arguments are also equal and the most generalform of the differential thermal energy balance equation is

∂H

∂t= −∇ · q + g(r, t)

This is called the differential thermal energy balance equation.

1.2 Constitutive Equation: The Heat Flux

Temperature is a measure of the degree of hotness potential at a point in a material andis a macroscopic manifestation of the total atomic (potential and kinetic) energies of theconstituent molecules. When temperature differences exist between two distinct points in amedium the result is the transport of thermal energy downhill the temperature gradient. Therate of energy transport has the units of energy per unit time (J/s = W ). The amount of

3

Page 4: Mathematical Modeling of Heat Conduction & Diffusion

thermal energy crossing a unit area per unit time while flowing in the direction of decreasingtemperature is the heat flux vector

q = −k∇T.

Here, q is the heat flux (J/m2s), T is the temperature (K), ∇ is the gradient operator and kis the thermal conductivity of the medium (W/mK). The term ∇T is thus the temperaturegradient vector. The minus sign on the right hand side indicates that thermal energy flowsfrom hot regions to cold regions.

The thermal conductivity is the rate of thermal energy transfer per unit area and perunit temperature gradient. Thermal energy is transported within a solid by the electronsand the phonons (lattice vibrations) inside the material. The transport of energy is hinderedby the presence of imperfections or by any kind of scattering sites.

Thermal conductivities of solids at room temperature vary from 0.1 W/mK for good in-sulators (e.g. asbestos) up to 400 W/mK for good conductors (e.g. silver). The conductivitychanges mildly with temperature except at very low temperatures where it can acquire verylarge values. For instance, pure copper at 10 K has a conductivity of about 20,000 W/mK.

Note that if there is macroscopic transport of matter (e.g. fluid flow) inside the body,the mass flow makes an additional contribution to the transport of energy (convective heattransfer). This contribution is disregarded when studying conduction heat transfer.

1.3 The Heat Equation

Incorporation of the constitutive equation into the energy equation above yields

∂H

∂t= ρCp

∂T

∂t= ∇ · k∇T + g(r, t)

Dividing both sides by ρCp and introducing the thermal diffusivity α of the material givenby

α =k

ρCp

(in m2/s) yields

∂T

∂t= ∇ · α∇T +

g(r, t)

ρCp

For constant thermal properties and no heat generation.

∂T

∂t= α∇2T

This is often called the heat equation.

4

Page 5: Mathematical Modeling of Heat Conduction & Diffusion

The thermal diffusivity α is a key property describing the speed of penetration into thebody of an applied thermal load at its surface. Values of α range from 0.1 × 10−6 for corkto 300× 10−6 for potasium.

Important special cases are obtained for systems under steady state conditions i.e. where∂T/∂t = 0. The temperature becomes independent of time and varies only with the spatialposition. In this case the heat equation becomes

∇ · (k∇T ) = −g(r, t)

This is called Poisson’s equation. Additional simplification is obtained if the thermal con-ductivity is assumed constant and there is no internal heat generation. The result is

∇2T = 0

This is called Laplace’s equation.The following are commonly used forms of the heat equation

∂T

∂t=

∂x(α

∂T

∂x) +

∂y(α

∂T

∂y) +

∂z(α

∂T

∂z) + g

in rectangular cartesian coordinates (x, y, z),

∂T

∂t=

1

r

∂r(αr

∂T

∂r) +

1

r2

∂φ(α

∂T

∂φ) +

∂z(α

∂T

∂z) + g

in cylindrical coordinates (r, φ, z),

∂T

∂t=

1

r2

∂r(αr2 ∂T

∂r) +

1

r2 sin θ

∂θ(α sin θ

∂T

∂θ) +

1

r2 sin2 θ

∂φ(α

∂T

∂φ) + g

in spherical coordinates (r, φ, θ), and

∂T

∂t=

1

a[

∂u1

(αa

a21

∂T

∂u1

) +∂

∂u2

(αa

a22

∂T

∂u2

) +∂

∂u3

(αa

a23

∂T

∂u3

)] + g

in general orthogonal curvilinear coordinates (u1, u2, u3), where a1, a2, a3 are the scale factorsand a = a1a2a3.

In solving moving boundary problems in heat conduction a slightly modified formulationis advantageous. The modified formulation also allows taking into account the temperaturedependence of the thermal conductivity. Instead of the temperature T one uses the new,transformed variable v (Kirchhoff transformation) defined as

v =∫ T

T0

kdT

With this, the energy balance equation becomes

∂H

∂t= ∇2v

To complete the formulation one must specify the (usually non-linear) relationship be-tween H and T . This is discussed in session 4 below.

5

Page 6: Mathematical Modeling of Heat Conduction & Diffusion

1.4 Initial and Boundary Conditions

An initial condition is the specification of the temperature distribution inside the body atthe start of the analysis (t = 0), i.e.

T (r, 0) = f(r)

For a function T (r, t) to be a solution of the heat equation it must satisfy the initial condition.Boundary conditions are the representation of the thermal conditions at the bounding

surface of the material. Boundary conditions can be of various different types on differentsegments of the boundary surface. The simplest type of condition is obtained when thetemperature is specified at the boundary, i.e.

T (∂r, t) = TB(∂r, t)

Alternatively, a boundary may be insulated from the environment and this yields theadiabatic no-flux condition

−k∂T

∂n= qn = 0

where ∂/∂n denotes differentiation in the direction of the outward normal to the surface andqn is the heat flux at the surface of the body in the direction of its outward normal.

More general boundary conditions are used to define energy exchanges between the ma-terial and its surroundings in J/m2s. The simplest condition results when the heat flux isspecified, i.e.

−k∂T

∂n= qB

A common energy exchange mechanism is convection into/from a surrounding fluid, i.e.

qconv = h(T − T∞)

where h is the heat transfer coefficient (W/m2K) and T∞ is the bulk temperature of thesurrounding environment. Another common exchange mechanism is radiation

qrad = εσ(T 4 − T 4r )

where ε, σ and Tr are, respectively the emissivity of the material (-), the Stefan-Boltzmannconstant (= 5.729× 10−8W/m2K4) and the temperature of the far-field reflecting surfaces.

The energy balance equation at the surface of the material is then

qn + qB = qconv + qrad

Boundary conditions are often expressed as linear relationships. For example, if thetemperature at the surface is specified one obtains boundary conditions of the first kind.

6

Page 7: Mathematical Modeling of Heat Conduction & Diffusion

Alternatively, if the heat flux at the surface is given, boundary conditions of the second kindresult. Next, if a (linear) relationship between surface heat flux and temperature is specified,for example,

−k∂T

∂n= h(T − T∞)

we talk about boundary conditions of the third kind. Finally, at the surface of contact oftwo solids an interface boundary condition can be stated in terms of an interfacial thermalconductance.

2 Engineering Analysis of Substance Diffusion Prob-

lems

Mass transfer engineers investigate the rate of diffusional transport in engineering systems.Materials engineers study how to control de properties of manufactured components bycarefully controlling the microstructural transformations taking place in the material duringprocessing. Microstructural transformations are changes in atomic arrangements and phasedistributions inside materials resulting from the effects of temperature and time. Diffusionaltransport is a fundamental physical mechanism available for atomic rearrangement in thesolid state. The rate of transport is particularly important at high temperatures.

Individual atoms in solid materials are in constant motion. Atoms vibrate rapidly abouttheir lattice positions and sometimes they are able to move into a neighboring location. Theaggregate movement of many such atoms constitutes mass diffusion. Diffusional mass trans-fer has been studied in great detail in metals and alloys, ceramics and polymeric materials.In crystalline solids, atoms are arranged in periodic fashion. The periodicity is disruptedby crystalline defects such as impurity atoms, vacancies, dislocations, grain boundaries anddispersed particles of various kinds. These crystalline imperfections have important effectson diffusion. Let us consider a few selected examples of practical situations involving massdiffusion processes.

Hydrogen gas is pressurized and stored in thick-wall steel vessels. Since the chemicalpotential of hydrogen on the inside wall of the vessel is higher than on the outside, hydrogenatoms diffuse out through the vessel wall (i.e. the vessel leaks at the atomic level). Adiffusion analysis can be used to estimate the rate of hydrogen loss from the vessel.

In the manufacture of certain high value added steel components one way to obtaina hard, wear resistant surface together with a fracture resistant, tough core is by means ofcarburization. During carburization, a tough, low carbon steel finished component is exposedfor some time to a carbon rich atmosphere at high temperature. Since the chemical potentialof carbon at the surface of the component is higher than in its interior, carbon diffuses intothe component. A diffusional mass transfer analysis can be used to determine the extent ofpenetration of carbon in the steel and thus control the size of the carbon-rich surface region.

7

Page 8: Mathematical Modeling of Heat Conduction & Diffusion

High grade ceramic components are produced by first synthesizing the material in theform of a fine powder and subsequent cold pressing followed by consolidation with hightemperature sintering. During high temperature sintering, the chemical potential of atomson the surface of powder particles is higher than in the neck area where particles come intocontact with each other and this results in atomic transport toward the neck areas ultimatelyresulting in the filling of the voids between particles. A diffusion analysis can be used toestimate the rate of mass transport and hence the sintering rate as a function of the variousprocess parameters.

Creep is the inelastic (i.e. permanent) deformation undergone by metallic materialsstressed at high temperatures. The stress sets up chemical potential gradients of the atomsin the material and results in atomic displacements that accomodate the bulk deformation.Diffusional mass transfer analysis can be used to estimate the rate of material transport dueto creep and hence have some control on the life of high temperature components.

Most engineering materials are multiphase mixtures. The relative proportion of thevarious phases depends on the kinetics of various transformation process undergone duringprocessing. One fundamental problem of considerable interest concerns the investigation ofthe process of dissolution of inclusions in metallic materials. A diffusional mass transferanlaysis can be used to estimate the response of the dissolution rate to variations in theprocessing parameters.

The turbine blades used in aircraft engines must be periodically inspected. After sometime in service, minute cracks appear on the blades and they must be removed to see ifthey can be repaired. A common blade repair process is the isothermal solidification processin which fine alloy powder with a relatively high concentration of Boron and mixed with abinder is applied on the cracks. Subsequently, the entire blade is heated in an oven at apreselected temperature. Then the Boron in the powder depresses the melting point andforms a thin liquid layer inside the crack. Over time, boron diffuses out of layer and into thesides of the crack. As the boron content in the crack decreases, the melting point increasesand when the boron level has decreased sufficiently, the layer solidifies and the crack isrepaired. A diffusion analysis is useful in the determination of the process parameter valuesrequired for optimal performance of the repair process.

2.1 The Differential Mass Balance Equation

We shall consider a material body consisting of two substances (binary system). One of thetwo substances is present in greater amount and is called the matrix. The other substanceis called the diffusing substance or simply the diffusant. We also assume that the diffusantatoms are much more mobile than the matrix atoms. The mass conservation equation isa differential statement of the mass balance of the diffusing substance in the body. Theamount of diffusing substance M (kg) in a material body can change only if

• substance is removed/added through its bounding surface or

8

Page 9: Mathematical Modeling of Heat Conduction & Diffusion

• substance is generated or absorbed within the body.

Consider a small volume element V inside a material undergoing mass transport pro-cesses. The rate of change of the amount of substance per unit volume (kg/m3) at a pointinside the volume is

1

V

∂M

∂t=

∂c

∂t

The amount of substance per unit volume M/V is called the concentration c of diffusingsubstance at any point in the body (in kg/m3). Other units such as percentage or atomicfraction are also commonly used for the concentration.

Now, the net outflow of diffusing substance through the bounding surface A of volumeV is given by the divergence theorem as

−∫

Aj · ndA = −

∫V∇ · jdV

where j is the mass flux vector representing the amount of substance crossing through a unitarea per unit time (in kg/m2s).

Finally, the rate of internal substance generation/absorption at a point in the body(kg/m3s) is assumed given as g(r, t).

The mass balance equation for the volume V is

∫V

∂c

∂tdV =

∫V[−∇ · j + g(r, t)]dV

However, since the integrals are equal the arguments are also equal and the most generalform of the differential mass balance equation is

∂c

∂t= −∇ · j + g(r, t)

This is called the differential mass balance equation. Note it has the same mathematicalform as the differential energy balance equation given before.

2.2 Constitutive Equation: The Mass Flux

The chemical potential µ is a measure of the chemical activity a of a substance at a pointin a material. When differences in the chemical potential (or activity) of a substance existbetween two distinct points in a medium the result is the transport of the substance downhillthe potential gradient. The value of the chemical potential of a diffusing substance in amedium is often directly proportional to the concentration of the substance, i.e. µ ∝ c.

The amount of substance crossing a unit area per unit time in the direction of decreasingpotential is the mass flux vector

j = −D∇c.

9

Page 10: Mathematical Modeling of Heat Conduction & Diffusion

Here, j is the mass flux (kg/m2s), c is the concentration (in kg/m3), ∇ is the gradientoperator and D is the mass diffusivity (also the diffusivity or diffusion coefficient) of thediffusing substance in the medium (m2/s). The term ∇c is thus the substance gradientvector. The minus sign on the right hand side indicates that matter flows from regions withhigh concentration to regions with low concentration.

The mass diffusivity is the rate of mass transfer per unit area and per unit potentialgradient. Mass is transported within a solid by bodily displacement of atoms in the material.The transport of mass may be hindered or assisted by the presence of imperfections or byany kind of scattering sites.

Mass diffusivities of atoms and molecules in solids are inversely proportional to the molec-ular weight of the diffusing species. In contrast with the thermal conductivity, the diffusivityis usually a very strong function of temperature. Specifically, in many important situationsthe functional relationship has the following form

D = D0e− Q

RT

where Q is the activation energy for diffusion, D0 is the pre-exponential coefficient, R is thegas constant and T is the absolute temperature.

Values of D vary from 10−20 for large molecules in organic materials and low temperaturesto 10−8(m2/s) for small atomic species diffusing interstitially in metals at high temperatures.

Note that if there is macroscopic transport of matter (e.g. fluid flow) inside the body, themass flow makes an additional contribution to the transport of substance (convective masstransfer). This contribution is disregarded when studying diffusional mass transfer.

2.3 The Diffusion Equation

Incorporation of the constitutive equation into the mass conservation equation above yields

∂c

∂t= ∇ ·D∇c + g(r, t)

and for constant diffusivity and no substance generation

∂c

∂t= D∇2c

This is often called the diffusion equation.Again, important special cases are obtained for systems under steady state conditions i.e.

where ∂c/∂t = 0. The concentration becomes independent of time and varies only with thespatial position. In this case the diffusion equation becomes

∇ · (D∇c) = −g(r, t)

10

Page 11: Mathematical Modeling of Heat Conduction & Diffusion

This is again Poisson’s equation. Additional simplification is obtained if the diffusivity isassumed constant and there is no internal heat generation. The result is

∇2c = 0

This is again Laplace’s equation.As in the case of heat conduction, the mass diffusivity here measures the speed of pene-

tration into the body of an applied substance load at its surface.The following are commonly used forms of the diffusion equation

∂c

∂t=

∂x(D

∂c

∂x) +

∂y(D

∂c

∂y) +

∂z(D

∂c

∂z) + g

in rectangular cartesian coordinates (x, y, z),

∂c

∂t=

1

r

∂r(Dr

∂c

∂r) +

1

r2

∂φ(D

∂c

∂φ) +

∂z(D

∂c

∂z) + g

in cylindrical coordinates (r, φ, z),

∂c

∂t=

1

r2

∂r(Dr2 ∂c

∂r) +

1

r2 sin θ

∂θ(D sin θ

∂c

∂θ) +

1

r2 sin2 θ

∂φ(D

∂c

∂φ) + g

in spherical coordinates (r, φ, θ), and

∂c

∂t=

1

a[

∂u1(D

a

a21

∂c

∂u1) +

∂u2(D

a

a22

∂c

∂u2) +

∂u3(D

a

a23

∂c

∂u3)] + g

in general orthogonal curvilinear coordinates (u1, u2, u3), where a1, a2, a3 are the scale factorsand a = a1a2a3.

In the solution of moving boundary problems in diffusion a slightly modified formulationis advantageous. The modified formulation requires consideration of the activity of thediffusing substance a = a(r, t) which is given in terms of concentration as

a = γc

where γ is the activity coefficient. The activity coefficient is typically a function of con-centration and temperature but it can be approximated as constant over narrow ranges ofvalues of these variables.

The mass balance equation then becomes

∂c

∂t= ∇ · (D

γ∇a)

The composition dependence of D/γ is easily incorporated by introducing the new trans-formed variable v (Kirchhoff transformation) given by

v =∫ a

a0

D

γda =

∫ a

a0

D′da

11

Page 12: Mathematical Modeling of Heat Conduction & Diffusion

where D′ = D/γ.With the above the diffusion equation becomes

∂c

∂t= ∇2v

To complete the formulation one must specify the (usually non-linear) relationship be-tween c and a. This is discussed in session 5 below.

2.4 Initial and Boundary Conditions

An initial condition is the specification of the concentration distribution inside the body atthe start of the analysis (t = 0), i.e.

c(r, 0) = f(r)

For a function c(r, t) to be a solution of the diffusion equation it must satisfy the initialcondition.

Boundary conditions are the representation of the concentration conditions at the bound-ing surface of the material. Boundary conditions can be of various different types on differentsegments of the boundary surface. The simplest type of condition is obtained when the con-centration is specified at the boundary, i.e.

c(∂r, t) = cB(∂r, t)

Alternatively, a boundary may be insulated from the environment and this yields theno-flux condition

−D∂c

∂n= jn = 0

where ∂/∂n denotes differentiation in the direction of the outward normal to the surface andjn is the heat flux at the surface of the body in the direction of its outward normal.

More general boundary conditions are used to define substance exchanges between thematerial and its surroundings in kg/m2s. The simplest condition results when the mass fluxis specified, i.e.

−D∂c

∂n= jB

Boundary conditions are the representation of the mass balance at the bounding surfaceof the material. They measure mass exchange interactions between the material and itssurroundings in kg/m2s. The most common mass exchange mechanism is convection

jconv = h(c− c∞)

12

Page 13: Mathematical Modeling of Heat Conduction & Diffusion

where h is the mass transfer coefficient (m/s) and c∞ is the bulk concentration of substancein the surrounding environment;

The mass balance equation at the surface of the material is then simply

jn = jconv

where jn is the mass flux at the surface of the body in the direction of its outward normal.Boundary conditions are often expressed as linear relationships. For example, if the

concentration at the surface is specified one obtains boundary conditions of the first kind.Alternatively, if the mass flux at the surface is given, boundary conditions of the secondkind result. Next, if a (linear) relationship between surface mass flux and concentration isspecified, for example,

−D∂c

∂n= h(c− c∞)

we talk about boundary conditions of the third kind.

3 General Statement of the Problem

As shown above, the mathematical expressions of heat conduction and diffusion problems areidentical. Therefore a generic formulation is appropriate. Let Ω be the body under analysisand let r ∈ Ω a point inside the body. Let u(r, t) be the value of the dependent variable oneis interested in (i.e. temperature or concentration) at the point r at time t. The problemconsists in finding the function u which satisfies

λ∂u

∂t= ∇ · Γ∇u + g(r, t)

subject to

u = u0 = f(r)

at t = 0 for all r ∈ Ω and

αu + β∂u

∂n= γ

on ∂Ω for t > 0, where λ, Γ, g, f, α, β and γ are given quantities.The parameters λ and Γ are, equal respectively to to ρCp and k in the case of the heat

equation and equal to 1 and D, respectively in the case of the diffusion equation.

13

Page 14: Mathematical Modeling of Heat Conduction & Diffusion

4 Exercises

Exercise 1. Consider the problem of one-dimensional transient conduction heat transferinside a rod of cross sectional area A where energy is conducted along the direction of theaxis of the rod (x-axis). At some arbitrary interior point of the rod x introduce a controlvolume of size ∆x. Perform an energy balance over the control volume (i.e. accumulation =input - output) and derive the one-dimensional heat equation.

Exercise 2. Derive the heat equation as in the previous exercise but for a hollow cylinderof inner and outer radii a and b, respectively.

Exercise 3. Consider the problem of one-dimensional diffusion inside a rod of crosssectional area A where substance diffuses along the direction of the axis of the rod (x-axis).At some arbitrary interior point of the rod x introduce a control volume of size ∆x. Performa mass balance over the control volume (i.e. accumulation = input - output) and derive theone-dimensional diffusion equation.

Exercise 4. Derive the heat equation as in the previous exercise but for a sphericalregion of radius R.

5 References

1.- F.H. Hildebrand, Advanced Calculus for Applications, 2nd ed. Prentice-Hall, Engle-wood Cliffs, 1976.

2.- B. Gebhart, Heat Conduction and Mass Diffusion, McGraw-Hill, New York, 1993.3.- D.W. Widder, The Heat Equation, Academic Press, New York, 1975.4.- H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, 2nd ed. Clarendon Press,

Oxford, 1959.5.- J. Crank, The Mathematics of Diffusion, 2nd ed., Clarendon Press, Oxford, 1975.6.- R. Berman, Thermal Conduction in Solids, Clarendon Press, Oxford, 19767.- M.E. Glicksman, Diffusion in Solids, John Wiley and Sons, New York, 2000.8.- E.A. Brandes and G.B. Brook, Smithells Metals Reference Book, 7th ed. Butterworth-

Heinemann, Oxford, 1992.9.- T. Ya. Kosolapova, Handbook of High Temperature Compounds, Hemisphere, New

York, 1990.10.- J. Szekely and N.J. Themelis, Rate Phenomena in Process Metallurgy, Wiley, New

York, 1971.11.- J. Szekely, J.W. Evans and J.K. Brimacombe, The Mathematical and Physical Mod-

eling of Primary Metals Processing Operations, Wiley, New York, 1988.

14

Page 15: Mathematical Modeling of Heat Conduction & Diffusion

12.- D.R. Poirier and G.H. Geiger, Transport Phenomena in Materials Processing, TMS,Warrendale, 1994.

13.- R.I.L. Guthrie, Engineering in Process Metallurgy, Oxford UP, Oxford, 1992.14.- D.R. Gaskell, An Introduction to Transport Phenomena in Materials Engineering,

Macmillan, New York, 1992.15.- W-J. Yang, S. Mochizuki and N. Nishiwaki, Transport Phenomena in Manufacturing

and Materials Processing, Elsevier, Amsterdam, 1994.16.- N.J. Themelis, Transport and Chemical Rate Phenomena, Gordon and Breach, Aus-

tralia, 1995.17.- S. Kou, Transport Phenomena in Materials Processing, Wiley, New York, 1996.18.- J.A. Dantzig and C.L. Tucker III, Modeling in Materials Processing, Cambridge UP,

Cambridge, 2001.19.- M. Rappaz, M. Bellet and M. Deville, Numerical Modeling in Materials Science and

Engineering, Springer, Berlin, 2003.

6 Units and Conversion Factors

Quantity SI Units English Units

E J BTU∂E/∂t W BTU/hrH J/m3 BTU/ft3

∂H/∂t W/m3 BTU/hrft3

q W/m2 BTU/hrft2

k W/mK BTU/hrftoFρ kg/m3 lb/ft3

Cp J/kgK BTU/lboFα m2/s ft2/hrh W/m2K BTU/hrft2oFσ 5.729× 10−8 W/m2K4 0.173× 10−8 BTU/hrft2oR4

M kg lb∂M/∂t kg/s lb/hrc kg/m3 kg/ft3

∂c/∂t kg/m3s kg/hrft3

j kg/m2s kg/hrft2

D m2/s ft2/hrh m/s ft/hr

15

Page 16: Mathematical Modeling of Heat Conduction & Diffusion

Chapter 2

Exact Solutions of Heat Conduction and DiffusionProblems

1 Introduction

This chapter is devoted to the presentation and discussion of analytical solutions to se-lected heat conduction and substance diffusion problems. First, fundamental solutions aredescribed. Fundamental solutions are solutions to selected fundamental problems in heatconduction and diffusion. They include steady as well as transient situations in the threemost commonly used coordinate systems. The method of separation of variables is subse-quently used to obtain solutions to more complicated problems under both steady state andtransient conditions and for multidimensional systems in various coordinates.

2 Heat Conduction

Here we investigate solutions to special cases of the following form of the heat equation

∂T

∂t= α∇2T

subject to properly stated initial and boundary conditions.Selected steady state problems will also be discussed. Recall that under steady state

conditions with constant thermal properties the energy balance equation is

∇2T = 0

Finally, at steady state but in the presence of distributed internal heat generation the energyequation is

∇ · (k∇T ) = −g(r)proper formulation requires the statement of boundary conditions.

Exact solutions to selected special cases of the above equations are presented below.

1

Page 17: Mathematical Modeling of Heat Conduction & Diffusion

2.1 Fundamental Solutions to Steady State Problems

Solutions to steady state problems in one dimensional systems exhibiting symmetry are easilyobtained as solutions of ordinary differential equations by direct integration.

Consider a solid slab whose thickness L is much smaller than its width and its height. Incartesian coordinates the steady state heat balance equation becomes

d2T

dx2= 0

the general solution of which is

T (x) = Ax+B

where the constants A and B must be determined from the specific boundary conditionsinvolved. This represents the steady state loss of heat through a flat wall.

Similarly, consider the infinite hollow cylinder with inner and outer radii a and b, respec-tively. At steady state the heat equation in cylindrical coordinates with azimuthal symmetrybecomes

d

dr(rdT

dr) = 0

the general solution of which is

T (r) = A ln r +B

where the constants A and B must be determined from the specific boundary conditionsinvolved. This represents the steady state loss of heat through a cylindrical wall.

Finally, consider the hollow sphere with inner and outer radii a and b, respectively. Atsteady state the heat equation in spherical coordinates with azimuthal and poloidal symmetrybecomes

d

dr(r2dT

dr) = 0

the general solution of which is

T (r) =A

r+B

where the constants A and B must be determined from the specific boundary conditionsinvolved. This represents the steady state loss of heat through a spherical shell.

2

Page 18: Mathematical Modeling of Heat Conduction & Diffusion

2.2 Fundamental Solutions to Transient Problems

Transient problems resulting from the effect of instantaneous point, line and planar sourcesof heat lead to useful fundamental solutions of the heat equation. By considering media ofinfinite or semi-infinite extent one can conveniently ignore the effect of boundary conditionson the resulting solutions.

Let a fixed amount of energy QρCp be released at time t = 0 at the origin of the threedimensional solid of infinite extent, initially at T = 0 everywhere. The heat equation is

1

α

∂T

∂t=∂2T

∂x2+∂2T

∂y2+∂2T

∂z2

and this must be solved subject to

T (x, y, z, 0) = 0

for all x, y, z and energy QρCp released instantaneously at t = 0 at the origin.The fundamental solution of this problem is

T (x, y, z, t) =Q

(4παt)3/2e−

x2+y2+z2

4αt

This solution is useful in the study of thermal explosions where a buried explosive load locatedat r = 0 is suddenly released at t = 0 and the subsequent distribution of temperature atvarious distances from the explosion is measured as a function of time. A slight modificationof the solution produced by the method of reflexion constitutes an approximation to theproblem of surface heating of bulk samples by short duration pulses of high energy beams.

Similarly, if the heat is released instantaneously at t = 0 but along the z−axis, thecorresponding fundamental solution is

T (x, y, z, t) =Q

4παte−

x2+y2

4αt

where QρCp is now the amount of heat released per unit length.Finally, if the heat is instantaneously released at t = 0 but on the entire the y − z plane

at x = 0 the corresponding fundamental solution is

T (x, y, z, t) =Q

(4παt)1/2e−

x2

4αt

where QρCp is now the amount of heat released per unit area.Another important solution is obtained for the case of a semi-infinite solid (x ≥ 0) initially

at T = T0 everywhere and suddenly exposed to a fixed temperature T = 0 at x = 0. Thestatement of the problem is

1

α

∂T

∂t=∂2T

∂x2

3

Page 19: Mathematical Modeling of Heat Conduction & Diffusion

subject to

T (x, 0) = T0

and

T (0, t) = 0

The solution is easily obtained introducing the Laplace transform. Multiply the heatequation by exp(−st), where s is the parameter of the transform, and integrate with respectto t from 0 to ∞, i.e.

1

α

∫ ∞

0exp(−st)∂T

∂tdt =

∫ ∞

0exp(−st)∂

2T

∂x2dt

introducing the notation L[T ] = T ∗ =∫∞0 exp(−st)Tdt the transformed heat equation be-

comes

d2T ∗

dx2=s

αT ∗

an ordinary differential equation which is readily solved for T ∗. The desired result T (x, t) isfinally obtained from T by inverting the transform and is

T (x, t) = T0erf(x

2√αt

)

where the error function, erf is defined as

erf(z) =2√π

∫ z

0exp(−ξ2)dξ

The above solution is an appropriate mathematical approximation of the problem of quench-ing hot bulk metal samples.

2.3 Solution to Steady State Problems in Finite Media by Sepa-ration of Variables

At steady state ∂T/∂t = 0 so that, in two dimensional systems, the temperature satisfiesLaplace’s equation

∇2T = 0

From Green’s theorem, Laplace’s equation requires that

∮ ∮∂T

∂ndσ = 0

4

Page 20: Mathematical Modeling of Heat Conduction & Diffusion

which states that under steady state conditions the boundary heat flux cannot be chosenarbitrarily but must average zero.

Also, from Green’s theorem, if T1 and T2 are two solutions of a steady state problemwhose values coincide at the boundary

∫ ∫ ∫V[∇(T2 − T1]

2dτ = 0

so that T2 − T1 = constant. The constant is zero when the problem involves only pre-scribed temperatures at the boundary (Dirichlet problem) and can be nonzero when normalderivatives of T at the boundary are specified (Neumann problem).

Consider steady state heat conduction in a thin rectangular plate of width l and heightd. The edges x = 0, x = l and y = 0 are maintained at T = 0 while at the edge y = dT (x, d) = f(x). No heat flow along the z direction perpendicular to the plate. The requiredtemperature T (x, y) satisfies

∂2T

∂x2+∂2T

∂y2= 0

To find T by separation of variables we assume the a particular solution can be representedas a product of two functions each depending on a single coordinate, i.e.

Tp(x, y) = X(x)Y (y)

substituting into Laplace’s equation gives

− 1

X

d2X

dx2=

1

Y

d2Y

dy2= k2

where k2 is a constant and this is true since the LHS is a function of x alone while the RHS afunction of y alone. The constant is selected as k2 in order to obtain a proper Sturm-Liouvilleproblem for X (with real eigenvalues). With the above the original PDE problem has beentransformed into a system of two ODE’s, i.e.

X ′′ + k2X = 0

subject to X(0) = X(l) = 0 and

Y ′′ − k2Y = 0

subject to Y (0) = 0.The solution for X(x) is

X = Xn = An sin(nπx

l)

5

Page 21: Mathematical Modeling of Heat Conduction & Diffusion

with eigenvalues

kn =nπ

l

for n = 1, 2, 3, ....The solution of Y (y) is

Yn = Bn sinh(nπy

l)

The principle of superposition allows the creation of a more general solution from indi-vidual particular solutions by simple linear combination. Therefore the final form of theparticular solution is

Tn =∞∑

n=1

an sin(nπx

l) sinh(

nπy

l)

The an’s are determined by making the above satisfy the nonhomogeneous condition aty = d, i.e.

f(x) =∞∑

n=1

[an sinh(nπd

l)] sin(

nπx

l)

which is the Fourier sine series representation of f(x) with coefficients

cn = an sinh(nπd

l) =

2

l

∫ l

0f(x) sin(

nπx

l)dx

so that the final solution is

T (x, y) =∞∑

n=1

cn sin(nπx

l)sinh(nπy

l)

sinh(nπdl

)

Therefore, as long as f(x) is representable in terms of Fourier series, the obtained solutioncoverges to the desired solution. Note also that the presence of homogeneous conditions atx = 0, x = l made feasible the determination of the required eigenvalues.

2.4 Solution to Transient Problems in Finite Media by Separationof Variables

A simple but important conduction heat transfer problem consists of determining the tem-perature history inside a solid body which is quenched from a high temperature. Morespecifically, consider the homogeneous problem of finding the one-dimensional temperaturedistribution inside a slab of thickness L and thermal diffusivity α undergoing transient heatconduction. The initial temperature distribution of the slab is T (x, 0) = f(x). The slab is

6

Page 22: Mathematical Modeling of Heat Conduction & Diffusion

quenched by forcing the temperature at its two surfaces x = 0 and x = L to become equalto zero (i.e. (T (0, t) = T (L, t) = 0; Dirichlet conditions) for t > 0.

The zero values at the boundaries make the problem homogeneous and easier to dealwith. The mathematical statement of the heat equation for this problem is:

∂2T (x, t)

∂x2=

1

α

∂T (x, t)

∂t

subject to

T (0, t) = T (L, t) = 0

and

T (x, 0) = f(x)

for all x when t = 0.The method of separation of variables starts by assuming the solution to this problem

has the following particular form

T (x, t) = X(x)Θ(t)

If the assumption is wrong, one discovers soon enough, but if it is correct then we may justfind a solution to the problem! The latter turns out to be the case for this and many othersimilar problems.

Introducing the above assumption into the heat equation and rearranging yields

1

X

d2X

dx2=

1

αΘ

dt

However since X(x) and Θ(t), the left hand side of this equation is only a function of xwhile the right hand side is a function only of t. For this to avoid being a contradiction (forarbitrary values of x and t) both sides must be equal to a constant. For physical reasons therequired constant must be negative; let us call it −ω2.

Therefore, the original PDE is transformed into the following two ODE’s

1

X

d2X

dx2= −ω2

and

1

αΘ

dt= −ω2

General solutions to these equations are readily obtained by direct integration and are

X(x) = A′ cos(ωx) +B′ sin(ωx)

7

Page 23: Mathematical Modeling of Heat Conduction & Diffusion

and

Θ(t) = C exp(−ω2αt)

and substituting back into our original assumption yields

T (x, t) = X(x)Θ(t) = [A cos(ωx) +B sin(ωx)] exp(−ω2αt)

where the constant C has been combined with A′ and B′ to give A and B without lossingany generality.

Now we introduce the boundary conditions. Since T (0, t) = 0, necessarily A = 0. Fur-thermore, since also T (L, t) = 0, then sin(ωx) = 0 (since B = 0 is an uninteresting trivialsolution.) There is an infinite number of values of ω which satisfy this conditions, i.e.

ωn =nπ

L

with n = 1, 2, 3, .... The ωn’s are the eigenvalues and the associated functions sin(ωnx) arethe eigenfunctions of this quenching problem. These eigenvalues and eigenfunctions play inheat conduction a role analogous to that of the deflection modes in structural dynamics, thevibration modes in vibration theory and the quantum states in wave mechanics.

Note that each value of ω yields an independent solution satisfying the heat equationas well as the two boundary conditions. Therefore we have now an infinite number ofindependent solutions Tn(x, t) for n = 1, 2, 3, ... given by

Tn(x, t) = [Bn sin(ωnx)] exp(−ω2nαt)

Using again the principle of superposition yields

T (x, t) =∞∑

n=1

Tn(x, t) =∞∑

n=1

[Bn sin(ωnx)] exp(−ω2nαt) =

∞∑n=1

[Bn sin(nπx

L)] exp(−(

L)2αt)

The last step is to ensure the values of the constants Bn are chosen so as to satisfy theinitial condition, i.e.

T (x, 0) = f(x) =∞∑

n=1

Bn sin(nπx

L) =

∞∑n=1

Bn sin(nπx

L)

Note that this is the Fourier sine series representation of the function f(x).Recall that a key property of the eigenfunctions is the orthonormality property expressed

in the case of the sin(ωnx) functions as

∫ L

0sin(

nπx

L) sin(

mπx

L)dx =

0 , n 6= mL/2 , n = m

8

Page 24: Mathematical Modeling of Heat Conduction & Diffusion

Using the orthonormality property one can multiply the Fourier sine series representationof f(x) by sin(mπx

L) and integrate from x = 0 to x = L to produce the result

Bn =2

L

∫ L

0f(x) sin(

nπx

L)dx

for n = 1, 2, 3, ....Explicit expressions for the Bn’s can be obtained for simple f(x)’s, for instance if

f(x) =

x , 0 ≤ x ≤ L

2

L− x , L2≤ x ≤ L

then

Bn =

4Ln2π2 , n = 1, 5, 9, ...− 4L

n2π2 , n = 3, 7, 11, ...0 , n = 2, 4, 6, ...

Finally, the resulting Bn’s can be substituted into the general solution above to give

T (x, t) =∞∑

n=1

Tn(x, t) =∞∑

n=1

[2

L

∫ L

0f(x′) sin(

nπx′

L)dx′] sin(

nπx

L) exp(−n

2π2αt

L2)

and for the specific f(x) given above

T (x, t) =4L

π2[exp(−π

2αt

L2) sin(

πx

L)− 1

9exp(−9π2αt

L2) sin(

3πx

L) + ...]

Another important special case is when the initial temperature f(x) = Ti = constant.The result in this case is

T (x, t) =4Ti

π

∞∑n=0

1

(2n+ 1)sin(

(2n+ 1)πx

L) exp(−n

2π2αt

L2)

A similar approach can be used to obtain the solution to the analogous problem for thesolid cylinder of radius a described by

∂T

∂t= α(

∂2T

∂r2+

1

r

∂T

∂r)

subject to

T (r, 0) = Ti

9

Page 25: Mathematical Modeling of Heat Conduction & Diffusion

and

k∂T

∂r+ hT = 0

at r = a. The corresponding solution is

T (r, t) = 2Ti

aλn

∞∑n=1

e−αλ2nt J1(λna)J0(λnr)

J0(λna)2 + J1(λna)2=

= 2(h

k)(Ti

a)∞∑

n=1

e−αλ2nt J0(rλn)

[(h/k)2 + λ2]J0(aλn)

where J0 is the Bessel function of first kind, order zero. The eigenvalues λ1, λ2, ... are theroots of

λJ′0(λa) + (

h

k)J0(λa) = 0

where J′0(z) = −J1(z), with J1(z) being the Bessel function of first kind, order one. The

above solution could represent the process of cooling a cylindrical shaft by exposure to aconvective environment.

If the initial temperature is Ti = 0 and boundary condition is instead one of constanttemperature, i.e. T (a, t) = TS the solution becomes

T (r, t) = TS − 2TS

a

∞∑n=1

e−αλ2nt J0(rλn)

λnJ1(aλn)

where the eigenvalues are now the roots of

J0(λa) = 0

This solution could represent the sudden heating of a cylindrical shaft.

3 Mass Diffusion

As with the heat equation, fundamental solutions to the diffusion equation are solutionsto selected fundamental problems in solid state diffusion. They include steady as well astransient situations in the three most commonly used coordinate systems. Solutions toselected multidimensional problems (steady and transient) in various coordinate systems areobtained using the separation of variables method.

Here we investigate solutions to special cases of the following form of the diffusion equa-tion

∂c

∂t= D∇2c

10

Page 26: Mathematical Modeling of Heat Conduction & Diffusion

subject to properly stated initial and boundary conditions.Selected steady state problems will also be discussed. Recall that under steady state

conditions with constant diffusivity the mass balance equation is

∇2c = 0

Finally, at steady state but in the presence of distributed internal substance generationprocesses the mass equation is

∇ · (D∇c) = −g(r)proper formulation requires the statement of boundary conditions.

Exact solutions to selected special cases of the above equations are presented below.

3.1 Fundamental Solutions to Steady State Problems

Solutions to steady state problems in one dimensional systems exhibiting symmetry are easilyobtained as solutions of ordinary differential equations by direct integration.

Consider a solid slab whose thickness L is much smaller than its width and its height. Incartesian coordinates the steady state mass balance equation becomes

d2c

dx2= 0

the general solution of which is

c(x) = Ax+B

where the constants A and B must be determined from the specific boundary conditionsinvolved. This represents the steady state diffusional leakage of substance through a flatwall.

Similarly, consider the infinite hollow cylinder with inner and outer radii a and b, re-spectively. At steady state the diffusion equation in cylindrical coordinates with azimuthalsymmetry becomes

d

dr(rdc

dr) = 0

the general solution of which is

c(r) = A ln r +B

where the constants A and B must be determined from the specific boundary conditions in-volved. This represents the steady state diffusional leakage of substance through a cylindricalwall.

11

Page 27: Mathematical Modeling of Heat Conduction & Diffusion

Finally, consider the hollow sphere with inner and outer radii a and b, respectively. Atsteady state the diffusion equation in spherical coordinates with azimuthal and poloidalsymmetry becomes

d

dr(r2 dc

dr) = 0

the general solution of which is

c(r) =A

r+B

where the constants A and B must be determined from the specific boundary conditionsinvolved. This represents the steady state diffusional leakage of substance through a sphericalshell.

3.2 Fundamental Solutions to Transient Problems

As in the case of the heat equation, transient problems resulting from the effect of instan-taneous point, line and planar sources of substance lead to useful fundamental solutionsof the diffusion equation. By considering media of infinite or semi-infinite extent one canconveniently ignore the effect of boundary conditions on the resulting solutions.

Let a fixed amount of substance M be released at time t = 0 at the origin of the threedimensional solid of infinite extent, initially at c = 0 everywhere. The diffusion equation is

1

D

∂c

∂t=∂2c

∂x2+∂2c

∂y2+∂2c

∂z2

and this must be solved subject to

c(x, y, z, 0) = 0

for all x, y, z and with the amount of substance M released instantaneously at t = 0 at theorigin.

The fundamental solution of this problem is

c(x, y, z, t) =M

(4πDt)3/2e−

x2+y2+z2

4Dt

Similarly, if the substance is released instantaneously at t = 0 but along the z−axis, thecorresponding fundamental solution is

c(x, y, z, t) =M

4πDte−

x2+y2

4Dt

where M is now the amount of substance released per unit length.

12

Page 28: Mathematical Modeling of Heat Conduction & Diffusion

Finally, if the substance is released instantaneously at t = 0 but on the entire the y − zplane at x = 0 the corresponding fundamental solution is

c(x, y, z, t) =M

(4πDt)1/2e−

x2

4Dt

where M is now the amount of substance released per unit area. This solution is useful insolid state diffusion studies of sandwich-type specimens produced by depositing a thin filmof diffusant on the clean surface of a cut sample which is then sandwiched by rejoining thesample. The specimen is subsequently exposed for selected periods of time at temperature,quenched and resulting distribution of diffusant measured by analytical means.

Another important solution is obtained for the case of a semi-infinite solid (x ≥ 0) initiallyat c = 0 everywhere and whose surface at x = 0 is maintained at c = cS for t > 0. Thestatement of the problem is

1

D

∂c

∂t=∂2c

∂x2

subject to

c(x, 0) = 0

and

c(0, t) = cS

The solution is easily obtained using again the Laplace transform. Multiply the diffusionequation by exp(−st), where s is the parameter of the transform, and integrate with respectto t from 0 to ∞, i.e.

1

D

∫ ∞

0exp(−st)∂c

∂tdt =

∫ ∞

0exp(−st) ∂

2c

∂x2dt

introducing the notation L[c] = c∗ =∫∞0 exp(−st)cdt the transformed heat equation becomes

d2c∗

dx2=

s

Dc∗

an ordinary differential equation which is readily solved for c∗. The desired result c(x, t) isfinally obtained from c by inverting the transform and is

c(x, t) = cSerfc(x

2√Dt

)

where the complementary error function, erfc is defined as

erfc(z) = 1− erf(z) =2√π

∫ ∞

zexp(−ξ2)dξ

The above solution is an approximate mathematical representation of the process of gascarburization of bulk iron samples.

13

Page 29: Mathematical Modeling of Heat Conduction & Diffusion

3.3 Solution to Steady State Problems in Finite Media by Sepa-ration of Variables

Consider the problem of determining the steady state distribution of diffusing substance ina thin annular plate where the concentrations are specified at the inner and outer radii r1and r2 as

c(r1, θ) = f1(θ)

c(r2, θ) = f2(θ)

Laplace’s equation in this case is

∇2c =∂2c

∂r2+

1

r

∂c

∂r+

1

r2

∂2c

∂θ2= 0

Assume now a particular solution is of the form

cp(r, θ) = R(r)Φ(θ)

Substituting leads to the following two ODEs

r2R′′ + rR′ − k2R = 0

Φ′′ + k2Φ = 0

where the separation constant as been chosen as k2 in order to obtain periodic trigonometricfunctions as the solutions for Φ.

The general solution for R is

R =

Akr

k +Bkr−k; k 6= 0

A0 +B0 ln r; k = 0

whereas that for Φ is

Φ =

Ck cos(kθ) +Dk sin(kθ); k 6= 0C0 +D0θ; k = 0

The periodicity requirement is satisfied by taking k = n, with n = 1, 2, 3, ....The particular single valued solution c is then

c = (a0 + b0 ln r) +∞∑

n=1

[(anrn + bnr

−n) cos(nθ)

+(cnrn + dnr

−n) sin(nθ)]

14

Page 30: Mathematical Modeling of Heat Conduction & Diffusion

Finally, the desired solution must satisfy the stated boundary conditions. Substituting f1

and f2 leads to Fourier series representations and the relationships

a0 + b0 ln r1 =1

∫ 2π

0f1(θ)dθ

a0 + b0 ln r2 =1

∫ 2π

0f2(θ)dθ

anrn1 + bnr

−n1 =

1

π

∫ 2π

0f1(θ) cos(nθ)dθ

anrn2 + bnr

−n2 =

1

π

∫ 2π

0f2(θ) cos(nθ)dθ

cnrn1 + dnr

−n1 =

1

π

∫ 2π

0f1(θ) sin(nθ)dθ

cnrn2 + dnr

−n2 =

1

π

∫ 2π

0f2(θ) sin(nθ)dθ

A special case of interest is steady state diffusion in a disk (r1 = 0) of radius r2 = asubject to a concentration of diffusant f(θ) at its boundary. In this case, the solution is

c(r, θ) = A0 +∞∑

n=1

(r

a)n[An cos(nθ) + Cn sin(nθ)]

with

A0 =1

∫ 2π

0f(θ)dθ

An =1

π

∫ 2π

0f(θ) cos(nθ)dθ

Cn =1

π

∫ 2π

0f(θ) sin(nθ)dθ

for n = 1, 2, .... Note that the concentration at the center of the disk is simply the averagevalue of the boundary concentration.

15

Page 31: Mathematical Modeling of Heat Conduction & Diffusion

Poisson’s integral formula allows direct determination of the concentration c(r, θ) fromthe values of it at its boundary as follows

c(r, θ) =1

∫ 2π

0

a2 − rr

a2 − 2ar cos(θ − ψ) + r2c(a, ψ)dψ

Another important special case is that of computing the concentration field around acircular hole (r2 →∞) of radius r1 = a subject to a concentration distribution c(a, θ) = f(θ)at the hole boundary. In this case

c(r, θ) = A0 +∞∑

n=1

(a

r)n[Bn cos(nθ) +Dn sin(nθ)]

with

A0 =1

∫ 2π

0f(θ)dθ

Bn =1

π

∫ 2π

0f(θ) cos(nθ)dθ

Dn =1

π

∫ 2π

0f(θ) sin(nθ)dθ

for n = 1, 2, .... Note that the concentration at infinity is simply the average value of theboundary concentration.

3.4 Solution to Transient Problems in Finite Media by Separationof Variables

The separation of variables method can also be used when the boundary conditions specifyvalues of the normal derivative of the concentration (Newmann conditions) or when linearcombinations of the normal derivative and the concentration itself are used (Convectiveconditions; Mixed conditions; Robin conditions). Consider the homogeneous problem oftransient diffusion in a slab initially containing a concentration c = f(x) of diffusant andsubject to convective losses into a medium with c = 0 at x = 0 and x = L. Convection masstransfer coefficients at x = 0 and x = L are, respectively h1 and h2. Assume the diffusivityD is constant.

The mathematical formulation of the problem is to find c(x, t) such that

∂2c(x, t)

∂x2=

1

D

∂c(x, t)

∂t

16

Page 32: Mathematical Modeling of Heat Conduction & Diffusion

−D∂c

∂x+ h1c = 0

at x = 0 and

D∂c

∂x+ h2c = 0

at x = L, with

c(x, 0) = f(x)

for all x when t = 0.Assume the solution is of the form c(x, t) = X(x)Θ(t) and substitute to obtain

1

X

d2X

dx2=

1

αΘ

dt= −β2

The solution for Θ(t) is

Θ(t) = exp(−Dβ2t)

while X(x) is the solution of the following eigenvalue (Sturm-Liouville) problem

d2X

dx2+ β2X = 0

with

−DdXdx

+ h1X = 0

at x = 0 and

DdX

dx+ h2X = 0

at x = L.Let the eigenvalues of this problem be βm and the eigenfunctions X(βm, x). Since the

eigenfunctions are orthogonal

∫ L

0X(βm, x)X(βn, x)dx =

0 , n 6= mN(βm) , n = m

where

N(βm) =∫ L

0X(βm, x)

2dx

17

Page 33: Mathematical Modeling of Heat Conduction & Diffusion

is the norm of the problem.It can be shown that for the above problem the eigenfunctions are

X(βm, x) = βm cos βmx+h1

k1

sinβmx

while the eigenvalues are the roots of the trascendental equation

tanβmL =βm(h1

k1+ h2

k2)

β2m − h1

k1

h2

k2

Therefore, the complete solution is of the form

c(x, t) =∞∑

m=1

AmX(βm, x) exp(−Dβ2mt)

The specific eigenfunctions are obtained by incorporating the initial condition

f(x) =∞∑

m=1

AmX(βm, x)

which expresses the representation of f(x) in terms of eigenfunctions and requires that

Am =1

N(βm)

∫ L

0X(βm, x)f(x)dx

Many problems are special cases of the above generalization. For example, the problemof diffusion out of the slab when its boundaries are maintained at constant concentration(homogeneous Dirichlet conditions) is a special case of the above in which the eigenfunctionsare

X(βm, x) = sin(βmx)

the eigenvalues are the roots of sin(βmL), i.e.

βm =mπ

L

and the norm is simply

N(βm) =∫ L

0X(βm, x)

2dx =∫ L

0sin(βmx)

2 =L

2

As another example, the case when h1 = 0 and h2 = h yields the eigenfunctions

X(βm, x) = cos(βmx)

18

Page 34: Mathematical Modeling of Heat Conduction & Diffusion

and the eigenvalues are the roots of βm tan(βmL) = h/D. Note that the eigenvalues inthis case cannot be given explicitly but must be determined by numerical solution of thegiven transcendental equation. For this purpose, it is common to rewrite the transcendentalequation as

cot(βmL) =βmL

Bi

where Bi = hL/D is the Biot number for mass transfer. This can be easily solved eithergraphically or numerically by bisection, Newton’s or secant methods. Finally, the norm inthis case is

N(βm) =∫ L

0X(βm, x)

2dx =∫ L

0cos(βmx)

2dx =

=1

2

cos(βmL) sin(βmL) + βmL

βm

=L(β2

m + (h/D)2) + (h/D)

2(β2m + (h/D)2)

Using the above for the case when f(x) = ci and simplifying yields the solution

c(x, t) = 2ci∞∑

m=1

sin(βmL) cos(βmx)

βmL+ sin(βmL cos(βmL)e−Dβ2

mt

A similar approach can be used to obtain the solution of the analogous problem for asphere of radius a described by

∂c

∂t= D(

∂2c

∂r2+

2

r

∂c

∂r)

subject to

c(r, 0) = ci

and

D∂c

∂r+ hc = 0

at r = a. The solution is

c(r, t) = 2(h

D)(cir

)∞∑

n=1

e−Dλ2nt[

a2λ2n + (a(h/D)− 1)2

λ2(a2λ2n + a(h/D)(a(h/D)− 1))

] sin(aλn) sin(rλn)

where λ1, λ2, ... are the roots of

aλ cot(aλ) + ah

D− 1 = 0

Finally, for the sphere containing initially no diffusant and whose surface in suddenlyexposed to a constant concentration of diffusant cS, the solution is

c(r, t) = cS +2acSπr

∞∑n=1

(−1)n

ne−αn2π2t/a2

sin(nπr

a)

19

Page 35: Mathematical Modeling of Heat Conduction & Diffusion

4 Exercises

Exercise 1. Obtain the solutions to 1D steady state problems with constant internalheat generation for rectangular, cylindrical and spherical coordinates.

Exercise 2. A large Titanium component at uniform initial temperature Ti = 25 degreesCelsius is exposed to an extreme environment which fixes the temperature of its surface toT0 = 525 degrees Celsius. Use the appropriate fundamental solution to investigate theheat conduction rate into the component. Assume k = 22W/mK, ρ = 4540kg/m3 andCp = 522J/kgK.

Exercise 3. Derive the expression given for Bn obtained in the solution to the transient1D heat conduction problem obtained by separation of variables. Then derive the infiniteseries solution for the special case of uniform initial temperature Ti.

Exercise 4. A diffusion specimen is prepared by depositing diffusant atoms on thesurface of the sample (1024 atoms per square meter. The surface is then sealed and thespecimen placed in a high temperature environment where the diffusivity is D = 10−18m2/sfor 4800 seconds. Use the appropriate fundamental solution to estimate the diffusion rate ofdiffusant into the sample.

Exercise 5. Derive the expression for N(βm) obtained for to the transient 1D diffusionproblem obtained by separation of variables .

Exercise 6. A solid aluminum cylinder of radius a = 0.1 m initially at a uniformtemperature of 500 degrees Celsius is cooled by convection into an environment at zerotemperature. The heat transfer coefficient is 100 W/m2K and the thermal diffusivity isα = 10−4m2/s. Use the series solution to map out the cooling process of the cylinder.

Exercise 7. A solid iron sphere is suddenly exposed to an environment which fixes thecarbon concentration at its surface to 1 percent (i.e. cS = 0.01). Use the series solution tomap out the carburization process in the sphere.

Exercise 8. Pure titanium samples are extracted from a furnace at a uniform temper-ature of 525 degrees Celsius and exposed to an environment at zero degrees. Samples are aslab 0.1 m in thickness, a cylinder 0.1 m in diameter and a sphere 0.1 m in diameter. Usethe given series solutions to determine the time required for the center of each sample toreach 100 degrees. Assume h = 1000W/m2K.

20

Page 36: Mathematical Modeling of Heat Conduction & Diffusion

5 References

1.- B. Gebhart, Heat Conduction and Mass Diffusion, McGraw-Hill, New York, 1993.2.- H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, 2nd ed. Clarendon Press,

Oxford, 1959.3.- S. Kakac and Y. Yener, Heat Conduction, 3rd ed., Taylor and Francis, Washington

DC, 1993.4.- M. Necati Ozisik, Heat Conduction, 2nd ed. John Wiley and Sons, New York, 1993.5.- J. Crank, The Mathematics of Diffusion, 2nd ed., Clarendon Press, Oxford, 1975.6.- W. Jost, Diffusion in Solids, Liquids and Gases, Academic Press, New York, 1960.7.- M.E. Glicksman, Diffusion in Solids, John Wiley and Sons, New York, 2000.

21

Page 37: Mathematical Modeling of Heat Conduction & Diffusion

Chapter 3

Numerical Solution of Heat Conduction andDiffusion Problems

1 Introduction

Recall that the mathematical expressions of heat conduction and diffusion problems arealmost identical. In the case of heat conduction the problem consists in finding the functionT (r, t) for r ∈ Ω and t > 0 which satisfies

ρCp∂T

∂t= ∇ · (k∇T ) + g(r, t)

subject to

T = T0 = f(r)

at t = 0 for all r ∈ Ω and

αT + β∂T

∂n= γ

on ∂Ω for t > 0, where Ω is the region of space under analysis and ∂Ω is its boundarysurface. Further, g, f, α, β and γ are given quantities and the coefficients α, β and γ canhave different values along different portions of the boundary surface.

In the case of substance diffusion the problem consists in finding the function c(r, t) forr ∈ Ω and t > 0 which satisfies

∂c

∂t= ∇ · (D∇c) + g(r, t)

subject to

c = c0 = f(r)

1

Page 38: Mathematical Modeling of Heat Conduction & Diffusion

at t = 0 for all r ∈ Ω and

αc + β∂c

∂n= γ

on ∂Ω for t > 0, where Ω is the region of space under analysis and ∂Ω is its boundarysurface. Further, g, f, α, β and γ are given quantities and the coefficients α, β and γ canhave different values along different portions of the boundary surface.

Errors are always involved in performing any numerical computation. Round-off errorsappear whenever computing takes place using a finite number of digits. This is the casewhen using modern computing machines. Truncation error is the error that exists even inthe absence of round-off error and is the result of neglecting higher order tems in the finitedifference approximations obtained from Taylor series expansions. Successful numerical workrequires attention to issues of accuracy and error control.

The presentation below is comprehensive but brief. It includes descriptions of the finitedifference method, the finite volume method and the finite element method. Finite differenceand finite volume methodologies are emphasized since they are readily implemented and arealso commonly used approaches to the analysis of real-world heat and mass transfer problemsin engineering systems.

2 Finite Difference Method

The simplest numerical technique to apply for the solution of the heat/diffusion equation isthe finite difference method. The basic idea behind the finite difference method is to replacethe various derivatives appearing in the mathematical formulation of the problem by suitableapproximations on a finite difference mesh of nodes.

The simplest derivation of finite difference formulae makes use of Taylor series. TheTaylor series expansions of a function y(x) about a point x are:

y(x + ∆x) = y(x) + ∆xy′(x) +∆x2

2!y′′(x) +

∆x3

3!y′′′(x) + ...

and

y(x−∆x) = y(x)−∆xy′(x) +∆x2

2!y′′(x)− ∆x3

3!y′′′(x) + ...

where ∆x is the mesh spacing.Solving the first equation above for y′(x) gives

y′(x) =y(x + ∆x)− y(x)

∆x− ∆x

2y′′(x)− ∆x2

6y′′′(x) + ...

and solving the second one

y′(x) =y(x)− y(x−∆x)

∆x+

∆x

2y′′(x)− ∆x2

6y′′′(x) + ...

2

Page 39: Mathematical Modeling of Heat Conduction & Diffusion

Finally, from the first two equations

y′(x) =y(x + ∆x)− y(x−∆x)

2∆x− ∆x2

6y′′′(x) + ...

These are called respectively the forward, backward and central approximations to the deriva-tive of y(x). Note that the second term on the right hand side in the first two equationsabove is proportional to ∆x while the same second term in the third equation is proportionalto ∆x2. Therefore, the first two equations are regarded as leading to first-order accurateapproximations to the derivative while the last formula leads to a second-order accurateapproximation.

Note that the neglect of higher order terms in the above formulae for y′(x) producesvarious approximation schemes for the derivative.

Second order derivative approximations can be similarly obtained. For example, expand-ing y(x±∆x) about x

y(x + 2∆x) = y(x) + 2∆xy′(x) + 2∆x2y′′(x) +4

3∆x3y′′′(x) + ...

and

y(x− 2∆x) = y(x)− 2∆xy′(x) + 2∆x2y′′(x)− 4

3∆x3y′′′(x) + ...

Eliminating y′(x) gives

y′′(x) =y(x + ∆x)− 2y(x) + y(x−∆x)

∆x2− 1

12∆x2y′′′(x) + ...

Neglecting the higher order terms produces the central difference approximation to y′′(x).Note that this leads to a second-order accurate approximation of the second derivative.

Finite difference approximations of derivatives for functiones involving more than oneindependent variable are readily obtained. For instance, consider the function of two in-dependent variables u(x, t). Introduce a mesh of N nodes in space xi = (i − 1)∆x where∆x = L/(N − 1) is the mesh spacing, with i = 1, 2, ..., N , the following discrete approxima-tion is readily obtained for ∂2u/∂x2 at each time level j

∂2u

∂x2≈ ui−1,j − 2ui,j + ui+1,j

∆x2

Where ui,j ≈ u(xi, tj).Similarly, introducing a mesh of M nodes in time tj = (j − 1)∆t with j = 1, 2, ...,M the

following discrete approximations are readily obtained for ∂u/∂t at each space node i,

∂u

∂t≈ ui,j+1 − ui,j

∆t

3

Page 40: Mathematical Modeling of Heat Conduction & Diffusion

i.e. the forward finite difference formula,

∂u

∂t≈ ui,j − ui,j−1

∆t

i.e. the backward finite difference formula and

∂u

∂t≈ ui,j+1 − ui,j−1

2∆t

i.e. the central finite difference formula. The forward and backward formulae are only firstorder accurate while the central difference formula is second order accurate.

Finite difference formula analogous to the original differential equation are then easilyconstructed. For instance, for the one-dimensional steady state heat equation with constantinternal heat generation and thermal conductivity

d

dx(dT

dx) +

g

k= 0

one readily obtains the analog

Ti−1 − 2Ti + Ti+1

∆x2+

g

k= 0

Now for steady state heat conduction in a rectangle with constant thermal conductivityand without internal heat generation (Laplace’s equation)

∂2T

∂x2+

∂2T

∂y2= 0

the finite difference method with ∆x = ∆y yields the easily remembered useful formula

Ti,j =1

4[Ti−1,j + Ti+1,j + Ti,j−1 + Ti,j+1]

which gives Ti,j as the average of the temperatures of neighboring nodes.Now for transient diffusion in the one dimensional case with constant diffusivity

∂c

∂t= D

∂2c

∂x2

the FD formula obtained using forward differencing in time is

ci,j+1 − ci,j

∆t= D

ci−1,j − 2ci,j + ci+1,j

∆x2

where ∆x is the mesh spacing in the x direction and ci,j ≈ c(xi, tj).

4

Page 41: Mathematical Modeling of Heat Conduction & Diffusion

The corresponding FD formula obtained using backward differencing in time is

ci,j+1 − ci,j

∆t= D

ci−1,j+1 − 2ci,j+1 + ci+1,j+1

∆x2

The above is easily generalized to three dimensions. For instance, the finite differenceanalog of the equation

∂c

∂t= D(

∂2c

∂x2+

∂2c

∂y2+

∂2c

∂z2)

obtained using forward differencing in time is

ci,j,k,n+1 − ci,j,k,n

∆t= D[

ci−1,j,k,n − 2ci,j,k,n + ci+1,j,k,n

∆x2+

ci,j−1,k,n − 2ci,j,k,n + ci,j+1,k,n

∆y2+

ci,j,k−1,n − 2ci,j,k,n + ci,j,k+1,n

∆z2]

where ∆x, ∆y and ∆z are the mesh spacings in the x, y and z directions, respectively andci,j,k,n ≈ c(xi, yj, zk, tn).

Generalizations to other coordinate systems are also straightforward. Consider the heatconduction equation in a solid cylinder of radius R with azimuthal symmetry and indepen-dent of z

∂T

∂t=

α

r[∂

∂r(r

∂T

∂r)]

Introducing a mesh of N nodes along the r−direction, ri with i = 1, 2, ..., N and ∆r =R/(N − 1) and a mesh of nodes in time tj , with j = 1, 2, ..., spacing ∆t, and forwarddifferencing in time, a finite difference analog is

Ti,j+1 − Ti,j

∆t= α

ri+1/2(Ti+1,j−Ti,j

∆r)− ri−1/2(

Ti,j−Ti−1,j

∆r)

ri∆r

where ri+1/2 is a radial position located halfway between ri+1 and ri, ri−1/2 is a radial positionlocated halfway between ri and ri−1 and Ti,j ≈ T (ri, tj).

If backward differencing in time is used instead, the result is

Ti,j+1 − Ti,j

∆t= α

ri+1/2(Ti+1,j+1−Ti,j+1

∆r)− ri−1/2(

Ti,j+1−Ti−1,j+1

∆r)

ri∆r

As a final example consider the diffusion equation in a solid sphere of radius R withazimuthal and poloidal symmetry

∂c

∂t=

D

r2[∂

∂r(r2 ∂c

∂r)]

5

Page 42: Mathematical Modeling of Heat Conduction & Diffusion

Introducing a mesh of N nodes along the r−direction, ri with i = 1, 2, ..., N and ∆r =R/(N − 1) and a mesh of nodes in time tj , with j = 1, 2, ..., spacing ∆t, and forwarddifferencing in time, a finite difference analog is

ci,j+1 − ci,j

∆t= D

r2i+1/2(

ci+1,j−ci,j

∆r)− r2

i−1/2(ci,j−ci−1,j

∆r)

r2i ∆r

where ci,j ≈ c(ri, tj).If backward differencing in time is used instead, the result is

ci,j+1 − ci,j

∆t= D

r2i+1/2(

ci+1,j+1−ci,j+1

∆r)− r2

i−1/2(ci,j+1−ci−1,j+1

∆r)

r2i ∆r

Since in every case one equation is obtained for each node and each equation relatesthe approximate value of T or c at the node with those of neighboring nodes, the result isa system of interlinked simultaneous algebraic equations. This is a feature common to allnumerical methods employed to solve the heat and diffusion equations.

3 Finite Volume Method

An alternative discretization method is based on the idea of regarding the computationdomain as subdivided into a collection of finite volumes. In this view, each finite volume isrepresented by a line in 1D, an area in 2D and a volume in 3D. Nodes, located inside each finitevolume, become the locus of computational values. In rectangular cartesian coordinates in2D the simplest finite volumes are rectangles. For each node, the rectangle faces are formedby drawing perpendiculars through the midpoints between contiguous nodes. Discretizationequations are obtained by integrating the original partial differential equation over the spanof each finite volume. The method is easily extended to nonlinear problems.

3.1 Steady State Conduction in a Slab with Internal Heat Gener-ation

The problem of steady state heat transport through the thickness L of a large slab withconstant internal heat generation g is described by the following form of the heat or diffusionequation

d

dx(k

dT

dx) + g = 0

To implement the finite volume method first subdivide the thickness of the slab into acollection of N adjoining segments of thickness not necessarily of uniform size (finite volumes)and place a node inside each volume. Thus, an arbitrary node will be called P , its size is∆x and the nodes to its left and right, respectively W and E.

6

Page 43: Mathematical Modeling of Heat Conduction & Diffusion

Note that two different types of nodes result. While interior nodes are surrounded byfinite volume on both sides, boundary nodes contain material only on one side. Here weshall concentrate on the derivation of discrete equations for the interior nodes. Those forthe boundary nodes will be discussed later.

The distance between nodes W and P is δxw and that between P and E, δxe. Thelocations of the finite volume boundaries corresponding to node P will be denoted by w ande. Finally, the distance between P and e is called δxe− and that between e and E is δxe+.If P is located in the center of the finite volume then δxe− = δxe+ = 1

2δxe.

To implement the finite volume method we now integrate the above equation over thespan of the finite volume associated with node P , i.e. from xw to xe∫ e

wd(k

dT

dx) +

∫ e

wgdx = (k

dT

dx)|e − (k

dT

dx)|w + g∆x = 0

Next, approximate the derivatives by piecewise linear profiles to give

keTE − TP

δxe− kw

TP − TW

δxw+ g∆x = 0

where the conductivities at the finite volume faces are calculated as the harmonic means ofthe values at the neighboring nodes, i.e.

ke = [1− δxe+/δxe

kP

+δxe+/δxe

kE

]−1

and

kw = [1− δxw+/δxw

kW

+δxw+/δxw

kP

]−1

Rearranging one obtains the algebraic equation

aP TP = aETE + aW TW + b

where the coefficients are given by

aE =ke

δxe

aW =kw

δxw

aP = aE + aW

and

b = g∆x

7

Page 44: Mathematical Modeling of Heat Conduction & Diffusion

One algebraic equation like the above, relating the values of T at three contiguous nodes,is obtained for each of the N nodes. Adding the this set the discrete equations associatedwith the boundary nodes one obtains a consistent set of interlinked simultaneous algebraicequations which must be solved to give the values of T for all nodal locations..

For the special case of constant thermal properties and finite volumes of uniform size(δxe = δxw = ∆x, the above is easily rearranged as

TE − 2TP + TW

∆x2+

g

k= 0

which coincides with the FD formula obtained before.

3.2 Transient Diffusion in a Slab

Now we apply the finite volume method to the discretization of a transient problem. Considerthe problem of determining c(x, t) for the slab x ∈ [0, L] and t > 0 such that

∂c

∂t=

∂x(D

∂c

∂x)

subject to

c(x, 0) = c0(x)

and

c(0, t) = c(L, t) = 0

Subdivide the slab into a collection of N adjacent segments of thickness (finite vol-umes) and introduce a set of N + 1 nodes (one inside each volume and one on each bound-ary). The positions of nodes are then labelled from left to right in the form of a sequencex1, x2, x3, ..., xi, ...xN+1. To discretize time simply select time intervals of duration ∆t atwhich the calculations will be performed. Uniform time intervals will be assumed here. Asbefore, we focus on the derivation of the discretized heat equation for all the interior volumes.

Consider now an arbitrary finite volume of size ∆x. Its representative node is locate atxP and its boundaries are located at xw and xe. . The two contiguous nodes to the leftand right of node P are W and E and their locations are xW and xE. Introduce again thevarious mesh spacings as in the steady case δxe, δxe+, δxe−, δxw, δxw+, δxw− and ∆x

Integrate now the diffusion equation over the span of the finite volume (i.e. from x tox + ∆x) and also over the time interval from t to t + ∆t , i.e.

∫ t+∆t

t

∫ xe

xw

∂c

∂tdxdt =

∫ t+∆t

t

∫ xe

xw

∂x(D

∂c

∂x)dxdt =

∫ t+∆t

t

∫ xe

xw

∂(D∂c

∂x)dt

8

Page 45: Mathematical Modeling of Heat Conduction & Diffusion

The double integration on the left hand side is straightforward and yields

∫ t+∆t

t

∫ xe

xw

∂c

∂tdxdt = ∆x(cP − co

P )

where cP is the value of c at P at time t + ∆t and coP is the value of c at P at time t.

On the right hand side, the space integration is performed first and the resulting deriva-tives are approximated from a piecewise linear profile to yield

∫ t+∆t

t

∫ xe

xw

∂(D∂u

∂x)dt =

∫ t+∆t

t[(D

∂c

∂x)|e − (D

∂c

∂x)|w]dt =

=∫ t+∆t

t[De

cE − cP

δxe−Dw

cP − cW

δxw]dt

To complete the process and important decision must be made when carrying out the timeintegration. A very general proposition is to assume that the integral is given by time-weighedaverages as follows

∫ t+∆t

tcP dt = [θcP + (1− θ)co

P ]∆t

∫ t+∆t

tcEdt = [θcE + (1− θ)co

E]∆t

and ∫ t+∆t

tcW dt = [θcW + (1− θ)co

W ]∆t

where the weighing factor θ is a pure number with 0 ≤ θ ≤ 1.Introducing the above, the integrated heat/diffusion equation then finally becomes

∆x

∆t(cP − co

P ) = θ[De(cE − cP )

δxe

− Dw(cP − cW )

δxw

] +

+(1− θ)[De(c

oE − co

P )

δxe

− Dw(coP − co

W )

δxw

]

Rearrangement gives

aP cP = aE [θcE + (1− θ)coE] + aW [θcW + (1− θ)co

W ] +

+[aoP − (1− θ)aE − (1− θ)aW ]co

P

where

aE =De

δxe

9

Page 46: Mathematical Modeling of Heat Conduction & Diffusion

aW =Dw

δxw

aoP =

∆x

∆t

and

aP = θaE + θaW + aoP

The result for the corresponding heat conduction problem is almost identical except for thefact that k’s must be used instead of D’s and the coefficient ao

P = ρCp∆x/∆t.Note that if finite volumes of uniform size are used with nodes at their midpoints, trans-

port properties are assumed constant and θ = 0 is assumed, the above reduces, after somerearrangement to

cP − coP

∆t= D

coW − 2co

P + coE

∆x2

which is identical to the result obtained earlier using the finite difference method with forwarddifferencing in time.

3.3 Transient Conduction in Multidimensional Systems

Consider the problem of estimating the temperature T (x, y, z, t) in a three-dimensional brickx ∈ [0, X], y ∈ [0, Y ], z ∈ [0, Z] undergoing transient heat conduction with constant internalheat generation. The heat equation for this case is

ρCp∂T

∂t=

∂x(k

∂T

∂x) +

∂y(k

∂T

∂y) +

∂z(k

∂T

∂z) + g

subject to specified conditions at the boundaries of the domain.The finite volume formulation regards the brick as composed of a set of adjoining volumes

each containing a node. The dimensions of the typical volume are ∆x ×∆y ×∆z and thetypical node P has six neighbors E,W,N, S, T and B. Proceeding exactly as above, thefinite volume method produces the following result (with θ = 1)

aP TP = aETE + aW TW + aNTN + aSTS + aT TT + aBTB + b

where

aE =ke∆y∆z

δxe

aW =kw∆y∆z

δxw

10

Page 47: Mathematical Modeling of Heat Conduction & Diffusion

aN =kn∆z∆x

δyn

aS =kw∆z∆x

δys

aT =kt∆x∆y

δzt

aB =kb∆x∆y

δzb

aoP = ρCp

∆x∆y∆z

∆t

b = g∆x∆y∆z + aoP T o

P

and

aP = aE + aW + aN + aS + aT + aB + aoP

Note that all the above expressions can all be generically written as

apTP =∑

anbTnb + b

where the summation contains just TE and TW in the case of uni-dimensional systems,contains TE , TW , TN and TS in the case of 2D systems and all TE, TW , TN , TS , TT and TB inthe case of three dimensional systems.

The discrete equation derived using the FV method can be rearranged for θ = 1 toproduce a very appealing and physically meaningful expression. Consider two dimensionalsystems. The generic discrete form of the conservation equation is

λP (φP − φoP )

∆V

∆t= JwAw − JeAe + JsAs − JnAn + g∆V

where the dependent variable φi is the temperature T , for heat transfer and the concentrationc, for mass transfer. Fuerther, the Ji’s are the fluxes of the transported quantity and the Ai’sare the cross-sectional areas of the finite volume faces through which the transported quantityenters/leaves the finite volume. Therefore the products JiAi are the rates of transport ofenergy or mass through the various control volume faces. Moreover, λ = ρCp for heat transferand = 1 for mass transfer. The transport rates are given as

JeAe = [(δxe−ΓP

) + (δxe+

ΓE)]−1(φP − φE)Ae

11

Page 48: Mathematical Modeling of Heat Conduction & Diffusion

JwAw = [(δxw−ΓW

) + (δxw+

ΓP)]−1(φW − φP )Aw

JnAn = [(δyn−ΓP

) + (δyn+

ΓN)]−1(φP − φN )An

JsAs = [(δys−ΓS

) + (δys+

ΓP

)]−1(φS − φP )

where Γi = ki for heat transfer and = D for mass transfer.Many special forms can be obtained by simplification of the above. For instance, for a

rectangle with constant thermal properties, without internal heat generatio at steady stateand using ∆x = ∆y one obtains

TP =1

4[TE + TW + TN + TS]

which is identical to the expression obtained before using the method of finite differences.

4 Finite Element Method

Consider the problem of multi-dimensional steady state heat conduction with internal heatgeneration and constant thermal properties

∇2T = −g

k

inside the domain Ω, and subject to T = 0 at the boundary. Intimately associated with thisboundary value problem is the following energy functional I

I(v) =∫Ω[1

2|∇v|2 − g

kv]dxdy

where v are functions among which the solution of the original heat conduction problem isincluded. It can be shown that the solution of the boundary value problem above is thefunction T (r) = v(r) that produces the minimum value of the energy functional I, i.e.

δI(T ) = 0

and this function must clearly come from the set of functions which satisfy the stated bound-ary conditions.

Discretization in the finite element method is obtained by subdiving the computationaldomain into subdomains (finite elements), commonly triangles, rectangles, tetrahedra or

12

Page 49: Mathematical Modeling of Heat Conduction & Diffusion

rectangular parallelepipeds (bricks). The vertices in each of these geometries are callednodes. The methods seeks an approximation inside each element of the form

T (r) =m∑

i=1

ciφi(r)

where the φi(r) are known linearly independent piecewise polynomials called the shape func-tions and the ci are unknown coefficients actually representing the values of T at the givennodal locations. The finite element method determines the specific values of these coefficientswhich minimize the functional I. (i.e. ∂I

∂ci= 0).

Minimization of I with respect to the ci’s produces a set of simultaneous linear algebraicequations of the form

Ac = b

where c = (c1, c2, ..., cm)T is the solution vector and b = (b1, b2, ..., bm)T is the forcing vector.Solution of the above system using standard techniques yields the desired approximation.

To illustrate the practical implementation of the finite element methodology we nowconsider the case of one-dimensional steady heat conduction with internal heat generationinside a slab, i.e.

d

dx(k

dT

dx) + g = 0 (1)

in 0 ≤ x ≤ 1 subject to the boundary conditions

T (0) = 0 (2)

andT (1) = 0 (3)

In the Galerkin formulation of the finite element method, the domain 0 ≤ x ≤ 1 isfirst subdivided into a set of n intervals (finite elements) of size ∆x connected at their ends(nodes). For each node i, introduce the following shape function of position

φi(x) =

0 0 ≤ x ≤ xi−1

N1(x) xi−1 ≤ x ≤ xi

N2(x) xi ≤ x ≤ xi+1

0 xi+1 ≤ x ≤ 1

(4)

where

N1(x) =x− xi−1

∆x(5)

and

N2(x) =xi+1 − x

∆x(6)

13

Page 50: Mathematical Modeling of Heat Conduction & Diffusion

The function φi is continuous and zero everywhere except for the interval xi−1 ≤ x ≤ xi+1,on which it consists of two linear segments with a maximum value of 1 attained at x = xi.As a set, these functions possess the very interesting property that any continuous piecewise-linear function of position, such as T (x), can be represented by the linear combination

T (x) ≈n∑

j=1

cjφj(x) (7)

where the coefficients cj are the values of T at the nodes j = 1, 2, ..., n, i.e. cj = Tj.Furthermore, the set of functions φi possess the fundamental property of orthogonality

i.e.

∫ 1

0φiφjdx =

0 j ≤ i− 2∆x/6 j = i− 1∆x/3 j = i∆x/6 j = i + 10 j ≥ i + 2

(8)

The Galerkin method requires consideration of the scalar product of the (approximated)energy equation with the shape functions, i.e.

∫ 1

0(

d

dx(k

dT

dx) + g)φi(x)dx = 0 (9)

Integrating the first term by parts and noting the behavior of the shape functions at theboundary nodes, one obtains,

∫ 1

0(−k

dT

dx

dφi

dx+ gφi)dx = 0 (10)

Since the same value of the integral is obtained if one integrates first over the interval[xi−1, xi+1] for all i and then adds up all the resulting integrals one can write

n∑i=1

∫ xi+1

xi−1

(−kdT

dx

dφi

dx+ gφi)dx = 0 (11)

Performing the integration over [xi−1, xi+1] with the given φi’s (and the approximationT (x) =

∑nj=1 cjφj(x)) one obtains,

∫ xi

xi−1

−kdT

dx

dφi

dxdx =

0 j 6= i

−k Ti−Ti−1

∆xj = i

(12)

and ∫ xi+1

xi

−kdT

dx

dφi

dxdx =

0 j 6= i

k Ti+1−Ti

∆xj = i

(13)

14

Page 51: Mathematical Modeling of Heat Conduction & Diffusion

and ∫ xi+1

xi−1

gφidx =∫ xi

xi−1

gN1dx +∫ xi+1

xi

gN2dx = g∆x (14)

Therefore, the integrated energy equation is

k

(∆x)2(−Ti−1 + 2Ti − Ti+1) = g (15)

for i = 1, 2, 3, ..., n. Note this is exactly the same result obtained using the finite differenceor the finite volume methods.

This result can be written using matrix notation as

Ac = b (16)

which is simply a tridiagonal system of linear algebraic equations where A is the globalstiffness matrix,

A =

K111 0 0 0 . .

K121 (K1

22 + K211) K2

12 0 . .0 K2

21 (K222 + K3

11) K312 0 .

0 0 K321 (K3

22 + K411) K4

12 00 . . . . .

(17)

The entries Ki11, Ki

12, Ki21, and Ki

22 are the components of the element stiffness matrices forthe i-th element

Ki =(

Ki11 Ki

12

Ki21 Ki

22

)=

k

(∆x)2

(1 −1−1 1

)(18)

Further, c = T is the vector of nodal temperatures,

c =

T1

T2

.

.

.Tn

(19)

and b is the force vector.

b =

0g..g0

(20)

15

Page 52: Mathematical Modeling of Heat Conduction & Diffusion

Note that the simplest way to handle the boundary conditions in this problem consistsof resetting the values of all the entries in the first and last rows of the stiffness matrix tozero (except for the first entry in the first row and last entry in the last row, which shouldbe set to 1), together with resetting the first and last elements of the force vector to zero(the specified temperatures at the boundaries).

As a specific illustration of the development of the finite element formulation for tran-sient problems consider the problem of one-dimensional, transient heat conduction withoutinternal heat generation through a plane wall of thickness L = 1 with constant thermalproperties. The heat equation is

∂T

∂t= α

∂2T

∂x2(21)

The problem is to be solved subject to the initial condition

T (x, 0) = To (22)

and the boundary conditionsT (0, t) = T (1, t) = 0 (23)

The Galerkin finite element method subdivides the domain 0 ≤ x ≤ 1 into a set ofn intervals (finite elements) of size ∆x connected at their ends (nodes). For each node i,introduce the following shape function of position

φi(x) =

0 0 ≤ x ≤ xi−1

N1(x) xi−1 ≤ x ≤ xi

N2(x) xi ≤ x ≤ xi+1

0 xi+1 ≤ x ≤ 1

(24)

where

N1(x) =x− xi−1

∆x(25)

and

N2(x) =xi+1 − x

∆x(26)

The function φi is continuous and zero everywhere except for the interval xi−1 ≤ x ≤ xi+1,on which it consists of two linear segments with a maximum value of 1 attained at x = xi.The set of Ni’s is used to construct a linear combination to approximate T (x, t) as follows

T (x, t) =n∑

j=1

cj(t)φj(x) =n∑

j=1

Tj(t)Nj(x) (27)

where the Fourier coefficients Tj are the values of T at the nodes j = 1, 2, ..., n. Note that theGalerkin formulation separates the dependency of the problem on t from that of x throughthe use of the shape functions.

16

Page 53: Mathematical Modeling of Heat Conduction & Diffusion

Furthermore, the set of functions Ni possess an orthogonality property such that

∫ 1

0NiNjdx =

0 j ≤ i− 2∆x/6 j = i− 1∆x/3 j = i∆x/6 j = i + 10 j ≥ i + 2

(28)

The Galerkin method is based in the weighed minimization of the residual R = Tt−αTxx

by constructing the scalar product (R,Ni) of the (approximated) energy equation with theshape functions, i.e.

(R,Ni) =∫ 1

0

∫ t

0[∂T

∂t− α

∂2T

∂x2]Ni(x)dxdt = 0 (29)

Note that the scalar product now involves integration over time as well as over space.The same value of the integral is obtained if one first integrates over the interval [xi−1, xi+1],

for all i and then collects all the resulting integrals, i.e.n∑

i=1

∫ xi+1

xi−1

∫ t

0[∂T

∂t− α

∂2T

∂x2]Ni(x)dxdt = 0 (30)

Given the dependencies on x and t, this can be written asn∑

i=1

∫ xi+1

xi−1

∫ t

0[dTj(t)

dtNj(x)Ni(x)− Tj(t)α

d2Nj(x)

dx2)Ni(x)]dxdt = 0 (31)

This can now be written using matrix notation as a set of ordinary differential equations

Ad~T

dt+ B~T = 0 (32)

where ~T is the vector of nodal temperatures

~T = (T1, T2, ..., Tn)T (33)

and A and B are matrices defined by the scalar products

A = aij = (Nj, Ni) (34)

and

B = bij = (−αd2Nj(x)

dx2, Ni) (35)

In order to solve the resulting system of ordinary differential equations, consider thefollowing generic implicit approximation with parameter θ such that 0 ≤ θ ≤ 1,

A(~T t+∆t − ~T t

∆t) + B(θ~T t+∆t + (1− θ)~T t) = 0 (36)

For any value of θ, a system of algebraic equations has to be solved. As in the steady case,introduction of the boundary conditions requires modification of the finite element equationsfor the boundary nodes.

17

Page 54: Mathematical Modeling of Heat Conduction & Diffusion

5 Boundary Conditions

Special care is require to handle more general boundary conditions. As an example considerthe situation where the following condition applies at x = 0

∂c

∂x= βc + g

where β and g can be functions of time. To derive a discrete equation for the node locatedat x = 0 one introduces a fictitious node located at x = 0− h and uses centered differencesto write

c0+h,j − c0−h,j

2h= βc0,j + g

The fictitious node value c0−h,j is then eliminated by combining the above with the corre-sponding finite difference formula (explicit, implicit or semi-implicit) which is assumed validup to x = 0− h. The result is the algebraic equation for c0,j.

Alternatively, finite volume methods can be used to derive accurate and physically mean-ingful approximative equations for complex boundary conditions. This approach is some-times preferred since it does not require consideration of auxiliary nodes.

An simple and convenient finite volume formulation of the boundary conditions is ob-tained by assuming that a certain amount of volume is associated with node 1. Considerheat conduction in a rectangular plate with constant internal heat generation and focus onthe boundary conditions applied on the vertical edge located at x = 0. Consider the threecontiguous nodes 1, 2 and 3. Node 1 is located at the boundary (x1 = 0), node 2 is at adistance ∆x from node 1 (i.e. x2 = ∆x and node 3 is at a distance ∆x from node 2 (i.e.x3 = x2 +∆x). The associated finite volumes are as follows. Node 1 has volume on only oneside (x > 0) and it value is ∆x/2. The volumes of the finite volumes asscoiated with nodes2 and 3 are ∆x.

Let the heat flux at the boundary be specified by the boundary conditions and be givenas q1. Under steady state conditions, a discrete heat balance on the finite volume associatedwith node 1 yields

q1 + g∆x

2= −k1

T2 − T1

∆x

Under transient conditions, since the volume associated with the boundary node is finite,there is energy accumulation producing a time dependent change in its temperature and theappropriate form of the energy balance becomes

q1 + g∆x

2= −k1

T o2 − T o

1

∆x+ ρCp

∆x

2

T1 − T o1

∆t

where T o1 and T o

2 are the temperatures at nodes 1 and 2 at the previous time step and T1 isthe temperature at node 1 at the next time step.

18

Page 55: Mathematical Modeling of Heat Conduction & Diffusion

The above expressions produce an equation defining the value of T1. Equations analogousto the above can be readily derived for all other boundaries. Such equations are added tothe set obtained for all interior nodes and the system solved using standard techniques.

An alternative finite volume formulation equivalent to the one above has been incorpo-rated in the research code CONDUCT. Consider again heat conduction in a rectangularplate and focus on the boundary conditions applied on the vertical edge located at x = 0.The finite volume closest to that edge is associated with three nodes. Node 1, located at theboundary, node 2, located inside the first finite volume at a distance δ from node 1, and node3, located a distance δx + δx+ away from node 2. Note that node 1 has the special featureof being located on the boundary of the first finite volume. This practice thus assumes thatthe finite volume associated with node 1 has volume of zero. Also, the right hand boundaryof the finite volume is located a distance δ from node 2 (i.e. 2δ = ∆x). If uniform meshspacing were used in this scheme, the distance between nodes 1 and 2 would be half of thatbetween any other pair of contiguous nodes.

A first approximation to the flux at the boundary of the finite volume, q2 is given by

q2 =k2

δ(T1 − T2)

A more accurate approximation is obtained by incorporating T3. This is done by approx-imating the flux at a point x, q between nodes 1 and 2 by the relationship

q = q2 +q3 − q2

2δx

Rearrangement produces the following expression

q2 =4

3[k2

T1 − T2

δ]− 1

3q3

where

q3 = [(δx

k2) + (

δx+

k3)]−1(T2 − T3)

The above expressions can then be used to compute the value of T1 for many different typesof boundary conditions.

When a multidimensional problem exhibits cylindrical or spherical symmetry it can berepresented as a one dimensional problem in polar coordinates. For example for radiallysymmetric diffusion from rods or spheres

∂c

∂t=

D

∂r(rγ ∂c

∂r) = ct = D[crr +

γ

rcr]

where γ = 1 for systems with cylindrical symmetry and γ = 2 for systems with sphericalsymmetry. Subscript notation for derivatives is used for simplicity.

19

Page 56: Mathematical Modeling of Heat Conduction & Diffusion

All ideas presented before can be directly applied here with little modification. However,special care is required to handle the symmetry condition at the origin r = 0. For symmetry,it is required that

∂c

∂r= 0

By means of a Maclaurin expansion one can show that at the origin, the following formof the diffusion equation is valid (when one has symmetry at the origin),

ct = (γ + 1)Dcrr

These expressions can then be readily discretized to obtain finite difference formulae for thepoint at the origin.

If no symmetry can be assumed the following expressions can be used instead to approx-imate the Laplacian,

∇2c ≈ 4(cM,j − c0,j)

∆r2

for cylindrical systems and

∇2c ≈ 6(cM,j − c0,j)

∆r2

for spherical systems. Here cM,j is the nearest-neighbor mean value of c obtained by averagingover all nearest neighbor nodes to the node at the origin. The above approximations canthen be used in the original PDE to obtain finite difference formulae for c0,j.

6 Computational Schemes

We can now use the discrete formulae given above to obtain numerical approximations to heatconduction and diffusion equations. Steady state problems in two dimensions are examinedfirst followed by one-dimensional transient problems.

6.1 Steady State Problems

The 2D steady state energy equation with internal heat generation in rectangular Cartesiancoordinates is

∂x(k

∂T

∂x) +

∂y(k

∂T

∂y) + g(x, y) = 0

If k and g are assumed constant this becomes Poisson’s equation

∂2T

∂x2+

∂2T

∂y2+

g

k= 0

20

Page 57: Mathematical Modeling of Heat Conduction & Diffusion

Furthermore, if g = 0 this reduces to Laplace’s equation

∂2T

∂x2+

∂2T

∂y2= 0

In practice, these equations must be solved subject to suitable boundary conditions to obtainthe function T (x, y).

As mention before, finite difference methods readily yield approximate solutions. Con-sider Laplace’s equation in a rectangular plate of width X and height Y subject to Dirichletconditions as follows

T (x, 0) = 0

T (0, y) = 0

T (X, y) = 0

and

T (x, Y ) = y(x)

Create a finite difference mesh of points xi, i = 1, 2, 3..., N and yj, j = 1, 2, 3, ...,M .Nodes (x1, yj), (xN , yj), (xi, y1) and (xi, yM) are boundary nodes while the rest are interiornodes. The value of T at a specific nodal location (xi, yj), will be denoted by T (xi, yj) andits numerical approximation will be Ti,j.

For the interior nodes, a second order accurate finite difference approximation of Laplace’sequation is

Ti−1,j − 2Ti,j + Ti+1,j

∆x2+

Ti,j−1 − 2Ti,j + Ti,j+1

∆y2= 0

The equations for the boundary nodes are simply

T (xi, 0) = Ti,1 = 0

for i = 1, 2, ..., N

T (0, yj) = T1,j = T (xN , yj) = TN,j = 0

and

T (xi, yM ) = Ti,M = f(xi)

The above is a system of N ×M simultaneous linear algebraic equations which must besolved to obtain the approximate values of the temperatures at the interior nodes.

21

Page 58: Mathematical Modeling of Heat Conduction & Diffusion

Now we must proceed to the solution of the system of algebraic equations. To simplify,consider the case of the square plate X = Y with N = M and a uniform mesh with∆x = ∆y = ∆. With this the finite difference equation for the interior node (i, j) becomes

Ti−1,j + Ti,j−1 − 4Ti,j + Ti+1,j + Ti,j+1 = 0

This is the five point formula introduced earlier.To obtain a banded matrix the mesh points must be relabeled sequentially from left to

right and from top to bottom. The resulting system can be solved by Gaussian eliminationif N and M are small and by SOR iteration when they are large.

Iteration methods can be used to solve this system of equations. These methods requirean initial guess for T (x, y) and the final result must be independent of the guess. Theiteration converges when the calculated temperature values at one iteration differ little fromthose obtained at the subsequent iteration.

In the Jacobi iteration method the interior nodes are visited sequentially and an improvedguess of the value of Ti,j is calculated using the previous guess values of all neighboring nodes.If Ti,j represents the new value and T o

i,j the old one the algorithm is

Ti,j =T o

i−1,j + T oi,j−1 + T o

i+1,j + T oi,j+1

4

Note that in the Jacobi method, the temperature field is only updated once all the nodeshave been visited.

Typically, nodes are visited from left to right and from bottom to top. I.e. (2, 2), (3, 2), ..., (N−1, 2), (2, 3), (3, 3), ..., (N−1,M−1). Note that in this scheme, when visiting node (i, j) nodes(i − 1, j) and (i, j − 1) would have already been visited (and improved guessess Ti−1,j andTi,j−1 would be available. Therefore, the Gauss-Seidel iteration uses calculated values assoon as they are available and the algorithm is

Ti,j =Ti−1,j + Ti,j−1 + T o

i+1,j + T oi,j+1

4

As a result of updating as the calculation proceeds, the Gauss-Seidel method converges at afaster rate than the Jacobi method.

It is possible to increase even more the speed of convergence by using the SuccessiveOverrelaxation (SOR) method. First, note that the Gauss-Seidel algorithm can be rewrittenas

Ti,j = T oi,j +

Ti−1,j + Ti,j−1 − 4T oi,j + T o

i+1,j + T oi,j+1

4

The second term on the right hand side is the correction or displacement in the value of thetemperature at node (i, j) from T o

i,j to Ti,j .

22

Page 59: Mathematical Modeling of Heat Conduction & Diffusion

The SOR method converges at a faster rate because larger corrections are done at eachiteration, i.e.

Ti,j = T oi,j + ω

Ti−1,j + Ti,j−1 − 4T oi,j + T o

i+1,j + T oi,j+1

4

where here the overrelaxation parameter ω is 1 ≤ ω ≤ 2.

6.2 Transient Problems: The Explicit Scheme

Consider the diffusion problem in a slab of thickness L

∂c

∂t= D

∂2c

∂x2

subject to suitable initial and boundary conditions. Using a forward difference in time toapproximately represent the time rate of change of c at nodal location (xi, tj) yields

∂c

∂t≈ c(xi, tj + ∆t)− c(xi, tj)

∆t=

ci,j+1 − ci,j

∆t

where ci,j is the numerical approximation to the value of c(xi, tj).A central difference approximation to the right hand side term around the same nodal

location yields

D∂2c

∂x2≈ D

c(xi + ∆x, tj)− 2c(xi, tj) + c(xi −∆x, tj)

∆x2= D

ci+1,j − 2ci,j + ci+1,j

∆x2

Substituting and rearranging gives the following explicit formula for the calculation ofci,j+1 for all interior nodes i, i.e.

ci,j+1 = ci,j +D∆t

∆x2(ci+1,j − 2ci,j + ci−1,j)

If the problem to be solved involves the initial condition

c(x, 0) = c0

and Dirichlet boundary conditions, for instance

c(0, t) = c(x1, tj) = c1

and

c(L, t) = c(xN , tj) = cN

23

Page 60: Mathematical Modeling of Heat Conduction & Diffusion

The above equations completely define the values of c at all the nodal locations. Sinceci,j, c1,j and cN,j are given, one computes only ci,j+1 for i = 2, 3, ..., N − 1 and for all timelevels j + 1.

An important limitation of the explicit scheme is that it is conditionally stable. It canbe shown that the calculation of ci,j with the above method produces stable and physicallymeaningful results only as long as the Courant-Friedrichs-Lewy (CFL) condition is fulfilled,i.e. as long as

D∆t

∆x2≤ 1

2

6.3 Transient Problems: The Implicit Scheme

An alternative scheme is obtained using instead a central difference approximation to theright hand side term around the nodal location (xi, tj+1). This gives

∂2c

∂x2≈ c(xi + ∆x, tj+1)− 2c(xi, tj+1) + c(xi −∆x, tj+1)

∆x2=

=ci+1,j+1 − 2ci,j+1 + ci−1,j+1

∆x2

Substituting and rearranging gives the following implicit formula for the calculation ofci,j+1 for all spatial nodes i at time level j + 1, i.e.

−D∆t

∆x2ci−1,j+1 + (2

D∆t

∆x2+ 1)ci,j+1 − D∆t

∆x2ci+1,j+1 = ci,j

For given values of c at the boundaries, the above formula constitutes a system of si-multaneous algebraic equations the solution of which yields the desired values of ci,j+1 for alli = 2, 3, ..., N − 1 and for all time levels j + 1.

Introducing the expressions

ai = ci =D∆t

∆x2

bi = 2D∆t

∆x2+ 1

and

di = ci,j

the system of equations becomes

−aici−1,j+1 + bici,j+1 − cici+1,j+1 = di

24

Page 61: Mathematical Modeling of Heat Conduction & Diffusion

for i = 2, 3, ..., N − 1 for each and every time level j + 1 such that j = 1, 2, ...,M . Recallthat the values of ci,1 are given for all i by the initial condition of the problem .

The resulting system is tridiagonal, the associated matrix is diagonally dominant and itis easily and efficiently solved by the Thomas algorithm.

The main idea in the Thomas algorithm is to first reduce the original tridiagonal systemof equations to a simple upper triangular form and then backsubstitute to determine thevalues of all the unknowns. Specifically, new variables βi, Si and Di for i = 1, 2, 3, ..., N areintroduced and computed as follows, first

β1 =d1

b1

next, recursively for i = 2, 3, ..., N

Si =ai

bi−1

Di = bi − Sici−1

βi = di − Siβi−1

Then, backsubstitution is performed to obtain the solution, first for i = N

cN,j+1 =βN

DN

and finally for i = N − 1, N − 2, ..., 2, 1 as follows

ci,j+1 =(βi − cici+1,j+1)

Di

An advantage of the implicit scheme is that it is unconditionally stable. However, accu-racy considerations preclude the use of large values of ∆t.

Consider the problem of transient heat conduction in a slab and recall the discrete fullyimplicit formula obtained when using the finite volume method

aP TP = aETE + aW TW + b

where

aE =ke

δxe

,

aW =kw

δxw,

25

Page 62: Mathematical Modeling of Heat Conduction & Diffusion

b = aoP T o

P ,

aoP = ρCp

∆x

∆t,

and

aP = aE + aW + aoP

Here the superscript o denotes time level t and the subscript P refers to the node locatedat xi. In this form, the implicit scheme leads to a tridiagonal system of algebraic equationswhich can be solved by the TDM algorithm described before.

6.4 The Semi-implicit Scheme

Still another possibility is to use weight averaging for the finite difference approximation ofthe right hand side term. Specifically, consider approximating the problem of diffusion in aslab using the method of finite differences. Recall that in this case the right hand side of thediffusion equation becomes

∂2c

∂x2≈ θ

c(xi + ∆x, tj+1)− 2c(xi, tj+1) + c(xi −∆x, tj+1)

∆x2+

+(1− θ)c(xi + ∆x, tj)− 2c(xi, tj) + c(xi −∆x, tj)

∆x2=

= θci+1,j+1 − 2ci,j+1 + ci+1,j+1

∆x2+ (1− θ)

ci+1,j − 2ci,j + ci+1,j

∆x2

where 0 ≤ θ ≤ 1.Substituting and rearranging gives a semi-implicit formula for the calculation of ci,j+1 for

all spatial nodes i, i.e.

−θD∆t

∆x2ci−1,j+1 + (2θ

D∆t

∆x2+ 1)ci,j+1 − θD∆t

∆x2ci+1,j+1 =

= ci,j + (1− θ)D∆t

∆x2(ci+1,j − 2ci,j + ci+1,j)

The resulting system is also tridiagonal and it is also easily and efficiently solved by theThomas algorithm. The scheme is also unconditionally stable. If θ = 1

2one obtains the

Crank-Nicolson scheme.Note that the above formula reduces to the explicit scheme when θ = 0 and to the implicit

scheme when θ = 1.Although the choice of ∆x is arbitrary, the value of ∆t may have to be selected based on

stability or accuracy considerations.

26

Page 63: Mathematical Modeling of Heat Conduction & Diffusion

Recall that the generic discrete expression of the energy balance produced by the finitevolume method is

apTP =∑

anbTnb + b

The Gauss-Seidel point by point method can be readily implemented to produce numericalapproximations to the solution TP for all nodes in a finite volume discretization. To do thisrewrite the above equation as

TP =

∑anbT

∗nb + b

aP

where T ∗nb stands for the nearest neighbor value of T currently existing in the storage memory

of the computer. This is the most recently calculated value for those neighbors that havealready been visited by the computational algorithm but is the value obtained in the previousiteration for those yet to be visited nodes. Convergence of the Gauss-Seidel method is assuredif the associated matrix of coefficients is strictly diagonally dominant. A sufficient conditionfor convergence is then that ∑ |anb|

|aP | ≤ 1

The rate of convergence can be significantly improved by implementing the line by lineiteration method. In this method one focuses on the nodes lying along a selected coordinatedirection (say y). If the discrete equation is written such that only those nodes are regardedas unknowns at any given iteration step then the resulting system of equations only involvesTP , TN and TS, i.e. it is a tridiagonal system. Ssytems of this form are solve very efficientlyusing the TDMA algorithm. The line by line iteration method then proceeds by visitinglines of nodes, one at a time, and solving for the all the TP ’s along the line using the mostrecent values of Tnb existing in the memory of the computer. The entire mesh is visited inthis fashion until convergence is achieved. The result represents the value of T for all nodesat position (x, y, z) and time t.

7 Exercises

Exercise 1. Derive the equation for q2 implemented in the code CONDUCT.

Exercise 2. Consider steady state heat conduction in a thin square plate of edge = 100cm. The edges x = 0, x = l and y = 0 are maintained at u = 0 while at the edge y = du(x, d) = 100. No heat flow along the z direction perpendicular to the plate. The requiredtemperature u(x, y) satisfies

∂2T

∂x2+

∂2T

∂y2= 0

27

Page 64: Mathematical Modeling of Heat Conduction & Diffusion

This problem is readily solved in closed form by separation of variables yielding

T (x, y) =∞∑

n=1

cn sin(nπ

100x)

sinh( nπ100

y)

sinh(nπ)

with

cn =

0 n even400nπ

n odd

Solve the above problem numerically using the finite difference method and compare yourresults against the analytical solution.

Exercise 3. Derive the finite difference formula analog to the transient 1D diffusionequation using the explicit scheme.

Exercise 4. Derive the finite difference formula analog to the transient 1D diffusionequation using the implicit scheme.

Exercise 5. Obtain the expressions for ai, bi, ci and di for the C-N scheme applied tothe diffusion equation.

Exercise 6. A large, 0.1 meter thick steel slab emerges from a rolling mill with a uniformtemperature of 1000 degrees Celsius and is left to cool by convection into an environment atzero degrees Celsius. For this steel k = 50W/mK, ρ = 7, 900kg/m3 and Cp = 470J/kgK.Assume the heat transfer coefficient is h = 250W/m2K. Investigate the cooling process bysolving the problem numerically using a finite difference method and explicit, implicit andsemi-implicit schemes. Compare your results against the analytical solution and investigatethe sensitivity of the results to the mesh resolution.

Exercise 7. A solid pure iron cylinder with radius a = 0.01 m is exposed to a carburizingenvironment which fixes the surface concentration of carbon to 1 percent cS = 0.01. For atemperature of 1000 degrees Celsius, D = 10−11m2/s is the diffusivity of carbon in theaustenite phase of iron. Use the method of finite differences to map out the progress of thiscarburization treatment.

8 References

1.- K.W. Morton and D.F. Mayers, Numerical Solution of Partial Differential Equations,Cambridge University Press, Cambridge, 1994.

28

Page 65: Mathematical Modeling of Heat Conduction & Diffusion

2.- C. Johnson, Numerical Solution of Partial Differential Equations by the Finite ElementMethod, Cambridge University Press, Cambridge, 1987.

3.- W.J. Minkowycz et al (eds), Handbook of Numerical Heat Transfer, John Wiley andSons, New York, 1988.

4.- M. Necati Ozisik, Finite Difference Methods in Heat Transfer, CRC Press, BocaRaton, 1994.

5.- S.V. Patankar, Numerical Heat Transfer and Fluid Flow, Hemisphere, Washington,1980.

6.- Y. Jaluria and K.E. Torrance, Computational Heat Transfer, 2nd ed. Taylor andFrancis, New York, 2003.

7.- G. Comini, S. Del Giudice and C. Nonino, Finite Element Analysis in Heat Transfer,Taylor and Francis, Washington DC, 1994.

8.- J.M. Dowden, The Mathematics of Thermal Modeling, Chapman and Hall/CRC,Boca Raton, 2001.

29

Page 66: Mathematical Modeling of Heat Conduction & Diffusion

Chapter 4

Moving Boundary Problems in Heat Conduction

1 Introduction

Changes in atomic arrangements in condensed phases involve the release or absorption ofthermal energy at the phase interface. Common examples are the release of latent heat offreezing during the solidification of a metal, the austenitization of steel during heat treatmentand crack sealing during wide gap braze repair of airfoils. The mathematical formulation ofthese problems require the statement of heat equations for the phases involved, specificationof necessary initial and boundary conditions and a description of conditions at the interfacebetween the phases. Since the position of the interface is not known in advance and mustbe determined as part of the solution, the problem is nonlinear.

Consider the problem of solidification in a semiinfinite region 0 < x <∞ initially liquidand at uniform temperature T (x, 0) = Ti > Tm where Tm is the melting/freezing point ofthe substance in question and subjected to a fixed temperature T (0, t) = T0 < Tm at itsboundary x = 0. After some time t, a solid skin has formed and the interface separatingsolid and liquid phases ξ(t), moves along the positive x direction.

The formulation of the problem requires finding functions Ts(x, t), Tl(x, t) and ξ(t) suchthat

∂2Ts

∂x2=

1

αs

∂Ts

∂t

in 0 < x < ξ(t),

∂2Tl

∂x2=

1

αl

∂Tl

∂t

in ξ(t) < x <∞, subject to

Ts(0, t) = T0

at x = 0,

Tl(x, t)→ Ti

1

Page 67: Mathematical Modeling of Heat Conduction & Diffusion

as x→∞, and

Ts(ξ, t) = Tl(ξ, t) = Tm

and

ks∂Ts

∂x− kl

∂Tl

∂x= ρL

dt= ρLv

at the interface boundary x = ξ(t). The first of the last two conditions specifies perfectcontact at the solid-liquid interface while the second is a statement of the thermal energybalance there. Here L is the latent heat of freezing (J/kg) and v = dξ/dt is the velocity ofadvancement of the solid-liquid interface.

If the densities of solid and liquid phases are different, (say ρs > ρl) the ρs must besubstituted for ρ in the RHS of the interface heat balance equation. Also, if convection inthe liquid is the dominant mode of heat transfer near the interface, the heat flux in the liquidmust be given instead by h(T∞ − Tm).

In 3D systems, the corresponding form of the heat balance at the interface is

ks∂Ts

∂n− kl

∂Tl

∂n= ρLvn

where vn is the interface velocity in the normal direction.

2 Exact Solutions

Consider the problem of melting of a semi-infinite (0 < x <∞) solid, which is initially at auniform temperature Ti ≈ Tm . Suddenly, the temperature at x = 0 is fixed at T0 > Tm andmaintained there. The solid begins to melt and the liquid-solid interface advances along thepositive x direction. since Ts(x, t) = Tm one must find Tl(x, t) in 0 < x < ξ(t) such that

∂2Tl

∂x2=

1

αl

∂Tl

∂t

subject to

Tl(0, t) = T0

Ts(x, 0) = Ti

for x > 0 and t = 0. The conditions at the interface x = ξ(t) are

Tl(ξ, t) = Tm

2

Page 68: Mathematical Modeling of Heat Conduction & Diffusion

and

−kl∂Tl

∂x= ρL

dt

A solution of the form

Tl(x, t) = T0 + B × erf [x

2√

αlt]

where the constant B is still to be determined satisfies the heat equation and the boundarycondition at x = 0. Satisfaction of the perfect thermal contact condition at the liquid-solidinterface requires that

B =Tm − T0

erf [ξ/2√

αlt]=

Tm − T0

erf(λ)

where λ = ξ/2√

αlt must be determined so as to satisfy the remaining heat balance conditionat the interface. The required solution thus becomes

Tl(x, t)− T0

Tm − T0

=erf [x/2

√αlt]

erf(λ)

Finally, the required value of λ is the root of the trascendental equation

λeλ2

erf(λ) =Cp(T0 − Tm)

L√

π

A related problem is the solidification of a large mass of supercooled liquid (i.e. Ti < Tm)from its surface maintained at Tm. Furthermore, no heat loss is allowed through the solid sothat its temperature is everywhere equal to Tm.

By an argument similar to the one above, the temperature profile in the supercooledliquid is given by

Tl(x, t)− Ti

Tm − Ti

=erfc[x/2

√αlt]

erfc(λ)

where the required value of λ is the root of the trascendental equation

λeλ2

erfc(λ) =Cp(Tm − Ti)

L√

π

Consider again the initial problem of a semiinfinite liquid (0 ≤ x < ∞), initially atuniform temperature T (x, 0) = Ti > Tm whose surface at x = 0 is maintained at T (0, t) =

3

Page 69: Mathematical Modeling of Heat Conduction & Diffusion

T0 < Tm begining at t = 0. A solid shell will form and the solid-liquid interface will advancealong the positive x direction. Since here T0 < Tm and Ti > Tm temperature profiles willdevelop in the two phases. Solutions for Ts(x, t) and Tl(x, t) of the forms

Ts(x, t) = T0 + A× erf [x/2√

αst]

and

Tl(x, t) = Ti + B × erfc[x/2√

αlt]

were A and B are constants yet to be determined, satisfy the heat equation, the boundaryconditions at x = 0 and x→∞ as well as the initial condition.

The condition of perfect contact at the solid-liquid interface requires that

A =Tm − T0

erf(λ)

and

B =Tm − Ti

erfc[λ√

αs/αl]

where

λ =ξ(t)

2√

αst

with the above, the required solutions are

Ts(x, t)− T0

Tm − T0

=erf [x/2

√αst]

erf(λ)

and

Tl(x, t)− Ti

Tm − Ti

=erfc[x/2

√αlt]

erfc[λ√

αs/αl]

Finally, a trascendental equation for the determination of λ is obtained by forcing theabove expressions to satisfy the interface heat balance, the result is

e−λ2

erf(λ)+

kl

ks

(αs

αl

)1/2 Tm − Ti

Tm − T0

e−λ2(αs/αl)

erfc[λ√

αs/αl]=

λL√

π

Cp,s(Tm − T0)

4

Page 70: Mathematical Modeling of Heat Conduction & Diffusion

Finally consider the problem involving a semiinfinite medium (0 < x < ∞), initiallyliquid at constant temperature Ti > Tm. The properties of the liquid are kl, ρl, Cp,l andthose of the associated solid ks, ρs, Cp,s. This medium is then brought at time t = 0 intoperfect thermal contact with another semiinfinite medium (−∞ < x < 0) with properties k0,ρ0, Cp,0 and initially at constant temperature T0(x, 0) = 0 < Tm. This may be a model of theinitial stages of solidification of a casting in a mold. Temperature distributions in the mold,solidified shell and in the liquid develop. As before, the problem can be solved assuming aspecific form for the temperature distributions and then determining the constants involvedby enforcing the initial and boundary conditions. The final result is

T0(x, t) =ksα

1/20 Tm

ksα1/20 + k0α

1/2s erf(λ)

(1 + erf [x

2√

α0t])

for −∞ < x < 0

Ts(x, t) =Tm

ksα1/20 + k0α

1/2s erf(λ)

(ksα1/20 + k0α

1/2s erf [

x

2√

αst])

for 0 < x < ξ(t) (the solidified shell), and

Tl(x, t) = Ti − (Ti − Tm)

erfc[λ(αs/αl)1/2]erfc[

x

2√

αlt])

where λ = ξ/2√

αlt is now the root of

k0α1/2s e−λ2

ksα1/20 + k0α

1/2s erf(λ)

− klα1/2s (Ti − Tm)e−λ2αs/αl

ksα1/2l Tmerfc[λ(αs/αl)1/2]

=λLπ1/2

Cp,sTm

3 Numerical Methods

Numerical solution techniques for phase change problems must account for the changinglocation of the phase boundary. Two commonly used procedures are variable grid methodsand fixed grid techniques. In variable grid methods one makes the (moving) phase boundarycoincide with a particular mesh point at all times, while in fixed grid techniques the boundarylocation is obtained by interpolation from the computed values of temperature on a fixedmesh.

Since fixed grid methods are usually easier to implement we shall focus on those here. Themost commonly used fixed grid method for the numerical solution of solidification problemsis based on the enthalphy-temperature formulation.

5

Page 71: Mathematical Modeling of Heat Conduction & Diffusion

Consider a slab of liquid material, initially at T (x, 0) = Ti > Tm which is made to solidifyby fixed the temperature at its boundaries T (0, t) = T (l, t) = T0 < Tm. Instead of writingseparate equations for the solid and liquid phases, the heat equation is written as follows:

∂H

∂t=

∂x(k

∂T

∂x)

where the enthalpy H (J/kg) is a step function of temperature, i.e.

H =

ρsCp,s(T − Tm); T < Tm

ρlCp,l(T − Tm) + ρsL; T > Tm

Introduce now a fixed mesh in space (mesh spacing ∆x) with N + 1 nodes located atxi where i = 1, 2, ..., N + 1 and a mesh in time (mesh spacing ∆t) with nodes tj wherej = 1, 2, 3, ....

Discretization of the heat equation by means of a simple explicit finite difference or finitevolume scheme yields

Hi,j+1 −Hi,j

∆t=

ki+ 12,j

Ti+1,j−Ti,j

∆x− ki− 1

2,j

Ti,j−Ti−1,j

∆x

∆x

where the two subscripts on the variables are needed to specify the mesh point where thequantity is to be evaluated.

The numerical calculation is carried out from an initial thermal condition by first com-puting values of enthalpy for all spatial nodes at the new time step (Hi,j+1) explicitly fromthe last expression. Temperature values for all spatial nodes at the new time step are thencalculated from the given enthalpy-temperature relationship. The position of the movingboundary is determined by locating spatial nodes around Tm and interpolation. The calcu-lation is then repeated to advance to the next time step. Since this is an explicit scheme,the mesh spacings must fulfill the CFL condition, namely

∆t =∆x2

2α∗

where α∗ is the smaller of αs and αl.Alternatively, an implicit scheme may be employed but this will require implementation

of an iterative process to advance the solution each time step.

4 Exercises

Exercise 1. The surface of a large solid Titanium mass initially at Ti ≈ Tm = 1933K,is suddenly raised to a temperature of T0 = 2000K and maintained there. Estimate theadvancement of the melting interface. Consider k = 15.5W/mK, ρ = 4, 505kg/m3, Cp =522J/kgK, L = 392, 648J/kg.

6

Page 72: Mathematical Modeling of Heat Conduction & Diffusion

Exercise 2. The surface of a large supercooled liquid Nickel mass initially at Ti = 1528K,is suddenly seeded with a crystal nucleus which induces solidification of the melt. Estimatethe advancement of the solidification interface. Consider k = 69.1W/mK, ρ = 8, 847kg/m3,Cp = 418J/kgK, L = 293, 065J/kg, Tm = 1728K.

Exercise 3. Use the properties of the error function to verify that the given expressionfor Ts in the problem of solidification of a semiinfinite melt satisfies the heat equation aswell as the boundary condition at x = 0 while that for Tl satisfies the heat equation, theboundary condition at x→∞ as well as the initial condition.

Exercise 4. The surface of a large molten mass of Aluminum initially at Ti = 1033K,is suddenly lowered to T0 = 333K and maintained there. Estimate the advancement ofthe solidification interface. Consider k = 238W/mK, ρ = 2, 700kg/m3, Cp = 945J/kgK,L = 389, 177J/kg, Tm = 933K.

Exercise 5. The surface of a large molten mass of Aluminum initially at Ti = 1033K,is suddenly placed in intimate thermal contact with a massive steel chill originally at T0 =333K. Estimate the advancement of the solidification interface. Consider the followingproperty values for steel k = 52.3W/mK, ρ = 7, 900kg/m3, Cp = 470J/kgK.

Exercise 6. The temperature of the surface of a large molten mass of Iron initially at Ti =1910K, is suddenly lowered to T0 = 25K and maintained there. Estimate the advancement ofthe solidification interface using an explicit finite difference method. Consider k = 30W/mK,ρ = 7, 300kg/m3, Cp = 600J/kgK, L = 277, 400J/kg, Tm = 1810K.

5 References

1.- L.I. Rubinstein, The Stefan Problem, American Mathematical Society, Providence,1971.

2.- J.R. Ockendon and W.R. Hodgkins, Moving Boundary Problems in Heat Flow andDiffusion, Clarendon Press, Oxford, 1975.

3.- J. Crank, Free and Moving Boundary Problems, Clarendon Press, Oxford, 1984.4.- V. Alexiades and A.D. Solomon, Mathematical Modeling of Melting and Freezing

Processes, Hemisphere, Washington, 1993.

7

Page 73: Mathematical Modeling of Heat Conduction & Diffusion

Chapter 5

Moving Boundary Problems in Mass Diffusion

1 Introduction

At equilibrium, the values of chemical potential of each substance in a multicomponentsystem are the same in all constituent phases of the system. For instance, in a binary systemconsisting of two substances A and B and existing in two phases α and β, the equilibriumconditions are

µαA = µβA

and

µαB = µβB

Sometimes it is more convenient to state the equilibrium conditions in terms of theactivities of the various substances, i.e.

aαA = aβA = a∗A

and

aαB = aβB = a∗B

If for some reason, gradients in the chemical potentials of constituent substances develop,the system naturally changes in such a way that the gradients disappear. The mechanism bywhich chemical potential gradients are reduced is atomic transport of substance from regionsof high potential to regions of low potential. This is entirely analogous to the situationencountered in heat conduction where thermal energy is transported from regions at hightemperature toward regions at low temperature in a natural attempt by the system to reducetemperature gradients. .

An interesting and commonly encountred situation in multicomponent multiphase sys-tems in equilibrium is the coexistence of different phases with different concentrations of

1

Page 74: Mathematical Modeling of Heat Conduction & Diffusion

substance (at the same chemical potential). For instance, for the same binary system abovethe equilibrium concentrations of the two components may be given by

cαA = cα∗A 6= cβA = cβ∗B

and

cαB = cα∗B 6= cβB = cβ∗B

Therefore, if such as system is taken out of equilibrium thus introducing gradients inthe chemical potentials of the constituent substances, the natural response of the system isthe atomic displacement (diffusion) of the constituent substances in an attempt to bring thesystem back into equilibrium conditions. In this process the relative amounts of phases αand β may change with time. This is a phase transformation process and a typical movingboundary problem, the boundary being the interface separating the two coexisting phases.

The mathematical formulation of these problems require the statement of diffusion equa-tions for the phases involved, specification of necessary initial and boundary conditions anda description of conditions at the interface between the phases. Since the position of the in-terface is not known in advance and must be determined as part of the solution, the problemis nonlinear.

Consider the problem of phase transformation in a semiinfinite region 0 < x < ∞ ofa binary system initially all β and at uniform potential of the constituent susbtances. Wewill consider only the case where the atomic mobilities of the component substances aresignificantly different so that only the diffusion of the fastest moving species needs to beexamined and the subscripts A and B can be omitted. Therefore, let the activity andconcentration of this substance be a and c, respectively. Let the initial condition of thesystem be given by aβ(x, 0) = ai > a∗ where a∗ is the value of the activity of the substancein question at equilibrium of the phases α and β (in terms of concentration cβ(x, 0) = ci).We shall also assume that although aα = aβ = a∗, the concentrations cα = cα∗ < cβ = cβ∗.

Now let the activity at its boundary x = 0 be fixed to a value a0(0, t) < a∗ (concentrationc(0, t) = c0 < cα∗). As a result, a layer of α phase forms at the surface and the interfaceseparating the α and β phases ξ(t), moves along the positive x direction. It is commonlyassumed that equilibrium conditions are quickly reached at the interface so that there (andonly there) c− = cα∗ and c+ = cβ∗. This is the condition of local equilibrium at the interface.

The formulation of the problem requires finding functions cα(x, t), cβ(x, t) and ξ(t) suchthat

∂2cα

∂x2=

1

∂cα

∂t

in 0 < x < ξ(t),

∂2cβ

∂x2=

1

∂cβ

∂t

2

Page 75: Mathematical Modeling of Heat Conduction & Diffusion

in ξ(t) < x <∞, subject to

cα(0, t) = c0

at x = 0,

cβ → ci

as x→∞.At the interface x = ξ(t) one has the local equilibrium condition

aα(ξ, t) = aβ(ξ, t) = a∗

(or, equivalently

cα = cα∗; cβ = cβ∗

and the interfacial mass balance

Dα∂cα

∂x−Dβ ∂c

β

∂x= (cβ∗ − cα∗)dξ

dt= (cβ∗ − cα∗)v

Here (cβ∗−cα∗) is the jump in concentration at the interface and v = dξ/dt is the velocityof advancement of the α− β interface.

In 3D systems, the corresponding form of the mass balance at the interface is

Dα∂cα

∂n−Dβ ∂c

β

∂n= (cβ∗ − cα∗)vn

where vn is the interface velocity in the normal direction.

2 Exact Solutions

Consider the situation involving a semi-infinite sample of a binary system in single phase (α)state with a uniform initial concentration of diffusing substance c(x, 0) = ci. At t = 0 thesurface concentration is increased and therein maintained at a fixed value c(0, t) = c0 > cβ∗

(surface enrichment). As a result, a layer of β phase forms at the surface and its thicknessincreases with time with the interface α− β moving along the positive x−direction.

The mathematical formulation of the problem requires finding functions cα(x, t), cβ(x, t)and ξ(t) such that

∂2cβ

∂x2=

1

∂cβ

∂t

3

Page 76: Mathematical Modeling of Heat Conduction & Diffusion

in 0 < x < ξ(t),

∂2cα

∂x2=

1

∂cα

∂t

in ξ(t) < x <∞, subject to

cβ(0, t) = c0

at x = 0,

cα(x, t)→ ci

as x→∞, and

aα(ξ, t) = aβ(ξ, t) = a∗

(or, equivalently

cα = cα∗; cβ = cβ∗

and

Dβ ∂cβ

∂x−Dα∂c

α

∂x= (cα∗ − cβ∗)dξ

dt

at the interface boundary x = ξ(t).This problem is readily solved by assuming the solution can be expressed in terms of

error functions. A solution of the form

cβ(x, t) = c0 +B × erf [x

2√Dβt

]

where the constant B is to be determined, satisfies the diffusion equation inside the β layeras well as the boundary condition at x = 0.

Satisfaction of the equilibrium condition at the α− β interface requires that

B = −c0 − cβ∗

erf(λ)

where λ = ξ/2√Dβt must be determined so as to satisfy the remaining condition at the

interface.Inside the α phase the appropriate form of the solution is

cα(x, t) = ci + C × erfc[ x

2√Dβt

]

4

Page 77: Mathematical Modeling of Heat Conduction & Diffusion

where the constant C is determined by invoking the equilibrium condition at the interface.Finally the required solution for the entire system thus becomes

cβ(x, t)− c0cβ∗ − c0 =

erf [x/2√Dβt]

erf(λ)

in the β layer and

cα(x, t)− cicα∗ − ci =

erfc[x/2√Dαt]

erfc(λ(Dβ/Dα)1/2

in the α interior.The interface position is given by

ξ(t) = 2λ√Dβt

Finally, the required value of λ is the root of the trascendental equation

c0 − cβ∗λ√πerf(λ)

e−λ2 − (cα∗ − ci)e−λ2ψ

√πλψ1/2erfc(λψ1/2)

= cβ∗ − cα∗

where

ψ =Dβ

The above solution can be applied to estimate the progress of oxidation of a pure metal(ci = 0) where β is the oxide layer and oxygen is the diffusing substance.

Finally consider the problem involving a semiinfinite medium (0 < x < ∞), initially allβ consisting of a pure substance B (i.e. cβB = cβ = 1 in atomic fraction units). This mediumis then joined at time t = 0 with another semiinfinite medium (−∞ < x < 0) consisting ofpure A (i.e. cαA = 1, cαB = cα = 0) in phase α. The two phases coexist in equilibrium overthe concentration range from cα∗ to cβ∗. Finally, assume that the diffusivity of substance Bis much larger than that of A in both phases so that Dα

B = Dα and DβB = Dβ.

This is a model of a diffusion couple, an experimental system commonly used to inves-tigate diffusional processes in solids. The problem can be solved as before by assuming aspecific (error function) form for the concentration distributions and then determining theconstants involved by enforcing the initial and boundary conditions. The final result for−∞ < x < 0 is

cα(x, t) =cα∗

1 + erf(λ)[1 + erf(

x

2√Dαt

)]

5

Page 78: Mathematical Modeling of Heat Conduction & Diffusion

and for 0 < x <∞,

cβ(x, t) =1

erfc(λ/ψ1/2)[cβ∗ − erf(λ/ψ1/2) + (1− cβ∗)erf(

x

2√Dβt

)]

Further, the interface position is given by

ξ(t) = 2λ√Dβt

where λ is the root of

cα∗e−λ2

(cβ∗ − cα)λ√π(1 + erf(λ))− (1− cβ∗)ψ1/2e−λ

2/ψ

(cβ∗ − cα)λ√πerfc(λ/ψ1/2)= 1

where

ψ =Dβ

3 Numerical Methods

Numerical solution techniques for diffusion problems with phase change must account forthe changing location of the phase boundary. As in the case of heat transfer, variable andfixed grid methods can be used. Since fixed grid methods are usually easier to implementwe shall again focus on those here. The fixed grid method used for the numerical solutionof moving boundary problems is based on the activity formulation.

Consider a slab of binary material in phase β with initial concentration of diffusingsubstance c(x, 0) = ci > cβ∗. At time t = 0, the concentration of diffusing substance at theboundaries of the slab is lowered and maintained at c(0, t) = cS < cα∗. As a result, layers ofα form at the surface and α − β interfaces move towards the center of the slab. Instead ofwriting separate equations for the solid and liquid phases, the diffusion equation is writtenas follows:

∂c

∂t=

∂x(D

∂a

∂x)

where the concentration c is a step function of activity, i.e.

c =

γα(a− a∗) + cα∗; a < a∗

γβ(a− a∗) + ∆c∗; a > a∗

where ∆c∗ = cβ∗ − cα∗.

6

Page 79: Mathematical Modeling of Heat Conduction & Diffusion

Introduce now a fixed mesh in space (mesh spacing ∆x) with N + 1 nodes located atxi where i = 1, 2, ..., N + 1 and a mesh in time (mesh spacing ∆t) with nodes tj wherej = 1, 2, 3, ....

Discretization of the heat equation by means of a simple explicit finite difference or finitevolume schemes yields

ci,j+1 − ci,j∆t

=Di+ 1

2,jai+1,j−ai,j

∆x−Di− 1

2,jai,j−ai−1,j

∆x

∆x

where the two subscripts on the variables are needed to specify the mesh point where thequantity is to be evaluated.

The numerical calculation is carried out from an initial concentration condition by firstcomputing values of concentration for all spatial nodes at the new time step (ci,j+1) explicitlyfrom the above expression. Activity values for all spatial nodes at the new time step are thencalculated from the given concentration-activity relationship. The position of the movingboundary is determined by locating spatial nodes around a∗ and interpolation. The calcula-tion is then repeated to advance to the next time step. Since this is an explicit scheme, themesh spacings must fulfill the CFL condition, namely

∆t =∆x2

2D

where D is the smaller of Dα and Dβ.Alternatively, an implicit scheme may be employed but this will require implementation

of an iterative process to advance the solution each time step.

4 Exercises

Exercise 1. Use the properties of the error function to verify that for the two phasebinary system α−β, the given expression for cβ satisfies the diffusion equation as well as theboundary condition at x = 0 while that for cα satisfies the diffusion equation, the boundarycondition at x→∞ as well as the initial condition.

Exercise 2. The surface of a large piece of pure iron is exposed to a carburizing atmo-sphere which fixes the surface concentration of carbon to c0 = 1 percent. At the treatmenttemperature of 900 degrees Celsius a carbon rich austenite (γ) phase forms on the surface ofthe carbon lean ferrite (α) core. Estimate the advancement of the γ −α interface. ConsiderDγ = 5 × 10−12, Dα = 5 × 10−10 (both in m2/s), cα∗ = 0.001, cγ∗ = 0.01 (both in weightpercent).

Exercise 3. A large sample of iron-carbon alloy contains 1 percent carbon. The sample isheated to 900 degrees Celsius (whence it becomes single phase - austenite or γ) and exposed

7

Page 80: Mathematical Modeling of Heat Conduction & Diffusion

to an environment that lowers the surface concentration of carbon to 0. As a result, a layerof α phase forms on the surface and the α − γ interface moves towards the interior of thesample. Estimate the advancement of the interface using an explicit finite difference method.

5 References

1.- L.I. Rubinstein, The Stefan Problem, American Mathematical Society, Providence,1971.

2.- J.R. Ockendon and W.R. Hodgkins, Moving Boundary Problems in Heat Flow andDiffusion, Clarendon Press, Oxford, 1975.

3.- J. Crank, Free and Moving Boundary Problems, Clarendon Press, Oxford, 1984.4.- V. Alexiades and A.D. Solomon, Mathematical Modeling of Melting and Freezing

Processes, Hemisphere, Washington, 1993.5.- J. Philibert, Atom Movements: Diffusion and Mass Transport in Solids, Les Editions

de Physique, France, 1991.6.- R. Sekerka, C.L. Jeanfils and R.W. Heckel, The Moving Boundary Problem, Chapter

IV in H. I. Aaronson (ed), Lectures on the Theory of Phase Transformations, The Metallur-gical Society, New York, 1975.

8