NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo Models Library:
Alternative Visualizations

(back to the library)

Heat Diffusion - Alternative Visualization

[screen shot]

Note: If you download the NetLogo application, every model in the Models Library is included.

ACKNOWLEDGMENT

This model is an alternate visualization of the Heat Diffusion model from the Chemistry & Physics section of the NetLogo Models Library. It uses visualization techniques as recommended in the paper:

WHAT IS IT?

This model simulates transient and steady-state temperature distribution of a thin plate. This version of the model uses a more intuitive visualization of the gradient of heat than the original model.

The View shows a square thin plate as viewed from above. The plate is thermally isolated on the two faces parallel to the view such that heat can flow only in and out from the perimeter of the plate and not into or out of the world. Heat is kept constant at the edges. As the simulation runs, heat is transmitted from warmer parts of the plate to cooler parts of the plate as shown by the varying color of the plate. Therefore, the temperature of the plate begins to change immediately and possibly differently at different locations, gradually converging to a stable state. Overall, the temperature distribution over the plate is a function of time and location. In addition to this simple use of the model, you are encouraged to control various paramaters, such as the temperature of each edge edge of the plate and of the center of the plate before--and even while--the model is running.

Heat diffuses ("spreads") at different rates through different media. These rates can be determined and are called the Thermal Diffusivity of the material. The Greek letter alpha is often associated with this value. The diffusivity of a material does not change based on how much of the material there is. It is always the same. Below is a table containing several different materials with different diffusivity rates. See that wood (bottom row) has a lower heat diffusivity than, say, iron. This means that it takes a longer for heat to spread through a wooden object than an iron one. That is one reason why the handles of iron saucepans are wooden, and not the other way round. Also, think of a marble table with iron legs that has just been put out in the sun in a street-side cafe. Which material part of the table do you expect will warm up faster? The model allows you to change thermal diffusivity of the plate in two ways. You can directly change the value of ALPHA to any value you like, or you can indirectly change ALPHA by selecting a material.

Thermal diffusivity of selected materials

<table border> <tr><th>Material<th>Thermal diffusivity<br>(alpha cm*cm/s) <tr><td>Wood (Maple)<td>0.00128 <tr><td>Stone (Marble)<td>0.0120 <tr><td>Iron<td>0.2034 <tr><td>Aluminum<td>0.8418 <tr><td>Silver<td>1.7004 </table>

HOW IT WORKS

Initialize the plate and edges to have temperatures that equal their respective slider values. Each time through the GO procedure, diffuse the heat on each patch in the following way. Have each patch set its current temperature to the sum of the 4 neighbors' old temperature times a constant based on alpha plus a weighted version of the patch's old temperature. (For those interested, the updated temperature is calculated by using a Forward Euler Method.) Then the edges are set back to the specified values and the old temperature is updated to the current temperature. Then the plate is redrawn.

HOW TO USE IT

There are five temperature sliders which enable users to set four fixed edge temperatures and one initial plate temperature: -- TOP-TEMP - Top edge temperature -- BOTTOM-TEMP - Bottom edge temperature -- INITIAL-PLATE-TEMP - Initial plate temperature -- LEFT-TEMP - Left edge temperature -- RIGHT-TEMP - Right edge temperature

There is a slider and a chooser that govern the thermal diffusivity of the plate. Selecting a material in the chooser, then pressing the UPDATE ALPHA button will set the value of ALPHA based on the material selected: -- ALPHA - The alpha constant of thermal diffusivity -- MATERIAL-TYPE - The value of the chooser is a material from the above chart. You must press UPDATE ALPHA for this to change the value of ALPHA.

There are four buttons with the following functions: -- SETUP - Initializes the model -- GO - Runs the simulation indefinitely -- GO ONCE - Runs the simulation for 1 time step -- UPDATE ALPHA - press this if you want to set ALPHA to a preset value based on the material selected by the MATERIAL-TYPE chooser

VISUALIZATION There is also a chooser, COLOR-SCHEME, which determines what scheme is used for coloring the plate. It has 4 values: RED - colors the plate a shade of red based on its temperature, uses NetLogo's SCALE-COLOR primitive (white is coldest, black is hottest) RGB - colors the plate from a spectrum of RGB colors based on its temperature, uses the Palette extension HSB - colors the plate from a spectrum of HSB colors based on its temperature DIVERGENT - colors the plate from a spectrum of colors from a divergent palette based on its temperature, uses the Palette extension

THINGS TO NOTICE

How does the equilibrium temperature distribution vary for different edge temperature settings?

Notice how an equilibrium (the steady-state condition) is reached.

Keep track of the units:

<table border> <tr><th>Variables<th>Units <tr><td>time<td>0.1 second <tr><td>temperature<td>degrees Celsius <tr><td>length<td>centimeters <tr><td>diffusivity<td>square centimeters per second </table>

How do the different color schemes map to the gradient of heat? The palette extension enables us to use divergent color schemes.

THINGS TO TRY

Set the parameters on the temperature sliders. Pick a value for ALPHA (or pick MATERIAL-TYPE and press UPDATE ALPHA). After you have changed all the sliders to values you like, press SETUP followed by GO or GO ONCE.

Try different materials to observe the heat transfer speed. How does this compare to physical experiments?

Try the following sample settings: - Top:100, Bottom:0, Left:0, Right:0 - Top:0, Bottom:100, Left:100, Right:100 - Top:0, Bottom:66, Left:99, Right:33 - Top:25, Bottom:25, Left:100, Right:0

EXTENDING THE MODEL

This model simulates a classic partial differential equation problem (that of heat diffusion). The thin square plate is a typical example, and the simplest model of the behavior. Try changing the shape or thickness of the plate (e.g. a circular or elliptical plate), or adding a hole in the center (the plate would then be a slice of a torus, a doughnut-shaped geometric object).

Add a slider to alter this thickness.

Try modeling derivative or combined boundary conditions.

NETLOGO FEATURES

The bundled palette extension is used to create color schemes from the widely-used ColorBrewer standard (https://colorbrewer2.org/). Here we use a divergent spectral color scheme.

CREDITS AND REFERENCES

Thanks to Weiguo Yang for his work on this model.

The visualizations of the plate are described in: Kornhauser, D., Wilensky, U. & Rand, W. (2009). Design guidelines for agent based model visualization. Journal of Artificial Societies and Social Simulation, JASSS, 12(2), 1. http://ccl.northwestern.edu/papers/2009/Kornhauser,Wilensky&Rand_DesignGuidelinesABMViz.pdf .

The palette extension uses the ColorBrewer color schemes (Harrower & Brewer 2003). It enables convenient selection and mapping of ColorBrewer Schemes in NetLogo. The ColorBrewer webpage (https://colorbrewer2.org/) shows the different color schemes.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 1998 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227.

(back to the NetLogo Models Library)