Tag Archives: CFD

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

Scientists use Energy2D to simulate the effect of micro flow on molecular self-assembly

Copyright: ACS Nano, American Chemical Society
Self-assembled peptide nanostructures have unique properties that lead to applications in electrical devices and functional molecular recognition. Exactly how to control the self-assembly process in a solution is a hot research topic. Since a solution is a fluid, a little fluid mechanics would be needed to understand how micro flow affects the self-assembly of the peptide molecules.

ACS Nano, a journal of the American Chemical Society, published a research article on December 11 that includes a result of using our Energy2D software to simulate turbulent situations in which the non-uniform plumes rising from the substrate result in the formation of randomly arranged diphenylalanine (FF) rods and tubes. This paper, titled "Morphology and Pattern Control of Diphenylalanine Self-Assembly via Evaporative Dewetting," is the result of collaboration between scientists from Nanjing University and the City University of Hong Kong.

We are absolutely thrilled by the fact that many scientists have used Energy2D in their work. As far as we know, this is the second published scientific research paper that has used Energy2D.

On a separate avenue, many engineers are already using Energy2D to aid their design work. For example, in a German forum about renewable energy, an engineer has recently used the tool to make sense of his experimental results with various air collector designs. He reported that the results are "confirmed by the experiences of several users: pressure losses and less volume of air in the blowing operation" (translated from German using Google Translate).

It is these successful applications of Energy2D in the real world that will make it a relevant tool in science and engineering for a very long time.

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.

Complete undo/redo support in Energy2D

In Version 2.3 of Energy2D, I have added full support of undo/redo for most actions. With this feature, you can undo all the way back to your starting point and redo all the way forward to your latest state. This is not only a must-have feature for a design tool with a reasonable degree of complexity, but also a simple -- yet powerful -- mechanism for reliably collecting very fine-grained data for understanding how a user interacts with the software.

Why are we interested in collecting these action data?

From the perspective of software engineering, these action data provide first-hand information for quality assurance (QA). QA engineers can analyze these data to measure the usability of the software, to identify behavior patterns of users, and to track results from version to version to gauge if an adjustment has led to better user experience.

From the perspective of education and training, these action data encode users' cognitive processes. Any interaction with the software, especially with a piece of highly visual and responsive software like Energy2D, is automatically a process of cognition. A fundamental thesis in learning science is to understand how we can design interactive materials that maximize learning for all students. These precious fine-grained action data may hold an important key to that understanding.

This idea of using the stack of actions stored in the undo manager of a piece of software to record and replay the entire process of interaction is a unique feature that has been implemented in our Energy2D and Energy3D software and proven a non-obtrusive, high-fidelity, and low-bandwidth technique for data collection.

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.

Energy2D recommended in computational fluid dynamics textbook

Computational fluid dynamics (CFD) is an important research method that uses numerical algorithms to solve and analyze problems that involve fluid flows. Computers are used to perform the calculations required to simulate the interaction of liquids and gases with surfaces defined by boundary conditions. Today, almost every branch of engineering rely on CFD simulations for conceptual design and product design.

A recent textbook "Computational Fluid Dynamics, Second Edition: A Practical Approach" by Profs. Jiyuan Tu, Guan Heng Yeoh, and Chaoqun Liu has recommended Energy2D as "Shareware CFD" for beginners. Here is a quote from their excellent book:
"Nevertheless, first-time CFD users may wish to search the Internet to gain immediate access to an interactive CFD code. (Users may be required to register in order to freely access the interactive CFD code.) The website is http://energy.concord.org/energy2d/index.html provides simple CFD flow problems for first time users to solve and allows colorful graphic representation of the computed results."

Happy New Year from Energy2D

In the year 2014, Energy2Dhas incorporated a radiation simulation engine and a particle simulation engine, expanding its modeling capacity and making it a truly multiphysics simulation package. To celebrate the New Year, I made some simulations that demonstrate these multiphysics features using objects shaped after the numbers of 2015.

These simulations feature the fluid dynamics engine, the heat conduction engine, the thermal radiation engine, and the particle dynamics engine. If you are curious enough, you can click this link to run the simulations.


These shapes were drawn using Energy2D's polygon and ring tools, which allow users to create a wide variety of arbitrary 2D shapes. Many users probably do not know how versatile the polygon tool actually is (the original triangle icon on the tool bar probably misleads some to think it is only good for drawing triangles -- so I changed it to look like a cross-section of an I-beam). The polygon tool allows one to easily draw a polygon with maximally 256 control points for adjusting its shape later. One can draw an approximate shape and then drag these control points to get it to the exact shape. To modify a shape even further, one can also insert a control point by double-clicking on an existing point. A new point will be added to the adjacent position, which you can then drag around. To delete a control point, just hold down the SHIFT key while double-clicking on it. In addition, a polygon can be rotated, twisted, compressed, or elongated using the corresponding fields in its property window (there is currently no graphical user interface for doing those things, however).

As for the New Year's resolutions, in 2015, the ring shape will be enhanced into a new tool called the shape subtractor, which allows users to subtract a shape from another to make a hollow one.

On the numerical simulation side, we will continue to improve the accuracy of the existing simulation engines by adding an explicit solver as an option for users to overcome some of the problems related to the implicit solvers.

On the multiphysics modeling side, we will try to support multiple fluids, which seems simple at first glance but has turned out to be a very difficult mathematical problem. With the capacity of multiple fluids, we will also be able to add an electromagnetism solver in order to model effects such as electrorheological fluids (fluids whose viscosity changes with respect to an applied electric field).

We wish all Energy2D users a very successful new year!

Using particle feeders in Energy2D for advection simulations

Fig. 1: Particle advection behind two obstacles.
Advection is a transport mechanism in which a substance is carried by the flow of a fluid. An example is the transport of sand in a river or pollen in the air. Advection is different from diffusion, whereas the more commonly known term, convection, is the combination of advection and diffusion.

Our Energy2D can simulate advection as it integrates particle dynamics in the Lagrangian frame and fluid dynamics in the Eulerian frame. Particles in Energy2D do not spontaneously diffuse -- they are driven by gravity or fluid, though we can introduce Brownian particles in the future by incorporating the Langevin Equation into Energy2D.

Fig. 2: Blowing away particles.
Over this weekend, I added a new object, the particle feeder, for creating continuous particle flow in the presence of open mass boundary. A particle feeder can emit a specified type of particle at a specified frequency. All these settings can be adjusted in its property window, which can be opened by right-clicking on it and selecting the relevant menu.

Figure 1 shows a comparison of particle advection behind a turbulent flow and a streamlined flow. Have you ever seen these kinds of patterns in rivers?

Figure 2 shows how particles of different densities separate when you blow them with a fan. There are six particle feeders at the top that continually drop particles. A fan is placed not far below the feeders.

With these new additions to Energy2D, we hope to be able to simulate more complex atmospheric phenomena (such as pollutant transport through jet streams) in the future.

Using fans to create fluid flows in Energy2D

Fig. 1: Swirling flows form between two opposite fans.
A new type of object, "fan", has been added to Energy2D to create and control fluid flows. This fan replaces the original implementation of fan that assigns a velocity to a solid part (which doesn't allow the fluid to flow through). For the CFD folks who are reading this post, this is equivalent to an internal velocity boundary.

To add a fan to the scene, use the Insert Menu to drop a fan to the last clicked location. You can then drag it anywhere and resize it any way. By default, the velocity of a fan is zero. You will need to set its velocity in the popup window that can be opened using the right-click popup menu. Currently, however, rotation has not been implemented, so a fan can only blow in four directions: left, right, up, or down -- the direction depends on the aspect ratio of the fan's shape and the value of the velocity.

Fig. 2: Eddy formation in a hole.
With this new feature, we can create a directional flow in Energy2D to simulate things such as a river or wind field. Then we can easily simulate various kinds of eddy flow and visualize them using the streamline feature of Energy2D.

For example, Figure 1 shows the continuous formation of swirling flows between two fans that blow wind in the opposite direction. If you move the fans further apart, you will find that the swirling pattern will not form. Could the mechanism shown in this simulation be related to the formation of certain types of twisters?


Fig. 3: Eddy formation behind a fin.
Figures 2 and 3 show the formation of an eddy in a hole and behind an obstacle, respectively. These eddies are common in fast-flowing rivers. Experienced fishermen know there is a higher chance to find fish in these eddies.

Scanning radiation flux with moving sensors in Energy2D

Figure 1: Moving sensors facing a rectangular radiator.
The heat flux sensor in Energy2D can be used to measure radiative heat flux, as well as conductive and convective heat fluxes. Radiative heat flux depends on not only the temperature of the object the sensor measures but also the angle at which it faces the object. The latter is known as the view factor.

In radiative heat transfer, a view factor between two surfaces A and B is the proportion of the radiation which leaves surface A that strikes surface B. If the two surfaces face each other directly, the view factor is greater than the case in which they do not. If the two surfaces are closer, the view factor is greater.

Figure 2: Rotating sensors inside and outside a ring radiator.
To conveniently visualize the effect of a view factor, Energy2D allows you to attach a heat flux sensor to a moving or rotating particle, with a settable linear or angular velocity. In this way, we can set up sensors to automatically "scan" the field of radiation heat flux like a radar.

Figure 1 shows a moving sensor and a rotating sensor, as well as the data they record. A third sensor is also placed to the right of an object that is being heated by the radiator. This object has an emissivity of one so it also radiates. Its radiation flux is recorded by the third sensor whose data shows a slowly increasing heat flux as the object slowly warms up.

As an interesting test case, Figure 2 shows two rotating sensors, one placed precisely at the center of a ring radiator and the other outside. The almost steady line recorded by the first sensor suggests that the view factor at the center does not change, which makes sense. The small sawtooth shape is due to the limitation of discretization in our numerical simulation.