Solving the Heat Equation with B.C. and I.C.

  • Context: MHB 
  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Heat Heat equation
Click For Summary
SUMMARY

The discussion focuses on solving the heat equation with specified boundary conditions (B.C.) and initial conditions (I.C.). The boundary conditions are defined as \(T_x(0,t) = 0\) and \(T(\pi,t) = 1\), while the initial condition is \(T(x,0) = 0\). The general solution is derived as \(T(x,t) = 1 + \frac{4}{\pi}\sum_{n = 1}^{\infty}\frac{(-1)^n}{2n + 1}\cos\left[\left(n + \frac{1}{2}\right)\frac{\pi x}{L}\right]\exp\left[-\alpha\left(n + \frac{1}{2}\right)^2\frac{\pi^2}{L^2}t\right]\). The discussion concludes with a query on how to plot the temperature profiles transitioning from the initial state to the steady-state.

PREREQUISITES
  • Understanding of partial differential equations, specifically the heat equation.
  • Familiarity with boundary value problems and initial value problems.
  • Knowledge of Fourier series and their application in solving differential equations.
  • Proficiency in mathematical software for plotting functions, such as MATLAB or Python's Matplotlib.
NEXT STEPS
  • Learn how to implement Fourier series in MATLAB for visualizing temperature profiles.
  • Research the use of Python's Matplotlib for plotting solutions of differential equations.
  • Study the numerical methods for solving the heat equation, including finite difference methods.
  • Explore the concept of convergence in series solutions to ensure accurate temperature profile representation.
USEFUL FOR

Mathematicians, physicists, and engineers interested in heat transfer analysis, as well as students studying partial differential equations and numerical methods for differential equations.

Dustinsfl
Messages
2,217
Reaction score
5
Is this correct?

$$
\text{B.C.}=\begin{cases}
T_x(0,t) = 0\\
T(\pi,t) = 1
\end{cases}
$$
The I.C. is $T(x,0) = 0$.

The equation is $\frac{1}{\alpha}T_t = T_{xx}$.$$
\varphi(x) = A\cos\lambda x + B\frac{\sin\lambda x}{\lambda}
$$
and
$$
\psi(t) = C\exp\left(-\alpha\lambda^2t\right).
$$
First, let's solve the steady state solution, $\varphi_{\text{ss}}'' = 0\Rightarrow\varphi_{\text{ss}} = ax + b$.
From the boundary conditions, we have that $\varphi_{\text{ss}}' = a = 0$ and $\varphi_{\text{ss}} = b = 1$.
So
$$
\varphi_{\text{ss}}(x) = 1
$$
which satisfy both boundary conditions.
Next, let's solve the transient problem.
Then we have that $\varphi' = -\lambda A\sin\lambda x + B\cos\lambda x$.
Using the homogeneous boundary condition, we have that $B = 0$.
So we are left with $\varphi(x) = A\cos\lambda x$.
Next, we have
$$
\cos\lambda L = 0\Rightarrow\lambda = \left(n + \frac{1}{2}\right)\frac{\pi}{L},\quad n\in\mathbb{Z}^+.
$$
Our general solution is of the form
$$
T(x,t) = 1 + \sum_{n = 1}^{\infty}A_n\cos\left[\left(n + \frac{1}{2}\right)\frac{\pi x}{L}\right]\exp\left[-\alpha\left(n + \frac{1}{2}\right)^2\frac{\pi^2}{L^2}t\right].
$$
Using the initial condition, we have $\int_0^{\pi}[f(x) - 1]\cos\left[\left(n + \frac{1}{2}\right)\frac{\pi x}{L}\right]dx = \frac{L}{2}A_n\iff A_n = (-1)^n\frac{4}{\pi(2n + 1)}$.
Finally, we have that the solution to heat equation with the prescribed is
$$
T(x,t) = 1 + \frac{4}{\pi}\sum_{n = 1}^{\infty}\frac{(-1)^n}{2n + 1}\cos\left[\left(n + \frac{1}{2}\right)\frac{\pi x}{L}\right]\exp\left[-\alpha\left(n + \frac{1}{2}\right)^2\frac{\pi^2}{L^2}t\right].
$$
For the special case of when $\alpha = 1$ and $L = \pi$, we have
$$
T(x,t) = 1 + \frac{4}{\pi}\sum_{n = 1}^{\infty}\frac{(-1)^n}{2n + 1}\cos\left[\left(n + \frac{1}{2}\right)x\right]\exp\left[-\left(n + \frac{1}{2}\right)^2t\right].
$$
 
Last edited:
Physics news on Phys.org
Assuming this is correct. How do I plot a sequence of the temperature profiles between the initial state and the steady-state?
 
Last edited:
dwsmith said:
Assuming this is correct. How do I plot a sequence of the temperature profiles between the initial state and the steady-state?

Would this be it?
View attachment 357
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
926
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K