Archive for the ‘Projects’ Category

Using particle feeders in Energy2D for advection simulations

August 30th, 2014 by Charles Xie
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.

A 16-year-old’s designs with Energy3D

August 13th, 2014 by Charles Xie
This post needs no explanation. The images say it all.

All these beautiful structures were designed from scratch (NOT imported from other sources) by Cormac Paterson using our Energy3D CAD software.

He is only 16 years old. (We have his parents' permission to reveal his name and his work.)

Using fans to create fluid flows in Energy2D

August 10th, 2014 by Charles Xie
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.

Accurate prediction of solar radiation using Energy3D: Part III

August 6th, 2014 by Charles Xie
Predicted and measured average daily insolation for 80 cities.
In Parts I and II, we have documented our progress on solar radiation modeling with our Energy3D CAD software. In the past few weeks, our summer interns Siobhan Bailey from Rensselaer Polytechnic Institute and Shiyan Jiang from University of Miami, and I have collected data for 167 worldwide locations. We analyzed 100 US locations among them and compared the insolation data calculated by Energy3D for a horizontal surface and a south-face vertical surface with 30 years of data collected by the US Department of Energy. The results show that, on average, the calculated mean daily insolation is within ±14% of error range compared with the measured results for a horizontal surface and ±10% of error range compared with the measure results for a south-facing vertical surface, respectively. The calculation of the average accuracy is based on both temporal data of 12 months over a year and spatial data of 100 locations in the US.

With this crystal ball in the hand to predict solar radiation anywhere anytime with a reasonable accuracy, Energy3D can be used by professional engineers for real-world applications related to solar energy, such as passive solar architecture, urban planning, solar park optimization, solar thermal power plants, and so on. Stay tuned for our future reports of those applications.

Go to Part I and Part II.

Scanning radiation flux with moving sensors in Energy2D

July 13th, 2014 by Charles Xie
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.

Simulating PTC and NTC heating elements with Energy2D

June 23rd, 2014 by Charles Xie
Figure 1: A demo simulation.
A heating element converts electricity into heat through Joule heating: Electric current passing through the element encounters resistance, causing the temperature of the element to rise. A thermistor is a type of resistor whose resistance changes significantly with temperature. In a heating element that uses a thermistor with a positive temperature coefficient (PTC), called a PTC heating element, the temperature increases rapidly. In a heating element that uses a thermistor with a negative temperature coefficient (NTC), called a NTC heating element, the heating will gradually weaken when the temperature increases.

Figure 2: Setting the temperature coefficient.
Several Energy2D users have requested adding PTC/NTC controls to the software. So this was added last night. You can now set the temperature coefficient while defining a power source, as shown in Figure 2.

Figure 1 shows the comparison of the temperature increasing in a PTC heater, a constant-power heater, and a NTC heater, with the temperature coefficients being 0.1, 0, and -0.1, respectively. Note that in the case of constant power, the temperature increases linearly in time (as per the definition of constant power), whereas PTC and NTC exhibit nonlinear behaviors.

You can click the link under the image to run the simulation yourself.

Design replay: Reconstruction of students’ engineering design processes from Energy3D logs

June 18th, 2014 by Charles Xie
One of the useful features of our Energy3D software is the ability to record the entire design process of a student behind the scenes. We call the reconstruction of a design process from fine-grained process data design replay.


Design replay is not a screencast technology. The main difference is that it records a sequence of CAD models, not in any video format such as MP4. This sequence is played back in the original CAD tool that generated it, not in a video player. As such, every snapshot model is fully functional and editable. For instance, a viewer can pause the replay and click on the user interface of the CAD tool to obtain or visualize more information, if necessary. In this sense, design replay can provide far richer information than screencast (which records as much information as the pixels in the recording screen permit).


Design replay provides a convenient method for researchers and teachers to quickly look into students' design work. It compresses hours of student work into minutes of replay without losing any important information for analyses. Furthermore, the reconstructed sequence of design can be post-processed in many ways to extract additional information that may shed light on student learning, as we can use any model in the recorded sequence to calculate any of its properties.



The three videos embedded in this post show the design replays of three students' work from a classroom study that we just completed yesterday in a Massachusetts high school. Sixty-seven students spent approximately two weeks designing zero-energy houses -- a zero-energy house is a highly energy-efficient house that consumes net zero (or even negative) energy over a year due to its use of passive and active solar technologies to conserve and generate energy. These videos may give you a clue how these three students solved the design challenge.

Towards a multiphysics Energy2D

June 14th, 2014 by Charles Xie
Figure 1: Particle motions driven by convective flow.
Up to yesterday, our Energy2D software has been a program for simulating, mostly, fluid and heat flows. But there are also objects in the world that are not fluids. To simulate that part of the world, we have to incorporate some other physics. A simple addition is to couple particles with fluids. This technique is commonly known as discrete phase modeling in the CFD community. It is used to model things such as suspension particles in fluids.

Figure 2: Heat traces of fireballs.
The latest version of Energy2D has a particle solver and a particle editor. Particles in Energy2D observe collision dynamics among themselves and interact with fluid and heat flows: particles can not only be moved by the fluid but also exert reaction force and transfer heat to the fluid. Figure 1 shows the motion of two types of particles driven by a convective flow. Depending on its density (relative to the fluid density), a particle may be buoyant enough to flow with the fluid or so heavy that it must sink to the bottom. This is shown in Figure 1: The black particles are the heavy ones and the white ones are the light ones; the convective force is not strong enough to move the black ones.

Particles can also transfer physical properties such as energy and momentum to the fluid while they are moving. Figure 2 shows the heat traces left by fireballs of different sizes.

Figure 3: Thermophoresis (Soret's effect)
With this new capacity, we can simulate phenomena such as thermophoresis, in which the different particle types in a mixture respond to a temperature gradient differently and thereby can be separated by just heating them up.

If you are enticed enough to want to see these simulations at work, click the links below the figures.

These new features represent an overdue step towards making Energy2D a versatile multiphysics simulation system. For engineering simulations, multiphysics is essential as real-world problems are often complicated by more than one mechanisms, each driven by its own physics.

The particle dynamics shown here is very simple (just a weekend's work). In the long run, I expect that a generic contact dynamics engine such as that of Box2D will be implemented in Energy2D. Coupling the Eulerian and Lagrangian reference frames, this integration will make Energy2D more interesting and useful. That would be a critical step towards our goal for Energy2D to simulate as many energy-related natural phenomena as possible.

Temperature change may not represent heat transfer; heat flux does.

May 4th, 2014 by Charles Xie
Figure 1 (go to simulation)
There has been some confusion lately about the heat transfer representations in Energy2D simulations. By default, Energy2D shows the temperature distribution and uses the change of the distribution to visualize heat flow. This is all good if we have only one type of medium or material. But in reality, different materials have different thermal conductivities and different volumetric heat capacities (i.e., the ability of a given volume of a substance to store thermal energy when the temperature increases by one degree; the volumetric heat capacity is in fact the specific heat multiplied by the density).

A
Figure 2 (go to simulation)
According to the Heat Equation, the change of temperature is affected by the thermal diffusivity, which is the thermal conductivity divided by the volumetric heat capacity (now that I have written the terminology down, I can see why these terms are so confusing). In general, a higher thermal conductivity and a lower volumetric heat capacity will both result in faster temperature change.

To illustrate my points, Figure 1 shows a comparison of temperature changes in two materials. The pieces that have the same texture are made of the same material. The upper ones have a lower thermal conductivity but a higher thermal diffusivity. The lower ones have a higher thermal conductivity but a lower thermal diffusivity. In both upper and lower setups, the piece on the left side maintains a higher temperature to provide the heat source. Everything else starts with a low temperature initially. The entire container is completely insulated -- no heat in, no heat out. Two thermometers are placed just at the right ends of the middle rods. Their results show that the temperature rises more quickly in the upper setup (Figure 1) -- because it has a higher diffusivity.

The fact that something diffuses faster doesn't mean it diffuses more. In order to see that, we can place two heat flux sensors somewhere in the rods to capture the heat flows. Figure 2 shows the results from the heat flux sensors. Obviously, there is a lot more heat flow in the lower setup in the same time period.

Figure 3 (go to simulation)
The conclusion is that it is the heat flux, not the temperature change, that ultimately measures heat transfer. If you want to know how fast heat transfer occurs, the thermal conductivity is a good measure. However, if you want to know how fast temperature changes, the thermal diffusivity is a good measure. This may be also important to remember for those who use infrared cameras: Infrared cameras only measure temperature distribution, so what we really see from infrared images is actually thermal diffusion and thermal diffusion alone could be deceiving.

Figure 4 (go to simulation)
To make this even more fun (or confusing), let's replace the pieces on the right of the container with two pieces that are made of the same material that has a volumetric heat capacity between those of the other upper and lower ones. You wouldn't think this change would affect the results, at least not qualitatively. But the truth is that, the temperature in the lower setup in this case rises more quickly than the temperature in the upper setup -- exactly opposite to the case shown in Figure 1! The surprising result indicates how unreliable temperature change may be as an indicator of heat transfer. In this case, the temperature field of the middle rod is affected by what it is connected with. If we look at the results from the heat flux sensors (Figure 4), the heat flux that goes through the rod is much higher in the lower setup. This once again shows that heat flux is a more reliable measure of heat transfer.

In Energy2D, we have implemented an Energy Field view to supplement the Temperature Field view to remedy this problem.

Building performance analyses in Energy3D

April 6th, 2014 by Charles Xie
Energy3D (Tree image credit: SketchUp Warehouse and Ethan McElroy)
A zero-energy building is a building with zero net energy consumption over a year. In other words, the total amount of energy used by the building on an annual basis is equal to or even less than the amount of renewable energy it produces through solar panels or wind turbines. A building that produces more renewable energy than it consumes over the course of a year is sometimes also called an energy-plus building. Highly energy-efficient buildings hold a crucial key to a sustainable future.


One of the goals of our Energy3D software is to provide a powerful software environment that students can use to learn about how to build a sustainable world (or understand what it takes to build such a world). Energy3D is unique because it is based on computational building physics, done in real time to produce interesting heat map visualization resembling infrared thermography. The connections to basic science concepts such as heat and temperature make the tool widely applicable in schools. Furthermore, at a time when teachers are required by the new science standards to teach basic engineering concepts and skills in classrooms, this tool may be even more relevant and useful. The easy-to-use user interface enables students to rapidly sketch up buildings of various shapes, creating a deep design space that provides many opportunities of exploration, inquiry, and learning.


In the latest version of Energy3D (Version 3.0), students can compute the energy gains, losses, and usages of a building over the course of a year. These data can be used to analyze the energy performance of the building under design. These results can help students decide their next steps in a complex design project. Without these simulation data to rationalize design choices, students' design processes would be speculative or random.

A complex engineering design project usually has many elements and variables. Supporting students to investigate each individual element or variable is key to helping them develop an understanding of the related concept. Situating this investigation in a design project enables students to explore the role of each concept on system performance. With the analytic tools in Energy3D, students can pick an individual building component such as a window or a solar panel and then analyze its energy performance. This kind of analysis can help students determine, for example, where a solar panel should be installed and which direction it should face. The video in this post shows how these analytic tools in Energy3D work.