# Diff of /trunk/doc/cookbook/TEXT/onedheatdiff_var001.tex

revision 2392 by ahallam, Thu Apr 16 01:53:23 2009 UTC revision 2393 by ahallam, Thu Apr 16 04:24:07 2009 UTC
# Line 12  Line 12
12  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14  \documentclass{manual}  \documentclass{manual}
15  \title{One Dimensional Heat Equation}  \title{One Dimensional Heat Equation Var 001}
16
17  \begin{document}  \begin{document}
18   It is quite simple to now expand upon the 1D heat diffusion problem we just tackled. While similar in   It is quite simple to now expand upon the 1D heat diffusion problem we just tackled. Suppose we have two blocks of isotropic material which are very large in all directions to the point that they seem infinite in size compared to the size of our problem. If \textit{Block 1} is of a temperature \verb T  and \textit{Block 2} is at a temperature \verb -T  what would happen to the temperature distribution in each block if we placed them next to each other. This problem is very similar to our Iron Rod but instead of a constant heat source we instead have a heat disparity with a fixed amount of energy. In such a situation it is common knowledge that the heat energy in the warmer block will gradually conduct into the cooler block untill the temperature between the blocks is balanced.
19
20    Only a small segment of code needs to be adapted for these new initial and boundary conditions. As there is no heat source our q variable can be set to zero. Now the initial conditions must be modified to represent the temperatures of the two blocks side by side. Taking the middle of the domain as the contact between the two blocks the new initial conditions are defined using the following:
21    \begin{verbatim}
22     T= -1*Tref*whereNegative(x[0]-0.025)+Tref*wherePositive(x[0]-0.025)
23    \end{verbatim}
24    This chooses all values along the x axis less than \verb 0.025  (which is half the length of our domain) to be equal to the negative of \verb Tref  while all values greater than \verb 0.025  will be equal to the positive of \verb Tref . The new PDE can now be solved as before.
25
27    \begin{enumerate}
28     \item Try changing the initial conditions so that the temperatures are unbalanced.
29     \item Move the boundary line between the two blocks to another part of the domain.
30     \item Try splitting the domain in to multiple blocks with varying temperatures.
31    \end{enumerate}
32
33
34
35
36  \end{document}  \end{document}

Legend:
 Removed from v.2392 changed lines Added in v.2393