Understanding the Inhomogeneous Heat Equation and Its Applications
Written on
Chapter 1: Introduction to the Heat Equation
This article serves as a continuation of my previous discussion on the heat equation, which you may want to read beforehand. Don’t worry; it’s concise. In our last exploration, we addressed basic initial boundary value problems (IBVPs) concerning the heat equation without any external forces, specifically under the conditions T(0,t)=T(L,t)=0°C.
The governing equation, represented as T_t - α²T_xx = 0, is referred to as the homogeneous heat equation. For clarity, we will denote α² as the diffusivity instead of using k/c. Notably, subscripts indicate partial derivatives; for instance, T_xx = ∂²T/∂x².
These types of problems typically model a long, slender metal rod that starts with a defined temperature distribution, insulated along its length. This allows heat exchange solely at its extremities. However, we will now consider a scenario where the insulation is removed, enabling heat exchange along the entire length of the rod, which is represented by an IBVP for the inhomogeneous heat equation:
Here, the function F(x,t) is introduced as the forcing term, and for simplicity, we will initially focus on cases where the forcing is independent of temperature.
Section 1.1: General Solution
At any given moment, the solution T(x,t) behaves as a piecewise continuous function over the interval 0 ≤ x ≤ L, with boundary conditions T(0,t)=T(L,t)=0. From the previous article, we established that the functions that meet this criterion form a vector space spanned by the basis:
This indicates that the solution can be expressed as a weighted sum of these basis functions, with the time dependence encapsulated in the coefficients. Thus, the solution takes the form:
The forcing term is also treated as a piecewise continuous function on the same domain, satisfying F(0,t)=F(L,t)=0, which allows us to expand it similarly:
The functions F_n(t) represent the Fourier coefficients of F(x,t). By substituting these into the heat equation, we arrive at:
This yields a first-order linear ordinary differential equation, which can be tackled using integrating factors.
In the fourth line, we converted the indefinite integral with respect to t into a definite integral over a dummy variable τ from 0 to t. This transition simplifies the expression to avoid confusion with functions of t multiplied by indefinite integrals.
When evaluating A_n(0), we find that A_n(0)=C_n, indicating that C_n represents the Fourier coefficients for T(x,0)=φ(x), which we can denote as φ_n.
Consequently, the general solution is represented as:
Thus, determining a particular solution for a specific IBVP of the inhomogeneous heat equation requires computing two integrals.
Section 1.2: Analytical Example: Heating and Cooling
Consider an IBVP where the forcing, initial conditions, and boundary conditions are defined as follows:
The animation below illustrates the forcing term, which heats and cools various sections of the rod at distinct intervals:
Next, we will compute the Fourier coefficients. It’s clear that φ_0=0, and since the forcing function is already in Fourier series format, we find F_n(t)=cos(2πt) and F_m(t)=cos(πt) with all other coefficients being zero. This leads us to the solution:
The following graphics are based on a diffusivity of α²=2×10^-2 m²/s.
Section 1.3: Numerical Example: Piecewise Forcing
Initially, the temperature across the rod is 0°C, and the diffusivity remains α²=2×10^-2 m²/s. The insulation has been removed from the central 10cm of the rod, which is connected to a heating element. This element raises the temperature at a steady rate of 5°C/s for 5 seconds before turning off. For t ≤ 5s, we have:
For t > 5s, we transition to a new problem:
The solution will be approached piecewise. For t ≤ 5s, we will substitute F(x,t) and φ(x) into the general solution. During this time, φ_0=0, and the F_n(t) coefficients will need to be calculated numerically. For the subsequent phase, we will solve the homogeneous heat equation using T(x,5) as the initial condition, treating t=5 as a new origin. At this stage, F_n(t)=0, and the φ_n coefficients correspond to T(x,5), which, as before, will be computed numerically.
An animation depicting the solution is shown below:
Conclusion
In reality, systems described by the heat equation are rarely isolated; they interact with their environment, and this interaction is encapsulated in the forcing term. By addressing the concept of forcing, we advance our capability to apply the heat equation to real-world phenomena. However, this discussion has only scratched the surface, focusing on a simplified case where forcing remains independent of the rod's temperature. This is not entirely realistic, as factors like Newtonian cooling depend on the temperature difference between T(x,t) and ambient conditions. Nevertheless, understanding this restricted scenario lays the groundwork for tackling more complex problems in future discussions.
Before progressing, we must also address the limitations of only handling homogeneous boundary conditions, which will be the focus of the next installment in this series.
This video titled "Solving PDEs with the Laplace Transform: The Heat Equation" provides an insightful exploration into solving partial differential equations, particularly the heat equation, using the Laplace Transform method.
The second video, "Lecture 8: 1d wave equation with a forcing function (Duhamel's Principle)," delves into the wave equation and its solutions when subjected to external forces, complementing our understanding of similar concepts in heat transfer.