Friday, September 10, 2010

A perfect storm in a cup of salt water?

I was bothered by an experiment I did recently about the temperature distribution in a cup of salt solution. I added a few spoons of table salt and baking soda in two cups of water to create two saturated solutions. Then I left them sit there for a few days, along with a cup of plain water. When I came back and aimed my infrared camera at them, I saw something quite puzzling: in the two cups of solution, the bottoms were always about 0.5°C warmer than the tops (see the IR image above)! In contrast, a cup of plain water did not show this temperature difference--the temperature was the same everywhere just as expected.

Exactly what kind of chemical force sets up this temperature gradient? We all know that warmer water should rise and colder water should sink, and eventually the convection stops and the temperature becomes the same everywhere. But this is apparently not true in the presence of salt solute. I feel this has to do with gravity. It must be gravity that causes a concentration gradient of the solute, which in turn results in the temperature gradient. But I am not sure how exactly this happens. I have no idea what energy source feeds this temperature gradient. Don't forget that the cup material tends to eliminate it through heat conduction and the air through convection. There must be an invisible hand that counters all these thermodynamic forces. This seems pretty amazing to me.

To make sure that this is not an effect of infrared radiation, I confirmed the result by sticking a sensitive temperature probe into the solution and moved it up an down for a few times. The image below is the 60-second result recorded by the temperature probe, which clearly agrees with the IR image.

This is an example that, once again, shows the power of infrared imaging. I would not have noticed there was such a temperature gradient in a solution without my infrared camera. The infrared camera, in just one simple shot, captured the salient and subtle details that reveal very complex physics, which I still do not understand.

What is the significance of this result rather than a tempest in a teacup? Might the temperature gradient be used to generate a voltage gradient, which in turn generates electricity? In other words, might this be some kind of battery that is a 100% clean energy source?

The ocean is a gigantic solution of salt. Half Celsius of temperature difference in the ocean translates into an enormous amount of energy. Might there be such an effect in the ocean?

Followups:
1) Evaporation is a driving force
2) The temperature gradient exists only in a saturated solution
3) Mystery solved?
4) Visualizing vapor pressure depression
5) Salinity gradient vs. temperature gradient
6) An evidence from an ice cube

Sunday, September 5, 2010

Infrared imaging for chemistry education

Infrared (IR) imaging is a technique for seeing heat based on detecting thermal radiation (mostly IR) an object emits. It used to be a very expensive tool only affordable to guys in military and secret services where money is not a problem.

You can now buy "lower"-grade IR cameras with $1,000-$2,500, which are pretty cool (thank you for lowering down the prices, FLIR and FLUKE!). There is a vast market for this technology. Engineers and technicians buy them primarily for checking heat flow in building, electrical systems, and mechanical systems. Companies also use them to do quality assurance and condition monitoring.

I have been digging the educational potential of IR imaging lately. I feel that the tool can be very useful in education. Compare it with a microscope. Both can be used to see something invisible. In the case of a microscope, it is things that are too small to be seen. In the case of an IR camera, it is things that our eyes cannot detect. It is obvious that students need a microscope to see small things. But perhaps we can also rationalize the need for an IR camera in the classroom? What are the most important things that IR imaging can teach?

Obviously there is heat transfer. I have recently written a paper about this. But I don't want to just do the evident ones. So I have been thinking about how to broaden its applications. A direction I am taking now is its applications in chemistry, where heat is a central concept. You probably still remember that your high school chemistry teacher always wanted you to remember how much heat is released or absorbed in a chemical reaction. If a reaction produces a dramatic effect, such as a bang or a flash or a flame, then you probably were impressed. What about those reactions that mostly go unnoticed unless some sensitive methods are used to show them? For instance, most biochemical processes are pretty "calm." How does one "see" or "hear" them?

I have done an experiment that uses an IR camera to show evaporation and condensation, as mentioned in the paper. The above IR thermogram shows what happened when a piece of paper was placed on top of a cup of water. The paper did not fully cover the cup. What we see from this IR image is a cooler area that shows the evaporation process of the water in the cup and a warmer area that shows the condensation process of the water on the other side of the paper.

Last week, I did another experiment to prove that it can also be used to visualize dissolving. This experiment is introduced in a short article. The image to the right shows the thermograms of three cups: pure water, table salt solution, and baking soda solution, shortly after table salt and baking soda were added to two of the cups originally filled with pure water.

I am hoping to devise more chemistry experiments to prove the versatility of this powerful tool in making mysterious things in chemistry visible. I intuitively feel that this tool, which is essentially a bundle of thousands of IR thermometers, may be able to release students from tedious lab procedures and make chemistry experiments easier to conduct and fun to look at.

Update in 2012: The idea in this post has grown into a website: http://energy.concord.org/ir/. Check it out!

Monday, August 16, 2010

Who says kids cannot invent?

I was recently involved in a few pilot field tests in which high school students were challenged to build an energy efficient scale model house. We observed something amazing. Initially, I was worried that students may end up building houses that are so similar to each other that the entire research will be invalidated. But that did not happen.

In one field test, a group of students created a pyramid and discovered an effect that I would call "a heat funnel." The images to the right show the pyramid heated by a 40W light bulb on the floor inside and an infrared signature showing the equilibrium temperature distribution. The students observed that the temperature at the tip of the pyramid reached nearly 150°C--enough to boil water! This amazing heating effect is due to the fact that hot air rises to the top in a way similar to how water flows down in a funnel. Just like the bottleneck of the funnel records the highest speed of water flow, the top of the heat funnel records the highest temperature of heat flow. The water funnel is usually explained using the conservation of mass, whereas the heat funnel can be explained using the conservation of energy. The density of thermal energy must increase when the heat conduit narrows in order for energy to conserve. Therefore, the temperature at the tip can be very high because its cross section is very small.

Although they did not expect the temperature at the tip to be so high, the students were fully aware of the convection effect, because they cut some slits at the bottom of the pyramid to let fresh air in in order to keep the air flow through it (you can see a slit from the photo on the left). This is the stack effect that drives a chimney. At the top of the pyramid, the hot air just exits through the tip, which naturally has small passages for the air because it was not perfectly sealed. Had students had a sensitive air speed meter, they would have observed a small but appreciable jet stream coming out from the tip (would they?), just like steam from the vent of a cooking pot.

In another field test, a group of students created a sliding roof that can provide overhang shading in summer and increase roof insulation in winter (see the images to the right).

I must confess that, as a physicist, I have never heard of or thought of the heat funnel effect until I saw it in the classroom. Pondering about this effect, I realized that it might be non-trivial and could have some engineering implications. For example, might this effect be used to build some kind of solar updraft pyramid for generating electricity? I have heard that in the US there are huge solar power plants that utilize the optical focus effect to create high temperature to boil water, which in turn creates steam to push an electrical generator. How about a heat funnel generator that will work sunny or cloudy?

The sliding roof invention is impressive in that the students figured out an engineering solution that solves two problems: winter insulation and summer shading. The students also had an idea of putting solar panels on the sliding roof and the base roof. This smart design, which increases the solar reception area, will turn the unwanted solar heat into electricity instead of reflecting it off. This is not just a single solution that solves one problem. This is a stone that kills three birds. Isn't this exactly what we strive to teach in our engineering classes?

These inventions of students should convince you that students are not just learners. If we give them creative tools and interesting projects, they can be inventors as well. Sometimes, their inventions will surprise even seasoned scientists and engineers. Science and engineering education should make more opportunities for these young inventors to rise to the top.

Sunday, February 14, 2010

MW applets and MWScript-JavaScript interactions


Now that you can publish a Molecular Workbench simulation as an applet and embed it on your web page, you may be wondering how you can control it and get data in and out. It may be interesting for web developers who would like to link an existing Flash animation with a molecular dynamics simulation in MW. For example, when the visitor clicks something in the Flash animation, a molecular dynamics simulation will pop out to show the molecular mechanism of what is going on underneath.

With MW, this can now be done using MWScript and JavaScript. MWScript is a scripting language used in MW to support modelers and animators to design simulations. The model builders in MW do have some simple GUI for building models and designing simulations, but their functionality is limited (as with any GUI). Syntactically, MWScript is a cousin of JmolScript, which supports scripting with the popular Jmol molecular viewer. So anyone who is already familiar with JmolScript may find it easy.

Before we talk about scripting, let me show you how to set up an MW applet on your web page. If you just want to show an existing MW simulation from mw2.concord.org (which hosts MW) on your web page, just embed the following applet code within the body of your HTML file:

<applet id="applet_id"
archive="http://mw2.concord.org/public/lib/mwapplet.jar" 
code="org.concord.modeler.MwApplet" codebase="http://mw2.concord.org/public/" 
width="100%" height="500"> <param name="permissions" value="all-permissions"/> 
<param name="script" value=
"page:0:import http://mw2.concord.org/public/student/classic/motion/undershotwaterwheel.cml"/>
</applet>
In the above example, I have randomly chosen an existing simulation from MW to show how this works. If you want to show other simulations, just replace "http://mw2.concord.org/public/student/classic/motion/undershotwaterwheel.cml" with whatever else.

This following shows the embedded MW applet specified by the above code:





This is very easy to do. But it has a limitation. Suppose you have created an MW simulation of your own and the name of the main file is "simulation.cml" (an MW simulation has other files associated with it as well). Now you have to upload the files to the Web. If you use its URL in the embedding code, the MW applet will not load it. Because of a good security reason, an applet is allowed to read files from only the same code base where the Java executable is located (in this case, http://mw2.concord.org/public/lib/mwapplet.jar).

To avoid this problem, you would want to have your own code base instead of using mw2.concord.org. First, you download the jar file: mwapplet.jar to the same folder where "simulation.cml" and the HTML file sit. Second, change the embedding code to:
<applet id="applet_id" archive="mwapplet.jar" 
code="org.concord.modeler.MwApplet"  codebase="http://mw2.concord.org/public/"
width="100%" height="450"> <param name="permissions" value="all-permissions"/> <param name="script"
value="page:0:import simulation.cml"/>
</applet>
Having done these, you just need to make sure to also upload "mwapplet.jar" to the same web folder where "simulation.cml" has been uploaded to.

If you have done these and succeeded in getting an MW applet to work properly, let's see how to get it to work with JavaScript as well. First, download this file: mw.js to the same folder. Second, put the following script declaration in the header of your HTML file:

<script type="text/javascript" src="mw.js"></script>
The MW applet is now ready to interact with JavaScript. The applet works offline as well, so you can conveniently test your JavaScript before deploying the whole thing to the Internet, by just double-clicking on the HTML file and see how it works.

There are currently three types of interactions between MWScript and JavaScript.
  • Use JavaScript to send MWScript to control an MW applet
  • Use JavaScript to feed data to an MW applet
  • Use JavaScript to get data out of an MW applet
The runScript(id, script) method in mw.js can be used to send MWScript to an MW applet with the specified ID. An MW applet is an MW page that can have multiple models, though in practice you would only use one model per applet. To specify which model you would like to send the MWScript, you have to following the following protocol:

[model type]:[index or UID of model]:[script body]

For instance, mw2d:1:run instructs the first model within the MW applet to run. You can pass a variable from JavaScript to MWScript by concatenating the variable with a script command. For example, var temp = 300; runScript("applet_id", "mw2d:1:set temperature " + temp) sets the temperature of the system to be 300 K.

The get command in MWScript was specifically designed to fetch data out of an MW applet. For instance, you can get the temperature by using the following code: var temp = runScript("applet_id", "mw2d:1:get %temperature");.

This page demonstrates all these three types of interactions with one applet. It is inconvenient for me to mix code in this blog as it interferes with the blog's setup. When you go to that page, you can view the page source to see the JavaScript code. If you have Firebug, it can also be used to view the code easily.

For more information about MWScript, go to http://mw.concord.org to launch the standalone application and check out the "Script" section in the User's Manual.