Jump to content

PlanetPhysics/Example of Solving the Heat Equation

From Wikiversity

Let a thin square-formed plate of heat conducting homogeneous material be in the -plane with sides on the -axis (isolated), on the line\, (held at the constant temperature\, ), and on the vertical lines\, \, and\, (both held at the constant temperature\, ).\, Determine the temperature function\, \, on the plate, when the faces of the plate are isolated.

The equation of the heat flow in this stationary case is

under the boundary conditions We first try to separate the variables, i.e. seek the solution of (1) of the form Then we get and thus (1) gets the form

and the boundary conditions We separate the variables in (2): This equation is not possible unless both sides are equal to a same negative constant , which implies for\, \, the solution and for\, \, the solution The two first boundary conditions give\, ,\, ,\, and since\, ,\, we must have\, ,\, i.e. Therefore The fourth boundary condition now gives that\, ;\, thus\, \, and\, \, So (1) has infinitely many solutions

with\, \, and they all satisfy the boundary conditions except the third.\, Because of the linearity of (1), also the sum of the functions (3) satisfy (1) and those boundary conditions, provided that this series converges.\, The third boundary condition requires that on the interval\, .\, But this is the Fourier sine series of the constant function\, \, on the half-interval\, ,\, whence The even 's here give 0 and the odd give

Thus we obtain the solution It can be shown that this series converges in the whole square of the plate.

\subsection*{Visualization of the solution}

\begin{figure}[!htb]

\includegraphics{heat-surface.eps} \caption{Surface plot of the solution , for }

\end{figure}

\begin{figure}[!htb]

\includegraphics{heat-color.eps} \caption{Color-coded plot of the temperature }

\end{figure}

Remark. The function has been approximated in the plot by computing a partial sum of the true infinite-series solution.\, However, there is substantial numerical error in the approximate solution near\, ,\, evident in the small oscillations observed in the surface plot, that should not be there in theory.\, This phenomenon is actually inevitable given that the boundary conditions are actually discontinuous at the corners\, \, and\, .

More precisely, observe that when\, ,\, the formula for\, \, reduces to the Fourier series

for the discontinuous function on\, :

That means the Fourier expansion will necessarily be subject to the Gibbs phenomenon .\, Of course, the series also cannot converge absolutely; in other words, the terms of the series decay too slowly in magnitude, adversely affecting the numerical solution.

 \item Python program to compute\, \, and produce the two figures