\documentstyle[12pt]{article}
\textwidth 16cm
\textheight 23cm
\topmargin 0cm
\evensidemargin 0cm
\oddsidemargin 0cm
\parindent=0pt
\parskip=10pt
\pagestyle{empty}
\begin{document}


\begin{center}
\Large \bf
Computational Physics \\
\large 
\vspace{0.2cm}
14 December-2000\\
\end{center}
\vspace{0.4cm}
\noindent 
{\bf Ex.~7:  Temperature distribution in a square room: solution of
the steady state heat equation by the overrelaxation method.} 

Consider a square room  with sides 6 m long. One side is at the winter 
temperature of -20 C. The opposite side is in contact with a corridor which 
is kept at a temperature of 18 C.  We assume a linear variation of the 
temperature on the lateral walls of the room from the temperature of the two 
other sides.In the center of the room there is a squared 
pillar with sides 1 m long which are kept at a temperature of 
60 C by hot water flowing within. The fluid has been flowing long enough that 
all the transient effects have disappeared and we can assume the system in 
a steady state. Question: where would you put your armchair?

The elliptic equation describing the temperature distribution in the room is:
\begin{equation}
{\partial^2 T(x,y) \over \partial x^2} + {\partial^2 T(x,y) \over \partial y^2}=0
\end{equation}
with the above given  boundary conditions.
Solve by the method of overrelaxion (define a grid, guess an initial 
temperature distribution, calculate $T(x,y)$ from the above equation in a 
discretized form for all points, ....).  
Find the optimal value of the overrelaxation acceleration parameter $\omega$.  
Assume a tolerance of  $1~^o$C.

In order to visualize your results you can make by gnuplot drawings of the 
isotherms in the room.

After having invoked gnuplot, give the following commands.

\begin{tabular}{ll}
set view 0, 0, 1, 1  & (this makes a top view)\\
set nohidden3d &   \\    
set contour    &       (this makes contour plots)\\
set cntrparam levels incremental -20,2,60   & (this gives isotherms every 2 
degrees from -20 to 60\\ 
set data style lines &   \\  
splot "grid" &    (grid is the files containing T values of your grid) \\  
\end{tabular}
\end{document}

