Wednesday, November 28, 2012

Relativistic Gaming Fun

How many games can you name off the top of your head that involve simulating the effects of relativity? Before Sunday I'd have had a hard time naming even one, but since then I've discovered not just one, but two.

The first one is a simple Flash game called Velocity Raptor, a game that takes place in two dimensions of space and one of time, right from the comfort of your own web browser! It features a whimsical art style and story suitable for all ages, and calming, ambient music. This game simulates the effects of special relativity by slowing the speed of light down to 3 miles per hour. Naturally, this changes things in ways that we are not normally equipped to think about, and the game is mind-bending while still managing to be fun. It builds up, introducing you first to a Newtonian world, then the world of relativity as measured (without taking into account light travel time), then finally the world as seen, where light takes a noticeable amount of time to reach you and things begin to appear to deform in wild and amazing ways. I found myself smiling quite a bit while playing this game as I watched the world around my character (the eponymous Velocity Raptor) warping and stretching . The progression is done well, introducing new concepts (such as the Doppler shift, or the relativity of simultaneity) in simple cases before tasking you with using your new-found knowledge to solve a puzzle to advance. (It actually reminds me a bit of Portal and Portal 2's approach to teaching new concepts, and I think that's a great thing. More games should be like that.) Be warned, the last levels are very difficult.

The second game I came across is called A Slower Speed of Light, produced by the MIT Game Lab (no, I didn't know MIT had a game lab before either). This game is an actual stand-alone program that you have to download (it's free) and run on your computer. Unlike Velocity Raptor, it's a full three-dimensional (well, four-dimensional, since it involves relativity) first-person view game. Similar to Velocity Raptor, it involves slowing down the speed of light rather than you moving close to the measured speed of light. However, it goes about it differently: in the game, your goal is collect 100 orbs, each of which, when collected, slows down the speed of light by a little bit. This has the effect of starting you in a basically Newtonian world that gradually gets more and more relativistic as you collect more orbs. The final ones can prove challenging to collect, not because of any obstacles, but because it can be difficult to judge position accurately when turning at near light-speed. The simulation mostly involves the Doppler shift and the Searchlight Effect, but upon collecting all 100 orbs those effects are turned off and speed of light is dropped to just above your walking speed, allowing you to see the Lorentz transformations that take place at significant fractions of light-speed. It's a lot easier than Velocity Raptor in that there is no way to actually lose, and watching spacetime warp and deform around you in first-person view is incredibly cool. The game authors are working on cementing the underlying game engine and planning to release it sometime next year as open-source software, so hopefully we'll start seeing more games that are truly relativistic.

I can definitely recommend these games to any aspiring physicists out there. It's incredibly cool to see these relativistic concepts come alive. But even if you're not a physicist, you can play them and experience some of the fun we get to have discovering these ideas!

Friday, November 23, 2012

Hauʻoli Lā Hoʻomaikaʻi!

Happy Thanksgiving everyone!

Once again it's that time of year where I am reminded how thankful I am to have loving family and friends, a steady job (even if I did have to work this evening), and a good living situation.

Speaking of working, I was able to see what kind of Thanksgiving dinner the cooks made up at Hale Pōhaku:

I will note that this is actually not my plate, but that of a friend of mine. I only thought to take a picture of our Thanksgiving dinner after I saw him doing so, and since I'd already cleared half my plate I asked to use his. Also, I hadn't noticed the cranberry sauce on the salad bar. That minor detail was easily fixed, and all in all I had a pretty good Thanksgiving dinner. The weather was completely overcast the entire evening as well, so it was nice and quiet at the VIS, for which I was thankful. Hope your Thanksgiving was as pleasant as mine!

Wednesday, November 21, 2012

The Internal Energy of Air

You know how sometimes, as you're going about your daily life, a completely random thought leads to you suddenly being intensely curious about something and unable to rest until your curiosity has been sated? This weekend I was thinking about nothing in particular while setting up for the morning at work, when I got the burning desire to know how much internal energy a cubic meter of air contained.

The nice part of being a physicist is that I can satisfy these urges, and the nice part of having a blog is that I can share it with other people! So without further ado, let's attempt to calculate the internal energy of 1 cubic meter of air at standard atmospheric pressure and room temperature (around 80 °F, or specifically for ease of calcuation, 300 kelvin).

This is actually fairly simple in theory. There exists a simple equation in thermodynamics for the internal energy of an ideal gas: \begin{equation}U=\frac{N}{2}nRT\tag{1}\end{equation} In this equation, U is the internal energy locked up in each of the N degrees of freedom of the gas, n is the number of moles of gas, the constant R is the ideal gas constant with value \(8.3144621\ \text{J}/(\text{mol}\cdot\text{K})\), and T is the absolute temperature in kelvins.

Now, at this point I should probably elaborate on what internal energy is and what it has to do with degrees of freedom. As I'm sure you know, the temperature of a system is merely a measure of the average energy of its constituent particles. This energy is called the internal energy of the system and can be stored in several different ways, each of which is known as a degree of freedom: in the motions of particles (atoms or molecules), in the rotation or vibration of molecules, or in the excitation and relaxation of electrons in the atoms (not all of these actually apply to all systems, as we shall see).

In thermodynamics there is a theorem known as the equipartition theorem that states that the available internal energy of a system is equally divided among all of its degrees of freedom. If we look at an ideal monatomic gas (such as any of the noble gases), it has only three degrees of freedom, corresponding to the three ways the particles making up the gas can move in three dimensions. Technically, the energy stored by electrons being excited in the atoms could count as another degree of freedom, but at the relatively low temperatures we're considering for this problem there is very little excitation going on and we are free to ignore this effect.

This would be fine if we were considering a monatomic gas, but we are interested in air, which is primarily composed of two diatomic gases: nitrogen (78%) and oxygen (21%). (The monatomic gas argon makes up about 90% of the remaining ~1% of the atmosphere, so we will simply assume that it is all argon for simplicity.) Diatomic molecules bring a new factor into the equation, as they can rotate in two dimensions around their long axis, and since energy can be stored in their rotational motion, this gives them another two degrees of freedom. Diatomic molecules can also store energy in the bond between them, and while this could count as another degree of freedom, in practice it takes temperatures much higher than we are considering here for this to be a significant effect.

So, in summary, monatomic gases have 3 degrees of freedom, representing the kinetic energy associated with their motion through three-dimensional space; diatomic gases – at the temperatures we are interested in – have 5 degrees of freedom since they have the ability to rotate as well. (If I was looking at much higher temperatures I'd have to take into account that vibrational mode I neglect here.)

The upshot of that lengthy diversion is that equation (\(1\)) above looks like \(\frac{3}{2}nRT\) for monatomic gases and \(\frac{5}{2}nRT\) for diatomic ones. Since R is a constant and we have a temperature in mind already, all that remains is to find n, the amount of each type of gas.

The n in that equation refers to moles of gas. The mole (abbreviated mol) is a unit used in chemistry and physics to represent a quantity of substance in terms of the number of particles (atoms or molecules) that make it up. A closely related concept is that of Avogadro's Number, \(6.022\times10^{23}\) (named after the Italian scientist Amadeo Avogadro). One mole of a substance is simply the amount of that substance that contains Avogadro's number of particles in it (it's slightly more complicated than that, but this will suffice for our purposes). Avogadro's number may seem arbitrary, but it is actually measured and defined such that if you have an amount of a substance in grams equal to its mean atomic mass in daltons, then you have one mole of that substance. (The name dalton is given to the unit of mass formerly known as the atomic mass unit, a handy measure for measuring the weight of atoms. It is roughly equivalent to the mass of a nucleon.)

For example: a hydrogen atom has a mean atomic mass of \(1.01\) daltons. Hydrogen typically combines with itself to form dihydrogen gas, H\(_2\). Thus dihydrogen gas has a mean molecular mass of \(2.02\) daltons. If you have \(2.02\) grams of dihydrogen gas, you then have one mole (\(6.022\times10^{23}\)) of dihydrogen gas molecules. Oxygen (mean atomic mass \(16.00\) daltons) likewise combines to form dioxygen (O\(_2\)) with a mean atomic mass of \(32.00\) daltons. If you have \(32.00\) grams of dioxygen gas, you then have one mole of dioxygen molecules. Combining the two to make water, H\(_2\)O, gives water a mean atomic mass of \(18.02\) (\(2\times1.01+16.00\)), so if you have \(18.02\) grams of water, you have one mole of water molecules.

Anyway, this lengthy preface should hopefully enable you to follow what should be a fairly straight-forward calculation, which we are finally ready to begin.

First off, we need to find the number of moles of oxygen, nitrogen, and argon in one cubic meter of our theoretical approximation of air. We can do that by first finding the density of air at our specified conditions (300 K, ~80 °F and 1 standard atmosphere of pressure, 101.325 kPa), then multiplying by the fractions established before to find out how much mass of each gas exists, before converting that mass into moles of each gas to fit the equation.

There is a equation for the density of dry air (which we are assuming it is) given by \[\rho=\frac{P}{R_{\text{specific}}T}\] In this equation, \(\rho\) (the Greek letter rho) stands for density (in kg/m\(^3\)), P stands for pressure, R\(_{\text{specific}}\) is a version of the ideal gas constant specifically for dry air equal to 287.058 J/(kg\(\cdot\)K), and T is again the temperature in kelvins.

Putting in the numbers and doing the math, we get:
\begin{align}\rho&=\frac{101,325 \frac{\text{N}}{\text{m}^2} }{287.058 \frac{\text{N}\cdot\text{m}}{\text{kg}\cdot\text{K}} \cdot300.00\ \text{K}}\\
Since we are assuming a single cubic meter of air, our mass of air consists of 1.1766 kg (about 2.6 pounds of air). Multiplying by the fractions we assumed for each of the ingredients, we get:
m_{\text{N}_2}&=0.78\cdot1.1766\ \text{kg}=0.9177\ \text{kg}=917.7\ \text{g}\\
m_{\text{O}_2}&=0.21\cdot1.1766\ \text{kg}=0.2471\ \text{kg}=247.1\ \text{g}\\
m_{\text{Ar}}&=0.01\cdot1.1766\ \text{kg}= 0.0118\ \text{kg}=11.8\ \text{g}
Now that we have the masses involved, we can convert to moles using their mean atomic masses:
n_{\text{N}_2}&=917.7\ \text{g}/28.013\frac{\text{g}}{\text{mol}}=32.762\ \text{moles}\\
n_{\text{O}_2}&=247.1\ \text{g}/31.9988\frac{\text{g}}{\text{mol}}=7.7222\ \text{moles}\\
n_{\text{Ar}}&= 11.8 \ \text{g}/39.948\frac{\text{g}}{\text{mol}}=0.29538 \ \text{moles}
Having now obtained the number of moles of each gas in our hypothetical approximation to air, we can now use equation (\(1\)) to calculate the amount of internal energy each gas contributes to the whole.
U _{\text{N}_2}&=\frac{5}{2}\cdot32.762\ \text{mol}\cdot8.314\frac{\text{J}}{\text{K}\cdot\text{mol}}\cdot300.00\ \text{K}=204.3\ \text{kJ}\\
U_{\text{O}_2}&= \frac{5}{2}\cdot7.7222\ \text{mol}\cdot8.314\frac{\text{J}}{\text{K}\cdot\text{mol}}\cdot300.00\ \text{K}=48.12\ \text{kJ} \\
U_{\text{Ar}}&=\frac{3}{2}\cdot0.29538\ \text{mol}\cdot8.314\frac{\text{J}}{\text{K}\cdot\text{mol}}\cdot300.00\ \text{K}=1.105\ \text{kJ}
This gives us a total of
\[ U _{\text{N}_2}+ U_{\text{O}_2}+ U_{\text{Ar}}=253.5\ \text{kJ}\]
That...actually turns out to be a bit more than I was expecting. That's a quarter of a million joules of energy contained in the motion and rotation of the air molecule in a single cubic meter of air.

To put this number in perspective, let's do some conversions to units you may be more familiar with. That many kilojoules is almost exactly 60 kilocalories (or Calories), the unit the energy in food is measured in. Put another way, the normal energy needs of an adult human are typically pegged at around 2,000 Calories per day. If you could somehow extract the energy from air, you'd need only about 33 cubic meters of air per day to survive, a volume smaller than the amount of air in most average-sized homes. Alternatively, the average amount of solar power over a 1 square meter area at the Earth's surface is about 1 kilojoule per second (1 kilowatt), so the amount of energy we calculated is equivalent to the amount hitting an area of 253,500 square meters (a quarter of a square kilometer) every second during full daylight. There's a lot of energy locked up in the air around you.

In a sense, though, I suppose I really shouldn't be too surprised. Gas molecules in the air whiz about at great speed, and this speed comes from the kinetic energy they have. In fact, we can estimate the root-mean-square speed of a typical nitrogen molecule fairly easily (the M is the molar-mass of the gas, in kg/mol):
&=\sqrt{\frac{3\cdot 8.314\frac{\text{J}}{\text{K}\cdot\text{mol}}\cdot300.00\ \text{K}}{0.028013\frac{\text{kg}}{\text{mol}}}}\\
\end{align}In case you're wondering, that a whopping 1,156 miles per hour. Those nitrogen molecules are, on average, moving about that fast (oxygen and argon move a bit slower, since they're more massive). So I guess when you consider billions upon billions of tiny atoms all zooming around at speeds comparable to this, it makes sense that there's a lot of energy tied up in their motion as kinetic energy. Wow. Amazing stuff.

Wednesday, November 14, 2012

Making Fudge.

Today I made fudge for the first time, and am currently munching on the first-fruits of my labors. Well, labors may be too strong a word – the whole process took fifteen minutes from start to finish, tops. It turned out to be easier than I was expecting, though it was still a good learning process. Some things I learned:
  1. If a recipe includes phrases like “stirring constantly” in it, it's probably a good idea to get any ingredients that come later in the recipe ready before becoming trapped in a cycle of time-critical stirring from which you can't break away.
  2. Pure vanilla extract? Very strong flavor. Very, very strong. Discovered this after spilling a bit (due to the hasty way I was rushing to open the bottle) and idly licking it off my fingers. I'd heard that before, of course, but wasn't quite expecting that particular burst of flavor.
  3. Molten fudge has a consistency close to that of pāhoehoe lava, if the shapes it formed as it cooled and congealed in the pan are any indication. Especially so soon after my trips through the Kaumana lava tubes, I was struck by the many similarities between the rock formations there and the fudge formations that formed in my pan. Fudge: chocolate lava. Or is it lava: rock fudge? Fudge:chocolate::lava:rock? (If you'll pardon the logical formalism.)
All in all an interesting experience. Since it turned out to be so easy, and I do love fudge, I'll probably continue to make it in the future.

Saturday, November 10, 2012

Cave Photography, Part 2

As promised in my last post, here are the pictures from the second part of my latest spelunking trip. I'd have had it up earlier but for working quite a bit over the last week and not feeling up to the task of writing this post, which will probably take me at least an hour.

Anyway, after exiting from the mauka side (uphill, left in this case) of the cave, we proceeded into the makai side (downhill, right in this instance). This side of the tube has a much larger entrance that allows light to shine much further into it.

View from just inside the entrance, with the steps from last post in the background.
I was so enthralled with the view back out the entrance, that it took me a few minutes to turn around and actually look inside the cave. When I did, imagine my surprise and delight to find an amazing example of a tube-in-tube formation not more than fifty feet into the cave!

A tube-in-tube is a structure that forms inside lava tubes for reasons that have to do with why lava tubes form in the first place. As the lava level in the tube drops, it begins to cool and can eventually form a hard crust on its surface within the original tube. Sometimes this crust can break in places when the volume of lava coming through the tube picks up again, and you get this neat effect where the rim of the break is coated in a layer of smooth, liquid-looking rock where the lava surged out of the hole, then flowed back in.

Anyway, one of these formations lies just within the makai opening.

Tube-in-tube formation just inside the cave, looking back.
In the picture you can see the extremely smooth rock around the edges where the lava surged up and down, and also the rougher rock forming the crust over the channel in the middle.

View of the cave entrance from just beyond the tube-in-tube formation.
Counter-intuitively, the tube-in-tube formation doesn't exactly cover the entire floor of the lava tube. Instead, it has these sort of ridges (officially called “­levees”) that stand up vertically out from the walls of the tube roughly parallel to them and act as the sides of the channel. Already at this point they're much more pronounced than they ever are in the mauka side of the tube, but further on they're even more impressive. You can kind of see the gap between the levee and the wall in the bottom-left corner of the picture.

Same view without flash to better capture the feel of the cave.
This picture does a better job of capturing the view, although the walls and ceiling are still a bit brighter than they appear to the eye.

Another view of the entrance from further in. Note the hanging roots and sulfur on the walls.
One thing that struck me about the makai side is that light from the entrance is visible much further in than it is on the mauka side. This picture is probably between a hundred and two hundred feet in, and the opening is still visible. Compare to the mauka side, where the nature of the entrance is such that by fifty feet in it's pretty much pitch black.

I believe this is a mild case of what are called “shark-tooth stalactites”.
Another thing I'm learning from all this cave photography is the importance of shadow for establishing depth, and the need to keep in mind that in a cave, you make your own shadows. It's an interesting learning experience.

Example of a levee.
Remember those levees I mentioned earlier in the post? Here's a shot showing a nice example of one.You can see how it sits about a foot from the wall, and closely parallels it, even around curves. Here the crust on top of the tube-in-tube formation wasn't strong enough to avoid collapse when the lava flowing through it dried up, leaving only the stronger sides as levees.

More of the levee on the floor, and a ledge above it about waist high.
Further on down the cave, the ledges on either side of the tube come together, and you have to climb up about waist height onto a thick ledge to continue. The lava flows in the area make some really strange looking shapes.

Hardly looks like solid rock, does it?
This part of the cave is very interesting, as the tube is split roughly in half by a ledge of reddish congealed lava of varying thickness. Holes appear in it periodically where lava surged up through the cooling crust and flowed back down. In the area beneath are some really nice examples of pāhoehoe lava:

Pāhoehoe lava in the lower half of the lava tube.

Here you can see one of the holes where ledge was especially thick.

Finally, at the point we reached before having to turn back due to prior engagements the ledge again split into two ledges on the sides of the tube before disappearing entirely as the whole tube abruptly shrank in size, in a manner very reminiscent of a river coming together before entering a narrow canyon to form rapids.

Here the ledge splits apart again before the tube narrows. This rock may have been placed by lava.
All in all, it was a fascinating journey, and I would love to go back and go all the way through. Since the next part of the cave appears to be some sort of “lava rapids”, I expect it should be pretty cool. Next time though I need to remember to bring gloves for crawling around, as the makai side seems to have a lot more low-hanging areas best suited to crawling than the mauka side. A hui hou!

Saturday, November 3, 2012

Cave Photography, Part 1

This past week my friend and I were able to get back to the Kaumana lava tube for some more exploring. Last time we had noticed a small tunnel branching off from the main tube on the uphill side that we wanted to explore, and of course the entirety of the downhill side was as yet unexplored. This time around, armed with a good flashlight and the knowledge I learned from writing my last post I took a lot more pictures. So many more that I'm going to break this post into two pieces. Today I'll post about our second trip into the uphill side, and Monday I'll try to finish detailing our trip downhill.

After making a circuit completely around the skylight to get a good view, we proceeded into the uphill side a second time to find the branching tunnel.
A picture of the lava flow of 1881 near the mouth of the cave. This is what 130-year-old lava looks like.
I actually got a shot of the entrance to the uphill side this time.

These are the steps going down into the tube. And my feet.

Nice picture from just inside the entrance to the uphill side.
Lava ball in the uphill side.
One neat thing I discovered while researching terminology for my last post was the concept of “lava balls”, basically chunks of rock that fall into the lava (perhaps collapsing off the ceiling) and get carried along like a leaf in rapids, picking up additional layers of lava as they go much as a snowball rolling down a hill accretes snow.

Also, from the various reading I've done, I think that the mineral coating the walls that makes the white color may be gypsum, as it seems to like to crystallize on the walls of lava tubes.

A better picture of the numerous lavacicles that cover the roof in place. Watch your head!

While traversing the cave this time, I noticed the opening seen in the picture on the left and was struck by a memory of my visits to Petra in Jordan. The picture on the right is from my visit in 2008, and shows the end of the wadi (or siq) by which one accesses the city nowadays. Through the gap is visible the famous “Treasury”, probably best known from Indiana Jones and the Last Crusade. Now that I compare the pictures side by side I guess it's not a great similarity, but it struck me when I saw it.

Extruded lava on the cave wall.
Another cool feature I noticed (now that I knew to look for it) was extruded lava. Basically, this is where lava in the cave wall is forced out as it cools. Because it's cooling, however, it has a consistency roughly akin to syrup, so it just sort of dribbles out. Once I noticed this feature, I started seeing them all over.

Tubular lava helictite.
This particular structure here is another, rarer, example of the same phenomenon. It's known as a tubular helictite, and comes about as cooling lava is forming a stalactite, but the fact that it's cooling causes it to crystallize and bend in different directions. These structures are fairly rare to begin with, and are easily broken by humans, so I was quite excited to actually find one.

Yet another example of cooling, extruded lava. This bit looks like a plate of spaghetti or something.
Where the cave floor meets the "curb" at the wall.
Honestly, this picture is just to show off the amazingly vivid reddish-orange colors of the cave more than anything. Cave photography is similar to astrophotography in that these colors don't really appear to the eye, unless perhaps you have a very powerful light. A camera flash qualifies as such, so it's able to capture some of the beautiful colors found here underground.

Entrance to small side tunnel.
As we were walking up towards where we'd seen the entrance to the side tunnel, we noticed what looked like another such entrance. In our new “explore everything” mode we decided to see where it went, only to find that it connected back to the main tube after a mere 30 feet, and in fact turned out to be the opposite end of the side tunnel we were originally meaning to explore. It was cool, a smaller tube about 7-8 feet tall and maybe 5-6 feet wide.

On the main tube floor near the other end of the side tunnel, I found some neat pāhoehoe features frozen in the floor.

It looks like water ripples, doesn't it? And yet it's solid rock.
Sulfur deposits in Kaumana Caves.
Another source of color in the caves are the occasional sulfur deposits seen on the walls. I think the yellow color is quite pretty.

Tiny gutter along the wall.
Finally, as we were heading back to the entrance, I noticed this little formation along the wall. It's hard to see in this picture, but the red area is slightly depressed compared to the rest of the floor. It's the beginning of what's called a “gutter” – a small trough that forms along and parallel to the walls of the tube as the lava inside begins to cool on the outsides and forms a smaller tube-within-a-tube for itself. I was quite excited to see one after reading about them, but little did I know that compared to the ones I was about to see, this one would be so small as to hardly warrant a mention.

Anyway, that's it for this post! Tune in next week when I have pictures of (a section of) the downhill side of Kaumana Caves! Spoiler: there's a lot of even cooler stuff in it.