Breadcrumbs

 

 

 

Download ModelDownload SourceembedLaunch Website ES WebEJS

About

Intro Page

Heat flow -- Dynamics of a 1D rod

Developed by L. Engelhardt

In introductory physics, students learn two equations that involve heat: Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, describes the amount of heat transferred in calorimetry; and Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> describes the rate of steady state heat flow through a window. In this Exercise Set we combine these two equations to explore the dynamics of heat flow and temperature change in one dimension. Specifically, we will explore the temperature of a frying pan handle as a function of both position and time, and we will see how this temperature profile depends on the material properties of the handle.

Subject Area Thermal & Statistical Physics
Levels First Year and Beyond the First Year
Available Implementations IPython/Jupyter Notebook and Python
Learning Objectives

Students will be able to:

  • Mathematically derive an equation for the small slice of a 1D rod at the end of the rod (Exercise 1)
  • Create 1D arrays to store the discretized values of both position and time (Exercise 2)
  • Look up the relevant material properties for heat transfer through a rod (Exercise 3)
  • Compute the heat transfer constant, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 4)
  • Set initial values in a 2D array – Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> – to represent a 1D rod at time Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">(Exercise 5)
  • Use the hyperbolic tangent function to model the increasing temperature of a frying pan, and use this to set boundary conditions for Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 6)
  • Convert temperatures between Fahrenheit and Celsius (Exercise 7)
  • Write code to compute Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> for all Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercises 8 and 9)
  • Plot Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> for various values of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 10)
  • Test for convergence in Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 11)
  • Create animations of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 12)
  • Create contour plots of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> (Exercise 13)
  • Interpret simulated data of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> from plots, animations, and contour plots (Exercise 14)
  • Carry out the analysis described above for multiple materials (Exercise 15)
Time to Complete 120 min
Exercise 1-3

In the exercises below, you will simulate heat transfer along a Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> cm long frying pan handle for a frying pan that is heated on a stove for 10 minutes.

Exercise 1: Mathematical Derivation

Derive an equation for the temperature of slice number Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> at the end of a one-dimensional rod, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">. Your derivation, and the resulting equation, will be very similar to the derivation and result for the other slices of the rod (for Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">). The only difference is that there is no heat flow in/out of the right side of this slice.

Exercise 2: x and t

Write lines of code to generate two one-dimensional arrays: one for the discrete values of position, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, and one for the discrete values of time, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">.

Exercise 3: Material Properties

You will simulate the handle of a frying pan, using handles made of (1) stainless steel and (2) Bakelite. Look up the relevant material properties for both stainless steel and Bakelite. What are the numerical values for each of these properties for each material?

Exercise 4-6

Exercise 4: Dimensionless constant, r

Compute the constant “Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">” for stainless steel. What value do you obtain? If it is greater than 0.5, you will need to adjust your discretization of the position and/or the time to decrease the values of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">.

Exercise 5: 2D array and initial temperature

Generate a 2D array that will be used to store temperature as a function of both position and time, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">.

The temperature of the frying pan handle will begin at a room temperature of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> F. Store this initial (Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">) value in the 2D array for all slices of the rod (for all Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">).

Exercise 6: Temperature of the pan

You will need to generate an array of temperatures for the frying pan (at the left edge of the handle) as a function of time, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">. The frying pan will start out at room temperature at time Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">. A typical frying pan will then heat up quicky for the first minute or two after a stove is turned on, and then it will reach a constant temperature of around 350 to Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> F. This behavior can be reproduced using the equation

Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; width: 668px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; width: 668px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">

with Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> F, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> F, and Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> seconds. “tanh” is the “hyperbolic tangent” function, which is one of the standard built-in functions for any computer math library.

Use this equation to compute an array of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> values, and then plot Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> versus Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> to verify that the temperature of you frying pan agrees with the following plot:

Once you have verified that Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> is correct, use the 1D array of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> values to set the temperature of the left (Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">) edge of the handle in the 2D array, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, for all values of time (for all Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">).

Exercise 7-9

Exercise 7: Conversions

You will need to convert the 2D array, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> from units of Fahrenheit to Celsius before beginning the simulation. Then convert back from Celsius to Fahrenheit after the simulation. What will you need to do in order to perform both of these conversions?

Exercise 8: Computing for many i and j

Complete the line of code to compute Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> for all positions, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, and all times, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">.

Exercise 9: End of the handle

Complete the line of code to compute Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> at the end of the handle for all times, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">. (You derived this equation in Exercise 1.)

Exercise 10-12

Exercise 10: Plotting

Plot the temperature of the rod versus position, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, for a few different values of time, Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">. Make sure that your results seem reasonable. Discuss if/why the results seem reasonable.

Note: It is likely that your program won’t work right away! If your code generates errors, or if the results just don’t seem physically reasonable, you will need to debug your code.

Exercise 11: Convergence

Decrease the values of Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> and Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">, and re-run the simulation to check for convergence. If the temperature results change when you change the discretization, that means that Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> and/or Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> are too big, and you need to make them smaller. (But make sure that Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">

Exercise 12: Animating

Create an animation showing temperature versus position at many different moments in time. Again, make sure that the results seem reasonable, and check for convergence. Discuss.

Exercise 13-15

Exercise 13: Contour plots

Create a contour plot that shows temperature as a function of both position and time in a single static plot. Again, make sure that the results seem reasonable, and check for convergence. Discuss.

Exercise 14: Analysis

At a temperature of 150Unexpected text node: 'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal">'style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-top-width: 0px; border-right-style: none; border-right-width: 0px; border-bottom-style: none; border-bottom-width: 0px; border-left-style: none; border-left-width: 0px; display: inline; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: normal"> F, an object will quickly cause a burn if touched. (You can also get burned by cooler objects, but not immediately – only if you continue to touch the object for an extended period of time.) Based on the results of your simulations, discuss where you would – and would not – be able to safely touch the handle of the pan at different moments in time.

Exercise 15: Repeat for other material

Repeat the exercises above for a frying pan handle that is made of Bakelite rather than stainless steel. Discuss your results.

Dynamics of a 1D rod.py

# # Author: Larry Engelhardt (July, 2016)

# Material properties for a few different materials are listed below

#

# 1. Thermal conductivity: `k_t`

# 2. Specific heat capacity: `c`

# 3. Density: `rho`

#

# Stainless Steel

k_t = 16 # W / (m C)

c = 500 # J / (kg C)

rho = 8000 # kg / m^3

# Bakelite

k_t = 0.2 # W / (m C)

c = 920 # J / (kg C)

rho = 1300 # kg / m^3

# Oak

k_t = 0.17 # W / (m C)

c = 2000 # J / (kg C)

rho = 700 # kg / m^3

# Fiberglass

k_t = 0.04 # W / (m C)

c = 700 # J / (kg C)

rho = 2000 # kg / m^3

# BEGINNING THE PROGRAM:

from pylab import *

# Discretizing space

L = 0.15 # Length of handle in meters

Nx = 76 # Number of positions in space

x = linspace(0, L, Nx) # Array of positions

dx = L / (Nx - 1) # Values of delta x (meters)

# Discretizing time

tMax = 600 # Maximum time in seconds

Nt = 1801 # Number of time steps

t = linspace(0, tMax, Nt) # Array of time values

dt = tMax / (Nt - 1) # Size of time step (seconds)

T0 = 72 # Initial temperature (Farenheit)

dT_stove = 300 # Temperature increase of the stove (F)

# Stainless Steel's material properties

k_t = 16 # W / (m C)

c = 500 # J / (kg C)

rho = 8000 # kg / m^3

r = k_t * dt / (c * rho * dx**2) ## THE PARAMETER! (dimensionless) ##

print('r:', r) # Check to make sure that r < 0.5

# Preparing 2D array of temperatures

T = zeros((Nt, Nx)) # 2D array for temperature. NOTE THE ORDER: [time, space]

T[0, :] = T0 # Initial values (time t = 0)

tau = 60 # Used in tanh function, units of seconds

T[:, 0] = T0 + dT_stove * tanh(t/tau) # Edge of rod (at x=0) in deg. F

T = (T - 32) / 1.8 # Convert all temperatures to Celsius

# Verifying that T(t) for the pan (x=0) looks correct:

Tpan = T0 + dT_stove * tanh(t/tau)

plot(t, Tpan, lw=2)

grid(True)

xlabel('Time (sec)')

ylabel('Pan Temperature (F)')

grid(True); show()

# Computing the temperature of the handle for all `x` and `t`:

for j in range(1, Nt): # Loop thru TIME

for i in range(1, Nx-1): # Loop thru SPACE

T[j,i] = r*T[j-1, i+1] + (1 - 2*r)*T[j-1,i] + r*T[j-1, i-1]

T[j, -1] = (1-r)*T[j-1,i] + r*T[j-1,i-1] # End of rod (x=L)

T = 1.8*T + 32 # Convert back to F from C

x = x * 100 # Convert from meters to cm

# Plotting T(x) for a few moments in time

jValues = [30, 180, 540, -1] # A few values of the time index (-1 for last element)

for j in jValues:

plot(x, T[j,:], linewidth=2, label='Time (seconds): '+str(t[j]))

legend()

title('Stainless Steel')

xlim([0, 15])

xlabel('Position (cm)')

ylabel('Temperature (F)')

grid(True);

savefig('StainlessSteel_T_vs_x.png')

show()

# Creating a contour plot of T(x,t)

colorvals = linspace(70, 160, 91) # colors for contour plot (min, max, num)

contourf(x, t, T, colorvals) # (x-axis, y-axis, z(x,y))

title('Stainless Steel')

xlabel('x (cm)')

ylabel('Time (sec)')

colorbar()

grid(True)

savefig('StainlessSteel_contour.png')

show()

# Repeating using Bakelite

# Discretizing space

L = 0.15 # Length of handle in meters

Nx = 76 # Number of positions in space

x = linspace(0, L, Nx) # Array of positions

dx = L / (Nx - 1) # Values of delta x (meters)

# Discretizing time

tMax = 600 # Maximum time in seconds

Nt = 1801 # Number of time steps

t = linspace(0, tMax, Nt) # Array of time values

dt = tMax / (Nt - 1) # Size of time step (seconds)

T0 = 72 # Initial temperature (Farenheit)

dT_stove = 300 # Temperature increase of the stove (F)

# Bakelite's material properties

k_t = 0.2 # W / (m C)

c = 920 # J / (kg C)

rho = 1300 # kg / m^3

r = k_t * dt / (c * rho * dx**2) ## THE PARAMETER! (dimensionless) ##

print('r:', r) # Check to make sure that r < 0.5

# Preparing 2D array of temperatures

T = zeros((Nt, Nx)) # 2D array for temperature. NOTE THE ORDER: [time, space]

T[0, :] = T0 # Initial values (time t = 0)

tau = 60 # Used in tanh function, units of seconds

T[:, 0] = T0 + dT_stove * tanh(t/tau) # Edge of rod (at x=0) in deg. F

T = (T - 32) / 1.8 # Convert all temperatures to Celsius

for j in range(1, Nt): # Loop thru TIME

for i in range(1, Nx-1): # Loop thru SPACE

T[j,i] = r*T[j-1, i+1] + (1 - 2*r)*T[j-1,i] + r*T[j-1, i-1]

T[j, -1] = (1-r)*T[j-1,i] + r*T[j-1,i-1] # End of rod (x=L)

T = 1.8*T + 32 # Convert back to F from C

x = x * 100 # Convert from meters to cm

jValues = [30, 180, 540, -1] # A few values of the time index (-1 for last element)

for j in jValues:

plot(x, T[j,:], linewidth=2, label='Time (seconds): '+str(t[j]))

legend()

title('Bakelite')

xlim([0, 15])

xlabel('Position (cm)')

ylabel('Temperature (F)')

grid(True);

savefig('StainlessSteel_T_vs_x.png')

show()

colorvals = linspace(70, 160, 91) # colors for contour plot (min, max, num)

contourf(x, t, T, colorvals) # (x-axis, y-axis, z(x,y))

title('Bakelite')

xlabel('x (cm)')

ylabel('Time (sec)')

colorbar()

grid(True)

savefig('Bakelite_contour.png')

show()

 

Translations

Code Language Translator Run

Credits

Fremont Teng; Loo Kang Wee

through practical application.

Main Themes:

  1. Computational Modeling of Heat Transfer: The central theme is the use of computational tools to model and understand the dynamics of heat flow. The resource guides students through the process of discretizing a continuous physical system (a 1D rod) in both space and time to create a numerical simulation.
  2. Finite Difference Method: The exercises implicitly utilize the finite difference method to approximate the partial differential equations governing heat transfer. This involves dividing the rod into small spatial slices and advancing the temperature distribution in discrete time steps.
  3. Material Properties and their Impact on Heat Transfer: A significant aspect of the simulation involves incorporating the material properties of the rod, such as thermal conductivity, specific heat capacity, and density. Students are tasked with researching these properties for different materials (stainless steel and Bakelite) and observing their effect on heat transfer.
  4. Stability and Convergence of Numerical Solutions: The resource touches upon the crucial concepts of numerical stability and convergence. The introduction of the dimensionless constant 'r' and the exercise on convergence highlight the importance of choosing appropriate discretization parameters (Δx and Δt) to ensure physically meaningful and stable simulation results.
  5. Practical Application: Frying Pan Handle: The simulation is framed around a relatable real-world example – the heating of a frying pan handle. This context helps students connect abstract physics concepts to everyday experiences.

Most Important Ideas and Facts:

  • Learning Objectives: The primary goal is for students to gain practical skills in:
  • Deriving equations for heat flow in a discretized system.
  • Creating and manipulating 1D and 2D arrays in Python to represent physical quantities (position, time, temperature).
  • Finding and using relevant material properties.
  • Calculating heat transfer constants.
  • Setting initial and boundary conditions for the simulation.
  • Implementing the finite difference method to simulate heat evolution over time.
  • Plotting and analyzing simulation results.
  • Understanding the concepts of numerical stability and convergence.
  • Discretization: The continuous 1D rod is divided into Nx number of positions, creating a spatial discretization with a step size of dx = L / (Nx - 1). Time is also discretized into steps of dt (though dt is not explicitly defined in the excerpts but is implied).
  • Heat Transfer Constant (r): The resource introduces a dimensionless constant 'r' which is crucial for the stability of the numerical simulation. Exercise 4 tasks students with computing this constant and highlights the condition that if it is greater than 0.5, adjustments to the discretization (reducing dx and/or dt) are necessary. This is a practical constraint related to the explicit finite difference method for heat diffusion.
  • Boundary Conditions: The simulation considers specific boundary conditions. Exercise 1 focuses on the mathematical derivation for the "slice number N at the end of a one-dimensional rod," where "there is no heat flow in/out of the right side of this slice." This represents an insulated boundary condition. Exercise 6 and the subsequent code snippets indicate a time-dependent temperature T_0(t) at the other end (the left edge of the handle, connected to the pan). The equation provided for T_0(t):
  • T_0(t) = T_room + (T_pan - T_room) * tanh(t / tau)
  • models the rapid heating of the pan to a steady-state temperature T_pan from room temperature T_room over a characteristic time tau = 60 seconds.
  • Numerical Implementation: The excerpts include Python code snippets using the pylab library (which includes numpy and matplotlib). This code demonstrates:
  • Setting the length of the handle (L = 0.15 meters).
  • Defining the number of spatial positions (Nx = 76).
  • Creating an array of positions using linspace.
  • Calculating dx.
  • Setting the maximum simulation time (tMax = 600 seconds).
  • Providing examples of material properties (thermal conductivity k_t, specific heat c, density rho) for various materials (Steel AISI 304, Wood (Oak), Fiberglass).
  • Simulation Steps: The exercises outline a step-by-step process for building the simulation:
  • Deriving the finite difference equation for the end of the rod.
  • Creating arrays for position and time.
  • Looking up material properties.
  • Computing the constant 'r'.
  • Setting initial conditions (Exercise 5, though the details are in the second excerpt where the entire rod is initialized to room temperature).
  • Defining the time-dependent boundary condition at the heated end (Exercise 6).
  • Implementing the core update rule for temperature at each time step and spatial position (Exercises 8 and 9).
  • Plotting the temperature profile along the rod at different times (Exercise 10).
  • Checking for convergence by refining the discretization (Exercise 11).

Quotes:

  • "The only difference is that there is no heat flow in/out of the right side of this slice." (Regarding the end slice of the rod in Exercise 1, highlighting the no-flux boundary condition).
  • "If it [the constant 'r'] is greater than 0.5, you will need to adjust your discretization of the position and/or the time to decrease the values of r." (Emphasizing the stability criterion for the numerical method).
  • "T_0(t) = T_room + (T_pan - T_room) * tanh(t / tau)" (Providing the equation for the time-dependent temperature at the heated end of the handle).

In summary, these excerpts describe a hands-on, computationally focused approach to teaching heat transfer. Students will learn fundamental physics concepts by developing and analyzing a numerical simulation of a real-world system, paying attention to the mathematical formulation, material properties, and the stability and reliability of their computational model.

 

 

Study Guide: 1D Heat Flow Simulation

Learning Objectives Review

This section summarizes the learning objectives outlined in the source material. Ensure you understand each of these before proceeding.

  • Mathematical Derivation (Exercise 1): You should be able to derive the finite difference equation for the temperature of the last slice of a one-dimensional rod, considering the boundary condition of no heat flow on one end.
  • Array Creation (Exercise 2): You should know how to create one-dimensional arrays in a programming environment to represent discrete positions along the rod and discrete time steps.
  • Material Properties (Exercise 3): You should be able to identify and look up relevant thermal properties of different materials (like thermal conductivity, specific heat capacity, and density) that influence heat transfer.
  • Heat Transfer Constant (Exercise 4): You should understand how to compute the dimensionless heat transfer constant, often denoted as 'r', using material properties and the discretization parameters (Δx and Δt).
  • Initial Conditions (Exercise 5): You should be able to set up a two-dimensional array representing the temperature distribution along the rod at the initial time (t=0).
  • Boundary Conditions (Exercise 6 & 9): You should understand how to implement boundary conditions in the simulation, specifically how to set the temperature at the heated end of the rod as a function of time and the insulated condition at the other end.
  • Iterative Computation (Exercise 8 & 9): You should grasp the iterative process of updating the temperature of each slice of the rod over time using the finite difference equations.
  • Plotting and Analysis (Exercise 10): You should be able to visualize the temperature distribution along the rod at different time points and interpret these results for physical reasonableness.
  • Convergence (Exercise 11): You should understand the concept of numerical convergence in simulations and how changing the discretization (Δx and Δt) affects the accuracy and stability of the results. You should also be aware of the stability criterion related to the heat transfer constant 'r'.
  • Material Comparison (Exercise 15): You should be able to run simulations for different materials and compare the resulting heat transfer dynamics based on their material properties.

Quiz

Answer the following questions in 2-3 sentences each.

  1. What is the key difference in the mathematical derivation of the heat flow equation for the end slice of the rod compared to an interior slice?
  2. Why is it necessary to discretize both position and time when simulating heat flow in a rod?
  3. Name three relevant material properties that determine how quickly heat will transfer through a substance.
  4. What is the dimensionless heat transfer constant 'r', and why is it important to consider its value in a heat flow simulation?
  5. How is the initial temperature distribution of the rod represented in the simulation setup?
  6. Describe how the heated end of the frying pan handle's temperature is modeled as a function of time in the simulation.
  7. Explain the physical meaning of setting a boundary condition of no heat flow at the end of the rod.
  8. In the iterative computation, how is the temperature of a slice at a future time step determined based on the temperatures at the current time step?
  9. What does it mean for a numerical simulation to "converge," and how can you check for convergence in this heat flow simulation?
  10. Why do different materials exhibit different heat transfer characteristics in the frying pan handle simulation?

Quiz Answer Key

  1. The main difference is that the end slice has a boundary with no heat flux, meaning heat only flows in or out from one adjacent slice, whereas an interior slice exchanges heat with two neighboring slices. This alters the terms in the heat balance equation for the end slice.
  2. Discretization is necessary because the heat flow process is continuous in both space and time. To simulate it computationally, we must divide the continuous rod into discrete segments (spatial discretization) and track the temperature changes over discrete intervals (temporal discretization).
  3. Three relevant material properties are thermal conductivity (how well a material conducts heat), specific heat capacity (how much energy is required to raise the temperature of a given mass), and density (mass per unit volume, influencing the total thermal mass).
  4. The heat transfer constant 'r' is a dimensionless parameter that combines material properties (thermal diffusivity) and the discretization parameters (Δx and Δt). It is crucial because its value affects the numerical stability of the simulation; for explicit methods, 'r' typically needs to be less than or equal to 0.5 to prevent oscillations or divergence.
  5. The initial temperature distribution is represented by assigning temperature values to each discrete position along the 1D array representing the rod at the starting time (t=0). This often involves setting all elements of the array to a uniform initial temperature or defining a specific initial temperature profile.
  6. The temperature of the heated end (i=0) is not typically calculated by the simulation but is instead set as a time-dependent boundary condition, often using a function like the hyperbolic tangent (tanh) to model the rapid initial heating followed by a saturation at a higher temperature.
  7. A boundary condition of no heat flow at the end of the rod signifies that the end is thermally insulated, and there is no transfer of thermal energy between that end of the rod and its surroundings. This is implemented by modifying the heat flow equation for the last slice.
  8. The temperature of an interior slice at the next time step is typically calculated using the temperatures of itself and its immediate neighbors at the current time step, weighted by the heat transfer constant 'r'. This finite difference approximation of the heat diffusion equation advances the simulation in time.
  9. Numerical convergence means that as the discretization intervals (Δx and Δt) are made smaller (more discrete points), the results of the simulation become less dependent on the specific discretization and approach a stable, physically meaningful solution. Convergence can be checked by running the simulation with progressively smaller Δx and Δt values and observing if the temperature profiles change significantly.
  10. Different materials have varying thermal properties, such as thermal conductivity, specific heat capacity, and density. These properties dictate how readily a material conducts heat, how much energy it stores per degree Celsius, and its overall thermal inertia, leading to different rates and extents of heat transfer along the frying pan handle.

Essay Format Questions

Consider the following questions and develop well-structured essays in response.

  1. Discuss the importance of discretizing continuous physical systems, such as a one-dimensional rod undergoing heat transfer, for the purpose of computer simulation. Explain the role of spatial and temporal discretization and the potential consequences of choosing inappropriate discretization parameters (Δx and Δt).
  2. Explain the concept of boundary conditions in the context of heat transfer in a one-dimensional rod. Describe the two specific boundary conditions discussed in the exercises (heated end and insulated end) and how they are mathematically and computationally implemented in the simulation.
  3. Analyze the significance of material properties in determining the dynamics of heat transfer. Compare and contrast the expected heat flow behavior in a frying pan handle made of stainless steel versus Bakelite, relating your discussion to their respective thermal conductivities, specific heat capacities, and densities.
  4. Discuss the concept of numerical stability and convergence in the context of the finite difference method used to simulate heat transfer. Explain the role of the heat transfer constant 'r' and the criteria necessary for a stable and accurate simulation. How can one assess whether a simulation has converged?
  5. The exercises involve a simplified one-dimensional model of heat transfer. Discuss the limitations of this model when considering a real frying pan handle. What are some of the additional factors or dimensions that might need to be considered for a more accurate and comprehensive simulation of heat transfer in such a system?

Glossary of Key Terms

  • Heat Flow: The transfer of thermal energy from a region of higher temperature to a region of lower temperature.
  • Steady State: A condition in which the temperature distribution within a system does not change over time. The rate of heat flow into a region equals the rate of heat flow out.
  • 1D (One-Dimensional): A system where properties (like temperature) vary primarily along a single spatial coordinate. In this case, along the length of the rod.
  • Discretization: The process of dividing a continuous domain (like space or time) into a finite number of discrete points or intervals for the purpose of numerical computation.
  • Finite Difference Method: A numerical technique for approximating the solutions to differential equations by replacing derivatives with finite difference quotients.
  • Δx (Delta x): The spatial step size in the discretization, representing the distance between adjacent points along the rod.
  • Δt (Delta t): The temporal step size in the discretization, representing the duration of each time interval in the simulation.
  • Thermal Conductivity (k_t): A material property that indicates its ability to conduct heat. A higher thermal conductivity means the material transfers heat more readily.
  • Specific Heat Capacity (c): A material property that quantifies the amount of heat energy required to raise the temperature of a unit mass of the material by one degree.
  • Density (ρ): A material property representing its mass per unit volume.
  • Heat Transfer Constant (r): A dimensionless parameter (often proportional to k_t * Δt / (c * ρ * Δx^2)) that appears in the finite difference equation for heat diffusion and affects the stability of the numerical solution.
  • Initial Conditions: The state of the system (e.g., temperature distribution) at the starting time of the simulation (t=0).
  • Boundary Conditions: Constraints or specified values at the edges or boundaries of the system that influence the solution within the domain. In this case, the temperature at the heated end and the heat flow at the insulated end.
  • Iteration: A step in a repetitive computational process where the state of the system is updated based on its previous state and the governing equations.
  • Convergence (Numerical): The property of a numerical method to produce solutions that get closer to the true solution of the problem as the discretization becomes finer (Δx and Δt become smaller).
  • Stability (Numerical): The property of a numerical method to prevent errors from growing unboundedly during the computation. For explicit methods in heat diffusion, it often relates to the value of the heat transfer constant.
  • tanh (Hyperbolic Tangent): A mathematical function that produces an S-shaped curve, often used to model a quantity that rapidly increases and then saturates at a certain level, as seen in the heating of the frying pan.

 

Version

  1. https://www.compadre.org/PICUP/exercises/exercise.cfm?I=138&A=heatflow_1d 
  2. http://weelookang.blogspot.com/2018/06/heat-flow-dynamics-of-1d-rod.html 

end faq

{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}

What is the main objective of this exercise set?

The primary goal of this exercise set is to simulate the heat transfer along a one-dimensional rod, specifically a 15 cm long frying pan handle, made of different materials like stainless steel and Bakelite, when the pan is heated on a stove for 10 minutes. Students will mathematically model this process, implement it using computational tools like Python, and analyze the resulting temperature distribution over time and position.

What mathematical task is involved in Exercise 1?

Exercise 1 requires students to mathematically derive an equation for the temperature of the last slice (slice number N) at the end of a one-dimensional rod. This derivation is similar to that for the inner slices but accounts for the boundary condition at the end, where there is no heat flow out of the right side of the slice. The result will be an equation for Tj+1N based on the temperature of the last slice and the slice immediately before it at the current time step.

What is the purpose of Exercises 2 and 5?

Exercise 2 focuses on the discretization of the physical system by asking students to create one-dimensional arrays to store the discretized values of both position (x) and time (t). This involves defining the length of the rod, the number of spatial divisions, the total simulation time, and the number of time steps. Exercise 5 builds upon this by requiring students to set the initial temperature values in a two-dimensional array, T(x,t), which represents the temperature of the 1D rod at different positions (x) and times (t), specifically at the initial time t=0.

What material properties are important for simulating heat transfer in Exercise 3?

Exercise 3 emphasizes the importance of material properties in heat transfer. Students need to research and find the relevant thermal properties for stainless steel and Bakelite. These properties typically include thermal conductivity (kt), specific heat capacity (c), and density (ρ), which are crucial for determining how heat will propagate through the materials.

What is the heat transfer constant 'r' and why is it important to compute it in Exercise 4?

The heat transfer constant, r, is a dimensionless parameter that combines the material properties, the spatial discretization (Δx), and the temporal discretization (Δt). It plays a crucial role in the numerical stability of the heat transfer simulation. Exercise 4 requires students to compute this constant for stainless steel. A key constraint mentioned is that if r is greater than 0.5, the discretization (either Δx or Δt) needs to be adjusted to ensure numerical stability and prevent oscillations or unrealistic results in the simulation.

How is the time-dependent temperature at the heated end of the frying pan handle (T0(t)) defined in Exercise 6?

Exercise 6 addresses the boundary condition at the heated end of the frying pan handle (where it connects to the pan). It provides an equation, T0(t)=Troom+(TpanTroom)×tanh(t/τ), to model the temperature of this end as a function of time. This equation captures the behavior of the pan heating up from room temperature (Troom) to a higher, relatively constant temperature (Tpan) over a characteristic time scale (τ=60 seconds). The hyperbolic tangent function (tanh) is used to represent this gradual increase.

What are Exercises 8 and 9 asking students to do in terms of computation?

Exercise 8 asks students to complete a line of code to compute the temperature Tj+1i for all the interior positions (1iN1) of the rod at the next time step (j+1) based on the temperatures at the current time step (j). This likely involves implementing a finite difference approximation of the heat equation. Exercise 9 is similar but focuses on computing the temperature Tj+1N at the very end of the handle (position N) for the next time step, using the equation derived in Exercise 1, which accounts for the no-flux boundary condition.

What important aspects of numerical simulation are covered in Exercises 10 and 11?

Exercise 10 focuses on the visualization and physical interpretation of the simulation results. Students are asked to plot the temperature of the rod versus position at different points in time and to assess whether these results are physically reasonable, prompting them to think about how heat should propagate along the rod. Exercise 11 introduces the concept of convergence in numerical methods. Students are instructed to decrease the spatial (Δx) and temporal (Δt) discretization and re-run the simulation to see if the temperature results change. If they do, it indicates that the discretization was not fine enough, and the simulation had not yet converged to a stable and accurate solution. They are also reminded of the stability condition (r<0.5).

1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)