Tag Archives: Heat transfer

Visualizing thermal equilibration: IR imaging vs. Energy2D simulation

Figure 1
A classic experiment to show thermal equilibration is to put a small Petri dish filled with some hot or cold water into a larger one filled with tap water around room temperature, as illustrated in Figure 1. Then stick one thermometer in the inner dish and another in the outer dish and take their readings over time.

With a low-cost IR camera like the FLIR C2 camera or FLIR ONE camera, this experiment becomes much more visual (Figure 2). As an IR camera provides a full-field view of the experiment in real time, you get much richer information about the process than a graph of two converging curves from the temperature data read from the two thermometers.
Figure 2

The complete equilibration process typically takes 10-30 minutes, depending on the initial temperature difference between the water in the two dishes and the amount of water in the inner dish. A larger temperature difference or a larger amount of water in the inner dish will require more time to reach the thermal equilibrium.

Another way to quickly show this process is to use our Energy2D software to create a computer simulation (Figure 3). Such a simulation provides a visualization that resembles the IR imaging result. The advantage is that it runs very fast -- only 10 seconds or so are needed to reach the thermal equilibrium. This allows you to test various conditions rapidly, e.g., changing the initial temperature of the water in the inner dish or the outer dish or changing the diameters of the dishes.

Figure 3
Both real-world experiments and computer simulations have their own pros and cons. Exactly which one to use depends on your situation. As a scientist, I believe nothing beats real-world experiments in supporting authentic science learning and we should always favor them whenever possible. However, conducting real-world experiments requires a lot of time and resources, which makes it impractical to implement throughout a course. Computer simulations provide an alternative solution that allows students to get a sense of real-world experiments without entailing the time and cost. But the downside is that a computer simulation, most of the time, is an overly simplified scientific model that does not have the many layers of complexity and the many types of interactions that we experience in reality. In a real-world experiment, there are always unexpected factors and details that need to be attended to. It is these unexpected factors and details that create genuinely profound and exciting teachable moments. This important nature of science is severely missing in computer simulations, even with a sophisticated computational fluid dynamics tool such as Energy2D.

Here is my balancing of this trade-off equation: It is essential for students to learn simplified scientific models before they can explore complex real-world situations. The models will give students the frameworks needed to make sense of real-world observation. A fair strategy is to use simulations to teach simplified models and then make some time for students to conduct experiments in the real world and learn how to integrate and apply their knowledge about the models to solve real problems.

A side note: You may be wondering how well the Energy2D result agrees with the IR result on a quantitative basis. This is kind of an important question -- If the simulation is not a good approximation of the real-world process, it is not a good simulation and one may challenge its usefulness, even for learning purposes. Figure 4 shows a comparison of a test run. As you can see, the while the result predicted by Energy2D agrees in trend with the results observed through IR imaging, there are some details in the real data that may be caused by either human errors in taking the data or thermal fluctuations in the room. What is more, after the thermal equilibrium was reached, the water in both dishes continued to cool down to room temperature and then below due to evaporative cooling. The cooling to room temperature was modeled in the Energy2D simulation through a thermal coupling to the environment but evaporative cooling was not.

Figure 4

An infrared investigation on a Stirling engine

Figure 1
The year 2016 marks the 200th anniversary of an important invention of Robert Stirling -- the Stirling engine. So I thought I should start this year's blogging with a commemoration article about this truly ingenious invention.

A Stirling engine is a closed-cycle heat engine that operates by cyclic compression and expansion of air or other gas by a temperature difference across the engine. A Stirling engine is able to convert thermal energy into mechanical work.

You can buy an awesome toy Stirling engine from Amazon (perhaps next Christmas's gift for some inquisitive minds). If you put it on top of a cup of hot water, this amazing machine will just run until the hot water cools down to the room temperature.

Figure 2
Curious about whether the Stirling circle would actually accelerate the cooling process, I filled hot water into two identical mugs and covered one of them with the Stirling engine. Then I started the engine and observed what happened to the temperature through an IR camera. It turned out that the mug covered by the engine maintained a temperature about 10 °C higher than the open mug in about 30 minutes of observation time. If you have a chance to do this experiment, you probably would be surprised. The flying wheel of the Stirling engine seems to be announcing that it is working very hard by displaying fast spinning and making a lot of noise. But all that energy, visual and audible as it is, is no match to the thermal energy lost through evaporation of water from the open hot mug (Figure 1).

How about comparing the Stirling engine with heat transfer? I found a metal box that has approximately the same size and same thickness with our Stirling engine. I refilled the hot water to the two mugs and covered one with the metal box and the other with the Stirling engine. Then I started the engine and tracked their temperatures through the IR camera. It turned out that the rates of heat loss from the two mugs were about the same in about 30 minutes of observation. What this really means is that the energy that drove the engine was actually very small compared with the thermal energy that is lost to the environment through heat transfer (Figure 2).

This is understandable because the speed of the flying wheel is only a small fraction of the average speed of molecules (which is about the speed of sound or higher). This investigation also suggests that the Stirling engine is very efficient. Had we insulated the mug, it would have run for hours.

Simulating geometric thermal bridges using Energy2D

Fig. 1: IR image of a wall junction (inside) by Stefan Mayer
One of the mysterious things that causes people to scratch their heads when they see an infrared picture of a room is that the junctions such as edges and corners formed by two exterior walls (or floors and roofs) often appear to be colder in the winter than other parts of the walls, as is shown in Figure 1. This is, I hear you saying, caused by an air gap between two walls. But not that simple! While a leaking gap can certainly do it, the effect is there even without a gap. Better insulation only makes the junctions less cold.

Fig. 2: An Energy2D simulation of thermal bridge corners.
A typical explanation of this phenomenon is that, because the exterior surface of a junction (where the heat is lost to the outside) is greater than its interior surface (where the heat is gained from the inside), the junction ends up losing thermal energy in the winter more quickly than a straight part of the walls, causing it to be colder. The temperature difference is immediately revealed by a very sensitive IR camera. Such a junction is commonly called a geometric thermal bridge, which is different from material thermal bridge that is caused by the presence of a more conductive piece in a building assembly such as a steel stud in a wall or a concrete floor of a balcony.

Fig. 3: IR image of a wall junction (outside) by Stefan Mayer
But the actual heat transfer process is much more complicated and confusing. While a wall junction does create a difference in the surface areas of the interior and exterior of the wall, it also forms a thicker area through which the heat must flow through (the area is thicker because it is in a diagonal direction). The increased thickness should impede the heat flow, right?

Fig. 4: An Energy2D simulation of a L-shaped wall.
Unclear about the outcome of these competing factors, I made some Energy2D simulations to see if they can help me. Figure 2 shows the first one that uses a block of object remaining at 20 °C to mimic a warm room and the surrounding environment of 0 °C, with a four-side wall in-between. Temperature sensors are placed at corners, as well as the middle point of a wall. The results show that the corners are indeed colder than other parts of the walls in a stable state. (Note that this simulation only involves heat diffusion, but adding radiation heat transfer should yield similar results.)

What about more complex shapes like an L-shaped wall that has both convex and concave junctions? Figure 3 shows the IR image of such a wall junction, taken from the outside of a house. In this image, interestingly enough, the convex edge appears to be colder, but the concave edge appears to be warmer!

The Energy2D simulation (Figure 4) shows a similar pattern like the IR image (Figure 3). The simulation results show that the temperature sensor placed near the concave edge outside the L-shape room does register a higher temperature than other sensors.

Now, the interesting question is, does the room lose more energy through a concave junction or a convex one? If we look at the IR image of the interior taken inside the house (Figure 1), we would probably say that the convex junction loses more energy. But if we look at the IR image of the exterior taken outside the house (Figure 3), we would probably say that the concave junction loses more energy.

Which statement is correct? I will leave that to you. You can download the Energy2D simulations from this link, play with them, and see if they help you figure out the answer. These simulations also include simulations of the reverse cases in which heat flows from the outside into the room (the summer condition).

Modeling solar thermal power using heliostats in Energy2D

An array of heliostats in Energy2D (online simulation)
A new class of objects was added in Energy2D to model what is called a heliostat, a device that can automatically turn a mirror to reflect sunlight to a target no matter where the sun is in the sky. Heliostats are often used in solar thermal power plants or solar furnaces that use mirrors. With an array of computer-controlled heliostats and mirrors, the energy from the sun can be concentrated on the target to heat it up to a very high temperature, enough to vaporize water to create steam that drives a turbine to generate electricity.

Image credit: Wikipedia
The Ivanpah Solar Power Facility in California's Mojave Desert, which went online on February 13, 2014, is currently the world's largest solar thermal power plant. With a gross capacity of 392 megawatts, it is enough to power 140,000 homes. It deploys 173,500 heliostats, each controlling two mirrors.

A heliostat in Energy2D contains a planar mirror mounted on a pillar. You can drop one in at any location. Once you specify its target, it will automatically reflect any sunlight beam hitting on it to the target.

Strictly speaking, heliostats are different from solar trackers that automatically face the sun like sunflowers. But in Energy2D, if no target is specified, as is the default case, a heliostat becomes a solar tracker. Unlike heliostats, solar trackers are often used with photovoltaic (PV) panels that absorb, instead of reflecting, sunlight that shine on them. A future version of Energy2D will include the capacity of modeling PV power plants as well.

Energy2D video tutorials in English and Spanish

Many users asked if there is any good tutorial of Energy2D. I apologize for the lack of a User Manual and other tutorial materials (I am just too busy to set aside time for writing up some good documentations).

So Carmen Trudell, an architect who currently teaches at the School of Architecture of the University of Virginia, decided to make a video tutorial of Energy2D for her students. It turned out to be an excellent overview of what the software is capable of doing in terms of illustrating some basic concepts related to heat transfer in architectural engineering. She also kindly granted permission for us to publish her video on Energy2D's website so that other users can benefit from her work.

If you happen to come from the Spanish-speaking part of the world, there is also a Spanish video tutorial made by Gabriel Concha based on an earlier version of Energy2D.

The deception of unconditionally stable solvers

Unconditionally stable solvers for time-dependent ordinary or partial differential equations are desirable in game development because they are highly resilient to player actions -- they never "blow up." In the entertainment industry, unconditionally stable solvers for creating visual fluid effects (e.g., flow, smoke, or fire) in games and movies were popularized by Jos Stam's 1999 paper "Stable Fluids."

Figure 1: Heat conduction between two objects.
The reason that a solver explodes is because the error generated in a numerical procedure gets amplified in iteration and grows exponentially. This occurs especially when the differential equation is stiff. A stiff equation often contains one or more terms that change very rapidly in space or time. For example, a sudden change of temperature between two touching objects (Figure 1) creates what is known as a singularity in mathematics (a jump discontinuity, to be more specific). Even if the system described by the equation has many other terms that do not behave like this, one such term is enough to crash the whole solver if it is linked to other terms directly or indirectly. To avoid this breakdown, a very small time step must be used, which often makes the simulation look too slow to be useful for games.

The above problem typically occurs in what is known as the explicit method in the family of the finite-difference methods (FDMs) commonly used to solve time-dependent differential equations. There is a magic bullet for solving this problem. This method is known as the implicit method. The secret is that it introduces numerical diffusion, an unphysical mechanism that causes the errors to dissipate before they grow uncontrollably. Many unconditionally stable solvers use the implicit method, allowing the user to use a much larger time step to speed up the simulation.

There ain't no such thing as a free lunch, however. It turns out that we cannot have the advantages of both speed and accuracy at the same time (efficiency and quality are often at odd in reality, as we have all learned from life experiences). Worse, we may even be deceived by the stability of an unconditionally stable solver without questioning the validity of the predicted results. If the error does not drive the solver nuts and the visual looks fine, the result must be good, right?

Figure 2: Predicted final temperature vs. time step.
Not really.

The default FDM solver in Energy2D for simulating thermal conduction uses the implicit method as well. As a result, it never blows up no matter how large the time step is. While this provides good user experiences, you must be cautious if you are using it in serious engineering work that requires not only numerical stability but also numerical reliability (in games we normally do not care about accuracy as long as the visual looks entertaining, but engineering is a precision science). In the following, I will explain the problems using very simple simulations:

1. Inaccurate prediction of steady states

Figure 3. Much longer equilibration with a large time step.
Figure 1 shows a simulation in which two objects at different temperatures come into contact and thermal energy flows from the high-temperature object into the low-temperature one. The two objects have different heat capacities (another jump discontinuity other than the difference in initial temperatures). As expected, the simulation shows that the two objects approach the same temperature, as illustrated by the convergence of the two temperature curves in the graph. If you increase the time step, this overall equilibration behavior does not change. Everything seems good at this point. But if you look at the final temperature after the system reaches the steady state, you will find that there are some deviations from the exact result, as illustrated in Figure 2, when the time step is larger than 0.1 second. The deviation stabilizes at about 24°C -- 4°C higher than the exact result.
Figure 4. Accurate behavior at a small time step.

2. Inaccurate equilibration time

The inaccuracy at large time steps is not limited to steady states. Figure 3 shows that the time it takes the system to reach the steady state is more than 10 times (about 1.5 hours as opposed to roughly 0.1 hours -- if you read the labels of the horizontal time axis of the graph) if we use a time step of 5 seconds as opposed to 0.05 second. The deceiving part of this is that the simulation appears to run equally quickly in both cases, which may fool your eyes until you look at the numerical outputs in the graphs.

3. Incorrect transient behaviors

Figure 5. Incorrect behavior at a very large time step.
With a more complex system, the transient behaviors can be affected more significantly when a large time step is used. Figure 4 shows a case in which the thermal conduction through two materials of different thermal conductivities (wood vs. metal) are compared, with a small time step (1 second). Figure 5 shows that when a time step of 1,000 seconds is used, the wood turns out to be initially more conductive than metal, which, of course, is not correct. If the previous example with two touching objects suggests that the simulation result can be quantitatively inaccurate at large time steps, this example means that the results can also be qualitatively incorrect in some cases (which is worse).

The general advice is to always choose a few smaller time steps to check if your results would change significantly. You can use a large time step to set up and test your model rapidly. But you should run your model at smaller time steps to validate your results.

The purpose of this article is to inform you that there are certain issues with Energy2D simulations that you must be aware if you are using it for engineering purposes. If these issues are taken care of, Energy2D can be highly accurate for conduction simulations, as illustrated by this example that demonstrates the conservation of energy of an isolated conductive system.

European scientists use Energy2D to simulate submarine eruptions

The November issue of the Remote Sensing of Environment published a research article "Magma emission rates from shallow submarine eruptions using airborne thermal imaging" by a team of Spanish scientists in collaboration with Italian and American scientists. The researchers used airborne infrared cameras to monitor the 2011–2012 submarine volcanic eruption at El Hierro, Canary Islands and used our Energy2D software to calculate the heat flux distribution from the sea floor to the sea surface. The two figures in the blog post are from their paper.

According to their paper, "volcanoes are widely spread out over the seabed of our planet, being concentrated mainly along mid-ocean ridges. Due to the depths where this volcanic activity occurs, monitoring submarine volcanic eruptions is a very difficult task." The use of thermal imaging in this research, unfortunately, can only detect temperature distribution on the sea surface. Energy2D simulations turn out to be a complementary tool for understanding the vertical body flow.

Their research was supported by the European Union and assisted by the Spanish Air Force.

Although Energy2D started out as an educational program, we are very pleased to witness that its power has grown to the point that even scientists find it useful in conducting serious scientific research. We are totally thrilled by the publication of the first scientific paper that documents the validity of Energy2D as a research tool and appreciate the efforts of the European scientists in adopting this piece of software in their work.

Visualizing the "thermal breathing" of a house in 24-hour cycle with Energy3D

The behavior of a house losing or gaining thermal energy from the outside in a 24-hour cycle, when visualized using Energy3D's heat flux view, resembles breathing, especially in the transition between seasons in which the midday can be hot and the midnight can be cold. We call this phenomenon the "thermal breathing" of a house. This embedded YouTube video in this blog post illustrates this effect. For the house shown in the video, the date was set to be May 1st and the location is set to Santa Fe, New Mexico.

This video only shows the daily thermal breathing of a house. Considering the seasonal change of temperature, we may also definite a concept "annual thermal breathing," which describes this behavior on an annual basis.

This breathing metaphor may help students build a more vivid mental picture of the dynamic heat exchange between a house and the environment. Interestingly, it was only after I realized this thermal visualization feature in Energy3D that this metaphor came to my mind. This experience reflects the importance of doing in science and engineering: Ideas often do not emerge until we get something concrete done. This process of externalization of thinking is critically important to the eventual internalization of ideas or concepts.

Simulating cool roofs with Energy3D

Fig. 1: Solar absorption of colors.
Cool roofs represent a simple solution that can save significant air-conditioning cost and help mitigate the urban heat island effect, especially in hot climates. Nobel Prize winner and former Secretary of Energy Steven Chu is a strong advocate of cool roofs. It was estimated that painting all the roofs and pavements around the world with reflective coatings would be "equivalent to getting 300 millions cars off the road!"

With Version 4.0 of Energy3D (BTW, this version supports 200+ worldwide locations -- with 150+ in the US), you can model cool roofs and evaluate how much energy you can save by switching from a dark-colored roof to a light-colored one. All you need to do is to set the colors of your roofs and other building blocks. Energy3D will automatically assign an albedo value to each building block according to the lightness of its color.

Figure 1 shows five rectangles in different gray colors (upper) and their thermal view (lower). In this thermal view, blue represents low energy absorption, red represents high energy absorption, and the colors in-between represents the energy absorption at the level in-between.

Now let's compare the thermal views of a black roof and a white roof of a cape code house, as shown in Figure 2. To produce Figure 2, the date was set to July 1st, the hottest time of the year in northern hemisphere, and the location was set to Boston.

Fig. 2: Compare dark and white roofs.
How much energy can we save if we switch from a perfectly black roof (100% absorption) to a perfectly white roof (0% absorption)? We can run the Annual Energy Analysis Tool of Energy3D to figure this out in a matter of seconds. The results are shown in Figure 3. Overall, the total yearly energy cost is cut from 6876 kWh to 6217 kWh for this small cape code house, about 10% of saving.

Figure 3 shows that the majority of savings comes from the reduction of AC cost. The reason that the color has no effect on heating in the winter is because the passive solar heat gains through the windows in this well-insulated house is enough to keep it warm during the sunshine hours. So the additional heat absorbed by the black roof in the same period doesn't offset the heating cost (it took me quite a while to figure out that this was not a bug in our code but actually the case in the simulation).

Fig. 3: Compare heating and AC costs (blue is white roof).
Of course, this result depends on other factors such as the U-value and thermal mass of the roof. In general, the better the roof is insulated, the less its color impacts the energy cost. With Energy3D, students can easily explore these design variables.

This new feature, along with others such as the heat flux visualization that we have introduced earlier, represents the increased capacity of Energy3D for performing function design using scientific simulations.

Here is a video that shows the heating effect on roofs of different colors.

Visualization of heat flux in Energy3D using vector fields

Fig. 1: Winter in Boston
One of the strengths of our Energy3D CAD software is its 3D visualizations of energy transfer. These visualizations not only allow students to see science concepts in action in engineering design, but also provide informative feedback for students to make their design choices based on scientific analyses of their design artifacts.

Fig. 2: Summer in Boston
A new feature has been added to Energy3D to visualize heat transfer across the building envelope using arrays of arrows. Each arrow represents the heat flux at a point on the surface of the building envelope. Its direction represents the direction of the heat flux and its length represents the magnitude of the heat flux, calculated by using Fourier's Law of Heat Conduction. Quantitatively, the length is proportional to the difference between the temperatures inside and outside the building, as well as the U-value of the material.

Fig. 3: Winter in Miami
The figures in this post show the heat flux visualizations of the same house in the winter and summer in Boston and Miami, respectively. Like the solar radiation heat map shown in the figures, the heat flux is the daily average. The U-value of the windows is greater than those of the walls and roof. Hence, you can see that the heat flux vectors in the winter sticking out of the windows are much longer than those sticking out of the walls or roof. In the summer, the heat flux vectors point into the house but they are much shorter, agreeing with the fact that Boston's summer is not very hot.

Fig. 4: Summer in Miami
Now move the same house to Miami. You can see that even in the winter, the daily average heat flux points inside the house, agreeing with the fact that Miami doesn't really have a winter. In the summer, however, the heat flux into the house becomes significantly large.

These visualizations give students clear ideas about where a house loses or gains energy the most. They can then adjust the insulation values of those weak points and run simulations to check if they have been fixed or not. Compared with just giving students some formulas or numbers to figure out what they actually mean to science and engineering practices, experiential learning like this should help students develop a true understanding of thermal conduction and insulation in the context of building science and technology.

Here is a YouTube video of the heat flux view.