Worksheet: Turkey.mw
Cooking a Spherical Turkey:
The Heat Equation in Spherical Coordinates
This worksheet examines a series solution that arises in a separation of variables solution for the heat equation in spherical coordinates :
=
(
+
) 0 < r < a
with boundary conditions
u(a,t) =
u(0,t) bounded
with initial condition
u(r,0)=
0 < x< a
| > | restart:with(plots): |
| > | a:=1;kappa:=2/100;T0:=75;T1:=350; |
Let's approximate the initial condition with the eigenfunctions that came from separation of variables.
| > | f:=n->sin(n*Pi*r/a)/r; |
| > | c:=n->int(1*f(n)*r^2,r=0..a)/int((f(n))^2*r^2,r=0..a); |
![]() |
| > | seq(c[n]=c(n),n=1..10); |
| > | M:=10; |
| > | u:=(r,t)->T1+(T0-T1)*sum(c(m)*f(m)*exp(-kappa*m^2*Pi^2*t/a^2),m=1..M); |
| > | u(r,t); |
| > | plot({u(r,0),75},r=0..a,thickness=2); |
![]() |
Note the Gibb's phenomena at the endpoints -- convergence is non-uniform at t=0, but uniform for any positive t.
| > | animate(u(r,t),r=0..a,t=0..5,thickness=2,frames=50); |
![]() |
| > | Uc:=simplify(expand(limit(u(r,t),r=0))); |
| > | plot({Uc,150},t=0..5,thickness=2); |
![]() |
| > | fsolve(Uc=150,t=4..6); |
It takes approximately 5 hours to cook the turkey!!