Heat Transfer along a Rod

Manipulate[
Module[{l,f},
l=1;
f[x_,t_]:=NSum[((400/(n*π)))Sin[((n*π*x)/l)](E^(-k(((((n*π)/l)))^2)t)) ,{n,1,m,2}];
Plot3D[f[x,t],{x,0,1},{t,0,2},FaceGrids->All,PlotRange->{{0,1},{0,2},{0,150}},PlotStyle->Directive[Orange,Specularity[White,30]],PlotPoints->ControlActive[4,20],AxesLabel->{"duljina","vrijeme","temperatura"},ImageSize->{400,400}]],
{{k,.1,"parametar provodljivost k"},.01,.5,Appearance->"Labeled"},
{{m,1,"broj članova n"},1,47,2,Appearance->"Labeled"},
TrackedSymbols:>{k,m}]

CAPTION

This Demonstration shows the solution to the heat equation for a one-dimensional rod. The rod is initially submerged in a bath at 100 degrees and is perfectly insulated except at the ends, which are then held at 0 degrees. This is a a Sturm–Liouville boundary value problem for the one-dimensional heat equation

((∂u (x, t))/(∂t))-k(((∂^2)u(x,t))/(∂(x^2)))=0,

with boundary conditions u(0,t)=0, u(L,t)=0, and u(x,0)=f(x), where t is time, x is distance along the rod, L is the length of the rod, and f(x)=100.

The solution is of the form

u (x,t)=(∑_(i=1)^∞)(Subscript[A, n])sin(((n π)/L))(e^(-((k(((n π)/L)))^2)t)),

where k is the conductivity parameter (a product of the density, thermal conductivity, and specific heat of the rod) and

A=(2/L)(∫_0^L)f(x)sin(((n π)/L)x)dx.

If you increase the number of terms n, the solution improves as long as the time is small. As t->∞ (the final state), the entire rod approaches a temperature of 0 degrees. You can see the effect of the thermal properties by varying the conductivity parameter k.

DETAILS

References:

[1] R. Haberman, Applied Partial Differential Equations with Fourier Series and Boundary Value Problems, 4th ed., Saddle River, NJ: Prentice Hall, 2003.

[2] J. R. Brannan and W. E. Boyce, Differential Equations with Boundary Value Problems: An Introduction to Modern Methods and Applications, New York: John Wiley and Sons, 2010.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Heat Transfer along a Rod" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/HeatTransferAlongARod/

Contributed by: Stephen Wilkerson

(Department of Mathematical Sciences at the United States Military Academy, West Point, NY)

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »