Graphing the Numerical Solution to the One-Dimensional Heat Conduction Equation

Jerico Manalo, University of the Philippines Diliman, Department of Mechanical Engineering

Author Profile

Summary

Students are to create their own script to solve a one-dimensional heat conduction equation using the finite difference method.


Learning Goals

The activity aims to help students understand the process in solving a parabolic partial differential equation using the finite difference method. In addition, animating the plot using the MATLAB function drawnow allows them to further understand the concept of one-dimensional heat conduction, which is one of the PDE's applications.

Context for Use

This activity is part of a problem set in a chapter we discussed on numerical solutions to partial differential equations for sophomore students in our university.

Prior to this, we had a class showing how to use MATLAB in solving a similar problem but for a different case. (We used Dirichlet boundary conditions.)

Description and Teaching Materials

Students are given a 1-D heat conduction equation [i.e., ut = 4uxx, t>0, 0<x<1] with a certain initial condition and Neumann boundary conditions for them to solve.

They are to create a script that numerically solves for u(x,t) for a finite amount of time using the simplest explicit method (using forward finite difference for ut and central finite difference for uxx). They are free to decide on step sizes, but noting of the method, they must make sure that the numerical solution must converge first.

After finding out the solution, they are to provide an animation of the plot by plotting u vs x for a certain t, and utilizing the MATLAB function drawnow to allow them to see the plot change for each t.





Assessment

Students will be assessed based on how they solved the problem and if they can effectively show the animated plot.