(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 9935, 297]*) (*NotebookOutlinePosition[ 10643, 321]*) (* CellTagsIndexPosition[ 10599, 317]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Examining Heat Dissipation", "Title", FontWeight->"Bold"], Cell[CellGroupData[{ Cell["The Heat Equation", "Section"], Cell[CellGroupData[{ Cell["Background", "Subsection"], Cell[TextData[{ "The following problems represent solutions to the partial differential \ heat equation: ", Cell[BoxData[ \(TraditionalForm\`w\_xx\)]], "=", Cell[BoxData[ \(TraditionalForm\`1\/c\^2\)]], Cell[BoxData[ \(TraditionalForm\`w\_t\)]], ", where ", StyleBox["w(x,t)", FontSlant->"Italic"], " represents the temperature at position ", StyleBox["x", FontSlant->"Italic"], " at time", StyleBox[" t", FontSlant->"Italic"], " in a thin rod of length ", StyleBox["1", FontSlant->"Italic"], " with perfectly insulated sides and ends that are held at constant \ temperatures of -20 degrees and 55 degrees, that is, ", Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{ RowBox[{ RowBox[{ FormBox["w", "TraditionalForm"], \((0, t)\)}], " ", "=", " ", \(-20\)}], ",", " ", RowBox[{ RowBox[{ FormBox["w", "TraditionalForm"], "(", \(1, t\), ")"}], " ", "=", "55"}]}]}], TraditionalForm]]], ". Assume an initial temperature distribution that is ", Cell[BoxData[ \(TraditionalForm\`75\)]], " throughout the rod. The value of the positive constant ", Cell[BoxData[ \(TraditionalForm\`c\^2\)]], " is determined by the material from which the rod is made." }], "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ The Heat Equation with Fixed Nonhomogeneous Ends and Use of the Fourier Sine \ Series \ \>", "Section"], Cell[TextData[{ "First, we determine the Fourier Series corresponding to the initial \ temperature state for the rod minus the linear function introduced because of \ the differing temperatures at each end of the rod:\n", StyleBox["75 - (", FontSlant->"Italic"], Cell[BoxData[ \(TraditionalForm\`\(\(\(-20\)\ + \ \((55\ + \ 20)\)\ x\)\()\)\)\ = \ 95\ - \ 75 x\)]], ". " }], "Text"], Cell[BoxData[{ \(Clear[a, b, x, fousine]\), "\n", \(\(length\ = \ 1;\)\), "\n", \(b[n_] := \(b[n] = 2/length\ \((Integrate[ Sin[n\ \[Pi]/length\ \ x]\ \ \((95 - 75 x)\), {x, 0, length}])\)\)\t\t\), "\n", \(Print["\", foursine[x_, 60] = Sum[b[j]\ Sin[j\ \[Pi]\ /length\ x], {j, 1, 60}] // N]\), "\n", \(\(Plot[foursine[x, 60], {x, 0, 1}];\)\ \ \)}], "Input"], Cell[BoxData[{ \(TextForm\`The\ solution\ to\ the\ heat\ equation\ can\ now\ be\ written\ \ as\), "\n", \(TextForm\`\t\t\ \(\(\(\ \)\(\[Sum]\)\)\+\(\(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)\(n = 1\)\)\%\(\(\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \)\(\[Infinity]\)\)\) a \((n)\)\ \(e\^\(\(-\ \((n\[Pi]\/4)\)\^2\) t\)\) Sin \((\(n\[Pi]\/4\) x)\)\), "\n", \(TextForm\`We\ will\ write\ write\ it\ out\ to\ n = 30. \)}], "Text"], Cell[BoxData[{ \(Clear[w, x, t]\ \), "\n", \(w[x_, t_] = \ \(-20\) + 75 x + Sum[b[j] Exp[\(-\((j\ Pi/length)\)^2\)\ *\ t] Sin[j\ Pi\ x/length], {j, 1, 60}]\ // N\)}], "Input"], Cell["\<\ Plot the temperature function at various positions along the rod as a \ function of time. \ \>", "Text"], Cell[BoxData[ \(\(xlevelplots = Plot[\ {w[0, t], w[ .2, t], w[ .4, t], w[ .6, t], w[ .8, t], w[1, t]}, {t, 0, .1}, \ PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, AxesLabel -> {t, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret these plots. What is happening to the temperature along different \ parts of the rod?\ \>", "Text"], Cell["\<\ Plot the temperature function at various times as a function of the position \ on the rod. Interpret the results.\ \>", "Text"], Cell[BoxData[ \(\(tlevelplots = Plot[{w[x, 0], w[x, .01], w[x, .04], w[x, .07], w[x, .1], w[x, .15]}, {x, 0, 1}, PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, \ \ PlotRange -> All, AxesLabel -> {x, "\"}, PlotLabel -> "\"]\ ;\)\)], "Input"], Cell["\<\ Interpret the results. What is happening to the temperature function as time \ goes on?\ \>", "Text"], Cell["\<\ Plot the contours for the temperature function and the temperature function \ as a surface.\ \>", "Text"], Cell[BoxData[{ \(\(ContourPlot[w[x, t], {x, 0, 1}, {t, 0, .15}, Axes -> True, AxesLabel -> {x, t}];\)\ \), "\n", \(\(Plot3D[w[x, t], {x, 0, 1}, {t, 0, .15}, AxesLabel -> {x, t, "\"}];\)\)}], "Input"], Cell[TextData[ "What is happening as t\[Rule]\[Infinity] ? Is this what you would expect? \ Why?"], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Rod with Insulated Ends and Use of the Fourier Series", "Section"], Cell[TextData[{ "Now suppose that the rod of length 4 has insulated ends, that is, ", Cell[BoxData[ \(TraditionalForm\`w\_x\)]], "(0,t) = ", Cell[BoxData[ \(TraditionalForm\`w\_x\)]], "(4,t) = 0. Assume a discontinuous initial temperature distribution - 12 \ for the left 1/4 of the rod and 0 elsewhere. This discontinuous initial \ temperature function necessitates the use of the Fourier series in order to \ get a continuous approximation to this discontinuous initial state. The \ following is a sketch of how it might appear.\nFirst determine the Fourier \ Series corresponding to the initial temperature state for the rod. " }], "Text"], Cell[BoxData[{ \(\na[n_] := \(a[n] = 1/2 Integrate[12 Cos[n\ Pi\ x/4], {x, 0, 1}]\)\t\ \), "\n", \(fourcos[x_, n_] := a[0]/2 + Sum[a[j] Cos[j\ Pi\ x/4], {j, 1, n}]\), "\n", \(\(Plot[fourcos[x, 50], {x, 0, 4}];\)\ \ \)}], "Input"], Cell["\<\ Now write the solution to the heat equation allowing a variable number of \ terms of the Fourier series to be used. The symbol \"n\" represents the \ number of terms in the Fourier series to be used. More terms are needed when \ t is closer to 0 in order to get a good approximation.\ \>", "Text"], Cell[BoxData[{ \(Clear[w, xlevelplots, tlevelplots]\ \), "\n", \(w[x_, t_, n_] := \ \(\(a[0]/2\)\(+\)\(Sum[ a[j] Exp[\(-\((j\ Pi/4)\)^2\)\ *\ t] Cos[j\ Pi\ x/4], {j, 1, n}]\)\(\ \)\)\)}], "Input"], Cell["\<\ Plot the temperature function at various positions along the rod as a \ function of time. Interpret the results.\ \>", "Text"], Cell[BoxData[ \(\(xlevelplots = Plot[\ {w[0, t, 10], w[ .8, t, 10], w[1.6, t, 10], w[2.4, t, 10], w[3.2, t, 10], w[4, t, 10]}, {t, 0, 5}, \ PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}]\ ;\)\)], "Input"], Cell["\<\ Plot the temperature function at various times as a function of the position \ on the rod. Interpret the results.\ \>", "Text"], Cell[BoxData[ \(\(tlevelplots = Plot[{w[x, 0, 70], w[x, .5, 20], w[x, 1, 10], w[x, 1.5, 10], w[x, 2, 10], w[x, 2.5, 10]}, {x, 0, 4}, PlotStyle -> {RGBColor[1, 0, 0], RGBColor[1, 1, 0], RGBColor[0, 1, 0], RGBColor[0, 1, 1], RGBColor[1, 0, 1], RGBColor[0, 0, 1]}, \ \ PlotRange -> All]\ ;\)\)], "Input"], Cell["\<\ Plot the contours for the temperature function and the temperature function \ as a surface.\ \>", "Text"], Cell[BoxData[{ \(\(ContourPlot[w[x, t, 30], {x, 0, 4}, {t, 0, 5}];\)\ \), "\n", \(\(Plot3D[w[x, t, 50], {x, 0, 4}, {t, 0, 5}];\)\)}], "Input"], Cell["\<\ What is happening as t\[Rule]\[Infinity] ? Is this what you would expect? \ Why?\ \>", "Text"] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{576, 468}, WindowMargins->{{151, Automatic}, {Automatic, 55}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 65, 1, 115, "Title"], Cell[CellGroupData[{ Cell[1817, 57, 36, 0, 59, "Section"], Cell[CellGroupData[{ Cell[1878, 61, 32, 0, 47, "Subsection"], Cell[1913, 63, 1416, 45, 112, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[3378, 114, 113, 3, 66, "Section"], Cell[3494, 119, 423, 10, 71, "Text"], Cell[3920, 131, 483, 10, 190, "Input"], Cell[4406, 143, 496, 8, 89, "Text"], Cell[4905, 153, 221, 5, 90, "Input"], Cell[5129, 160, 115, 3, 33, "Text"], Cell[5247, 165, 403, 7, 150, "Input"], Cell[5653, 174, 119, 3, 33, "Text"], Cell[5775, 179, 138, 3, 52, "Text"], Cell[5916, 184, 436, 8, 150, "Input"], Cell[6355, 194, 111, 3, 33, "Text"], Cell[6469, 199, 115, 3, 33, "Text"], Cell[6587, 204, 232, 4, 70, "Input"], Cell[6822, 210, 107, 2, 33, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[6966, 217, 72, 0, 39, "Section"], Cell[7041, 219, 664, 13, 166, "Text"], Cell[7708, 234, 261, 5, 150, "Input"], Cell[7972, 241, 307, 5, 90, "Text"], Cell[8282, 248, 237, 5, 70, "Input"], Cell[8522, 255, 137, 3, 52, "Text"], Cell[8662, 260, 353, 6, 130, "Input"], Cell[9018, 268, 138, 3, 52, "Text"], Cell[9159, 273, 369, 6, 130, "Input"], Cell[9531, 281, 115, 3, 33, "Text"], Cell[9649, 286, 151, 2, 50, "Input"], Cell[9803, 290, 104, 3, 33, "Text"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)