Taking Falls

September 23rd, 2011 2 comments

I met Jeremy Bornstein a decade ago when I used to train in Aikido. This is a video of him throwing me around. It turns out I’m really good at falling. 3ric Johanson filmed this with our Phantom v.12 camera at the Hackers conference. The whole thing happens in about 1 second, but here it is slowed down by a couple orders of magnitude. Be sure to watch my fingers and leg turn to butter as they smack on the ground. The aikidoka in the audience will certainly enjoy critiquing my technique.

Meet the New Olfactometer

September 13th, 2011 No comments

Some mosquitoes are unfortunately highly anthropophilic, meaning they seek out humans for their blood meals rather than other animals. But how do these insects find us in the first place? How do they distinguish between a human and a shrub? There is evidence that odor may have something to do with it.

Some smells are stronger attractants than others. In order to test this idea, the guys in the machine shop built the olfactometer you see above.  The device allows a cage of mosquitoes to be secured on the base of the Y, and receiving cages with stimuli on each arm. The swarm is released, presenting each insect with a Frostian decision. This puts each smell, or combination of smells in a head to head showdown for mosquito palatability.

Yet, determining the most popular stimulus is just one use of this device.  The olfactometer can also filter groups of mosquitoes based on their olfactory preferences. We can separate those that are more strongly drawn to cow scent from those more drawn to human scent, and set up further experimentation for each specific population.

There are several other notable features of the olfactometer. Gates at the entrance/exit points (1st & 3rd photos) allow control over the release of both mosquitoes and scent.  There is also hose attachment to anesthetize the insects with CO2 (3rd photo).  A computer fan is attached to the cage at the base to provide air current, distributing the odor from the stimulus cages into the stock cage (4th photo).

Big thanks go  to thank Tom Donaldson for his diligent work, and Ryan Smith for fabulous photography.

Sharing the Load

August 18th, 2011 No comments

It’s one thing to have a powerful supercomputer cluster, it’s quite another thing to use it at its full potential. For anyone who has ever chopped wood, you know that slight changes in one’s stance or grip can dramatically increase the amount force the axe can delivered. Similarly, when dealing with a multi-core computer, over 5,000 cores in our case, slight adjustments in how you run a complex calculation can greatly impact the processing time.

Here’s an example using simplified numbers. Imagine you have 4 cores and each can run 10 instructions per second (IPS). Potentially, your machine could carry out a set of 100 instructions in 2.5 seconds. (100 instructions divided evenly among 4 processors=25 each; divided by 10 IPS=2.5 sec) However, computers don’t intuitively  know how to divvy up tasks. Worst case scenario, all the instructions get sent to one core while the others are left idle. This would take the job 10 seconds to process, which is 4 times as long. The practice of optimizing the distribution of the work load is known as load balancing. When epidemiological simulations are taking hours, days and weeks to process across thousands of cores, effective load balancing becomes crucial.

Applying Load Balancing to Epidemiological Modeling

A few months ago, we received the results of the static load balancing script, which makes sure that each core does an equal amount of work over the epidemiological simulation of Madagascar . While doing further analysis, we found that each core was also spending considerable time waiting for other cores, even though the static load balancing did provide substantial efficiency improvements. This waiting time is due to dynamic load imbalances that average to zero.

Below is an estimation of how we initially split up Madagascar along with the figure of the corresponding relative load by core over time, with no load balancing other than giving equal land areas to each processor.

Equal land area load distribution

Notice the big gap between cores 30 and 50.  In this approach, where the core/processor number corresponds to a specific block region on the map, 30-50 are doing a lot less work than the cores.  This is due to the island’s central plateau, which has very little malaria and thus is an inexpensive simulation. In addition, there are also varying dips along the time axis depending on the location.  These are caused by seasonal differences across the country. The north is always fairly expensive, while the southern arid region has deep troughs during dry season. In a sense, the spatio-temporal patterns of malaria from the north to south of Madagascar are visible in processor loading.

These inconsistencies informed our static load balancing strategy where we divided Madagascar by average malaria prominence. This approach improves matters, and all core rows add up to the same value, but the columns differ at each point in time.

Static load balancing by average malaria prominence

Much better, and the overall job runs much faster, since the more even processor loading reduces the waiting time.

“Loading” is a relatively smooth function of location, however, also dependent on population density, temperature and rainfall.  These factors vary over distances that are much larger than our simulation resolution. So if we grid off the country and divvy up ”pixels” between cores, then every core has an equal sample of every area in Madagascar. This results in automatic static and dynamic load balancing.

Checkerboard balancing

However, there is an overhead cost to checkerboard balancing. With large blocked regions, such as in static load balancing, almost all migration of individuals happens within one of these large blocks and thus within a single core, being handled in local memory with pointers. With a checkerboard, almost all migration is to other cores, and individuals and their infections must be packed, sent in a message, and unpacked. Over the course of a 90 minute simulation, this adds about 6 minutes of overhead.   Yet the elimination of waiting time at synchronization gains time, and the even balancing of the load improves efficiency as well.

At the moment, both static load balancing which avoids the migration overhead, and checkerboard which eliminates processor waiting time both provide good improvements over the basic simulation efficiency.

We are working on dynamic load balancing that keeps areas connected and dynamically balanced. This has the potential to achieve both types of efficiency improvements with less overhead.  We’ll report back when we have the results.

The Turbulence of Dimples

August 9th, 2011 No comments

Turbulence shows up everywhere we look: from the flight of airplanes to golf balls, or the fluttering of a flag to the swinging of suspension bridges. Through the eyes of a fluid dynamicist, “smooth sailing” is something of a rare exception. Turbulence is a type of flow characterized by chaotic and rapid changes in the properties of flow. Yet even though it is commonplace, the physics and mathematics of turbulence are extraordinarily complex, and still very active areas of research. In spite of these difficulties, engineers are constantly confronted by the challenge of dealing with turbulence in their designs because of its ubiquity and importance.  Proper understanding and attention could help prevent another Tacoma Narrows Bridge.

Physicists and engineers often use dimensionless numbers to help talk about and characterize complex phenomena. When it comes to turbulence, at the heart of every discussion is the Reynolds number, named after the British fluid dynamicist Osborne Reynolds. The Reynolds number measures the relative importance of inertial forces to viscous forces in any flow, so an increased Reynolds number corresponds to dominating inertial forces, which results in more chaotic behavior.

Another important factor is the patterns or texture of the surface over which the flow takes place. Shark skin, with its small riblet structures aligned with the motion direction, interacts with the turbulent flow of water slipping past in ways that reduce drag on the animal, enabling it to be a fast swimmer. Dimpled surfaces also interact with turbulent flows in interesting ways. The surfaces of golf balls work to decrease drag and increase the flight distance.

Usually, any feature that results in increased turbulence, improves mixing at the expense of a significant increase in fluidic drag. A ceiling fan stirs up the air in a room.  If you want more air mixing you need to crank up the speed, but this will make the motor work harder.  How hard the motor is working is a measure of the fluidic drag.  Thus, increased drag is usually undesirable because it requires more power to drive the motion.

Under certain conditions however, dimples on the walls of a conduit can be arranged in such a way that they dramatically improve mixing with only little increase in drag. Such designs find applications in heat exchangers, where improved mixing results in higher heat exchanger efficiencies without paying a proportionally large penalty on the pumping costs.

Above, we show results of high performance computational fluid dynamics simulations of turbulent air flow over dimpled surfaces.  Even though the flow would be turbulent in the absence of dimples, presence of dimples gives rise to the formation of additional structures in the flow. For example, rolling vortices shedding off the dimpled cavities are evident in the 1st clip (moderate Reynolds number), which help improve mixing. The second clip examines the variation of flow velocity in just a vertical slice of the total flow, that also occurs at a lower speed.  The last video shows a very similar flow but at a faster flow speed (high Reynolds number).

Story Carding Your Way to TED

July 19th, 2011 1 comment

TED2010 has long past. The presentation went off without a hitch, and that can be attributed to oodles of preparation.  A dozen people were tapped to ready the Photonic Fence for its first public demo.  There was a ton to do: finalizing the software with a handsome interface, constructing custom casing and mounts for the hardware, breeding hoards of backup mosquitoes, testing, tweaking, testing, tweaking…you get the idea.  With so many scrambling to cross off hundreds of tasks, this easily could have turned into a formidable debacle.

In order to streamline workflow, 3ric Johanson pulled a tool from the extreme programmer‘s handbag. Story cards are a visual way to organize tasks. Each item is placed on its own card and clustered based on topic, delegation, sequence, or whatever is appropriate in the moment. Dependencies between tasks are then shown using green arrows. The approach is flexible as items are easily edited or moved, while providing an always up to date big picture for all involved.

The board was hung in a prominent place in the Lab.  As to-do’s were completed, challenges revealed and priorities shifted, the board underwent constant evolution: a tapestry of note cards fluctuating, receding, diverging, with old worn cards giving way to sprightly, fresh, new ones.   Though more impressive was the team’s ability to stay focused and agile.  Ultimately the demonstration garnered a standing ovation at one of the most popular conferences today.  So the next time you’re facing down a beastly project, give story carding a try and report back with your findings.

If you want to see a video summary of all the prep, check out Getting Ready for TED

Blue Swirl

May 24th, 2011 No comments

Just a quick 2 AM camera test before heading to the last Gadgetoff.  Take a beaker of water, a stir plate and one drop of blue dye, then slow it down…way down.  Free vortexes, like what we created here, swirl more strongly at the center with decreasing velocities as you move outward.  These differences in speeds cause the dye to spiral until it’s completely mixed.

However, not all vortexes are born free.  Forced vortexes, on the other hand, consist of fluid rotating together as a single mass. There’s no shearing, at least in theory*, and therefore no mixing.

*…but only under perfect conditions: complete uniformity in the fluid material, consistant rotation, no air friction, etc.


Thanks to Torley for the improvised piano.

 

Colorful Microscopy

May 20th, 2011 No comments

Rheinberg illumination is cool. It came up in conversation recently as a useful tool for viewing blood cells and is a variant of dark field imaging. The process uses color filters placed in the microscope condenser, rather than solely an opaque disk as with traditional dark field. (See the diagram to the right.) This allows high contrast mixes of bright- and dark field images. Variations in the pattern and color of the filtered stop result in different aspects of the specimen being accentuated.

So this week I set out to see what I could do with Rheinberg illumination. CIMG3096I was transported back to 3rd grade as I drew, cut, colored and taped together little pieces of transparent things found around the lab: folders, transparencies, left over birthday decorations, you name it. To the left, are some of the filters I came up with.

The next task was to see what kind of images I could make. Here is a piece of something organic illuminated with normal bright-field and a few different Rheinberg filters. Can you match the images to their corresponding filters?

Rhein3Rhein2image007image002

The next target was blood cells. Here, the image on the left uses a purple center filter, while the right one uses a dark field-like patch stop in the center with a colored outer filter.  Notice the differences in highlighting.

image012image010

Even though I got some good images, and enjoyed the exploration, it turns out Rheinberg illumination isn’t exactly what I’m looking for.  Back to the drawing board =)

Grant and the Oobleck

May 11th, 2011 1 comment

What do quicksand, liquid body armor and silly putty have in common?  They are all a particular type of non-Newtonian fluid know as dilatants, also called shear thickening fluids.  With common Newtonian fluids, temperature is the only factor affecting viscosity.  This is a flow property you’re likely familiar with if you’ve ever warmed up thick maple syrup to drizzle over pancakes.  The viscosities of non-Newtonian fluids, on the other hand, are dependent also on shear stress or time, resulting in the categories of shear thickening, shear thinning, time thickening and time thinning, along with a couple more variations.

Grant Crilly in the kitchen mixed up a batch of oobleck (cornstarch and water) the other day.  Being a shear thickening fluid, the material was runny, and you could easily run your hand through a vat of the stuff as long as you moved slowly.  However, a quick jolt will turn the oobleck into a near solid, bringing the mixing hand to a stop.  Stress or agitation increases the viscosity.  If this stress is applied in a uniform manner, under certain frequencies, otherworldly behavior results.  For our demonstration, a subwoofer hooked up to a frequency generator did the trick.

music by niteffect

YouTube goodness:
Running on a pool of oobleck
Creeping oobleck
More dancing oobleck

Kludge Engineering

May 3rd, 2011 1 comment

We completed a quick proof of concept:   The photonic fence project has been using an expensive lens and large area photodiode in order to detect wing beat frequency.   We knew on paper that this could be replaced cheaply, however, it seemed worth while to do some quick validation.  I ordered some $3 fresnel lenses from Ebay, and replaced our large area photo diode with a much cheaper/smaller part.   Not only did it work , but we had a AMAZING signal to noise ratio on wing beat signal – - due to the large (8.5×11″) area of the fresnel lens.  Total effort of validation:  40 minutes and some tape.   Due to X/Y movement of the retroreflected signal from the laser, we will need one more additional (inexpensive) optical element to keep the signal aligned with the photodiode.

Chatting about Future Tech

April 27th, 2011 No comments

Word on the canal is that over the next few days Pablos will be speaking at the web conference TNW2011 in Amsterdam, immediately followed by the media conference SIME in Vienna. Boris from TNW had a brief pre-show chat (yes, on instant messenger) with Pablos, who shared a snapshot of his vision of the future.  Check out the transcript below.

Boris: You are a hacker, entrepreneur, researcher, space ship builder and professional mosquito assassin. Am I correct?
Pablos: Guilty on all counts.

Boris: Tell me about the assassin part…
Pablos: Bill Gates asked us to work on inventions to help eradicate Malaria. Basically, we take somebody with a problem like that, put them in a room with a nuclear physicist, a laser expert, a computer hacker and a chemist. Collectively, we know about the cutting edge in every area of science & technology so we can cross-pollinate that knowledge to come up with new inventions, for whatever your problem is. In this case, we came up with lasers for mosquitoes which sounded ridiculous, even to us. But now we’ve actually built this system, and it works.

Boris: It sounds awesome and gets you massive geek credit. But aren’t nets easier and cheaper?
Pablos: They’re a big help, but they’re often used ineffectively. To get rid of malaria entirely, we’re going to need a variety of tools. So we’re inventing some more tools. The “Photonic Fence” is a way to put a perimeter defense around a clinic, or a village, and just kill all the mosquitoes before they get to the humans.

On Spaceships

Boris: Yeah, as I said: awesome. Anything involving lasers is cool (watch the video here, it is amazing stuff!). I’ll also bet that the line ‘I used to build spaceships’ goes over well as a pickup line?
Pablos: Oh yeah, if you are trying to pick up space cadets anyway. I worked for Jeff Bezos, trying to research crazy alternatives to rockets for getting into space. There are some great ideas out there, but none of them has had as much development as rockets. It is a lot easier to build rockets, because of the billions NASA has spent on them in the past. We can learn so much from that work.

Boris: Space elevators? Anything crazier than that?
Pablos: Space elevators have some potential, mainly from the notion of “beaming” power from the ground. If you did that, you wouldn’t be hauling all your fuel up into space with you!

Boris: Right, laser powered space sails…
Pablos: Neal Stephenson worked with me on that, and has written about it recently for Slate. He does a better job than I can of describing why rockets are entrenched. We also worked on some even crazier ideas. One of them was to build a gargantuan whip, and attach the payload to the tip. Use that to fling a payload into space. And crazy as it sounds, if NASA spent billions of dollars over decades on that, they could probably make it work!

Read more…