Saturday, June 14, 2014

Towards a multiphysics Energy2D

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.

Saturday, May 31, 2014

Global pattern of insolation predicted by Energy3D

Figure 1. Global insolation pattern from Pole to Pole
The Sun's power drives the climate of the Earth. Accurately modeling the incident solar radiation, namely, insolation, at a given location is important to the design of high-performance buildings. As I have blogged last week, the insolation calculation in our Energy3D software considers the incident angle of the Sun to the surface, the duration of the day, and the air mass. And we have recently incorporated the effect of altitude and the ambient inputs.

Figure 2. Real data for the three locations (source)
In Energy3D, we can easily investigate the global pattern of insolation by horizontally placing a sensor module on the ground and then collecting the sensor data throughout the year. We can easily change the latitude and collect a new set of data. Figure 1 shows the global insolation pattern from the North Pole to the South Pole. The time integral of each curve represents the total solar energy a location at the corresponding latitude receives. There is an interesting observation from Figure 1: The Equator doesn't actually have the highest peak value and its peak values are not in the summer but in the spring and fall. However, because the insolation does not differ very much from season to season in the Equator, its time integral is much larger, which is the Equator is hot all year round.
Figure 3. Energy3D's prediction


How accurate are the predictions of Energy3D? Let's pick three locations that someone has collected real data, as shown in Figure 2. More insolation data can be found on this website. (Surprisingly, the peak solar energy at the South Pole is higher than the peak solar energy at the Equator.)

Figure 3 shows that the insolation values predicted by Energy3D. As you can see, the predicted trend agrees reasonably well with the trend in the real data. Overall, Energy3D tends to underestimate the insolation by about 50% (after unit conversion), however.

Monday, May 26, 2014

The effect of air mass on building solar performance

Figure 1
As it travels through the atmosphere of the Earth, the light from the Sun interacts with the molecules in the air and are scattered or absorbed, causing the radiation energy that ultimately reaches the ground to weaken. This effect is more significant in early morning or late afternoon than at noon because sunlight has to travel a longer distance in the atmosphere before reaching the ground (Figure 1) and, therefore, has a higher chance of being scattered or absorbed in the atmosphere. This is also why stars appear to be less bright at the horizon than above head.

In solar energy engineering, this effect is called the air mass, which defines the length of the sunlight’s path through the atmosphere (not to be confused with air mass in meteorology, which defines a volume of air that can be as large as thousands of square miles).

Why is the air mass important to predicting solar energy performance of a building?

Figure 2
Let's consider a high latitude location like Boston. For a south-facing window, the Sun is lower in the sky in the winter, causing more solar energy to shine into the house, compared with the case in the summer. This is known as the projection effect (Figure 2). Does this mean that we get a lot more solar energy from the window in the winter like the cross-sections of the solar beams in Figure 2 seem to indicate? Not so fast.

In Boston, the day in the winter can be as short as 9 hours and the day in the summer can be as long as 15 hours. So even if the projection effect favors the winter condition, the duration of the day doesn't. Our calculation must consider these two competing factors. After these considerations, the solar energy the window gains in 12 months is shown in Figure 3: It turns out that the window still gets more energy in the winter -- the projection effect wins big!

For now.

OK, let's now include the effect of the air mass in the calculation. Big surprise (at least to me when I first saw the results)!

Figure 3
Figure 4 shows that a south-facing window no longer picks up the highest amount of solar energy in the winter. Its solar gain peaks in the spring and fall and the difference between the summer value and the winter value decreases dramatically.

As comparisons, Figures 3 and 4 also show the results for a west-facing and a north-facing window, both peaking in the summer (for different reasons that we will not elaborate here).

Figure 4
Is this finding the universal truth? Not at all! It turns out that the peak solar gain of a south-facing window depends on the latitude. Figure 5 shows the comparison of four locations from Miami to the North Pole. In Miami, the energy gain peaks in the winter and declines almost to zero in the summer. In contrast, at the North Pole (to which anywhere else is south), the energy gain peaks in the summer and is nearly zero for almost six months. The situation of Moscow is between Boston and the North Pole, with the peaks moving more towards the summer and are less distinguishable.
Figure 5

Given Figure 5, the fact that a south-facing window in Boston receives peak solar energy in the spring and fall becomes comprehensible now -- by the law of mathematics, the transition from the Equator to the North Pole must be smooth and the energy peak of any latitude in-between must be somewhere between winter (the season of peak energy in the Equator) and summer (the season of peak energy in the North Pole).

Interestingly enough, the peak energy at the North Pole is comparable to that at any other location in Figure 5. Considering that the Arctic has 24 hours of sun in the summer and the projection effect reaches maximum, this result is in fact a good demonstration of the air mass effect. Without the air mass, the North Pole would have gotten three times of solar energy as it does now, making the Arctic a tropical resort in the summer. Our planet would have been quite different.

All these analytic capabilities are freely available in our Energy3D software and all you need to do are some mouse clicks and some thinking. For the air mass calculation, you can choose to use the Homogeneous Sphere Model (default) or Kasten-Young Model. You can also turn the air mass off temporarily to evaluate its effect, just like what I showed in this article -- this is a piece of cake in Energy3D but is impossible to do in reality because you cannot turn the atmosphere off!

Wednesday, May 7, 2014

Iranian studies show the effectiveness of Molecular Workbench

A Molecular Workbench virtual experiment used in the Iranian study.
In the May Issue of Journal of Educational and Social Research, published by MCSER (Mediterranean Center of Social and Educational Research) in Rome, researchers from Iran and Malaysia reported that "students who were taught using the Molecular Workbench software performed better in post-tests on five chemistry topics as compared with those who received conventional instruction." This study was conducted in Iranian secondary schools with 70 students. The researchers also reported that "students using the software also found this software useful in the learning of chemistry." Their paper, titled with "Molecular Workbench Software as Computer Assisted Instruction to Aid the Learning of Chemistry", is freely available in this open-access journal. The authors are Elaheh Khoshouie, Ahmad Fauzi Mohd Ayub, and Farhad Mesrinejad, from two universities in Iran and Malaysia, respectively.

This example, once again, demonstrates the power of visualization in science education. Regardless of the culture or religion children may have grown up with, scientific visualization transcends all the man-made barriers to convey science messages to the young minds. In the case of Molecular Workbench, the effect is even more profound because the heart of it has actually been written in the universal language of humanity -- mathematics.