Sunday, October 25, 2009

Beyond Google SketchUp

Google SketchUp is a wonderful program that you can use to design 3D structures such as a building WYSIWYG-ly. It offers by far the most advanced user interface for creating 3D objects. Within ten minutes, you can sketch up a simple house with a roof, a few windows, and a door, as shown by the image below (if you have learned the basics). While the learning curve may take a little while to overcome--not because the program does a poor job but because the task of creating 3D objects is inherently difficult, the program still provides tremendous opportunities for education.

If you are a teacher, you may have used it in your classroom, or seen someone using it to engage students to design things like a house. These activities are just wonderful as students really love designing their own homes or schools. SketchUp provides them a simple platform to do exactly that.

Now, the question is that what students learn from designing their dream houses. The obvious answer is that they learn solid geometry, without which one cannot really design any 3D structures.

Solid geometry isn't an easy subject and being able to reason in three dimensions is an important skill to have. All these things are very good, but what about teaching other topics in science and engineering?

As many students use SketchUp to design buildings, those who have a mindset of energy efficiency may come up with some green designs, for instance, some neat passive heating or cooling architecture. After they draw their structures, they would like to evaluate if their designs are really green. This goes beyond what SketchUp can do, because it doesn't deal with heat and mass transfer for the created structures.

There has been a plug-in to SketchUp called OpenStudio, which was developed by the Department of Energy to integrate SketchUp with their EnergyPlus software. EnergyPlus is a program written in Fortran that was created for architects to evaluate thermal performance of buildings they design.

OpenStudio, however, doesn't quite do the job one would like to get done (judged from a demo video). The image below, taken from Wikipedia, is what we have in our mind that we would like to see. The image is a thermogram of a passive house in the background of traditional houses, taken by an infrared camera.

Wouldn't it be great if students can design a building and then do some thermal physical analysis using some kind of virtual thermography? This ability will truly extend what students can do with a geometric design tool such as SketchUp. By giving the power of physics-based simulation to the design tool, it will be transformed into a useful experimental tool that allows students to learn the scientific and engineering principles behind energy efficiency.

This is exactly what we set out to do since October 1, 2009, thanks to the generous funding by the US National Science Foundation.

Heat transfer calculations aren't new things to engineers. There have been plenty of commercial software that have been developed to simulate heat transfer. But many of them do not meet our criteria for creating an interactive learning environment. Unlike an industrial application with which engineers can take their time and make all kinds of valid assumptions, there isn't much flexibility for an educational program.

First, students cannot wait. The calculations must be done relatively quickly. Anything that takes a long time to compute kills interactivity.

Second, again required by interactivity, transient heat transfer is a must-do, leaving us no steady state to retreat to. An interactive learning environment requires that the user can intervene at any time when he or she would like to see the causality. There is simply no such thing as a steady state when the user is interacting with a simulation as user's action is totally unpredictable.

Third, the simulation must render a convincing visualization that shows what happen to the heat inside and outside a house. All things must be considered so as to support as many explorations as possible. This requirement is at odd with the first one, as it will load the engine with all kinds of calculations that may slow each other down.

So how do we model the heat transfer of a house? In a model of building, there are two different kinds of things: solid structures and air. The major difference between the heat transfer in them is that there is only conduction in a solid structure but there are both conduction and convection in the air because air is a fluid.

Mathematically, what we have boils down to two fundamental equations: the heat equation and the Navier-Stokes equation. The heat equation models conduction and the Navier-Stokes equation models convection. These two equations are coupled to simulate the heat transfer in the air. For the heat transfer in a solid structure, only the heat equation is needed. A convective boundary condition is applied to the edge of the border to model the effect of heating or cooling through the flow of air over the surface of the structure.

That is pretty much all the computational physics involved in modeling the thermal performance of a house. We leave out radiation, but it should not be hard to add it to the boundary conditions.

Friday, June 26, 2009

What is in a Molecular Workbench simulation?

The Molecular Workbench (MW) software offers salient interactive simulations of electrons, atoms, and molecules that explain many phenomena from the microscopic level. What exactly is in a simulation that makes it a better teaching tool than a text book illustration?

Let's start with a real world example. Imagine a closed glass bottle with some liquid at the bottom. There are a number of things about such a system that most of us have noticed since we were a kid. When we rotate the bottle, the liquid will always flow to fill the lowest part. When the liquid comes to rest, its surface levels off.

Now let's heat it up. As the temperature increases, evaporation accelerates. Eventually, all liquid molecules are evaporated and the liquid vanishes--we end up with a gas that fills the entire bottle. The gas molecules are evenly distributed inside the bottle, no matter how we rotate it. Suppose the bottle is expandable. The gas molecules will fill the entire volume of it, no matter how large it becomes (the gas just gets more diluted).

These are the things we know about the difference between a gas and a liquid from everyday life. Now, let's see how a simple MW simulation can model all these facts. On the right is an animation of a liquid in a box made from an MW simulation (click this link to run it; you will need Java 5.0+). In order for the simulation to run fast enough on an ordinary computer, the liquid includes just 256 molecules. This is not a lot to be called a liquid, but it is enough to demonstrate the phenomena. In addition, a super-strong gravitational field is applied to accelerate the gravitational effect (you might have heard from someone that the gravitational effect is not important at the atomic level, but that is because the gravity on the surface of the Earth is too weak).

A theoretical physicist would celebrate the simulation as the triumph of theoretical physics. The fact that a computational model can describe such a variety of natural phenomena means that they have been deciphered by science.

As an ordinary user, you may not know much about what is under the hood--in fact, most of the time, you should not have to care. You may be wondering what advantages a computer simulation has, compared with just giving students a bottle of water and asking them to flip and boil it. If you are a hands-on person, you may, on the contrary, prefer giving students a bottle of water. So what is the big deal of a simulation for you?

There are a few things that the computer simulation can do for you but a bottle of water cannot. First, the simulation is literally an atomic explanation of what happens when you play with a bottle of water. The very fact that a macroscopic phenomenon can be explained with a picture of a few hundred atoms is a very important insight in science. People have probably known how water in a bottle behaves thousands of years before, but an atomic perspective was not firmly established until 100 years ago.

Second, the simulation provides an "atomic microscope" that allows users to "zoom" into the atomic world easily because we can control it in many ways that are not realizable with a bottle of water. For example, we can navigate an "atomic camera" inside the system, or attach it to an atom. What would it look like if we could be shrunk to an atomic size and take a "space walk" or just "ride on an atom" inside a gas (the image on the right shows a screenshot in which atoms appear to run down to your face)? Kids are motivated by this kind of adventure experience, which can be supported very well by a computer simulation.

Another advantage of a computer simulation is that it can be easily embedded into an electronic textbook (which recently becomes the trend due to budget crises in many states in the US). Obviously, embedding a bottle of water into an electronic textbook is much harder, if not impossible at all (I would never say that is impossible). With the support of this kind of interactive simulation, future textbooks will not be just some readable things. They will be playable delights.

Tuesday, June 2, 2009

Why do educational software need rocket science?

The educational software market is largely dominated by cartoon movies, animations, and games. Developing these media usually requires no rocket science (i.e., sophisticated mathematics and computation in the context of this blog). But this may change soon in the field of science education, enlightened by the success of some applications that will be discussed below.

A strand of mechanical simulation programs started with Interactive Physics back in the 90s and significantly advanced by the recently released Phun and Crayon Physics have demonstrated great educational potential. These impressive programs allow users to draw a variety of shapes, which then move realistically on the screen: they fall, slide, roll, and bump into each other--just like objects in the real world they model do. These programs have a user interface that is very friendly to novices, especially with a freehand drawing tool connected to a digital pen. With only a handful of tools, users can create many interesting simulations. Experienced users can build simulations as sophisticated as a vehicle impact test and a hovercraft takeoff. As a matter of fact, what users can create is limited only by their imagination.

There is no doubt that these tools truly motivate students, unleash their creativity, and make learning physics unprecedentedly enjoyable. But the important thing is that all these would not have been possible without using computational physics. The reason that these tools model the real world so well is because the motions of objects are calculated using Newtonian dynamics--to be more precise, using a computational method commonly known as the multibody dynamics. In fact, Phun uses a computational engine called SPOOK developed by Dr. Claude Lacoursière, and Crayon Physics uses a similar one called Box2D developed by Dr. Erin Catto. These multibody dynamics engines simulate interconnected bodies with contacts, joints, constraints, dry friction, and power input/output. SPOOK even supports multiphysics simulations by integrating the multibody dynamics for modeling rigid bodies with the smoothed particle hydrodynamics for modeling fluids.

The multibody dynamics method comes from rocket science--it is used in industry to model robots, vehicles, and aircraft. It was, however, not intentionally developed for use in education. The generations of computational scientists who developed the method presumably did not anticipate that one day the method would find its use in hundreds of thousands of middle schools and high schools. By the time I was blogging about this, the simulations run in classrooms may have far exceeded those run for research--by any standard.

What does this teach us?

The first lesson we learned is that computational science is not a privilege of some scientists in ivory towers any more. In fact, science education and scientific research share a common goal: to understand how things work. It is, therefore, not surprising that a research tool like the multibody dynamics can be so successfully converted into an effective learning tool. I would further contend that the only correct way to develop an educational tool would be to use the first principles in the corresponding domain of science as much as possible. The initial investment on such a tool may be high (e.g., it needs dedicated computational scientists such as Drs. Lacoursière and Catto, as well as brilliant programmers such as the authors of Phun and Crayon Physics), but the payback will be more powerful, generic software that can last for a long time.

In my opinion, the single most important advantage of using first principles to build an educational tool is that the power of creation and prediction embodied in these scientific principles will be given to students. What else is more important in education than giving students the power developed by the most intelligent individuals of the entire human race in decades or hundreds of years, now that we have a wonderful way of delivering it through computing?

Unfortunately, this advantage is often underappreciated by many educators who do not fully realize the potential of this approach. The vision that the well-advocated cyberinfrastructure should include smart media powered by first principles is not widely shared. Using science to build interactive science media is not part of the design guidelines of mainstream educational media. Applications such as Phun and Crayon Physics are still scarce. There are many more domains of science and engineering that need to be covered.

But there is hope. Outside education, game developers have adopted first principles far earlier. Games need to have realistic look-and-feels in order to be competitive in the market. Major graphics libraries already provide excellent lighting functions. Realistic motion of objects powered by physics engines and projected grid engine for rendering water are now not uncommon in games. Phun and Crayon Physics, despite their great educational power, are billed as games but not educational tools. Perhaps, the breeze from the gaming world into the educational world will slowly transform the way people think of educational media and changes will then occur naturally. What would schools be when they are equipped with tools powered by rocket science?

Saturday, March 28, 2009

Smart molecules: next generation molecular visualization

A significant part of chemistry education is about teaching molecular structures. Before computers were widely available, many teachers used physical ball-and-stick models in the classroom. Using physical models has limitations--the variety of the molecules we can make is limited and the molecules cannot have too many atoms. When computers were powerful enough to support 3D video gaming, chemistry educators realized that they could be used to show any kind of molecules on the computer screen and there was essentially no limitation to the molecular structures that one wished to show. This method of computer-aided teaching is now commonly known as molecular visualization and is widely adopted by chemistry teachers in teaching about molecules.

There are now many molecular visualization tools freely available for education, such as Jmol, PyMOL, QuteMol, and Visual Molecular Dynamics, to name a few. All of these tools present wonderful graphics for showing molecules in 3D. When a student uses such a tool to learn a molecule's structure, he or she usually rotates the molecule to see it from different angles, zooms in and out to view different levels of details, and sometimes turns on different representations of the molecule to identify some recognizable patterns (such as a structural motif of a biomolecule like the famous DNA double helix and an electrostatic surface of a polar molecule like a water molecule).

It is our hope that through manipulating and observing these virtual molecules students will gain a lot of information about them and be able to apply the knowledge and learn to think like a chemist. There are, however, some reasonable doubts that this expected learning would spontaneously occur once students are given these tools. We observed in the classroom that there were a number of students who did not accomplish the learning goal even though they were fascinated by beautiful visualizations of molecules and played with them tirelessly. Most materials do provide instructions and background readings, but they seem to be not very effective. In the absence of an instructor nearby to explain to them what they are seeing on the screen, many students may leave the activity with no science learning accomplished.

The problem, in my opinion, partly lies in that most of these tools only present a passive learning experience. By passive I mean the molecule does not actually give any feedback to the student while he or she is interacting with it.

In the game world, a well-designed game presents an active experience to the user. While the user is playing a game, he constantly receives feedback from the system that attracts his attention and he is always facing a challenge that he must meet to accomplish his goals.

What can we learn from games? A lot. The first thing is: imagine the molecule can respond to the student's actions. For example, the student pilots a microscopic spaceship into the molecule with a mission to fight some toxic molecules (such as carbon monoxide) and he has to carefully avoid running into vicious traps from strongly polar sites that want to catch his ship. His ship is equipped with a laser gun that can break a chemical bond and destroy an evil molecule. During his journey, he will encounter a number of puzzles and challenges that he must solve to win the game. For instance, he must maneuver his ship through a narrow passage inside a molecule in order to get to an active reaction site.

By adding these additional functionalities to a molecular visualization tool to make the molecule actively interact with the user (in addition to just passively rendering a view), we may be able to increase the learning opportunities for students. We call this idea the Smart Molecules, which is based on our NSF-funded Molecular Rover Project.

A smart molecule can also be thought of as an interactive tutor built into a visualization tool. For example, depending on where the ship is, the molecule can act like a flight controller to instruct the student where to pilot the ship. It can give hints to the user while navigating. It can provide more munition or fuel once the supplies on the ship are running low. Science lessons can be embedded into the environment to be called up for help if needed.

The Smart Molecules represents a revolutionary step forward for the use of molecular visualization tools in education. It would be interesting to see if this technology will help students learn molecular structures better in the classroom. Stay tuned.

Thursday, March 19, 2009

Constructive science in the classroom


"Imagination is more important than knowledge." --- Albert Einstein
Science should be taught as a verb, not only as a noun. Doing science is a compelling and effective way to learn. It is through the process of exploration, creation, and invention that theories are applied, ideas are tested, and knowledge is synthesized and upgraded. This post showcases some interesting simulations recently created by students using the Molecular Workbench software and proves the feasibility of using the constructionist approach to teach science more effectively.

The image on the left is a screenshot of a student's simulation about how a ball that has a density lower than that of water keeps afloat in a bucket being filled up by rain. The dynamic simulation shows how buoyancy works with an amicable setup of clouds, rain, a ball, and a bucket. The simulation and the note made by the student (not presented here due to privacy issues) clearly show that the student had learned not only the modeling tool but also the science during the construction process, because the simulation produces the emergent behavior exactly intended and explained by the student.

The second image is a screenshot of a student's simulation about the gas laws. Designing something that violates a physics law is often very motivational to students. Students are inspired to use their creativity to come up with every imaginable possibility of violation. This student designed a subtle situation in which all atoms in one container move only in the direction perpendicular to the piston and atoms in another container move in both the perpendicular and the parallel direction with an initial setup that guarantees the equipartition of the kinetic energy in each direction. The simulation shows that the volume of the gas in the right container is approximately half of that of the gas in the left container. Is the Ideal Gas Law broken? We leave this question to you.

The third image is a screenshot of a simulation of a salt crystal and water a student created using the 3D Molecular Simulator. It shows that the student knew what a crystal structure is and how dissolving occurs. Considering the complexity of constructing a 3D model (over a 2D one), this student's work is quite impressive. The fourth image is a screenshot of a simulation of photosynthesis created by another student, which shows the student's understanding of this complex biological process and her efforts in modeling it.

A common challenge in using a general-purpose modeling tool in the classroom is that it may take students longer time than teachers are willing to spend in the classroom to make something pertinent to the learning goals. Tempted by the versatility of the tool, some students even tend to "drift" away from the learning goals. To help students focus on learning science, the Molecular Workbench software permits instructors to design scaffolded construction activities while engaging students to build simulations. This is a unique and important feature of the software that will facilitate the wide adoption of this pedagogy.

From the point of view of assessment, the richness of information expressed in these simulations has much to offer to research and evaluation about using computer simulations in the classroom. As a Chinese proverb says: "A picture is worth a thousand words," a simulation may be worth much more than a thousand words for the assessment of student learning. Ultimately, the most reliable and relevant assessment of educational simulations should use simulations themselves as the data sources. The only way to make this assessment work is to engage students to make their own simulations.

Wednesday, February 18, 2009

Making sense of quantum phenomena through simulations

"We have become quantum mechanics -- engineering and exploring the properties of quantum states. We're paving the way for the future nanotechnicians." --- Donald M. Eigler, IBM Fellow
Understanding how things work in the microscopic world is fundamentally important to science and engineering education in this century. The micro world is essentially operated by quantum mechanics, which is traditionally very difficult to learn--even for a physics student--because it is so unintuitive. Nevertheless, a large number of phenomena can only be understood with the quantum picture. Understanding these phenomena is becoming imperative. Many important technologies such as microelectronics and nanophotonics are built upon the science of electrons. These technologies are now spearheading new innovations that will lead to revolutionary changes in manufacturing, computing, communication, health care, and medicine.

This poses an interesting challenge to educators: how do we teach quantum reasoning to students without getting them bogged down in the complex field of quantum mechanics (and possibly the philosophical issues associated with its weird interpretations that are still at issues among some scientists and philosophers)? Is there a pathway for students to develop a quantum sense without resorting to the formalism of quantum mechanics?

Funded by the National Science Foundation, we are currently exploring effective ways through simulations to teach the science of electrons and the related technologies. Unlike many existing interactives on the web, our simulation program will provide students a tool with which they can familiarize themselves with the strange quantum world, without having to learn any equation at all. They will learn through playing with existing systems set up by curriculum developers or customized by their instructors (learning by interacting), or through designing new virtual devices of their own (learning by designing), such as a multigate field effect transistor, a quantum dot, a nanowire, or a molecular switch.

Unlike the common approach in which knowledge is told, these quantum simulations allow students to discover how tiny things behave through exploring the emergent behaviors of the microelectronic systems. For example, photon absorption and stimulate emission emerge from a quantum dynamics simulation of a bound electron and a laser. It also allows students to discover that it is the frequency of the laser, not the intensity, that determines these important processes. Another example is related to the core of chemistry. Our quantum dynamics simulator can be used to model how electron cloud changes when an atom is polarized (see the left part of the image on the left). When the user moves the nucleus closer, there is a dramatic change of the electron cloud--it now covers both nuclei. This causes a strong binding of two nuclei through the electron cloud, which is called the covalent bonding. When the user applies an external electric field (other than that of a point charge), it will also cause polarization. When the intensity of the field increases to a certain extent, the electron cloud will be stripped away from the nucleus--a phenomenon that we call ionization. It is fascinating to see that these fundamental concepts in chemistry just emerge from our quantum dynamics simulations! (see this page for more information.) These seemingly disparate concepts can be learned with a single, coherent picture of moving electron cloud in our simulations. The technology provides us a fresh opportunity to look at the reductionist approach, which advocates teaching fewer but more fundamental scientific principles and deriving other knowledge based on them (also see a recent article "How less can be more" by Bob Tinker).

In addition to the quantum dynamics simulator, we are also building a user interface that students can use to design systems such as a chemical reaction or a nanoscale circuit board.

These virtual experiments and virtual designs provide an accessible way to learning quantum phenomena. After all, a large part of the difficulty in understanding quantum phenomena stems from trying to explain microscopic things using our everyday experience, among some other philosophical issues that technical and engineering students may not care. If this obstacle is removed, understanding quantum phenomena should not be much more difficult than understanding water waves and optics. Computer models just streamline this learning process, as if students had a powerful, ultrafast microscope that can be used to look into the micro world. The visualization of how a nanoelectronic device works will help students understand the mechanism, just like a video that shows how air flows in a wind tunnel. Creating virtual devices and observing their properties will allow students to apply their knowledge and further enhance their learning, just like designing a stream table and then running water through it. Through this intimate interaction with a salient simulated micro world, students will learn more deeply than the traditional treatment through the standard teaching approach used in a textbook of solid state physics or chemistry, which either attempts to teach quantum concepts through daunting formalism or static illustrations, or completely avoids them.

It is important to point out that, although we do not try to teach the formalism of quantum mechanics, we use the theory to create the simulation tool. Our quantum dynamics simulation engine behind the user interface is based on numerically solving the time-dependent Schrodinger equation, and our computational method is based on cutting-edge research in computational physics (e.g., a speedy finite-difference time-domain method and novel boundary conditions). Because of this, our tool delivers accurate simulations that correctly depict the spatial distribution and the time evolution of electrons. This is very important, because it ensures the quality and scientific integrity of our simulations.
Image captions: 1) A quantum corral (click here to launch the model). 2) The probability wave just in the middle of a quantum tunneling event (click here to launch the model). 3) The electron clouds in the polarization of an atom and the formation of a covalent bond (click here to launch the model). 4) A nano star coupler that splits an input signal into three output signals (click here to launch the model).