Let us consider a heat conduction problem for a straight bar of uniform cross section and homogeneous material. With appropriate Cartesian coordinate system, the bar of length ℓ is oriented in the horizontal x-direction from x = 0 to x = ℓ. Suppose further that the sides of the bar are perfectly insulated so that no heat passes through them. We also assume that the cross-sectional dimensions are so small that the temperature u can be considered constant on any given cross section. Then u is a function of the axial coordinate x and the time t.
Graphics3D[Cylinder[{{0,0,0},{3,0,0}}, 1/3]]
The variation of temperature in the bar is governed by the partial differential equation, called the heat equation or diffusion equation:
In general, a positive coefficient α>0, known as the thermal diffusivity, may depend on spatial variables, temperature, and pressure. However, we assume the thermal diffusivity to be constant in our problems, for simplicity. The parameter α depends only on the material from which the rod is made and is defined by
In order to determine a unique solution to the heat transfer equation, we need to specify its initial temperature at t=0 and boundary conditions at end points.
It is assumed that the initial temperature distribution in the bar is known
where f is some given function. The physics of the problem dictates that this function must also satisfy some regularity conditions to match the temperature at the boundary. However, sometimes the corresponding initial boundary value problem (IBVP for short) can be considered without these regularity conditions with the expense of not uniform convergence of solution.
The general solution of a partial differential equation is very sensitive to the boundary conditions. As such, the same equation may posses different properties under different sets of boundary conditions. In this section, we illustrate this fact by examining one dimensional heat conduction problems with different sets of boundary conditions. First, we consider a long metal bar of length ℓ which is much longer than it is thick. This means that we can treat the distribution of heat as a function of just one spatial variable x ∈ [0, ℓ] and time variable t. The bar is assumed to be insulated along its length so that it can only gain and lose heat through its ends. This means that the temperature distribution u(x, t) depends only on these two variables.
Keep in mind that, throughout this section, we will be solving the same one-dimensional homogeneous partial differential equation, Eq.\eqref{EqBheat.1}, which is called the diffusion equation (also known as the heat transfer equation).
The heat conduction equation can now be paired up with a set of boundary conditions, of which we consider three most common types:
The second type of boundary conditions or Neumann conditions ( named after Carl Neumann) when the heat flow (in general, the surface heat flux) is specified
The third type of boundary conditions or mixed boundary conditions usually include the following two cases.
On one part of the boundary the temperature is specified (the Dirichlet conditions), while on another part the normal derivative is specified (Neumann conditions).
When we observe convective heat transfer at the boundary
where κ is the thermal conductivity of the material (with units W/(m K)), h is the convection heat transfer coefficient (with unites Watt/m² -K), and A is the surface area (units m²). The convection heat transfer coefficient is sometimes referred to as a film coefficient. It represents the thermal resistance of a relatively stagnant layer of fluid or air between a heat transfer surface and the fluid medium. It can also be defined through the Nusselt number:
\( \displaystyle h = \left( Nu \cdot \kappa \right) /L , \) where Nu is the Nusselt number, κ is the thermal conductivity, and L is the characteristic length.
Diffusion equation with the Dirichlet boundary condition
Consider a heat transfer problem for a thin straight bar (or wire) of uniform cross section and homogeneous material. Let the x-axis be chosen along the axis of the bar, and let x=0 and x=ℓ denote the ends of the bar. Suppose further that the lateral surface of the rod are perfectly insulated so that no heat transfers through them. We also assume that the cross-sectional dimensions are so small that the temperature u can be considered constant on any cross section. Then u is a function only of the axial coordinate x and the time t.
Assuming that no heat is being generated within the rod, the variation of temperature in it is governed by the partial differential equation (of parabolic type):
where α > 0 is a constant known as the thermal diffusivity.
In addition, we assume that the ends x=0 and x=ℓ of the rod are held at fixed temperatures. More over, these temperatures are assumed to be zeroes, u(0,t) = 0℃ and u(ℓ,t) = 0℃ during all heat conduction process (for all t). This requirement is essential for the method of separation of variables that will be used to obtain the solution of Eq.\eqref{EqBheat.1}. In the following section, it will be shown how to bypass the homogeneity of the boundary conditions.
For now, we consider the following boundary conditions:
As previously stated, the regularity conditions are dictated by the physics of the problem.
They consist of two parts: the first part requires the matching for the initial temperature with the homogeneous boundary conditions to maintain the continuity of the temperature distribution inside the rod. This condition can be disregarded because it does not affect the solvability of the IBVP. However, violation of this condition makes the given problem ill-posed and its numerical approximation may suffer instability or the Gibbs phenomena. The second condition is almost always satisfied because temperature approaches zero with time due to dissipation of energy.
The following animation gives the temperature distribution in a finite bar subject to homogeneous Dirichlet boundary conditions:
The fundamental problem of heat conduction is to find u(x, t) that satisfies the heat equation and subject to the boundary and initial conditions.
Under some light conditions on the initial function f, the formulated initial boundary value problem has a unique solution. This problem can be considered as a boundary value problem in xt-plane (see figure below). The solution u(x, t) of the heat equation is sought in the semi-infinite strip 0 < x < ℓ, t > 0, subject to the requirement that u(x, t) must assume a prescribed values at each point on the boundary of this strip.
Boundary value problem for the heat conduction equation.
As it is seen from the figure, the boundary for the xt-domain is not smooth because it has two corner points (0,0) and (ℓ,0). In this case, we have to impose the regularity conditions to make the corresponding IBVP well-posed.
Note that the equation and boundary conditions are homogeneous---only under these assumptions the separation of variables method is applicable. This gives us a way to seek its solution as superposition of some nontrivial solutions of the auxiliary problem:
So we seek nontrivial (which means not identically zero) solutions of the above auxiliary problem that are represented as a product of two functions:
\[
u(x,t) = X(x)\, T(t) ,
\]
where functions X = X(x) depends only on spatial variable x and T = T(t) depends on time variable t. Substituting this product into the heat equation, we get
in which the variables are separated. Since the left hand side depends only on time variable t, the right side depends on spatial variable x, and these variables are independent, these functions could be equal only when they are constant. Denoting this constant of separation as −λ, we arrive at two ordinary differential equations:
Considering together the differential equation for X(x) and the homogeneous boundary conditions, we obtain the familiar Sturm--Liouville problem that we discussed previously:
Hence, T(t) = Tn(t) is proportional to the exponent \( \exp \left\{ - \frac{\alpha\, n^2 \pi^2 t}{\ell^2} \right\} , \ n=1,2,\ldots . \) Multiplying functions Tn and Xn, we obtain for each n partial nontrivial solution of the heat equation satisfying the homogeneous boundary conditions of Dirichlet type:
Each partial nontrivial solution un(x, t) satisfies the heat conduction equation \eqref{EqBheat.1} and the homogeneous boundary conditions. Obviously, an arbitrary linear combination of these functions will also satisfy the homogeneous heat equation and boundary conditions (in our case, they are of Dirichlet type).
Now we apply the principle of superposition by seeking a solution to the given IBVP that is a linear combination of all partial nontrivial solutions
Assuming that the series \eqref{EqBheat.3} converges uniformely (this condition is required to interchange the order of limit and summation), the the sum function u(x, t) satisfies the partial differential equation \( u_t = \alpha\, u_{xx} \) and homogeneous boundary conditions u(0,t) = 0 and u(ℓ,t) = 0 because the individual terms un have the same property. It remains only to satisfy the initial condition
So if we can move the limit under the sign of summation (this is possible when the series converges uniformely), then what is remained to do is to determine
the coefficients cn so that the identity
holds
In other words, we have to determine coefficients cn so that the Fourier sine series converges to the initial temperature distribution f(x) for 0<x<ℓ. According to Euler--Fourier formula, we have
The expression \eqref{EqBheat.3} for the temperature is not easy to analyze, but the negative exponential factor in each term of the series causes the series to converge if the coefficients \eqref{EqBheat.5} do not grow exponentially. If the initial temperature is represented by a function f(x) of bounded variation, then these coefficients decrease and the total series \eqref{EqBheat.3} converges quite rapidly for t ≥ t0 > 0. For small t, the series solution \eqref{EqBheat.3} may converge, but not uniformly, and proving the validity of the initial condition can be challengeable.
provides a good approximation to the true solution in the domain t ≥ t0 > 0 because every term un(x, t) satisfies exactly the heat conduction equation and the boundary conditions, and the the exponential tail of the remainder can be ignored. Therefore, the truncated series can be used for actual approximation to the solution for the moderate values of t, but it loses its fast convergence for small t, which requires additional attention.
Example 1A:
Consider a uniform rod of length ℓ = 3 meters long, insulated on sides, with thermal diffusivity 9.
If initially the rod has a constant temperature of 20℃, but homogeneous Dirichlet boundary conditions are maintained, we come to the following IBVP:
The temperature in the rod satisfies the heat conduction equation \eqref{EqBheat.1} with ℓ = 3 and initial temperature f(x) = 20 for 0 < x < 3. Thus, from Eq.\eqref{EqBheat.3}, the solution is
The series solution converges rapidly in the domain t ≥ t0 > 0, but the initial conditions are difficult to verify because the series does not converge uniformly for small t and we cannot set t = 0 under the sign of summation because it converges conditionally.
Now we demonstrate how this problem can be solved with Mathematica. Firs, we define the heat partial differential equation that represents the
temperature in the bar:
heatEq = D[u[x, t], t] == 9 * D[u[x, t], {x, 2}]
\( u^{(0,1)}[x, t] = 9\,u^{(2,0)}[x, t] \)
Then we solve the heat equation with the appropriate boundary conditions
As it is seen from the graph, there are ripples near the edge t = 0, which indicates poor convergence of the series. This is a confirmation that the given initial boundary value problem is ill-posed; so the corresponding numerical calculations must be done with care. The Gibbs phenomenon becomes clear when plotting the graph from a different perspective.
 
The graph reveals a Gibbs phenomena near the edge t = 0. We take the truncated sum with 31 terms and plot it.
We plot temperature as a function of the position across the bar at
different time values. First, we compare truncated versions of regular Fourier approximation and its Cesàro counterpart for tiny t = 0.001.
 
We put two temperature profiles at t = 0.001 together for comparison,
Of course, Mathematia complains that the exponential terms are too small for actual calculations. Therefore, 30-term approximation is not needed and first few terms is sufficient for accurate approximations.
 
 
Temperature distribution at t = 0.1.
Temperature distribution at t = 0.2.
Temperature distribution at t = 2.1.
In order plot the temperature as a function of the time at different position
values along the bar, we compare its distribution with just first term