16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

208 CHAPTER 5. LINEAR PDE MODELS. PART 1<br />

considers a semi-in¯nite solid medium whose bounding planar surface is periodicallyheatedbythesun.<br />

Thedirectiontransversetothesurfaceistakento<br />

be the x-direction, with the surface located at x =0,andpositivextaken to<br />

be inside the surface. In order to animate the temperature pro¯le inside the<br />

surface, Russell loads the plots library package.<br />

> restart: with(plots):<br />

From undergraduate thermodynamics, he knows that the time-dependent temperature<br />

distribution T (x; t) obeys the one-dimensional heat di®usion equation<br />

@T<br />

@t = d @2T ; (5.1)<br />

@x2 with the heat di®usion coe±cient d = K=(½C), where K is the thermal conductivity,<br />

½ the density, and C the speci¯c heat. Russell enters the heat equation.<br />

> heateq:=diff(T(x,t),t)-d*diff(T(x,t),x,x)=0;<br />

³ ´ μ<br />

heateq := @@tT (x; t) ¡ d @ 2<br />

<br />

2 T (x; t) =0<br />

@x<br />

To account for the periodic heating of the planar surface due to the sun, he<br />

takes the temperature variation at x =0tobeT (0;t)=T0 cos(!t). Rather<br />

than derive the temperature variation T (x; t) forx > 0, Russell decides to<br />

make an intelligent guess as to its mathematical form and check it by substituting<br />

the form back into the di®usion equation. Since he is looking for a<br />

steady-state response and the temperature should decrease as x increases inside<br />

the surface, Russell conjectures that the solution should be of the structure<br />

T (x; t) =T0 e ¡®x cos(!t¡ ¯x), with the parameters ® and ¯ as yet undetermined.<br />

At x = 0, the boundary condition is satis¯ed, and an exponentially<br />

decaying cosine solution seems reasonable inside the surface. Both ® and ¯<br />

must be positive for a waveform propagating in the positive x-direction.<br />

What forms should ® and ¯ have? From the structure of the heat di®usion<br />

equation, the units of d are m 2 /s, so 1= p d has units of s 1=2 ¢m ¡1 . Since the<br />

argument in the exponential function must be dimensionless, ® must have the<br />

dimensions of m ¡1 . The only other parameter in the problem involving a time<br />

unit is the frequency ! with units s ¡1 . So, noting that the combination p !=d<br />

has the units m ¡1 ,Russelltakes® = a p !=d, wherea is a numerical factor, yet<br />

to be determined. By similar reasoning, the constant ¯ is set equal to b p !=d,<br />

with b another numerical factor. Both a and b must be positive.<br />

To check the postulated solution and determine a and b, Russell enters<br />

T (x; t), which will be automatically substituted into the heat equation.<br />

> T(x,t):=T[0]*exp(-a*sqrt(omega/d)*x)<br />

*cos(omega*t-b*sqrt(omega/d)*x);<br />

T (x; t) :=T0 e (¡a p !<br />

d x) cos<br />

Russell then simpli¯es the heat equation,<br />

> eq:=simplify(heateq);<br />

μ<br />

¡!t+ b<br />

r !<br />

d x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!