Trinh @ Bath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vpde_lecture23 [2020/03/26 13:31]
trinh
vpde_lecture23 [2020/03/26 17:05] (current)
trinh
Line 1: Line 1:
 ====== MA20223 Lecture 23 ====== ====== MA20223 Lecture 23 ======
 +
 +<html>
 +<iframe width="560" height="315" src="https://www.youtube.com/embed/09hFyOkBF3g" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 +</html>
  
 ==== The 1D heat equation with zero Dirichlet conditions ====  ==== The 1D heat equation with zero Dirichlet conditions ==== 
Line 20: Line 24:
  
 The hardest part is to understand how to calculate the $b_n$ coefficients via an odd extension of the initial condition. In many ways, this is somewhat backwards (usually we ask "How do I compute a Fourier series for an odd extension" rather than to associate a Fourier series already given to an odd extension).  The hardest part is to understand how to calculate the $b_n$ coefficients via an odd extension of the initial condition. In many ways, this is somewhat backwards (usually we ask "How do I compute a Fourier series for an odd extension" rather than to associate a Fourier series already given to an odd extension). 
 +
 +Anyways, this we do in the video, and there we show that 
 +$$
 +b_n = -\frac{2}{n\pi}[(-1)^n - 1]
 +$$
 +
 +We'll then share a numerical simulation of this heat flow problem in the lecture. The code is below.
  
 <Code:Matlab linenums:1 |Solution of 1D heat equation with zero Dirichlet> <Code:Matlab linenums:1 |Solution of 1D heat equation with zero Dirichlet>
Line 73: Line 84:
 ==== The 1D heat equation with a steady state temperature ====  ==== The 1D heat equation with a steady state temperature ==== 
  
 +We will now examine the methodology for solving the non-homogeneous heat equation with Dirichlet conditions. 
 +
 +$$
 +\begin{gathered}
 +u_t = \kappa u_{xx}, \quad x\in[0, L], t \geq 0 \\
 +u(0, t) = T_0, \quad u(L, t) = T_1 \\ 
 +u(x, 0) = f(x).
 +\end{gathered}
 +$$
 +
 +The trick is to seek a steady state solution. Seek a solution that does not depend on time. Then $u(x, t) = U(x)$ and we must satisfy: 
 +$$
 +\begin{gathered}
 +0 = \kappa u_{xx}, \quad x\in[0, L], t \geq 0 \\
 +U(0) = T_0, \quad U(L) = T_1.
 +\end{gathered}
 +$$
 +The solution is then $U(x) = T_0 + (T_1 - T_0)x/L$.
 +
 +Next, we set the solution as
 +$$
 +u(x,t) = U(x) + \hat{u}(x,t). 
 +$$
 +
 +Why do this? Substitute into the system now to see that
 +$$
 +\begin{gathered}
 +\hat{u}_t = \kappa \hat{u}_{xx}, \quad x\in[0, L], t \geq 0 \\
 +\hat{u}(0, t) = 0, \quad \hat{u}(L, t) = 0. \\
 +\hat{u}(x, 0) = f(x) - U(x).
 +\end{gathered}
 +$$
 +
 +In other words, the effect of the trick of writing the solution using the steady-state $U(x)$ has effectively zero'ed the boundary conditions. So we can simply use the same techniques as developed above for the zero Dirichlet problem. 
  
 +The algorithm is summarised in the video, and we will complete the demonstration in Friday's class.