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.

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

N := C5 C1 BesselJ(0; ¹r) e (¡td¹2 ¡tdº 2 +t¯) ( C3 cos(ºz)+ C4 cos(ºz))<br />

+ C5 C1 BesselJ(0; ¹r) e (¡td¹2 ¡tdº 2 +t¯) ( C3 sin(ºz) ¡ C4 sin(ºz)) I<br />

Hugo assumes that the neutron density at the surface of the cylindrical mass is<br />

zero. Thus, since it doesn't go to zero at z =0,thecos(ºz) term is removed<br />

(a second boundary condition) from N and the result factored.<br />

> N:=factor(remove(has,N,cos)); #bc2<br />

N := C5 C1 BesselJ(0; ¹r) e (¡t (¡¯+d¹2 +dº 2 )) sin(ºz)(¡ C4 + C3) I<br />

In the next command line, Hugo removes the \ugly" Maple coe±cient combination<br />

from N by forming the product of the 4th, 5th, and 6th operands of N,<br />

the other operands corresponding to the various constants.<br />

> N2:=op(4,N)*op(5,N)*op(6,N);<br />

N2 := BesselJ(0; ¹r) e (¡t (¡¯+d¹2 +dº 2 )) sin(ºz)<br />

Since the neutron density is zero on the cylindrical surface r = a and at the end<br />

z = h, two more boundary conditions must be imposed. At r = a, J0(¹a)=0,<br />

so that ¹ = ¸m=a, where ¸m is the mth zero of J0. These zeros may be<br />

found with the command BesselJZeros(0,m), wherem =1; 2;:::: At z = h,<br />

sin(ºh)=0,soº = n¼=h,withn a positive integer. This pair of boundary<br />

condition relations is substituted into N2.<br />

> N2:=subs(fmu=BesselJZeros(0,m)/a,nu=n*Pi/hg,N2); #bcs<br />

μ<br />

N2 := BesselJ 0;<br />

<br />

BesselJZeros(0; m) r<br />

a<br />

d BesselJZeros(0;m)2<br />

e<br />

(¡t (¡¯ + a2 + dn2 ¼ 2<br />

h2 ³<br />

)) n¼z<br />

´<br />

sin<br />

h<br />

By the principle of linear superposition, the complete solution will be<br />

1X 1X<br />

1X 1X<br />

N(r; z; t) = Cm;n N2 ´ Nm;n;<br />

m=1 n=1<br />

m=1 n=1<br />

with the Cm;n determined by the initial neutron density N(r; z; 0) = f. Evaluating<br />

N2 at t = 0, and labeling the result g,<br />

> g:=eval(N2,t=0);<br />

μ<br />

<br />

BesselJZeros(0; m) r<br />

³<br />

n¼z<br />

´<br />

g := BesselJ 0; sin<br />

a<br />

h<br />

one has<br />

1X 1X<br />

N(r; z; 0) = Cm;n g = f:<br />

m=1 n=1<br />

If we multiply both sides of N(r; z; 0) by rJ0(¸m0 r=a)sin(n0¼z=h)andinte grate r from 0 to a and z from 0 to h, the lhs will yield zero unless m = m 0<br />

and n = n 0 . Solving for Cm 0 ;n 0, and dropping the primes, the coe±cients can<br />

be calculated from<br />

R a R h<br />

0 0<br />

Cm;n =<br />

rfgdrdz<br />

R a R h<br />

0 0 rg2 dr dz :

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

Saved successfully!

Ooh no, something went wrong!